| 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 #if defined(OS_LINUX) && !defined(OS_ANDROID) | 113 #if defined(OS_LINUX) && !defined(OS_ANDROID) |
| 114 mojo::Array<mojo::String> font_service_interfaces; | 114 mojo::Array<mojo::String> font_service_interfaces; |
| 115 font_service_interfaces.push_back(font_service::FontService::Name_); | 115 font_service_interfaces.push_back(font_service::FontService::Name_); |
| 116 filter->filter.insert("mojo:font_service", | 116 filter->filter.insert("mojo:font_service", |
| 117 std::move(font_service_interfaces)); | 117 std::move(font_service_interfaces)); |
| 118 #endif | 118 #endif |
| 119 | 119 |
| 120 mojo::Shell::ConnectParams params(std::move(request)); | 120 mojo::Shell::ConnectParams params(std::move(request)); |
| 121 params.set_filter(std::move(filter)); | 121 params.set_filter(std::move(filter)); |
| 122 connection_ = shell->Connect(¶ms); | 122 connection_ = shell->Connect(¶ms); |
| 123 connection_->ConnectToService(&frame_client_); | 123 connection_->GetInterface(&frame_client_); |
| 124 connection_->AddRemoteIDCallback(on_got_id_callback); | 124 connection_->AddRemoteIDCallback(on_got_id_callback); |
| 125 } | 125 } |
| 126 | 126 |
| 127 mus::mojom::WindowTreeClientPtr FrameConnection::GetWindowTreeClient() { | 127 mus::mojom::WindowTreeClientPtr FrameConnection::GetWindowTreeClient() { |
| 128 DCHECK(connection_); | 128 DCHECK(connection_); |
| 129 mus::mojom::WindowTreeClientPtr window_tree_client; | 129 mus::mojom::WindowTreeClientPtr window_tree_client; |
| 130 connection_->ConnectToService(&window_tree_client); | 130 connection_->GetInterface(&window_tree_client); |
| 131 return window_tree_client; | 131 return window_tree_client; |
| 132 } | 132 } |
| 133 | 133 |
| 134 uint32_t FrameConnection::GetContentHandlerID() const { | 134 uint32_t FrameConnection::GetContentHandlerID() const { |
| 135 uint32_t content_handler_id = | 135 uint32_t content_handler_id = |
| 136 mojo::shell::mojom::Shell::kInvalidApplicationID; | 136 mojo::shell::mojom::Shell::kInvalidApplicationID; |
| 137 if (!connection_->GetRemoteContentHandlerID(&content_handler_id)) | 137 if (!connection_->GetRemoteContentHandlerID(&content_handler_id)) |
| 138 NOTREACHED(); | 138 NOTREACHED(); |
| 139 return content_handler_id; | 139 return content_handler_id; |
| 140 } | 140 } |
| 141 | 141 |
| 142 } // namespace web_view | 142 } // namespace web_view |
| OLD | NEW |