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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1686223002: Move InterfaceProvider into the shell::mojom namespace like the rest of the shell interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 10 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 | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_thread_impl.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 // showing, then WebKit will never send a commit and we'll be left spinning. 1490 // showing, then WebKit will never send a commit and we'll be left spinning.
1491 // Set the is_swapped_out_ bit to true, so IPC filtering is in effect and 1491 // Set the is_swapped_out_ bit to true, so IPC filtering is in effect and
1492 // the navigation to swappedout:// is not announced to the browser side. 1492 // the navigation to swappedout:// is not announced to the browser side.
1493 is_swapped_out_ = true; 1493 is_swapped_out_ = true;
1494 GURL swappedOutURL(kSwappedOutURL); 1494 GURL swappedOutURL(kSwappedOutURL);
1495 WebURLRequest request(swappedOutURL); 1495 WebURLRequest request(swappedOutURL);
1496 frame_->loadRequest(request); 1496 frame_->loadRequest(request);
1497 } 1497 }
1498 1498
1499 void RenderFrameImpl::BindServiceRegistry( 1499 void RenderFrameImpl::BindServiceRegistry(
1500 mojo::InterfaceRequest<mojo::InterfaceProvider> services, 1500 mojo::shell::mojom::InterfaceProviderRequest services,
1501 mojo::InterfaceProviderPtr exposed_services) { 1501 mojo::shell::mojom::InterfaceProviderPtr exposed_services) {
1502 service_registry_.Bind(std::move(services)); 1502 service_registry_.Bind(std::move(services));
1503 service_registry_.BindRemoteServiceProvider(std::move(exposed_services)); 1503 service_registry_.BindRemoteServiceProvider(std::move(exposed_services));
1504 } 1504 }
1505 1505
1506 ManifestManager* RenderFrameImpl::manifest_manager() { 1506 ManifestManager* RenderFrameImpl::manifest_manager() {
1507 return manifest_manager_; 1507 return manifest_manager_;
1508 } 1508 }
1509 1509
1510 void RenderFrameImpl::SetPendingNavigationParams( 1510 void RenderFrameImpl::SetPendingNavigationParams(
1511 scoped_ptr<NavigationParams> navigation_params) { 1511 scoped_ptr<NavigationParams> navigation_params) {
(...skipping 4485 matching lines...) Expand 10 before | Expand all | Expand 10 after
5997 media_permission_dispatcher_.reset(new MediaPermissionDispatcher( 5997 media_permission_dispatcher_.reset(new MediaPermissionDispatcher(
5998 base::Bind(&RenderFrameImpl::GetInterface<PermissionService>, 5998 base::Bind(&RenderFrameImpl::GetInterface<PermissionService>,
5999 base::Unretained(this)))); 5999 base::Unretained(this))));
6000 } 6000 }
6001 return media_permission_dispatcher_.get(); 6001 return media_permission_dispatcher_.get();
6002 } 6002 }
6003 6003
6004 #if defined(ENABLE_MOJO_MEDIA) 6004 #if defined(ENABLE_MOJO_MEDIA)
6005 media::interfaces::ServiceFactory* RenderFrameImpl::GetMediaServiceFactory() { 6005 media::interfaces::ServiceFactory* RenderFrameImpl::GetMediaServiceFactory() {
6006 if (!media_service_factory_) { 6006 if (!media_service_factory_) {
6007 mojo::InterfaceProviderPtr service_provider = 6007 mojo::shell::mojom::InterfaceProviderPtr service_provider =
6008 ConnectToApplication(GURL("mojo:media")); 6008 ConnectToApplication(GURL("mojo:media"));
6009 mojo::GetInterface(service_provider.get(), &media_service_factory_); 6009 mojo::GetInterface(service_provider.get(), &media_service_factory_);
6010 media_service_factory_.set_connection_error_handler( 6010 media_service_factory_.set_connection_error_handler(
6011 base::Bind(&RenderFrameImpl::OnMediaServiceFactoryConnectionError, 6011 base::Bind(&RenderFrameImpl::OnMediaServiceFactoryConnectionError,
6012 base::Unretained(this))); 6012 base::Unretained(this)));
6013 } 6013 }
6014 6014
6015 return media_service_factory_.get(); 6015 return media_service_factory_.get();
6016 } 6016 }
6017 6017
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
6066 base::Bind(&ImageDownloaderImpl::CreateMojoService, 6066 base::Bind(&ImageDownloaderImpl::CreateMojoService,
6067 base::Unretained(this))); 6067 base::Unretained(this)));
6068 } 6068 }
6069 } 6069 }
6070 6070
6071 template <typename Interface> 6071 template <typename Interface>
6072 void RenderFrameImpl::GetInterface(mojo::InterfaceRequest<Interface> request) { 6072 void RenderFrameImpl::GetInterface(mojo::InterfaceRequest<Interface> request) {
6073 GetServiceRegistry()->ConnectToRemoteService(std::move(request)); 6073 GetServiceRegistry()->ConnectToRemoteService(std::move(request));
6074 } 6074 }
6075 6075
6076 mojo::InterfaceProviderPtr RenderFrameImpl::ConnectToApplication( 6076 mojo::shell::mojom::InterfaceProviderPtr RenderFrameImpl::ConnectToApplication(
6077 const GURL& url) { 6077 const GURL& url) {
6078 if (!mojo_shell_) 6078 if (!mojo_shell_)
6079 GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&mojo_shell_)); 6079 GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&mojo_shell_));
6080 mojo::InterfaceProviderPtr service_provider; 6080 mojo::shell::mojom::InterfaceProviderPtr service_provider;
6081 mojo::URLRequestPtr request(mojo::URLRequest::New()); 6081 mojo::URLRequestPtr request(mojo::URLRequest::New());
6082 request->url = mojo::String::From(url); 6082 request->url = mojo::String::From(url);
6083 mojo::shell::mojom::CapabilityFilterPtr filter( 6083 mojo::shell::mojom::CapabilityFilterPtr filter(
6084 mojo::shell::mojom::CapabilityFilter::New()); 6084 mojo::shell::mojom::CapabilityFilter::New());
6085 mojo::Array<mojo::String> all_interfaces; 6085 mojo::Array<mojo::String> all_interfaces;
6086 all_interfaces.push_back("*"); 6086 all_interfaces.push_back("*");
6087 filter->filter.insert("*", std::move(all_interfaces)); 6087 filter->filter.insert("*", std::move(all_interfaces));
6088 mojo_shell_->ConnectToApplication( 6088 mojo_shell_->ConnectToApplication(
6089 std::move(request), GetProxy(&service_provider), nullptr, 6089 std::move(request), GetProxy(&service_provider), nullptr,
6090 std::move(filter), base::Bind(&OnGotRemoteIDs)); 6090 std::move(filter), base::Bind(&OnGotRemoteIDs));
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
6131 int match_count, 6131 int match_count,
6132 int ordinal, 6132 int ordinal,
6133 const WebRect& selection_rect, 6133 const WebRect& selection_rect,
6134 bool final_status_update) { 6134 bool final_status_update) {
6135 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6135 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6136 selection_rect, ordinal, 6136 selection_rect, ordinal,
6137 final_status_update)); 6137 final_status_update));
6138 } 6138 }
6139 6139
6140 } // namespace content 6140 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698