Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: content/renderer/render_frame_proxy.cc

Issue 2008873004: Reland: Add support for entering/exiting HTML fullscreen from OOPIFs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests on Mac Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_frame_proxy.h ('k') | content/test/data/fullscreen_frame.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
267 OnAddContentSecurityPolicy) 267 OnAddContentSecurityPolicy)
268 IPC_MESSAGE_HANDLER(FrameMsg_ResetContentSecurityPolicy, 268 IPC_MESSAGE_HANDLER(FrameMsg_ResetContentSecurityPolicy,
269 OnResetContentSecurityPolicy) 269 OnResetContentSecurityPolicy)
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)
277 IPC_MESSAGE_UNHANDLED(handled = false) 278 IPC_MESSAGE_UNHANDLED(handled = false)
278 IPC_END_MESSAGE_MAP() 279 IPC_END_MESSAGE_MAP()
279 280
280 // Note: If |handled| is true, |this| may have been deleted. 281 // Note: If |handled| is true, |this| may have been deleted.
281 return handled; 282 return handled;
282 } 283 }
283 284
284 bool RenderFrameProxy::Send(IPC::Message* message) { 285 bool RenderFrameProxy::Send(IPC::Message* message) {
285 return RenderThread::Get()->Send(message); 286 return RenderThread::Get()->Send(message);
286 } 287 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 void RenderFrameProxy::OnSetPageFocus(bool is_focused) { 373 void RenderFrameProxy::OnSetPageFocus(bool is_focused) {
373 render_view_->SetFocus(is_focused); 374 render_view_->SetFocus(is_focused);
374 } 375 }
375 376
376 void RenderFrameProxy::OnSetFocusedFrame() { 377 void RenderFrameProxy::OnSetFocusedFrame() {
377 // This uses focusDocumentView rather than setFocusedFrame so that blur 378 // This uses focusDocumentView rather than setFocusedFrame so that blur
378 // events are properly dispatched on any currently focused elements. 379 // events are properly dispatched on any currently focused elements.
379 render_view_->webview()->focusDocumentView(web_frame_); 380 render_view_->webview()->focusDocumentView(web_frame_);
380 } 381 }
381 382
383 void RenderFrameProxy::OnWillEnterFullscreen() {
384 render_view_->webview()->willEnterFullScreen(web_frame_);
385 }
386
382 void RenderFrameProxy::frameDetached(DetachType type) { 387 void RenderFrameProxy::frameDetached(DetachType type) {
383 if (type == DetachType::Remove && web_frame_->parent()) { 388 if (type == DetachType::Remove && web_frame_->parent()) {
384 web_frame_->parent()->removeChild(web_frame_); 389 web_frame_->parent()->removeChild(web_frame_);
385 390
386 // Let the browser process know this subframe is removed, so that it is 391 // Let the browser process know this subframe is removed, so that it is
387 // destroyed in its current process. 392 // destroyed in its current process.
388 Send(new FrameHostMsg_Detach(routing_id_)); 393 Send(new FrameHostMsg_Detach(routing_id_));
389 } 394 }
390 395
391 web_frame_->close(); 396 web_frame_->close();
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 blink::WebLocalFrame* source) { 492 blink::WebLocalFrame* source) {
488 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); 493 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID();
489 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); 494 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id));
490 } 495 }
491 496
492 void RenderFrameProxy::frameFocused() { 497 void RenderFrameProxy::frameFocused() {
493 Send(new FrameHostMsg_FrameFocused(routing_id_)); 498 Send(new FrameHostMsg_FrameFocused(routing_id_));
494 } 499 }
495 500
496 } // namespace 501 } // namespace
OLDNEW
« no previous file with comments | « content/renderer/render_frame_proxy.h ('k') | content/test/data/fullscreen_frame.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698