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 RemoteFrameView_h 6 #define RemoteFrameView_h 7 8 #include "platform/Widget.h" 9 #include "platform/geometry/IntRect.h" 10 11 namespace WebCore { 12 13 class RemoteFrame; 14 15 class RemoteFrameView : public Widget { 16 public: 17 static PassRefPtr<RemoteFrameView> create(RemoteFrame*); 18 19 virtual ~RemoteFrameView(); 20 isRemoteFrameView()21 virtual bool isRemoteFrameView() const OVERRIDE { return true; } 22 frame()23 RemoteFrame& frame() const { return *m_remoteFrame; } 24 25 // Override to notify remote frame that its viewport size has changed. 26 virtual void frameRectsChanged() OVERRIDE; 27 28 virtual void invalidateRect(const IntRect&) OVERRIDE; 29 30 virtual void setFrameRect(const IntRect&) OVERRIDE; 31 32 private: 33 explicit RemoteFrameView(RemoteFrame*); 34 35 RefPtr<RemoteFrame> m_remoteFrame; 36 }; 37 38 DEFINE_TYPE_CASTS(RemoteFrameView, Widget, widget, widget->isRemoteFrameView(), widget.isRemoteFrameView()); 39 40 } // namespace WebCore 41 42 #endif // RemoteFrameView_h 43