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 "config.h" | 5 #include "config.h" |
6 #include "web/WebRemoteFrameImpl.h" | 6 #include "web/WebRemoteFrameImpl.h" |
7 | 7 |
8 #include "core/frame/FrameOwner.h" | 8 #include "core/frame/FrameOwner.h" |
| 9 #include "core/frame/FrameView.h" |
9 #include "core/frame/RemoteFrame.h" | 10 #include "core/frame/RemoteFrame.h" |
10 #include "core/frame/Settings.h" | 11 #include "core/frame/Settings.h" |
11 #include "core/page/Page.h" | 12 #include "core/page/Page.h" |
12 #include "platform/heap/Handle.h" | 13 #include "platform/heap/Handle.h" |
13 #include "public/platform/WebFloatRect.h" | 14 #include "public/platform/WebFloatRect.h" |
14 #include "public/platform/WebRect.h" | 15 #include "public/platform/WebRect.h" |
15 #include "public/web/WebDocument.h" | 16 #include "public/web/WebDocument.h" |
16 #include "public/web/WebPerformance.h" | 17 #include "public/web/WebPerformance.h" |
17 #include "public/web/WebRange.h" | 18 #include "public/web/WebRange.h" |
18 #include "web/WebLocalFrameImpl.h" | 19 #include "web/WebLocalFrameImpl.h" |
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 m_frame = frame; | 873 m_frame = frame; |
873 } | 874 } |
874 | 875 |
875 WebRemoteFrameImpl* WebRemoteFrameImpl::fromFrame(RemoteFrame& frame) | 876 WebRemoteFrameImpl* WebRemoteFrameImpl::fromFrame(RemoteFrame& frame) |
876 { | 877 { |
877 if (!frame.client()) | 878 if (!frame.client()) |
878 return 0; | 879 return 0; |
879 return static_cast<RemoteFrameClient*>(frame.client())->webFrame(); | 880 return static_cast<RemoteFrameClient*>(frame.client())->webFrame(); |
880 } | 881 } |
881 | 882 |
| 883 void WebRemoteFrameImpl::initializeFromFrame(WebLocalFrame* source) const |
| 884 { |
| 885 ASSERT(source); |
| 886 WebLocalFrameImpl* localFrameImpl = toWebLocalFrameImpl(source); |
| 887 client()->initializeChildFrame( |
| 888 localFrameImpl->frame()->view()->frameRect(), |
| 889 localFrameImpl->frame()->view()->visibleContentScaleFactor()); |
| 890 } |
| 891 |
882 } // namespace blink | 892 } // namespace blink |
OLD | NEW |