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

Side by Side Diff: components/view_manager/public/cpp/lib/view_manager_client_factory.cc

Issue 1138073007: Nukes the windowmanager interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 7 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 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 "components/view_manager/public/cpp/view_manager_client_factory.h" 5 #include "components/view_manager/public/cpp/view_manager_client_factory.h"
6 6
7 #include "components/view_manager/public/cpp/lib/view_manager_client_impl.h" 7 #include "components/view_manager/public/cpp/lib/view_manager_client_impl.h"
8 #include "mojo/application/public/interfaces/shell.mojom.h" 8 #include "mojo/application/public/interfaces/shell.mojom.h"
9 9
10 namespace mojo { 10 namespace mojo {
11 11
12 ViewManagerClientFactory::ViewManagerClientFactory( 12 ViewManagerClientFactory::ViewManagerClientFactory(
13 Shell* shell, 13 Shell* shell,
14 ViewManagerDelegate* delegate) 14 ViewManagerDelegate* delegate)
15 : shell_(shell), delegate_(delegate) { 15 : shell_(shell), delegate_(delegate) {
16 } 16 }
17 17
18 ViewManagerClientFactory::~ViewManagerClientFactory() { 18 ViewManagerClientFactory::~ViewManagerClientFactory() {
19 } 19 }
20 20
21 // static
22 ViewManagerClient* ViewManagerClientFactory::WeakBindViewManagerToPipe(
23 InterfaceRequest<ViewManagerClient> request,
24 ViewManagerServicePtr view_manager_service,
25 Shell* shell,
26 ViewManagerDelegate* delegate) {
27 const bool delete_on_error = false;
28 auto client = new ViewManagerClientImpl(delegate, shell, request.Pass(),
29 delete_on_error);
30 client->SetViewManagerService(view_manager_service.Pass());
31 return client;
32 }
33
34 // InterfaceFactory<ViewManagerClient> implementation. 21 // InterfaceFactory<ViewManagerClient> implementation.
35 void ViewManagerClientFactory::Create( 22 void ViewManagerClientFactory::Create(
36 ApplicationConnection* connection, 23 ApplicationConnection* connection,
37 InterfaceRequest<ViewManagerClient> request) { 24 InterfaceRequest<ViewManagerClient> request) {
38 const bool delete_on_error = true; 25 const bool delete_on_error = true;
39 new ViewManagerClientImpl(delegate_, shell_, request.Pass(), delete_on_error); 26 new ViewManagerClientImpl(delegate_, shell_, request.Pass(), delete_on_error);
40 } 27 }
41 28
42 } // namespace mojo 29 } // namespace mojo
OLDNEW
« no previous file with comments | « components/view_manager/public/cpp/BUILD.gn ('k') | components/view_manager/public/cpp/lib/view_manager_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698