| 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 "web/WebRemoteFrameImpl.h" | 5 #include "web/WebRemoteFrameImpl.h" | 
| 6 | 6 | 
| 7 #include "core/dom/Fullscreen.h" | 7 #include "core/dom/Fullscreen.h" | 
| 8 #include "core/dom/RemoteSecurityContext.h" | 8 #include "core/dom/RemoteSecurityContext.h" | 
| 9 #include "core/dom/SecurityContext.h" | 9 #include "core/dom/SecurityContext.h" | 
| 10 #include "core/frame/FrameView.h" | 10 #include "core/frame/FrameView.h" | 
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 489   } | 489   } | 
| 490 } | 490 } | 
| 491 | 491 | 
| 492 bool WebRemoteFrameImpl::isIgnoredForHitTest() const { | 492 bool WebRemoteFrameImpl::isIgnoredForHitTest() const { | 
| 493   HTMLFrameOwnerElement* owner = frame()->deprecatedLocalOwner(); | 493   HTMLFrameOwnerElement* owner = frame()->deprecatedLocalOwner(); | 
| 494   if (!owner || !owner->layoutObject()) | 494   if (!owner || !owner->layoutObject()) | 
| 495     return false; | 495     return false; | 
| 496   return owner->layoutObject()->style()->pointerEvents() == PE_NONE; | 496   return owner->layoutObject()->style()->pointerEvents() == PE_NONE; | 
| 497 } | 497 } | 
| 498 | 498 | 
| 499 void WebRemoteFrameImpl::willEnterFullscreen() { | 499 void WebRemoteFrameImpl::willEnterFullscreen() {} | 
| 500   // This should only ever be called when the FrameOwner is local. |  | 
| 501   HTMLFrameOwnerElement* ownerElement = |  | 
| 502       toHTMLFrameOwnerElement(frame()->owner()); |  | 
| 503 |  | 
| 504   // Call requestFullscreen() on |ownerElement| to make it the provisional |  | 
| 505   // fullscreen element in FullscreenController, and to prepare |  | 
| 506   // fullscreenchange events that will need to fire on it and its (local) |  | 
| 507   // ancestors. The events will be triggered if/when fullscreen is entered. |  | 
| 508   // |  | 
| 509   // Passing |forCrossProcessAncestor| to requestFullscreen is necessary |  | 
| 510   // because: |  | 
| 511   // - |ownerElement| will need :-webkit-full-screen-ancestor style in |  | 
| 512   //   addition to :-webkit-full-screen. |  | 
| 513   // - there's no need to resend the ToggleFullscreen IPC to the browser |  | 
| 514   //   process. |  | 
| 515   // |  | 
| 516   // TODO(alexmos): currently, this assumes prefixed requests, but in the |  | 
| 517   // future, this should plumb in information about which request type |  | 
| 518   // (prefixed or unprefixed) to use for firing fullscreen events. |  | 
| 519   Fullscreen::from(ownerElement->document()) |  | 
| 520       .requestFullscreen(*ownerElement, Fullscreen::PrefixedRequest, |  | 
| 521                          true /* forCrossProcessAncestor */); |  | 
| 522 } |  | 
| 523 | 500 | 
| 524 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, | 501 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, | 
| 525                                        WebRemoteFrameClient* client) | 502                                        WebRemoteFrameClient* client) | 
| 526     : WebRemoteFrame(scope), | 503     : WebRemoteFrame(scope), | 
| 527       m_frameClient(RemoteFrameClientImpl::create(this)), | 504       m_frameClient(RemoteFrameClientImpl::create(this)), | 
| 528       m_client(client), | 505       m_client(client), | 
| 529       m_selfKeepAlive(this) {} | 506       m_selfKeepAlive(this) {} | 
| 530 | 507 | 
| 531 }  // namespace blink | 508 }  // namespace blink | 
| OLD | NEW | 
|---|