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

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

Issue 728133002: Update mojo sdk to rev e01f9a49449381a5eb430c1fd88bf2cae73ec35a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android + ios gyp fixes 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/public/cpp/view_manager/view_manager_client_factory.h" 5 #include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h"
6 6
7 #include "mojo/public/interfaces/application/shell.mojom.h" 7 #include "mojo/public/interfaces/application/shell.mojom.h"
8 #include "mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h" 8 #include "mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.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 21 // static
22 scoped_ptr<ViewManagerClient> 22 scoped_ptr<ViewManagerClient>
23 ViewManagerClientFactory::WeakBindViewManagerToPipe( 23 ViewManagerClientFactory::WeakBindViewManagerToPipe(
24 ScopedMessagePipeHandle handle, 24 ScopedMessagePipeHandle handle,
25 Shell* shell, 25 Shell* shell,
26 ViewManagerDelegate* delegate) { 26 ViewManagerDelegate* delegate) {
27 scoped_ptr<ViewManagerClientImpl> client( 27 const bool delete_on_error = false;
28 new ViewManagerClientImpl(delegate, shell)); 28 scoped_ptr<ViewManagerClientImpl> client(new ViewManagerClientImpl(
29 WeakBindToPipe(client.get(), handle.Pass()); 29 delegate, shell, handle.Pass(), delete_on_error));
30 return client.Pass(); 30 return client.Pass();
31 } 31 }
32 32
33 // InterfaceFactory<ViewManagerClient> implementation. 33 // InterfaceFactory<ViewManagerClient> implementation.
34 void ViewManagerClientFactory::Create( 34 void ViewManagerClientFactory::Create(
35 ApplicationConnection* connection, 35 ApplicationConnection* connection,
36 InterfaceRequest<ViewManagerClient> request) { 36 InterfaceRequest<ViewManagerClient> request) {
37 BindToRequest(new ViewManagerClientImpl(delegate_, shell_), &request); 37 const bool delete_on_error = true;
38 new ViewManagerClientImpl(delegate_, shell_, request.PassMessagePipe(),
39 delete_on_error);
38 } 40 }
39 41
40 } // namespace mojo 42 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698