| 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 "base/containers/hash_tables.h" | 7 #include "base/containers/hash_tables.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/metrics/user_metrics_action.h" | 9 #include "base/metrics/user_metrics_action.h" |
| 10 #include "content/browser/child_process_security_policy_impl.h" | 10 #include "content/browser/child_process_security_policy_impl.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 void RenderFrameHostImpl::NotifyContextMenuClosed( | 124 void RenderFrameHostImpl::NotifyContextMenuClosed( |
| 125 const CustomContextMenuContext& context) { | 125 const CustomContextMenuContext& context) { |
| 126 Send(new FrameMsg_ContextMenuClosed(routing_id_, context)); | 126 Send(new FrameMsg_ContextMenuClosed(routing_id_, context)); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void RenderFrameHostImpl::ExecuteCustomContextMenuCommand( | 129 void RenderFrameHostImpl::ExecuteCustomContextMenuCommand( |
| 130 int action, const CustomContextMenuContext& context) { | 130 int action, const CustomContextMenuContext& context) { |
| 131 Send(new FrameMsg_CustomContextMenuAction(routing_id_, context, action)); | 131 Send(new FrameMsg_CustomContextMenuAction(routing_id_, context, action)); |
| 132 } | 132 } |
| 133 | 133 |
| 134 void RenderFrameHostImpl::InsertCSS(const std::string& css) { |
| 135 Send(new FrameMsg_CSSInsertRequest(routing_id_, css)); |
| 136 } |
| 137 |
| 134 RenderViewHost* RenderFrameHostImpl::GetRenderViewHost() { | 138 RenderViewHost* RenderFrameHostImpl::GetRenderViewHost() { |
| 135 return render_view_host_; | 139 return render_view_host_; |
| 136 } | 140 } |
| 137 | 141 |
| 138 bool RenderFrameHostImpl::Send(IPC::Message* message) { | 142 bool RenderFrameHostImpl::Send(IPC::Message* message) { |
| 139 return GetProcess()->Send(message); | 143 return GetProcess()->Send(message); |
| 140 } | 144 } |
| 141 | 145 |
| 142 bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) { | 146 bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) { |
| 143 if (delegate_->OnMessageReceived(this, msg)) | 147 if (delegate_->OnMessageReceived(this, msg)) |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 params.pending_history_list_offset = -1; | 452 params.pending_history_list_offset = -1; |
| 449 params.current_history_list_offset = -1; | 453 params.current_history_list_offset = -1; |
| 450 params.current_history_list_length = 0; | 454 params.current_history_list_length = 0; |
| 451 params.url = url; | 455 params.url = url; |
| 452 params.transition = PAGE_TRANSITION_LINK; | 456 params.transition = PAGE_TRANSITION_LINK; |
| 453 params.navigation_type = FrameMsg_Navigate_Type::NORMAL; | 457 params.navigation_type = FrameMsg_Navigate_Type::NORMAL; |
| 454 Navigate(params); | 458 Navigate(params); |
| 455 } | 459 } |
| 456 | 460 |
| 457 } // namespace content | 461 } // namespace content |
| OLD | NEW |