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 3 // found in the LICENSE file. 4 5 #ifndef RemoteFrame_h 6 #define RemoteFrame_h 7 8 #include "core/frame/Frame.h" 9 10 namespace blink { 11 12 class RemoteFrameView; 13 14 class RemoteFrame: public Frame { 15 public: 16 static PassRefPtrWillBeRawPtr<RemoteFrame> create(FrameClient*, FrameHost*, FrameOwner*); isRemoteFrame()17 virtual bool isRemoteFrame() const OVERRIDE { return true; } 18 19 virtual ~RemoteFrame(); 20 21 virtual void detach() OVERRIDE; 22 23 void setView(PassRefPtr<RemoteFrameView>); 24 void createView(); 25 26 RemoteFrameView* view() const; 27 28 private: 29 RemoteFrame(FrameClient*, FrameHost*, FrameOwner*); 30 31 RefPtr<RemoteFrameView> m_view; 32 }; 33 view()34inline RemoteFrameView* RemoteFrame::view() const 35 { 36 return m_view.get(); 37 } 38 39 DEFINE_TYPE_CASTS(RemoteFrame, Frame, remoteFrame, remoteFrame->isRemoteFrame(), remoteFrame.isRemoteFrame()); 40 41 } // namespace blink 42 43 #endif // RemoteFrame_h 44