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

Side by Side Diff: mojo/services/view_manager/view_manager_init_service_context.cc

Issue 629523003: Rename Get to GetProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix device Created 6 years, 2 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 "mojo/services/view_manager/view_manager_init_service_context.h" 5 #include "mojo/services/view_manager/view_manager_init_service_context.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "mojo/services/view_manager/connection_manager.h" 9 #include "mojo/services/view_manager/connection_manager.h"
10 #include "mojo/services/view_manager/view_manager_init_service_impl.h" 10 #include "mojo/services/view_manager/view_manager_init_service_impl.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 connection, 51 connection,
52 base::Bind(&ViewManagerInitServiceContext::OnNativeViewportDeleted, 52 base::Bind(&ViewManagerInitServiceContext::OnNativeViewportDeleted,
53 base::Unretained(this)))); 53 base::Unretained(this))));
54 } 54 }
55 } 55 }
56 56
57 void ViewManagerInitServiceContext::Embed( 57 void ViewManagerInitServiceContext::Embed(
58 const String& url, 58 const String& url,
59 ServiceProviderPtr service_provider, 59 ServiceProviderPtr service_provider,
60 const Callback<void(bool)>& callback) { 60 const Callback<void(bool)>& callback) {
61 connection_manager_->EmbedRoot(url, Get(&service_provider)); 61 connection_manager_->EmbedRoot(url, GetProxy(&service_provider));
62 callback.Run(true); 62 callback.Run(true);
63 } 63 }
64 64
65 void ViewManagerInitServiceContext::OnNativeViewportDeleted() { 65 void ViewManagerInitServiceContext::OnNativeViewportDeleted() {
66 // Prevent the connection from modifying the connection list during manual 66 // Prevent the connection from modifying the connection list during manual
67 // teardown. 67 // teardown.
68 base::AutoReset<bool> deleting_connection(&deleting_connection_, true); 68 base::AutoReset<bool> deleting_connection(&deleting_connection_, true);
69 for (Connections::const_iterator it = connections_.begin(); 69 for (Connections::const_iterator it = connections_.begin();
70 it != connections_.end(); ++it) { 70 it != connections_.end(); ++it) {
71 delete *it; 71 delete *it;
72 } 72 }
73 connections_.clear(); 73 connections_.clear();
74 connection_manager_.reset(); 74 connection_manager_.reset();
75 } 75 }
76 76
77 } // namespace service 77 } // namespace service
78 } // namespace mojo 78 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc ('k') | mojo/shell/dynamic_application_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698