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

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: Make possible multiple ServerImpls per aa's review to close a potential leak 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 uint16_t connection_id, 89 uint16_t connection_id,
90 ScopedMessagePipeHandle window_manager_pipe) override { 90 ScopedMessagePipeHandle window_manager_pipe) override {
91 // |wm_internal| is tied to the life of the pipe. 91 // |wm_internal| is tied to the life of the pipe.
92 WindowManagerImpl* wm = new WindowManagerImpl(app_, true); 92 WindowManagerImpl* wm = new WindowManagerImpl(app_, true);
93 WeakBindToPipe(wm, window_manager_pipe.Pass()); 93 WeakBindToPipe(wm, window_manager_pipe.Pass());
94 } 94 }
95 95
96 // InterfaceImpl: 96 // InterfaceImpl:
97 void OnConnectionError() override { 97 void OnConnectionError() override {
98 // Necessary since we used WeakBindToPipe and are not automatically deleted. 98 // Necessary since we used WeakBindToPipe and are not automatically deleted.
99 // crbug.com/431911
99 delete this; 100 delete this;
100 } 101 }
101 102
102 private: 103 private:
103 WindowManagerApp* app_; 104 WindowManagerApp* app_;
104 105
105 DISALLOW_COPY_AND_ASSIGN(WindowManagerInternalImpl); 106 DISALLOW_COPY_AND_ASSIGN(WindowManagerInternalImpl);
106 }; 107 };
107 108
108 // Used for calls to Embed() that occur before we've connected to the 109 // Used for calls to Embed() that occur before we've connected to the
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 view_manager_app->ConnectToService(&window_manager_client_); 413 view_manager_app->ConnectToService(&window_manager_client_);
413 } 414 }
414 415
415 void WindowManagerApp::Create(ApplicationConnection* connection, 416 void WindowManagerApp::Create(ApplicationConnection* connection,
416 InterfaceRequest<WindowManagerInternal> request) { 417 InterfaceRequest<WindowManagerInternal> request) {
417 WindowManagerInternalImpl* impl = new WindowManagerInternalImpl(this); 418 WindowManagerInternalImpl* impl = new WindowManagerInternalImpl(this);
418 BindToRequest(impl, &request); 419 BindToRequest(impl, &request);
419 } 420 }
420 421
421 } // namespace mojo 422 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | sky/framework/inspector/inspector.sky » ('j') | sky/services/inspector/inspector_frontend_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698