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

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

Issue 710043004: Make it possible to have multiple InspectorBackends (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Move InspectorFrontendImpl into server.cc and rename ServerImpl to InspectorServerImpl 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
« no previous file with comments | « no previous file | sky/framework/inspector/inspector.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/converters/geometry/geometry_type_converters.h" 9 #include "mojo/converters/geometry/geometry_type_converters.h"
10 #include "mojo/converters/input_events/input_events_type_converters.h" 10 #include "mojo/converters/input_events/input_events_type_converters.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 uint16_t connection_id, 42 uint16_t connection_id,
43 ScopedMessagePipeHandle window_manager_pipe) override { 43 ScopedMessagePipeHandle window_manager_pipe) override {
44 // |wm_internal| is tied to the life of the pipe. 44 // |wm_internal| is tied to the life of the pipe.
45 WindowManagerImpl* wm = new WindowManagerImpl(app_, true); 45 WindowManagerImpl* wm = new WindowManagerImpl(app_, true);
46 WeakBindToPipe(wm, window_manager_pipe.Pass()); 46 WeakBindToPipe(wm, window_manager_pipe.Pass());
47 } 47 }
48 48
49 // InterfaceImpl: 49 // InterfaceImpl:
50 void OnConnectionError() override { 50 void OnConnectionError() override {
51 // Necessary since we used WeakBindToPipe and are not automatically deleted. 51 // Necessary since we used WeakBindToPipe and are not automatically deleted.
52 // crbug.com/431911
52 delete this; 53 delete this;
53 } 54 }
54 55
55 private: 56 private:
56 WindowManagerApp* app_; 57 WindowManagerApp* app_;
57 58
58 DISALLOW_COPY_AND_ASSIGN(WindowManagerInternalImpl); 59 DISALLOW_COPY_AND_ASSIGN(WindowManagerInternalImpl);
59 }; 60 };
60 61
61 // Used for calls to Embed() that occur before we've connected to the 62 // Used for calls to Embed() that occur before we've connected to the
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 view_manager_app->ConnectToService(&window_manager_client_); 354 view_manager_app->ConnectToService(&window_manager_client_);
354 } 355 }
355 356
356 void WindowManagerApp::Create(ApplicationConnection* connection, 357 void WindowManagerApp::Create(ApplicationConnection* connection,
357 InterfaceRequest<WindowManagerInternal> request) { 358 InterfaceRequest<WindowManagerInternal> request) {
358 WindowManagerInternalImpl* impl = new WindowManagerInternalImpl(this); 359 WindowManagerInternalImpl* impl = new WindowManagerInternalImpl(this);
359 BindToRequest(impl, &request); 360 BindToRequest(impl, &request);
360 } 361 }
361 362
362 } // namespace mojo 363 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | sky/framework/inspector/inspector.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698