OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 Framelet_h |
| 6 #define Framelet_h |
| 7 |
| 8 #include "core/CoreExport.h" |
| 9 #include "platform/heap/Handle.h" |
| 10 #include "public/platform/WebFocusType.h" |
| 11 #include "wtf/RefCounted.h" |
| 12 |
| 13 namespace blink { |
| 14 |
| 15 class Event; |
| 16 class IntRect; |
| 17 class FrameletClient; |
| 18 class FrameletView; |
| 19 class FrameOwner; |
| 20 class LayoutPart; |
| 21 class WebLayer; |
| 22 |
| 23 class CORE_EXPORT Framelet : public RefCountedWillBeGarbageCollectedFinalized<Fr
amelet> { |
| 24 public: |
| 25 static PassRefPtrWillBeRawPtr<Framelet> create(FrameletClient*, FrameOwner*)
; |
| 26 |
| 27 virtual ~Framelet(); |
| 28 |
| 29 DECLARE_VIRTUAL_TRACE(); |
| 30 |
| 31 void didAttach(); |
| 32 void didDetach(); |
| 33 |
| 34 // FIXME: Remove this method once we have input routing in the browser |
| 35 // process. See http://crbug.com/339659. |
| 36 void forwardInputEvent(Event*); |
| 37 |
| 38 void frameRectsChanged(const IntRect& frameRect); |
| 39 |
| 40 void setRemotePlatformLayer(WebLayer*); |
| 41 WebLayer* remotePlatformLayer() const; |
| 42 |
| 43 void updateFocus(bool, WebFocusType); |
| 44 |
| 45 void updateVisibility(bool); |
| 46 |
| 47 void setView(PassRefPtrWillBeRawPtr<FrameletView>); |
| 48 void createView(); |
| 49 |
| 50 FrameletClient* client() const; |
| 51 |
| 52 FrameOwner* owner() const; |
| 53 void setOwner(FrameOwner* owner) { m_owner = owner; } |
| 54 |
| 55 LayoutPart* ownerLayoutObject() const; // LayoutObject for the element that
contains this frame. |
| 56 |
| 57 FrameletView* view() const; |
| 58 |
| 59 private: |
| 60 Framelet(FrameletClient*, FrameOwner*); |
| 61 |
| 62 RawPtrWillBeMember<FrameletClient> m_client; |
| 63 RawPtrWillBeMember<FrameOwner> m_owner; |
| 64 RefPtrWillBeMember<FrameletView> m_view; |
| 65 }; |
| 66 |
| 67 inline FrameletClient* Framelet::client() const |
| 68 { |
| 69 return m_client; |
| 70 } |
| 71 |
| 72 inline FrameOwner* Framelet::owner() const |
| 73 { |
| 74 return m_owner; |
| 75 } |
| 76 |
| 77 inline FrameletView* Framelet::view() const |
| 78 { |
| 79 return m_view.get(); |
| 80 } |
| 81 |
| 82 } // namespace blink |
| 83 |
| 84 #endif // Framelet_h |
OLD | NEW |