OLD | NEW |
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 Loading... |
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(¶ms); | 121 application_connection_ = app->ConnectToApplication(¶ms); |
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 |
OLD | NEW |