Skip to content

Commit d86ec05

Browse files
authored
Remove platform window handle in flutter_platform_view.h (#212)
* Remove platform window handle at flutter_platform_view.h * It will be replaced by ``FlutterDesktopGetWindow`` Signed-off-by: MuHong Byun <[email protected]> * Rename ``FlutterRegisterViewFactory`` to ``FlutterDesktopRegisterViewFactory`` Signed-off-by: MuHong Byun <[email protected]>
1 parent 68e2976 commit d86ec05

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

shell/platform/tizen/flutter_tizen.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,10 @@ void FlutterDesktopNotifyAppIsDetached(FlutterDesktopEngineRef engine) {
179179
EngineFromHandle(engine)->lifecycle_channel()->AppIsDetached();
180180
}
181181

182-
void FlutterRegisterViewFactory(
182+
void FlutterDesktopRegisterViewFactory(
183183
FlutterDesktopPluginRegistrarRef registrar,
184184
const char* view_type,
185185
std::unique_ptr<PlatformViewFactory> view_factory) {
186-
view_factory->SetWindow(registrar->engine->renderer()->GetWindowHandle());
187186
registrar->engine->platform_view_channel()->ViewFactories().insert(
188187
std::pair<std::string, std::unique_ptr<PlatformViewFactory>>(
189188
view_type, std::move(view_factory)));

shell/platform/tizen/public/flutter_platform_view.h

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ class PlatformView {
1919
PlatformView(flutter::PluginRegistrar* registrar,
2020
int view_id,
2121
void* platform_window)
22-
: platform_window_(platform_window),
23-
registrar_(registrar),
22+
: registrar_(registrar),
2423
view_id_(view_id),
2524
texture_id_(0),
2625
is_focused_(false) {}
@@ -46,9 +45,6 @@ class PlatformView {
4645
virtual void DispatchKeyDownEvent(Ecore_Event_Key* key) = 0;
4746
virtual void DispatchKeyUpEvent(Ecore_Event_Key* key) = 0;
4847

49-
protected:
50-
void* platform_window_;
51-
5248
private:
5349
flutter::PluginRegistrar* registrar_;
5450
int view_id_;
@@ -59,8 +55,7 @@ class PlatformView {
5955
class PlatformViewFactory {
6056
public:
6157
PlatformViewFactory(flutter::PluginRegistrar* registrar)
62-
: platform_window_(nullptr),
63-
registrar_(registrar),
58+
: registrar_(registrar),
6459
codec_(flutter::StandardMessageCodec::GetInstance(nullptr)) {}
6560
virtual ~PlatformViewFactory() {}
6661
flutter::PluginRegistrar* GetPluginRegistrar() { return registrar_; }
@@ -72,10 +67,6 @@ class PlatformViewFactory {
7267
double height,
7368
const ByteMessage& parameters) = 0;
7469
virtual void Dispose() = 0;
75-
void SetWindow(void* platform_window) { platform_window_ = platform_window; }
76-
77-
protected:
78-
void* platform_window_;
7970

8071
private:
8172
flutter::PluginRegistrar* registrar_;
@@ -86,7 +77,7 @@ class PlatformViewFactory {
8677
extern "C" {
8778
#endif
8879

89-
FLUTTER_EXPORT void FlutterRegisterViewFactory(
80+
FLUTTER_EXPORT void FlutterDesktopRegisterViewFactory(
9081
FlutterDesktopPluginRegistrarRef registrar,
9182
const char* view_type,
9283
std::unique_ptr<PlatformViewFactory> view_factory);

0 commit comments

Comments
 (0)