Index: third_party/WebKit/Source/core/frame/Framelet.h |
diff --git a/third_party/WebKit/Source/core/frame/Framelet.h b/third_party/WebKit/Source/core/frame/Framelet.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..25664d252eb6269035bd33ee5421e8c04cc3a4bd |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/frame/Framelet.h |
@@ -0,0 +1,84 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef Framelet_h |
+#define Framelet_h |
+ |
+#include "core/CoreExport.h" |
+#include "platform/heap/Handle.h" |
+#include "public/platform/WebFocusType.h" |
+#include "wtf/RefCounted.h" |
+ |
+namespace blink { |
+ |
+class Event; |
+class IntRect; |
+class FrameletClient; |
+class FrameletView; |
+class FrameOwner; |
+class LayoutPart; |
+class WebLayer; |
+ |
+class CORE_EXPORT Framelet : public RefCountedWillBeGarbageCollectedFinalized<Framelet> { |
+public: |
+ static PassRefPtrWillBeRawPtr<Framelet> create(FrameletClient*, FrameOwner*); |
+ |
+ virtual ~Framelet(); |
+ |
+ DECLARE_VIRTUAL_TRACE(); |
+ |
+ void didAttach(); |
+ void didDetach(); |
+ |
+ // FIXME: Remove this method once we have input routing in the browser |
+ // process. See http://crbug.com/339659. |
+ void forwardInputEvent(Event*); |
+ |
+ void frameRectsChanged(const IntRect& frameRect); |
+ |
+ void setRemotePlatformLayer(WebLayer*); |
+ WebLayer* remotePlatformLayer() const; |
+ |
+ void updateFocus(bool, WebFocusType); |
+ |
+ void updateVisibility(bool); |
+ |
+ void setView(PassRefPtrWillBeRawPtr<FrameletView>); |
+ void createView(); |
+ |
+ FrameletClient* client() const; |
+ |
+ FrameOwner* owner() const; |
+ void setOwner(FrameOwner* owner) { m_owner = owner; } |
+ |
+ LayoutPart* ownerLayoutObject() const; // LayoutObject for the element that contains this frame. |
+ |
+ FrameletView* view() const; |
+ |
+private: |
+ Framelet(FrameletClient*, FrameOwner*); |
+ |
+ RawPtrWillBeMember<FrameletClient> m_client; |
+ RawPtrWillBeMember<FrameOwner> m_owner; |
+ RefPtrWillBeMember<FrameletView> m_view; |
+}; |
+ |
+inline FrameletClient* Framelet::client() const |
+{ |
+ return m_client; |
+} |
+ |
+inline FrameOwner* Framelet::owner() const |
+{ |
+ return m_owner; |
+} |
+ |
+inline FrameletView* Framelet::view() const |
+{ |
+ return m_view.get(); |
+} |
+ |
+} // namespace blink |
+ |
+#endif // Framelet_h |