| 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/renderer/render_frame_proxy.h" | 5 #include "content/renderer/render_frame_proxy.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) | 267 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) |
| 268 IPC_MESSAGE_HANDLER(FrameMsg_DispatchLoad, OnDispatchLoad) | 268 IPC_MESSAGE_HANDLER(FrameMsg_DispatchLoad, OnDispatchLoad) |
| 269 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateName, OnDidUpdateName) | 269 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateName, OnDidUpdateName) |
| 270 IPC_MESSAGE_HANDLER(FrameMsg_EnforceStrictMixedContentChecking, | 270 IPC_MESSAGE_HANDLER(FrameMsg_EnforceStrictMixedContentChecking, |
| 271 OnEnforceStrictMixedContentChecking) | 271 OnEnforceStrictMixedContentChecking) |
| 272 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, | 272 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, |
| 273 OnSetFrameOwnerProperties) | 273 OnSetFrameOwnerProperties) |
| 274 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateOrigin, OnDidUpdateOrigin) | 274 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateOrigin, OnDidUpdateOrigin) |
| 275 IPC_MESSAGE_HANDLER(InputMsg_SetFocus, OnSetPageFocus) | 275 IPC_MESSAGE_HANDLER(InputMsg_SetFocus, OnSetPageFocus) |
| 276 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) | 276 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) |
| 277 IPC_MESSAGE_HANDLER(FrameMsg_WillEnterFullscreen, OnWillEnterFullscreen) | |
| 278 IPC_MESSAGE_UNHANDLED(handled = false) | 277 IPC_MESSAGE_UNHANDLED(handled = false) |
| 279 IPC_END_MESSAGE_MAP() | 278 IPC_END_MESSAGE_MAP() |
| 280 | 279 |
| 281 // Note: If |handled| is true, |this| may have been deleted. | 280 // Note: If |handled| is true, |this| may have been deleted. |
| 282 return handled; | 281 return handled; |
| 283 } | 282 } |
| 284 | 283 |
| 285 bool RenderFrameProxy::Send(IPC::Message* message) { | 284 bool RenderFrameProxy::Send(IPC::Message* message) { |
| 286 return RenderThread::Get()->Send(message); | 285 return RenderThread::Get()->Send(message); |
| 287 } | 286 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 void RenderFrameProxy::OnSetPageFocus(bool is_focused) { | 361 void RenderFrameProxy::OnSetPageFocus(bool is_focused) { |
| 363 render_view_->SetFocus(is_focused); | 362 render_view_->SetFocus(is_focused); |
| 364 } | 363 } |
| 365 | 364 |
| 366 void RenderFrameProxy::OnSetFocusedFrame() { | 365 void RenderFrameProxy::OnSetFocusedFrame() { |
| 367 // This uses focusDocumentView rather than setFocusedFrame so that blur | 366 // This uses focusDocumentView rather than setFocusedFrame so that blur |
| 368 // events are properly dispatched on any currently focused elements. | 367 // events are properly dispatched on any currently focused elements. |
| 369 render_view_->webview()->focusDocumentView(web_frame_); | 368 render_view_->webview()->focusDocumentView(web_frame_); |
| 370 } | 369 } |
| 371 | 370 |
| 372 void RenderFrameProxy::OnWillEnterFullscreen() { | |
| 373 render_view_->webview()->willEnterFullScreen(web_frame_); | |
| 374 } | |
| 375 | |
| 376 void RenderFrameProxy::frameDetached(DetachType type) { | 371 void RenderFrameProxy::frameDetached(DetachType type) { |
| 377 if (type == DetachType::Remove && web_frame_->parent()) { | 372 if (type == DetachType::Remove && web_frame_->parent()) { |
| 378 web_frame_->parent()->removeChild(web_frame_); | 373 web_frame_->parent()->removeChild(web_frame_); |
| 379 | 374 |
| 380 // Let the browser process know this subframe is removed, so that it is | 375 // Let the browser process know this subframe is removed, so that it is |
| 381 // destroyed in its current process. | 376 // destroyed in its current process. |
| 382 Send(new FrameHostMsg_Detach(routing_id_)); | 377 Send(new FrameHostMsg_Detach(routing_id_)); |
| 383 } | 378 } |
| 384 | 379 |
| 385 web_frame_->close(); | 380 web_frame_->close(); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 blink::WebLocalFrame* source) { | 476 blink::WebLocalFrame* source) { |
| 482 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); | 477 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); |
| 483 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); | 478 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); |
| 484 } | 479 } |
| 485 | 480 |
| 486 void RenderFrameProxy::frameFocused() { | 481 void RenderFrameProxy::frameFocused() { |
| 487 Send(new FrameHostMsg_FrameFocused(routing_id_)); | 482 Send(new FrameHostMsg_FrameFocused(routing_id_)); |
| 488 } | 483 } |
| 489 | 484 |
| 490 } // namespace | 485 } // namespace |
| OLD | NEW |