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

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

Issue 1914643005: Add support for entering/exiting HTML fullscreen from OOPIFs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase (and deal with gfx:: -> display:: rename). Add replication CL as dependent and use its allowfullscreen test file. Created 4 years, 7 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
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 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)
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 void RenderFrameProxy::OnSetPageFocus(bool is_focused) { 362 void RenderFrameProxy::OnSetPageFocus(bool is_focused) {
362 render_view_->SetFocus(is_focused); 363 render_view_->SetFocus(is_focused);
363 } 364 }
364 365
365 void RenderFrameProxy::OnSetFocusedFrame() { 366 void RenderFrameProxy::OnSetFocusedFrame() {
366 // This uses focusDocumentView rather than setFocusedFrame so that blur 367 // This uses focusDocumentView rather than setFocusedFrame so that blur
367 // events are properly dispatched on any currently focused elements. 368 // events are properly dispatched on any currently focused elements.
368 render_view_->webview()->focusDocumentView(web_frame_); 369 render_view_->webview()->focusDocumentView(web_frame_);
369 } 370 }
370 371
372 void RenderFrameProxy::OnWillEnterFullscreen() {
373 render_view_->webview()->willEnterFullScreen(web_frame_);
374 }
375
371 void RenderFrameProxy::frameDetached(DetachType type) { 376 void RenderFrameProxy::frameDetached(DetachType type) {
372 if (type == DetachType::Remove && web_frame_->parent()) { 377 if (type == DetachType::Remove && web_frame_->parent()) {
373 web_frame_->parent()->removeChild(web_frame_); 378 web_frame_->parent()->removeChild(web_frame_);
374 379
375 // Let the browser process know this subframe is removed, so that it is 380 // Let the browser process know this subframe is removed, so that it is
376 // destroyed in its current process. 381 // destroyed in its current process.
377 Send(new FrameHostMsg_Detach(routing_id_)); 382 Send(new FrameHostMsg_Detach(routing_id_));
378 } 383 }
379 384
380 web_frame_->close(); 385 web_frame_->close();
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 blink::WebLocalFrame* source) { 481 blink::WebLocalFrame* source) {
477 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); 482 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID();
478 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); 483 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id));
479 } 484 }
480 485
481 void RenderFrameProxy::frameFocused() { 486 void RenderFrameProxy::frameFocused() {
482 Send(new FrameHostMsg_FrameFocused(routing_id_)); 487 Send(new FrameHostMsg_FrameFocused(routing_id_));
483 } 488 }
484 489
485 } // namespace 490 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698