Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

WINUWP: Conditionalize plugin related wrapper #25540

Merged
merged 1 commit into from
Apr 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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