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 "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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 422 m_frame = frame; | 422 m_frame = frame; |
| 423 } | 423 } |
| 424 | 424 |
| 425 WebRemoteFrameImpl* WebRemoteFrameImpl::fromFrame(RemoteFrame& frame) | 425 WebRemoteFrameImpl* WebRemoteFrameImpl::fromFrame(RemoteFrame& frame) |
| 426 { | 426 { |
| 427 if (!frame.client()) | 427 if (!frame.client()) |
| 428 return nullptr; | 428 return nullptr; |
| 429 return static_cast<RemoteFrameClientImpl*>(frame.client())->webFrame(); | 429 return static_cast<RemoteFrameClientImpl*>(frame.client())->webFrame(); |
| 430 } | 430 } |
| 431 | 431 |
| 432 void WebRemoteFrameImpl::initializeFromFrame(WebLocalFrame* source) const | 432 void WebRemoteFrameImpl::initializeFromFrame(WebLocalFrame* source) const |
|
dcheng
2016/08/17 17:11:31
Do we still need to pass |source| here if it's unu
| |
| 433 { | 433 { |
| 434 DCHECK(source); | 434 DCHECK(source); |
| 435 WebLocalFrameImpl* localFrameImpl = toWebLocalFrameImpl(source); | 435 client()->initializeChildFrame(); |
| 436 client()->initializeChildFrame(localFrameImpl->frame()->page()->deviceScaleF actor()); | |
| 437 } | 436 } |
| 438 | 437 |
| 439 void WebRemoteFrameImpl::setReplicatedOrigin(const WebSecurityOrigin& origin) co nst | 438 void WebRemoteFrameImpl::setReplicatedOrigin(const WebSecurityOrigin& origin) co nst |
| 440 { | 439 { |
| 441 DCHECK(frame()); | 440 DCHECK(frame()); |
| 442 frame()->securityContext()->setReplicatedOrigin(origin); | 441 frame()->securityContext()->setReplicatedOrigin(origin); |
| 443 | 442 |
| 444 // If the origin of a remote frame changed, the accessibility object for the owner | 443 // If the origin of a remote frame changed, the accessibility object for the owner |
| 445 // element now points to a different child. | 444 // element now points to a different child. |
| 446 // | 445 // |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 549 | 548 |
| 550 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, WebRemoteFrameCli ent* client) | 549 WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, WebRemoteFrameCli ent* client) |
| 551 : WebRemoteFrame(scope) | 550 : WebRemoteFrame(scope) |
| 552 , m_frameClient(RemoteFrameClientImpl::create(this)) | 551 , m_frameClient(RemoteFrameClientImpl::create(this)) |
| 553 , m_client(client) | 552 , m_client(client) |
| 554 , m_selfKeepAlive(this) | 553 , m_selfKeepAlive(this) |
| 555 { | 554 { |
| 556 } | 555 } |
| 557 | 556 |
| 558 } // namespace blink | 557 } // namespace blink |
| OLD | NEW |