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

Side by Side Diff: mojo/services/window_manager/window_manager_app.cc

Issue 685013002: Refactors event dispatching of NativeViewport into its own interface (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: cleanup Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/services/window_manager/window_manager_app.h" 5 #include "mojo/services/window_manager/window_manager_app.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "mojo/aura/aura_init.h" 9 #include "mojo/aura/aura_init.h"
10 #include "mojo/converters/geometry/geometry_type_converters.h" 10 #include "mojo/converters/geometry/geometry_type_converters.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 //////////////////////////////////////////////////////////////////////////////// 88 ////////////////////////////////////////////////////////////////////////////////
89 // WindowManagerApp, public: 89 // WindowManagerApp, public:
90 90
91 WindowManagerApp::WindowManagerApp( 91 WindowManagerApp::WindowManagerApp(
92 ViewManagerDelegate* view_manager_delegate, 92 ViewManagerDelegate* view_manager_delegate,
93 WindowManagerDelegate* window_manager_delegate) 93 WindowManagerDelegate* window_manager_delegate)
94 : shell_(nullptr), 94 : shell_(nullptr),
95 window_manager_service2_factory_(this), 95 window_manager_service2_factory_(this),
96 window_manager_factory_(this), 96 window_manager_factory_(this),
97 window_manager_internal_service_factory_(this), 97 native_viewport_event_dispatcher_factory_(this),
98 wrapped_view_manager_delegate_(view_manager_delegate), 98 wrapped_view_manager_delegate_(view_manager_delegate),
99 window_manager_delegate_(window_manager_delegate), 99 window_manager_delegate_(window_manager_delegate),
100 view_manager_(NULL), 100 view_manager_(NULL),
101 root_(NULL), 101 root_(NULL),
102 dummy_delegate_(new DummyDelegate), 102 dummy_delegate_(new DummyDelegate) {
103 window_manager_client_(nullptr) {
104 } 103 }
105 104
106 WindowManagerApp::~WindowManagerApp() {} 105 WindowManagerApp::~WindowManagerApp() {}
107 106
108 // static 107 // static
109 View* WindowManagerApp::GetViewForWindow(aura::Window* window) { 108 View* WindowManagerApp::GetViewForWindow(aura::Window* window) {
110 return window->GetProperty(kViewKey); 109 return window->GetProperty(kViewKey);
111 } 110 }
112 111
113 aura::Window* WindowManagerApp::GetWindowForViewId(Id view) { 112 aura::Window* WindowManagerApp::GetWindowForViewId(Id view) {
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 MessagePipe pipe; 373 MessagePipe pipe;
375 ApplicationConnection* view_manager_app = 374 ApplicationConnection* view_manager_app =
376 app->ConnectToApplication("mojo:view_manager"); 375 app->ConnectToApplication("mojo:view_manager");
377 ServiceProvider* view_manager_service_provider = 376 ServiceProvider* view_manager_service_provider =
378 view_manager_app->GetServiceProvider(); 377 view_manager_app->GetServiceProvider();
379 view_manager_service_provider->ConnectToService(ViewManagerService::Name_, 378 view_manager_service_provider->ConnectToService(ViewManagerService::Name_,
380 pipe.handle1.Pass()); 379 pipe.handle1.Pass());
381 view_manager_client_ = ViewManagerClientFactory::WeakBindViewManagerToPipe( 380 view_manager_client_ = ViewManagerClientFactory::WeakBindViewManagerToPipe(
382 pipe.handle0.Pass(), shell_, this).Pass(); 381 pipe.handle0.Pass(), shell_, this).Pass();
383 382
384 view_manager_app->AddService(&window_manager_internal_service_factory_); 383 view_manager_app->AddService(&native_viewport_event_dispatcher_factory_);
384
385 view_manager_app->ConnectToService(&window_manager_client_);
385 } 386 }
386 387
387 } // namespace mojo 388 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/window_manager/window_manager_app.h ('k') | mojo/services/window_manager/window_manager_internal_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698