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

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

Issue 1308973005: html_viewer/web_view: An app for running layout-tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 3 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/web_view/BUILD.gn ('k') | components/web_view/test_runner/BUILD.gn » ('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 "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/resource_provider/public/interfaces/resource_provider.mojom .h" 10 #include "components/resource_provider/public/interfaces/resource_provider.mojom .h"
11 #include "components/view_manager/public/interfaces/gpu.mojom.h" 11 #include "components/view_manager/public/interfaces/gpu.mojom.h"
12 #include "components/view_manager/public/interfaces/view_tree_host.mojom.h" 12 #include "components/view_manager/public/interfaces/view_tree_host.mojom.h"
13 #include "components/web_view/frame_tree.h" 13 #include "components/web_view/frame_tree.h"
14 #include "components/web_view/test_runner/public/interfaces/layout_test_runner.m ojom.h"
14 #include "mojo/application/public/cpp/application_connection.h" 15 #include "mojo/application/public/cpp/application_connection.h"
15 #include "mojo/application/public/cpp/application_impl.h" 16 #include "mojo/application/public/cpp/application_impl.h"
16 #include "mojo/services/network/public/interfaces/cookie_store.mojom.h" 17 #include "mojo/services/network/public/interfaces/cookie_store.mojom.h"
17 #include "mojo/services/network/public/interfaces/url_loader_factory.mojom.h" 18 #include "mojo/services/network/public/interfaces/url_loader_factory.mojom.h"
18 #include "mojo/services/network/public/interfaces/web_socket_factory.mojom.h" 19 #include "mojo/services/network/public/interfaces/web_socket_factory.mojom.h"
19 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h" 20 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h"
20 21
21 #if defined(OS_LINUX) && !defined(OS_ANDROID) 22 #if defined(OS_LINUX) && !defined(OS_ANDROID)
22 #include "components/font_service/public/interfaces/font_service.mojom.h" 23 #include "components/font_service/public/interfaces/font_service.mojom.h"
23 #endif 24 #endif
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 88
88 mojo::Array<mojo::String> tracing_interfaces; 89 mojo::Array<mojo::String> tracing_interfaces;
89 tracing_interfaces.push_back(tracing::StartupPerformanceDataCollector::Name_); 90 tracing_interfaces.push_back(tracing::StartupPerformanceDataCollector::Name_);
90 filter->filter.insert("mojo:tracing", tracing_interfaces.Pass()); 91 filter->filter.insert("mojo:tracing", tracing_interfaces.Pass());
91 92
92 mojo::Array<mojo::String> view_manager_interfaces; 93 mojo::Array<mojo::String> view_manager_interfaces;
93 view_manager_interfaces.push_back(mojo::Gpu::Name_); 94 view_manager_interfaces.push_back(mojo::Gpu::Name_);
94 view_manager_interfaces.push_back(mojo::ViewTreeHostFactory::Name_); 95 view_manager_interfaces.push_back(mojo::ViewTreeHostFactory::Name_);
95 filter->filter.insert("mojo:view_manager", view_manager_interfaces.Pass()); 96 filter->filter.insert("mojo:view_manager", view_manager_interfaces.Pass());
96 97
98 mojo::Array<mojo::String> test_runner_interfaces;
sky 2015/09/04 14:56:04 Do you think we should only do this in certain sit
sadrul 2015/09/04 21:16:03 Not sure ... probably not? I can't think of a case
99 test_runner_interfaces.push_back(LayoutTestRunner::Name_);
100 filter->filter.insert("mojo:web_view_test_runner",
101 test_runner_interfaces.Pass());
102
97 #if defined(OS_LINUX) && !defined(OS_ANDROID) 103 #if defined(OS_LINUX) && !defined(OS_ANDROID)
98 mojo::Array<mojo::String> font_service_interfaces; 104 mojo::Array<mojo::String> font_service_interfaces;
99 font_service_interfaces.push_back(font_service::FontService::Name_); 105 font_service_interfaces.push_back(font_service::FontService::Name_);
100 filter->filter.insert("mojo:font_service", font_service_interfaces.Pass()); 106 filter->filter.insert("mojo:font_service", font_service_interfaces.Pass());
101 #endif 107 #endif
102 108
103 application_connection_ = app->ConnectToApplicationWithCapabilityFilter( 109 application_connection_ = app->ConnectToApplicationWithCapabilityFilter(
104 request.Pass(), filter.Pass()); 110 request.Pass(), filter.Pass());
105 application_connection_->ConnectToService(&frame_tree_client_); 111 application_connection_->ConnectToService(&frame_tree_client_);
106 frame_tree_client_.set_connection_error_handler([]() { 112 frame_tree_client_.set_connection_error_handler([]() {
(...skipping 12 matching lines...) Expand all
119 } 125 }
120 126
121 uint32_t FrameConnection::GetContentHandlerID() const { 127 uint32_t FrameConnection::GetContentHandlerID() const {
122 uint32_t content_handler_id = mojo::Shell::kInvalidContentHandlerID; 128 uint32_t content_handler_id = mojo::Shell::kInvalidContentHandlerID;
123 if (!application_connection_->GetContentHandlerID(&content_handler_id)) 129 if (!application_connection_->GetContentHandlerID(&content_handler_id))
124 NOTREACHED(); 130 NOTREACHED();
125 return content_handler_id; 131 return content_handler_id;
126 } 132 }
127 133
128 } // namespace web_view 134 } // namespace web_view
OLDNEW
« no previous file with comments | « components/web_view/BUILD.gn ('k') | components/web_view/test_runner/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698