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

Side by Side Diff: components/web_view/frame_connection.cc

Issue 1578473002: Pass application ids via AcceptConnection & ConnectToApplication callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 10 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 | « components/html_viewer/media_factory.cc ('k') | components/web_view/frame_utils.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 "components/web_view/frame_connection.h" 5 #include "components/web_view/frame_connection.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 mojo::Array<mojo::String> font_service_interfaces; 113 mojo::Array<mojo::String> font_service_interfaces;
114 font_service_interfaces.push_back(font_service::FontService::Name_); 114 font_service_interfaces.push_back(font_service::FontService::Name_);
115 filter->filter.insert("mojo:font_service", 115 filter->filter.insert("mojo:font_service",
116 std::move(font_service_interfaces)); 116 std::move(font_service_interfaces));
117 #endif 117 #endif
118 118
119 mojo::ApplicationImpl::ConnectParams params(std::move(request)); 119 mojo::ApplicationImpl::ConnectParams params(std::move(request));
120 params.set_filter(std::move(filter)); 120 params.set_filter(std::move(filter));
121 application_connection_ = app->ConnectToApplication(&params); 121 application_connection_ = app->ConnectToApplication(&params);
122 application_connection_->ConnectToService(&frame_client_); 122 application_connection_->ConnectToService(&frame_client_);
123 application_connection_->AddContentHandlerIDCallback(on_got_id_callback); 123 application_connection_->AddRemoteIDCallback(on_got_id_callback);
124 } 124 }
125 125
126 mus::mojom::WindowTreeClientPtr FrameConnection::GetWindowTreeClient() { 126 mus::mojom::WindowTreeClientPtr FrameConnection::GetWindowTreeClient() {
127 DCHECK(application_connection_); 127 DCHECK(application_connection_);
128 mus::mojom::WindowTreeClientPtr window_tree_client; 128 mus::mojom::WindowTreeClientPtr window_tree_client;
129 application_connection_->ConnectToService(&window_tree_client); 129 application_connection_->ConnectToService(&window_tree_client);
130 return window_tree_client; 130 return window_tree_client;
131 } 131 }
132 132
133 uint32_t FrameConnection::GetContentHandlerID() const { 133 uint32_t FrameConnection::GetContentHandlerID() const {
134 uint32_t content_handler_id = mojo::Shell::kInvalidContentHandlerID; 134 uint32_t content_handler_id = mojo::Shell::kInvalidApplicationID;
135 if (!application_connection_->GetContentHandlerID(&content_handler_id)) 135 if (!application_connection_->GetRemoteContentHandlerID(&content_handler_id))
136 NOTREACHED(); 136 NOTREACHED();
137 return content_handler_id; 137 return content_handler_id;
138 } 138 }
139 139
140 } // namespace web_view 140 } // namespace web_view
OLDNEW
« no previous file with comments | « components/html_viewer/media_factory.cc ('k') | components/web_view/frame_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698