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

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

Issue 1775953004: bluetooth: Move writeValue to mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Address scheib's comments Created 4 years, 8 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"
11 #include "base/containers/hash_tables.h" 11 #include "base/containers/hash_tables.h"
12 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/process/kill.h" 14 #include "base/process/kill.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "content/browser/accessibility/accessibility_mode_helper.h" 17 #include "content/browser/accessibility/accessibility_mode_helper.h"
18 #include "content/browser/accessibility/ax_tree_id_registry.h" 18 #include "content/browser/accessibility/ax_tree_id_registry.h"
19 #include "content/browser/accessibility/browser_accessibility_manager.h" 19 #include "content/browser/accessibility/browser_accessibility_manager.h"
20 #include "content/browser/accessibility/browser_accessibility_state_impl.h" 20 #include "content/browser/accessibility/browser_accessibility_state_impl.h"
21 #include "content/browser/bluetooth/web_bluetooth_service_impl.h"
21 #include "content/browser/child_process_security_policy_impl.h" 22 #include "content/browser/child_process_security_policy_impl.h"
22 #include "content/browser/child_process_security_policy_impl.h" 23 #include "content/browser/child_process_security_policy_impl.h"
23 #include "content/browser/devtools/render_frame_devtools_agent_host.h" 24 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
24 #include "content/browser/download/mhtml_generation_manager.h" 25 #include "content/browser/download/mhtml_generation_manager.h"
25 #include "content/browser/frame_host/cross_process_frame_connector.h" 26 #include "content/browser/frame_host/cross_process_frame_connector.h"
26 #include "content/browser/frame_host/cross_site_transferring_request.h" 27 #include "content/browser/frame_host/cross_site_transferring_request.h"
27 #include "content/browser/frame_host/frame_mojo_shell.h" 28 #include "content/browser/frame_host/frame_mojo_shell.h"
28 #include "content/browser/frame_host/frame_tree.h" 29 #include "content/browser/frame_host/frame_tree.h"
29 #include "content/browser/frame_host/frame_tree_node.h" 30 #include "content/browser/frame_host/frame_tree_node.h"
30 #include "content/browser/frame_host/navigation_handle_impl.h" 31 #include "content/browser/frame_host/navigation_handle_impl.h"
(...skipping 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after
1890 if (!permission_service_context_) 1891 if (!permission_service_context_)
1891 permission_service_context_.reset(new PermissionServiceContext(this)); 1892 permission_service_context_.reset(new PermissionServiceContext(this));
1892 1893
1893 GetServiceRegistry()->AddService<mojom::PermissionService>( 1894 GetServiceRegistry()->AddService<mojom::PermissionService>(
1894 base::Bind(&PermissionServiceContext::CreateService, 1895 base::Bind(&PermissionServiceContext::CreateService,
1895 base::Unretained(permission_service_context_.get()))); 1896 base::Unretained(permission_service_context_.get())));
1896 1897
1897 GetServiceRegistry()->AddService(base::Bind( 1898 GetServiceRegistry()->AddService(base::Bind(
1898 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); 1899 &PresentationServiceImpl::CreateMojoService, base::Unretained(this)));
1899 1900
1901 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1902 switches::kEnableWebBluetooth)) {
1903 GetServiceRegistry()->AddService(
1904 base::Bind(&RenderFrameHostImpl::CreateWebBluetoothService,
1905 base::Unretained(this)));
1906 }
1907
1900 if (!frame_mojo_shell_) 1908 if (!frame_mojo_shell_)
1901 frame_mojo_shell_.reset(new FrameMojoShell(this)); 1909 frame_mojo_shell_.reset(new FrameMojoShell(this));
1902 1910
1903 GetServiceRegistry()->AddService<mojo::shell::mojom::Connector>(base::Bind( 1911 GetServiceRegistry()->AddService<mojo::shell::mojom::Connector>(base::Bind(
1904 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); 1912 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get())));
1905 1913
1906 #if defined(ENABLE_WEBVR) 1914 #if defined(ENABLE_WEBVR)
1907 const base::CommandLine& browser_command_line = 1915 const base::CommandLine& browser_command_line =
1908 *base::CommandLine::ForCurrentProcess(); 1916 *base::CommandLine::ForCurrentProcess();
1909 1917
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
2724 // For the root frame tree node, also store the AXTreeID of the focused frame. 2732 // For the root frame tree node, also store the AXTreeID of the focused frame.
2725 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame(); 2733 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame();
2726 if (!focused_frame_tree_node) 2734 if (!focused_frame_tree_node)
2727 return; 2735 return;
2728 RenderFrameHostImpl* focused_frame = 2736 RenderFrameHostImpl* focused_frame =
2729 focused_frame_tree_node->current_frame_host(); 2737 focused_frame_tree_node->current_frame_host();
2730 DCHECK(focused_frame); 2738 DCHECK(focused_frame);
2731 dst->focused_tree_id = focused_frame->GetAXTreeID(); 2739 dst->focused_tree_id = focused_frame->GetAXTreeID();
2732 } 2740 }
2733 2741
2742 void RenderFrameHostImpl::CreateWebBluetoothService(
2743 blink::mojom::WebBluetoothServiceRequest request) {
2744 DCHECK(!web_bluetooth_service_);
2745 web_bluetooth_service_.reset(
2746 new WebBluetoothServiceImpl(this, std::move(request)));
2747 }
2748
2734 } // namespace content 2749 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/child/mojo/type_converters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698