Skip to content

Commit

Permalink
Conditionalize plugin related wrapper (flutter#25540)
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkezone authored Apr 12, 2021
1 parent d9bdc46 commit 4bc4143
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class PluginRegistrarWindows : public PluginRegistrar {

FlutterView* GetView() { return view_.get(); }

#ifndef WINUWP
// Registers |delegate| to receive WindowProc callbacks for the top-level
// window containing this Flutter instance. Returns an ID that can be used to
// unregister the handler.
Expand Down Expand Up @@ -80,8 +81,10 @@ class PluginRegistrarWindows : public PluginRegistrar {
registrar(), PluginRegistrarWindows::OnTopLevelWindowProc);
}
}
#endif

private:
#ifndef WINUWP
// A FlutterDesktopWindowProcCallback implementation that forwards back to
// a PluginRegistarWindows instance provided as |user_data|.
static bool OnTopLevelWindowProc(HWND hwnd,
Expand Down Expand Up @@ -113,14 +116,17 @@ class PluginRegistrarWindows : public PluginRegistrar {
}
return result;
}
#endif

// The associated FlutterView, if any.
std::unique_ptr<FlutterView> view_;

#ifndef WINUWP
// The next ID to return from RegisterWindowProcDelegate.
int next_window_proc_delegate_id_ = 1;

std::map<int, WindowProcDelegate> window_proc_delegates_;
#endif
};

} // namespace flutter
Expand Down

0 comments on commit 4bc4143

Please sign in to comment.