| OLD | NEW |
| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
| 13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
| 15 #include "base/metrics/histogram_macros.h" | 15 #include "base/metrics/histogram_macros.h" |
| 16 #include "base/metrics/user_metrics.h" | 16 #include "base/metrics/user_metrics.h" |
| 17 #include "base/process/kill.h" | 17 #include "base/process/kill.h" |
| 18 #include "base/strings/utf_string_conversions.h" |
| 18 #include "base/time/time.h" | 19 #include "base/time/time.h" |
| 19 #include "build/build_config.h" | 20 #include "build/build_config.h" |
| 20 #include "content/browser/accessibility/browser_accessibility_manager.h" | 21 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 21 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 22 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
| 22 #include "content/browser/bluetooth/web_bluetooth_service_impl.h" | 23 #include "content/browser/bluetooth/web_bluetooth_service_impl.h" |
| 23 #include "content/browser/browser_main_loop.h" | 24 #include "content/browser/browser_main_loop.h" |
| 24 #include "content/browser/child_process_security_policy_impl.h" | 25 #include "content/browser/child_process_security_policy_impl.h" |
| 25 #include "content/browser/devtools/render_frame_devtools_agent_host.h" | 26 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
| 26 #include "content/browser/download/mhtml_generation_manager.h" | 27 #include "content/browser/download/mhtml_generation_manager.h" |
| 27 #include "content/browser/frame_host/cross_process_frame_connector.h" | 28 #include "content/browser/frame_host/cross_process_frame_connector.h" |
| (...skipping 3221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3249 mojom::kNavigation_FrameSpec, browser_info_.interface_provider_specs, | 3250 mojom::kNavigation_FrameSpec, browser_info_.interface_provider_specs, |
| 3250 &browser_spec); | 3251 &browser_spec); |
| 3251 service_manager::GetInterfaceProviderSpec( | 3252 service_manager::GetInterfaceProviderSpec( |
| 3252 mojom::kNavigation_FrameSpec, renderer_info_.interface_provider_specs, | 3253 mojom::kNavigation_FrameSpec, renderer_info_.interface_provider_specs, |
| 3253 &renderer_spec); | 3254 &renderer_spec); |
| 3254 interface_registry_->Bind(std::move(interfaces), | 3255 interface_registry_->Bind(std::move(interfaces), |
| 3255 browser_info_.identity, browser_spec, | 3256 browser_info_.identity, browser_spec, |
| 3256 renderer_info_.identity, renderer_spec); | 3257 renderer_info_.identity, renderer_spec); |
| 3257 } | 3258 } |
| 3258 | 3259 |
| 3260 void RenderFrameHostImpl::RequestKeyLock( |
| 3261 const std::vector<std::string>& key_codes, |
| 3262 const RequestKeyLockCallback& callback) { |
| 3263 // TODO(zijiehe): Implementation required. |
| 3264 callback.Run(false, base::ASCIIToUTF16("Unsupported")); |
| 3265 } |
| 3266 |
| 3267 void RenderFrameHostImpl::CancelKeyLock(const CancelKeyLockCallback& callback) { |
| 3268 // TODO(zijiehe): Implementation required. |
| 3269 callback.Run(); |
| 3270 } |
| 3271 |
| 3259 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) | 3272 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) |
| 3260 #if defined(OS_MACOSX) | 3273 #if defined(OS_MACOSX) |
| 3261 | 3274 |
| 3262 void RenderFrameHostImpl::DidSelectPopupMenuItem(int selected_index) { | 3275 void RenderFrameHostImpl::DidSelectPopupMenuItem(int selected_index) { |
| 3263 Send(new FrameMsg_SelectPopupMenuItem(routing_id_, selected_index)); | 3276 Send(new FrameMsg_SelectPopupMenuItem(routing_id_, selected_index)); |
| 3264 } | 3277 } |
| 3265 | 3278 |
| 3266 void RenderFrameHostImpl::DidCancelPopupMenu() { | 3279 void RenderFrameHostImpl::DidCancelPopupMenu() { |
| 3267 Send(new FrameMsg_SelectPopupMenuItem(routing_id_, -1)); | 3280 Send(new FrameMsg_SelectPopupMenuItem(routing_id_, -1)); |
| 3268 } | 3281 } |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3698 } | 3711 } |
| 3699 | 3712 |
| 3700 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( | 3713 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( |
| 3701 const std::string& interface_name, | 3714 const std::string& interface_name, |
| 3702 mojo::ScopedMessagePipeHandle pipe) { | 3715 mojo::ScopedMessagePipeHandle pipe) { |
| 3703 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); | 3716 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); |
| 3704 } | 3717 } |
| 3705 #endif | 3718 #endif |
| 3706 | 3719 |
| 3707 } // namespace content | 3720 } // namespace content |
| OLD | NEW |