Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Unified Diff: services/window_manager/window_manager_app.cc

Issue 924653002: Use StrongBinding instead of InterfaceImpl in wm event dispatcher (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/window_manager/window_manager_app.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/window_manager/window_manager_app.cc
diff --git a/services/window_manager/window_manager_app.cc b/services/window_manager/window_manager_app.cc
index c35c5ff963b2fce9ad5980b73e40f4f15750f0be..9b1a87b0b1ae362272a3809e3182508683269eaa 100644
--- a/services/window_manager/window_manager_app.cc
+++ b/services/window_manager/window_manager_app.cc
@@ -53,7 +53,6 @@ WindowManagerApp::WindowManagerApp(
ViewManagerDelegate* view_manager_delegate,
WindowManagerDelegate* window_manager_delegate)
: shell_(nullptr),
- native_viewport_event_dispatcher_factory_(this),
wrapped_view_manager_delegate_(view_manager_delegate),
window_manager_delegate_(window_manager_delegate),
root_(nullptr) {
@@ -152,7 +151,7 @@ void WindowManagerApp::Initialize(mojo::ApplicationImpl* impl) {
bool WindowManagerApp::ConfigureIncomingConnection(
ApplicationConnection* connection) {
- connection->AddService(static_cast<InterfaceFactory<WindowManager>*>(this));
+ connection->AddService<WindowManager>(this);
return true;
}
@@ -333,8 +332,8 @@ void WindowManagerApp::LaunchViewManager(mojo::ApplicationImpl* app) {
app->ConnectToApplication("mojo:view_manager");
view_manager_app->ConnectToService(&view_manager_service_);
- view_manager_app->AddService(&native_viewport_event_dispatcher_factory_);
view_manager_app->AddService<WindowManagerInternal>(this);
+ view_manager_app->AddService<mojo::NativeViewportEventDispatcher>(this);
view_manager_app->ConnectToService(&window_manager_client_);
}
@@ -359,6 +358,12 @@ void WindowManagerApp::Create(ApplicationConnection* connection,
// destructor.
}
+void WindowManagerApp::Create(
+ mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<mojo::NativeViewportEventDispatcher> request) {
+ new NativeViewportEventDispatcherImpl(this, request.Pass());
+}
+
void WindowManagerApp::CreateWindowManagerForViewManagerClient(
uint16_t connection_id,
mojo::ScopedMessagePipeHandle window_manager_pipe) {
« no previous file with comments | « services/window_manager/window_manager_app.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698