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

Side by Side Diff: services/ui/view_manager/view_associate_table.cc

Issue 1916233002: Mark ApplicationImpl::ConnectTo{Application,Service}() as deprecated. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « services/ui/launcher/launch_instance.cc ('k') | services/ui/view_manager/view_manager_app.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "services/ui/view_manager/view_associate_table.h" 5 #include "services/ui/view_manager/view_associate_table.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 17 matching lines...) Expand all
28 const std::vector<std::string>& urls, 28 const std::vector<std::string>& urls,
29 const AssociateConnectionErrorCallback& connection_error_callback) { 29 const AssociateConnectionErrorCallback& connection_error_callback) {
30 DCHECK(app_impl); 30 DCHECK(app_impl);
31 DCHECK(inspector); 31 DCHECK(inspector);
32 32
33 for (auto& url : urls) { 33 for (auto& url : urls) {
34 DVLOG(1) << "Connecting to view associate: url=" << url; 34 DVLOG(1) << "Connecting to view associate: url=" << url;
35 associates_.emplace_back(new AssociateData(url, inspector)); 35 associates_.emplace_back(new AssociateData(url, inspector));
36 AssociateData* data = associates_.back().get(); 36 AssociateData* data = associates_.back().get();
37 37
38 app_impl->ConnectToService(url, &data->associate); 38 app_impl->ConnectToServiceDeprecated(url, &data->associate);
39 data->associate.set_connection_error_handler( 39 data->associate.set_connection_error_handler(
40 base::Bind(connection_error_callback, url)); 40 base::Bind(connection_error_callback, url));
41 41
42 mojo::ui::ViewInspectorPtr inspector; 42 mojo::ui::ViewInspectorPtr inspector;
43 data->inspector_binding.Bind(mojo::GetProxy(&inspector)); 43 data->inspector_binding.Bind(mojo::GetProxy(&inspector));
44 data->associate->Connect( 44 data->associate->Connect(
45 inspector.Pass(), 45 inspector.Pass(),
46 base::Bind(&ViewAssociateTable::OnConnected, base::Unretained(this), 46 base::Bind(&ViewAssociateTable::OnConnected, base::Unretained(this),
47 pending_connection_count_)); 47 pending_connection_count_));
48 48
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 134 }
135 135
136 ViewAssociateTable::AssociateData::AssociateData( 136 ViewAssociateTable::AssociateData::AssociateData(
137 const std::string& url, 137 const std::string& url,
138 mojo::ui::ViewInspector* inspector) 138 mojo::ui::ViewInspector* inspector)
139 : url(url), inspector_binding(inspector) {} 139 : url(url), inspector_binding(inspector) {}
140 140
141 ViewAssociateTable::AssociateData::~AssociateData() {} 141 ViewAssociateTable::AssociateData::~AssociateData() {}
142 142
143 } // namespace view_manager 143 } // namespace view_manager
OLDNEW
« no previous file with comments | « services/ui/launcher/launch_instance.cc ('k') | services/ui/view_manager/view_manager_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698