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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1832813002: Add mojom module suffix in .mojom files in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Tom's comment Created 4 years, 9 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
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/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after
1845 base::Bind(&RenderFrameHostImpl::DidUseGeolocationPermission, 1845 base::Bind(&RenderFrameHostImpl::DidUseGeolocationPermission,
1846 weak_ptr_factory_.GetWeakPtr()))); 1846 weak_ptr_factory_.GetWeakPtr())));
1847 } 1847 }
1848 1848
1849 WakeLockServiceContext* wake_lock_service_context = 1849 WakeLockServiceContext* wake_lock_service_context =
1850 delegate_ ? delegate_->GetWakeLockServiceContext() : nullptr; 1850 delegate_ ? delegate_->GetWakeLockServiceContext() : nullptr;
1851 if (wake_lock_service_context) { 1851 if (wake_lock_service_context) {
1852 // WakeLockServiceContext is owned by WebContentsImpl so it will outlive 1852 // WakeLockServiceContext is owned by WebContentsImpl so it will outlive
1853 // this RenderFrameHostImpl, hence a raw pointer can be bound to service 1853 // this RenderFrameHostImpl, hence a raw pointer can be bound to service
1854 // factory callback. 1854 // factory callback.
1855 GetServiceRegistry()->AddService<WakeLockService>( 1855 GetServiceRegistry()->AddService<mojom::WakeLockService>(
1856 base::Bind(&WakeLockServiceContext::CreateService, 1856 base::Bind(&WakeLockServiceContext::CreateService,
1857 base::Unretained(wake_lock_service_context), 1857 base::Unretained(wake_lock_service_context),
1858 GetProcess()->GetID(), GetRoutingID())); 1858 GetProcess()->GetID(), GetRoutingID()));
1859 } 1859 }
1860 1860
1861 if (!permission_service_context_) 1861 if (!permission_service_context_)
1862 permission_service_context_.reset(new PermissionServiceContext(this)); 1862 permission_service_context_.reset(new PermissionServiceContext(this));
1863 1863
1864 GetServiceRegistry()->AddService<PermissionService>( 1864 GetServiceRegistry()->AddService<mojom::PermissionService>(
1865 base::Bind(&PermissionServiceContext::CreateService, 1865 base::Bind(&PermissionServiceContext::CreateService,
1866 base::Unretained(permission_service_context_.get()))); 1866 base::Unretained(permission_service_context_.get())));
1867 1867
1868 GetServiceRegistry()->AddService(base::Bind( 1868 GetServiceRegistry()->AddService(base::Bind(
1869 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); 1869 &PresentationServiceImpl::CreateMojoService, base::Unretained(this)));
1870 1870
1871 if (!frame_mojo_shell_) 1871 if (!frame_mojo_shell_)
1872 frame_mojo_shell_.reset(new FrameMojoShell(this)); 1872 frame_mojo_shell_.reset(new FrameMojoShell(this));
1873 1873
1874 GetServiceRegistry()->AddService<mojo::shell::mojom::Connector>(base::Bind( 1874 GetServiceRegistry()->AddService<mojo::shell::mojom::Connector>(base::Bind(
1875 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); 1875 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get())));
1876 1876
1877 #if defined(ENABLE_WEBVR) 1877 #if defined(ENABLE_WEBVR)
1878 const base::CommandLine& browser_command_line = 1878 const base::CommandLine& browser_command_line =
1879 *base::CommandLine::ForCurrentProcess(); 1879 *base::CommandLine::ForCurrentProcess();
1880 1880
1881 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { 1881 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) {
1882 GetServiceRegistry()->AddService<VRService>( 1882 GetServiceRegistry()->AddService(base::Bind(&VRDeviceManager::BindRequest));
1883 base::Bind(&VRDeviceManager::BindRequest));
1884 } 1883 }
1885 #endif 1884 #endif
1886 1885
1887 GetContentClient()->browser()->RegisterRenderFrameMojoServices( 1886 GetContentClient()->browser()->RegisterRenderFrameMojoServices(
1888 GetServiceRegistry(), this); 1887 GetServiceRegistry(), this);
1889 } 1888 }
1890 1889
1891 void RenderFrameHostImpl::SetState(RenderFrameHostImplState rfh_state) { 1890 void RenderFrameHostImpl::SetState(RenderFrameHostImplState rfh_state) {
1892 // We decrement the number of RenderFrameHosts in a SiteInstance when the 1891 // We decrement the number of RenderFrameHosts in a SiteInstance when the
1893 // status of a RenderFrameHost gets flipped from active. 1892 // status of a RenderFrameHost gets flipped from active.
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
2697 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame(); 2696 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame();
2698 if (!focused_frame_tree_node) 2697 if (!focused_frame_tree_node)
2699 return; 2698 return;
2700 RenderFrameHostImpl* focused_frame = 2699 RenderFrameHostImpl* focused_frame =
2701 focused_frame_tree_node->current_frame_host(); 2700 focused_frame_tree_node->current_frame_host();
2702 DCHECK(focused_frame); 2701 DCHECK(focused_frame);
2703 dst->focused_tree_id = focused_frame->GetAXTreeID(); 2702 dst->focused_tree_id = focused_frame->GetAXTreeID();
2704 } 2703 }
2705 2704
2706 } // namespace content 2705 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/leveldb_wrapper_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698