| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 #include "content/port/browser/render_widget_host_view_port.h" | 51 #include "content/port/browser/render_widget_host_view_port.h" |
| 52 #include "content/public/browser/browser_accessibility_state.h" | 52 #include "content/public/browser/browser_accessibility_state.h" |
| 53 #include "content/public/browser/browser_context.h" | 53 #include "content/public/browser/browser_context.h" |
| 54 #include "content/public/browser/browser_message_filter.h" | 54 #include "content/public/browser/browser_message_filter.h" |
| 55 #include "content/public/browser/content_browser_client.h" | 55 #include "content/public/browser/content_browser_client.h" |
| 56 #include "content/public/browser/dom_operation_notification_details.h" | 56 #include "content/public/browser/dom_operation_notification_details.h" |
| 57 #include "content/public/browser/native_web_keyboard_event.h" | 57 #include "content/public/browser/native_web_keyboard_event.h" |
| 58 #include "content/public/browser/notification_details.h" | 58 #include "content/public/browser/notification_details.h" |
| 59 #include "content/public/browser/notification_service.h" | 59 #include "content/public/browser/notification_service.h" |
| 60 #include "content/public/browser/notification_types.h" | 60 #include "content/public/browser/notification_types.h" |
| 61 #include "content/public/browser/render_frame_host.h" |
| 61 #include "content/public/browser/render_widget_host_iterator.h" | 62 #include "content/public/browser/render_widget_host_iterator.h" |
| 62 #include "content/public/browser/user_metrics.h" | 63 #include "content/public/browser/user_metrics.h" |
| 63 #include "content/public/common/bindings_policy.h" | 64 #include "content/public/common/bindings_policy.h" |
| 64 #include "content/public/common/content_constants.h" | 65 #include "content/public/common/content_constants.h" |
| 65 #include "content/public/common/content_switches.h" | 66 #include "content/public/common/content_switches.h" |
| 66 #include "content/public/common/context_menu_params.h" | 67 #include "content/public/common/context_menu_params.h" |
| 67 #include "content/public/common/drop_data.h" | 68 #include "content/public/common/drop_data.h" |
| 68 #include "content/public/common/result_codes.h" | 69 #include "content/public/common/result_codes.h" |
| 69 #include "content/public/common/url_constants.h" | 70 #include "content/public/common/url_constants.h" |
| 70 #include "content/public/common/url_utils.h" | 71 #include "content/public/common/url_utils.h" |
| (...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 GetRoutingID(), | 1053 GetRoutingID(), |
| 1053 gfx::Point(client_x, client_y), | 1054 gfx::Point(client_x, client_y), |
| 1054 gfx::Point(screen_x, screen_y), | 1055 gfx::Point(screen_x, screen_y), |
| 1055 false, WebDragOperationNone)); | 1056 false, WebDragOperationNone)); |
| 1056 } | 1057 } |
| 1057 | 1058 |
| 1058 void RenderViewHostImpl::DragSourceSystemDragEnded() { | 1059 void RenderViewHostImpl::DragSourceSystemDragEnded() { |
| 1059 Send(new DragMsg_SourceSystemDragEnded(GetRoutingID())); | 1060 Send(new DragMsg_SourceSystemDragEnded(GetRoutingID())); |
| 1060 } | 1061 } |
| 1061 | 1062 |
| 1063 RenderFrameHost* RenderViewHostImpl::GetMainFrame() { |
| 1064 return RenderFrameHost::FromID(GetProcess()->GetID(), main_frame_routing_id_); |
| 1065 } |
| 1066 |
| 1062 void RenderViewHostImpl::AllowBindings(int bindings_flags) { | 1067 void RenderViewHostImpl::AllowBindings(int bindings_flags) { |
| 1063 // Never grant any bindings to browser plugin guests. | 1068 // Never grant any bindings to browser plugin guests. |
| 1064 if (GetProcess()->IsGuest()) { | 1069 if (GetProcess()->IsGuest()) { |
| 1065 NOTREACHED() << "Never grant bindings to a guest process."; | 1070 NOTREACHED() << "Never grant bindings to a guest process."; |
| 1066 return; | 1071 return; |
| 1067 } | 1072 } |
| 1068 | 1073 |
| 1069 // Ensure we aren't granting WebUI bindings to a process that has already | 1074 // Ensure we aren't granting WebUI bindings to a process that has already |
| 1070 // been used for non-privileged views. | 1075 // been used for non-privileged views. |
| 1071 if (bindings_flags & BINDINGS_POLICY_WEB_UI && | 1076 if (bindings_flags & BINDINGS_POLICY_WEB_UI && |
| (...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2255 void RenderViewHostImpl::AttachToFrameTree() { | 2260 void RenderViewHostImpl::AttachToFrameTree() { |
| 2256 FrameTree* frame_tree = delegate_->GetFrameTree(); | 2261 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 2257 | 2262 |
| 2258 frame_tree->ResetForMainFrameSwap(); | 2263 frame_tree->ResetForMainFrameSwap(); |
| 2259 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { | 2264 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { |
| 2260 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); | 2265 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); |
| 2261 } | 2266 } |
| 2262 } | 2267 } |
| 2263 | 2268 |
| 2264 } // namespace content | 2269 } // namespace content |
| OLD | NEW |