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

Side by Side Diff: mandoline/tab/frame_connection.cc

Issue 1290323002: HTMLViewer no longer connects to NetworkService interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 4 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/html_viewer/web_socket_handle_impl.cc ('k') | mojo/mojo_services.gyp » ('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 "mandoline/tab/frame_connection.h" 5 #include "mandoline/tab/frame_connection.h"
6 6
7 #include "components/clipboard/public/interfaces/clipboard.mojom.h" 7 #include "components/clipboard/public/interfaces/clipboard.mojom.h"
8 #include "components/devtools_service/public/interfaces/devtools_service.mojom.h " 8 #include "components/devtools_service/public/interfaces/devtools_service.mojom.h "
9 #include "components/resource_provider/public/interfaces/resource_provider.mojom .h" 9 #include "components/resource_provider/public/interfaces/resource_provider.mojom .h"
10 #include "components/view_manager/public/interfaces/display.mojom.h" 10 #include "components/view_manager/public/interfaces/display.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/surfaces.mojom.h" 12 #include "components/view_manager/public/interfaces/surfaces.mojom.h"
13 #include "components/view_manager/public/interfaces/view_manager_root.mojom.h" 13 #include "components/view_manager/public/interfaces/view_manager_root.mojom.h"
14 #include "mojo/application/public/cpp/application_connection.h" 14 #include "mojo/application/public/cpp/application_connection.h"
15 #include "mojo/application/public/cpp/application_impl.h" 15 #include "mojo/application/public/cpp/application_impl.h"
16 #include "mojo/services/network/public/interfaces/network_service.mojom.h" 16 #include "mojo/services/network/public/interfaces/cookie_store.mojom.h"
17 #include "mojo/services/network/public/interfaces/url_loader_factory.mojom.h" 17 #include "mojo/services/network/public/interfaces/url_loader_factory.mojom.h"
18 #include "mojo/services/network/public/interfaces/web_socket_factory.mojom.h"
18 19
19 #if defined(OS_LINUX) && !defined(OS_ANDROID) 20 #if defined(OS_LINUX) && !defined(OS_ANDROID)
20 #include "components/font_service/public/interfaces/font_service.mojom.h" 21 #include "components/font_service/public/interfaces/font_service.mojom.h"
21 #endif 22 #endif
22 23
23 namespace mandoline { 24 namespace mandoline {
24 25
25 FrameConnection::FrameConnection() : application_connection_(nullptr) { 26 FrameConnection::FrameConnection() : application_connection_(nullptr) {
26 } 27 }
27 28
28 FrameConnection::~FrameConnection() { 29 FrameConnection::~FrameConnection() {
29 } 30 }
30 31
31 void FrameConnection::Init(mojo::ApplicationImpl* app, 32 void FrameConnection::Init(mojo::ApplicationImpl* app,
32 mojo::URLRequestPtr request, 33 mojo::URLRequestPtr request,
33 mojo::ViewManagerClientPtr* view_manage_client) { 34 mojo::ViewManagerClientPtr* view_manage_client) {
34 DCHECK(!application_connection_); 35 DCHECK(!application_connection_);
35 36
36 mojo::CapabilityFilterPtr filter(mojo::CapabilityFilter::New()); 37 mojo::CapabilityFilterPtr filter(mojo::CapabilityFilter::New());
37 mojo::Array<mojo::String> resource_provider_interfaces; 38 mojo::Array<mojo::String> resource_provider_interfaces;
38 resource_provider_interfaces.push_back( 39 resource_provider_interfaces.push_back(
39 resource_provider::ResourceProvider::Name_); 40 resource_provider::ResourceProvider::Name_);
40 filter->filter.insert("mojo:resource_provider", 41 filter->filter.insert("mojo:resource_provider",
41 resource_provider_interfaces.Pass()); 42 resource_provider_interfaces.Pass());
42 43
43 mojo::Array<mojo::String> network_service_interfaces; 44 mojo::Array<mojo::String> network_service_interfaces;
44 network_service_interfaces.push_back(mojo::NetworkService::Name_); 45 network_service_interfaces.push_back(mojo::CookieStore::Name_);
45 network_service_interfaces.push_back(mojo::URLLoaderFactory::Name_); 46 network_service_interfaces.push_back(mojo::URLLoaderFactory::Name_);
47 network_service_interfaces.push_back(mojo::WebSocketFactory::Name_);
46 filter->filter.insert("mojo:network_service", 48 filter->filter.insert("mojo:network_service",
47 network_service_interfaces.Pass()); 49 network_service_interfaces.Pass());
48 50
49 mojo::Array<mojo::String> clipboard_interfaces; 51 mojo::Array<mojo::String> clipboard_interfaces;
50 clipboard_interfaces.push_back(mojo::Clipboard::Name_); 52 clipboard_interfaces.push_back(mojo::Clipboard::Name_);
51 filter->filter.insert("mojo:clipboard", clipboard_interfaces.Pass()); 53 filter->filter.insert("mojo:clipboard", clipboard_interfaces.Pass());
52 54
53 mojo::Array<mojo::String> surfaces_interfaces; 55 mojo::Array<mojo::String> surfaces_interfaces;
54 surfaces_interfaces.push_back(mojo::DisplayFactory::Name_); 56 surfaces_interfaces.push_back(mojo::DisplayFactory::Name_);
55 surfaces_interfaces.push_back(mojo::Surface::Name_); 57 surfaces_interfaces.push_back(mojo::Surface::Name_);
(...skipping 18 matching lines...) Expand all
74 request.Pass(), filter.Pass()); 76 request.Pass(), filter.Pass());
75 application_connection_->ConnectToService(view_manage_client); 77 application_connection_->ConnectToService(view_manage_client);
76 application_connection_->ConnectToService(&frame_tree_client_); 78 application_connection_->ConnectToService(&frame_tree_client_);
77 frame_tree_client_.set_connection_error_handler([]() { 79 frame_tree_client_.set_connection_error_handler([]() {
78 // TODO(sky): implement this. 80 // TODO(sky): implement this.
79 NOTIMPLEMENTED(); 81 NOTIMPLEMENTED();
80 }); 82 });
81 } 83 }
82 84
83 } // namespace mandoline 85 } // namespace mandoline
OLDNEW
« no previous file with comments | « components/html_viewer/web_socket_handle_impl.cc ('k') | mojo/mojo_services.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698