Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_proxy_host.h" | 5 #include "content/browser/frame_host/render_frame_proxy_host.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "content/browser/bad_message.h" | 10 #include "content/browser/bad_message.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 return true; | 143 return true; |
| 144 | 144 |
| 145 bool handled = true; | 145 bool handled = true; |
| 146 IPC_BEGIN_MESSAGE_MAP(RenderFrameProxyHost, msg) | 146 IPC_BEGIN_MESSAGE_MAP(RenderFrameProxyHost, msg) |
| 147 IPC_MESSAGE_HANDLER(FrameHostMsg_Detach, OnDetach) | 147 IPC_MESSAGE_HANDLER(FrameHostMsg_Detach, OnDetach) |
| 148 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenURL, OnOpenURL) | 148 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenURL, OnOpenURL) |
| 149 IPC_MESSAGE_HANDLER(FrameHostMsg_RouteMessageEvent, OnRouteMessageEvent) | 149 IPC_MESSAGE_HANDLER(FrameHostMsg_RouteMessageEvent, OnRouteMessageEvent) |
| 150 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) | 150 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) |
| 151 IPC_MESSAGE_HANDLER(FrameHostMsg_AdvanceFocus, OnAdvanceFocus) | 151 IPC_MESSAGE_HANDLER(FrameHostMsg_AdvanceFocus, OnAdvanceFocus) |
| 152 IPC_MESSAGE_HANDLER(FrameHostMsg_FrameFocused, OnFrameFocused) | 152 IPC_MESSAGE_HANDLER(FrameHostMsg_FrameFocused, OnFrameFocused) |
| 153 IPC_MESSAGE_HANDLER(FrameHostMsg_TriedDisplayingInsecureContent, | |
| 154 OnTriedDisplayingInsecureContent) | |
| 155 IPC_MESSAGE_HANDLER(FrameHostMsg_TriedRunningInsecureContent, | |
| 156 OnTriedRunningInsecureContent) | |
| 153 IPC_MESSAGE_UNHANDLED(handled = false) | 157 IPC_MESSAGE_UNHANDLED(handled = false) |
| 154 IPC_END_MESSAGE_MAP() | 158 IPC_END_MESSAGE_MAP() |
| 155 return handled; | 159 return handled; |
| 156 } | 160 } |
| 157 | 161 |
| 158 bool RenderFrameProxyHost::InitRenderFrameProxy() { | 162 bool RenderFrameProxyHost::InitRenderFrameProxy() { |
| 159 DCHECK(!render_frame_proxy_created_); | 163 DCHECK(!render_frame_proxy_created_); |
| 160 | 164 |
| 161 // It is possible to reach this when the process is dead (in particular, when | 165 // It is possible to reach this when the process is dead (in particular, when |
| 162 // creating proxies from CreateProxiesForChildFrame). In that case, don't | 166 // creating proxies from CreateProxiesForChildFrame). In that case, don't |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 352 | 356 |
| 353 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type, | 357 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type, |
| 354 source_proxy_routing_id)); | 358 source_proxy_routing_id)); |
| 355 } | 359 } |
| 356 | 360 |
| 357 void RenderFrameProxyHost::OnFrameFocused() { | 361 void RenderFrameProxyHost::OnFrameFocused() { |
| 358 frame_tree_node_->frame_tree()->SetFocusedFrame(frame_tree_node_, | 362 frame_tree_node_->frame_tree()->SetFocusedFrame(frame_tree_node_, |
| 359 GetSiteInstance()); | 363 GetSiteInstance()); |
| 360 } | 364 } |
| 361 | 365 |
| 366 void RenderFrameProxyHost::OnTriedDisplayingInsecureContent(const GURL& origin, | |
| 367 const GURL& url) { | |
| 368 frame_tree_node_->current_frame_host()->OnTriedDisplayingInsecureContent( | |
|
alexmos
2016/01/09 01:39:02
Instead of referencing IPC handlers directly and m
| |
| 369 origin, url); | |
| 370 } | |
| 371 | |
| 372 void RenderFrameProxyHost::OnTriedRunningInsecureContent(const GURL& origin, | |
| 373 const GURL& url) { | |
| 374 frame_tree_node_->current_frame_host()->OnTriedRunningInsecureContent(origin, | |
| 375 url); | |
| 376 } | |
| 377 | |
| 362 } // namespace content | 378 } // namespace content |
| OLD | NEW |