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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 mojo::Array<mojo::String> font_service_interfaces; | 111 mojo::Array<mojo::String> font_service_interfaces; |
112 font_service_interfaces.push_back(font_service::FontService::Name_); | 112 font_service_interfaces.push_back(font_service::FontService::Name_); |
113 filter->filter.insert("mojo:font_service", | 113 filter->filter.insert("mojo:font_service", |
114 std::move(font_service_interfaces)); | 114 std::move(font_service_interfaces)); |
115 #endif | 115 #endif |
116 | 116 |
117 mojo::ApplicationImpl::ConnectParams params(std::move(request)); | 117 mojo::ApplicationImpl::ConnectParams params(std::move(request)); |
118 params.set_filter(std::move(filter)); | 118 params.set_filter(std::move(filter)); |
119 application_connection_ = app->ConnectToApplication(¶ms); | 119 application_connection_ = app->ConnectToApplication(¶ms); |
120 application_connection_->ConnectToService(&frame_client_); | 120 application_connection_->ConnectToService(&frame_client_); |
121 application_connection_->AddContentHandlerIDCallback(on_got_id_callback); | 121 application_connection_->AddRemoteIDCallback(on_got_id_callback); |
122 } | 122 } |
123 | 123 |
124 mus::mojom::WindowTreeClientPtr FrameConnection::GetWindowTreeClient() { | 124 mus::mojom::WindowTreeClientPtr FrameConnection::GetWindowTreeClient() { |
125 DCHECK(application_connection_); | 125 DCHECK(application_connection_); |
126 mus::mojom::WindowTreeClientPtr window_tree_client; | 126 mus::mojom::WindowTreeClientPtr window_tree_client; |
127 application_connection_->ConnectToService(&window_tree_client); | 127 application_connection_->ConnectToService(&window_tree_client); |
128 return window_tree_client; | 128 return window_tree_client; |
129 } | 129 } |
130 | 130 |
131 uint32_t FrameConnection::GetContentHandlerID() const { | 131 uint32_t FrameConnection::GetContentHandlerID() const { |
132 uint32_t content_handler_id = mojo::Shell::kInvalidContentHandlerID; | 132 uint32_t content_handler_id = mojo::Shell::kInvalidApplicationID; |
133 if (!application_connection_->GetContentHandlerID(&content_handler_id)) | 133 if (!application_connection_->GetRemoteContentHandlerID(&content_handler_id)) |
134 NOTREACHED(); | 134 NOTREACHED(); |
135 return content_handler_id; | 135 return content_handler_id; |
136 } | 136 } |
137 | 137 |
138 } // namespace web_view | 138 } // namespace web_view |
OLD | NEW |