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

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

Issue 1455833005: Convert ConnectToApplication to take a params class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 1 month 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
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "components/clipboard/public/interfaces/clipboard.mojom.h" 9 #include "components/clipboard/public/interfaces/clipboard.mojom.h"
10 #include "components/mus/public/interfaces/gpu.mojom.h" 10 #include "components/mus/public/interfaces/gpu.mojom.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 test_runner_interfaces.push_back(LayoutTestRunner::Name_); 103 test_runner_interfaces.push_back(LayoutTestRunner::Name_);
104 filter->filter.insert("mojo:web_view_test_runner", 104 filter->filter.insert("mojo:web_view_test_runner",
105 test_runner_interfaces.Pass()); 105 test_runner_interfaces.Pass());
106 106
107 #if defined(OS_LINUX) && !defined(OS_ANDROID) 107 #if defined(OS_LINUX) && !defined(OS_ANDROID)
108 mojo::Array<mojo::String> font_service_interfaces; 108 mojo::Array<mojo::String> font_service_interfaces;
109 font_service_interfaces.push_back(font_service::FontService::Name_); 109 font_service_interfaces.push_back(font_service::FontService::Name_);
110 filter->filter.insert("mojo:font_service", font_service_interfaces.Pass()); 110 filter->filter.insert("mojo:font_service", font_service_interfaces.Pass());
111 #endif 111 #endif
112 112
113 application_connection_ = app->ConnectToApplicationWithCapabilityFilter( 113 mojo::ApplicationImpl::ConnectParams params(request.Pass());
114 request.Pass(), filter.Pass()); 114 params.set_filter(filter.Pass());
115 application_connection_ = app->ConnectToApplication(&params);
115 application_connection_->ConnectToService(&frame_client_); 116 application_connection_->ConnectToService(&frame_client_);
116 application_connection_->AddContentHandlerIDCallback(on_got_id_callback); 117 application_connection_->AddContentHandlerIDCallback(on_got_id_callback);
117 } 118 }
118 119
119 mus::mojom::WindowTreeClientPtr FrameConnection::GetWindowTreeClient() { 120 mus::mojom::WindowTreeClientPtr FrameConnection::GetWindowTreeClient() {
120 DCHECK(application_connection_); 121 DCHECK(application_connection_);
121 mus::mojom::WindowTreeClientPtr window_tree_client; 122 mus::mojom::WindowTreeClientPtr window_tree_client;
122 application_connection_->ConnectToService(&window_tree_client); 123 application_connection_->ConnectToService(&window_tree_client);
123 return window_tree_client.Pass(); 124 return window_tree_client.Pass();
124 } 125 }
125 126
126 uint32_t FrameConnection::GetContentHandlerID() const { 127 uint32_t FrameConnection::GetContentHandlerID() const {
127 uint32_t content_handler_id = mojo::Shell::kInvalidContentHandlerID; 128 uint32_t content_handler_id = mojo::Shell::kInvalidContentHandlerID;
128 if (!application_connection_->GetContentHandlerID(&content_handler_id)) 129 if (!application_connection_->GetContentHandlerID(&content_handler_id))
129 NOTREACHED(); 130 NOTREACHED();
130 return content_handler_id; 131 return content_handler_id;
131 } 132 }
132 133
133 } // namespace web_view 134 } // namespace web_view
OLDNEW
« no previous file with comments | « components/resource_provider/public/cpp/resource_loader.cc ('k') | components/web_view/frame_devtools_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698