Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Side by Side Diff: Source/core/frame/Frame.h

Issue 842033003: Cleanup RemotePlatformLayer when disconnecting RemoteFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/frame/Frame.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999-2001 Lars Knoll <knoll@kde.org> 3 * 1999-2001 Lars Knoll <knoll@kde.org>
4 * 1999-2001 Antti Koivisto <koivisto@kde.org> 4 * 1999-2001 Antti Koivisto <koivisto@kde.org>
5 * 2000-2001 Simon Hausmann <hausmann@kde.org> 5 * 2000-2001 Simon Hausmann <hausmann@kde.org>
6 * 2000-2001 Dirk Mueller <mueller@kde.org> 6 * 2000-2001 Dirk Mueller <mueller@kde.org>
7 * 2000 Stefan Schimanski <1Stein@gmx.de> 7 * 2000 Stefan Schimanski <1Stein@gmx.de>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 10 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class FrameClient; 42 class FrameClient;
43 class FrameHost; 43 class FrameHost;
44 class FrameOwner; 44 class FrameOwner;
45 class HTMLFrameOwnerElement; 45 class HTMLFrameOwnerElement;
46 class DOMWindow; 46 class DOMWindow;
47 class KURL; 47 class KURL;
48 class Page; 48 class Page;
49 class RenderPart; 49 class RenderPart;
50 class SecurityContext; 50 class SecurityContext;
51 class Settings; 51 class Settings;
52 class WebLayer;
53 class WindowProxy; 52 class WindowProxy;
54 53
55 class Frame : public RefCountedWillBeGarbageCollectedFinalized<Frame> { 54 class Frame : public RefCountedWillBeGarbageCollectedFinalized<Frame> {
56 public: 55 public:
57 virtual ~Frame(); 56 virtual ~Frame();
58 57
59 virtual void trace(Visitor*); 58 virtual void trace(Visitor*);
60 59
61 virtual bool isLocalFrame() const { return false; } 60 virtual bool isLocalFrame() const { return false; }
62 virtual bool isRemoteFrame() const { return false; } 61 virtual bool isRemoteFrame() const { return false; }
(...skipping 29 matching lines...) Expand all
92 virtual SecurityContext* securityContext() const = 0; 91 virtual SecurityContext* securityContext() const = 0;
93 92
94 Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame); 93 Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame);
95 Frame* findUnsafeParentScrollPropagationBoundary(); 94 Frame* findUnsafeParentScrollPropagationBoundary();
96 95
97 bool canNavigate(const Frame&); 96 bool canNavigate(const Frame&);
98 virtual void printNavigationErrorMessage(const Frame&, const char* reason) = 0; 97 virtual void printNavigationErrorMessage(const Frame&, const char* reason) = 0;
99 98
100 RenderPart* ownerRenderer() const; // Renderer for the element that contains this frame. 99 RenderPart* ownerRenderer() const; // Renderer for the element that contains this frame.
101 100
102 // FIXME: These should move to RemoteFrame when that is instantiated.
103 void setRemotePlatformLayer(WebLayer*);
104 WebLayer* remotePlatformLayer() const { return m_remotePlatformLayer; }
105
106 Settings* settings() const; // can be null 101 Settings* settings() const; // can be null
107 102
108 // FIXME: This method identifies a LocalFrame that is acting as a RemoteFram e.
109 // It is necessary only until we can instantiate a RemoteFrame, at which poi nt
110 // it can be removed and its callers can be converted to use the isRemoteFra me()
111 // method.
112 bool isRemoteFrameTemporary() const { return m_remotePlatformLayer; }
113
114 // isLoading() is true when the embedder should think a load is in progress. 103 // isLoading() is true when the embedder should think a load is in progress.
115 // In the case of LocalFrames, it means that the frame has sent a didStartLo ading() 104 // In the case of LocalFrames, it means that the frame has sent a didStartLo ading()
116 // callback, but not the matching didStopLoading(). Inside blink, you probab ly 105 // callback, but not the matching didStopLoading(). Inside blink, you probab ly
117 // want Document::loadEventFinished() instead. 106 // want Document::loadEventFinished() instead.
118 void setIsLoading(bool isLoading) { m_isLoading = isLoading; } 107 void setIsLoading(bool isLoading) { m_isLoading = isLoading; }
119 bool isLoading() const { return m_isLoading; } 108 bool isLoading() const { return m_isLoading; }
120 virtual bool isLoadingAsChild() const { return isLoading(); } 109 virtual bool isLoadingAsChild() const { return isLoading(); }
121 110
122 protected: 111 protected:
123 Frame(FrameClient*, FrameHost*, FrameOwner*); 112 Frame(FrameClient*, FrameHost*, FrameOwner*);
124 113
125 mutable FrameTree m_treeNode; 114 mutable FrameTree m_treeNode;
126 115
127 RawPtrWillBeMember<FrameHost> m_host; 116 RawPtrWillBeMember<FrameHost> m_host;
128 RawPtrWillBeMember<FrameOwner> m_owner; 117 RawPtrWillBeMember<FrameOwner> m_owner;
129 118
130 private: 119 private:
131 FrameClient* m_client; 120 FrameClient* m_client;
132 WebLayer* m_remotePlatformLayer;
133
134 bool m_isLoading; 121 bool m_isLoading;
135 }; 122 };
136 123
137 inline FrameClient* Frame::client() const 124 inline FrameClient* Frame::client() const
138 { 125 {
139 return m_client; 126 return m_client;
140 } 127 }
141 128
142 inline FrameOwner* Frame::owner() const 129 inline FrameOwner* Frame::owner() const
143 { 130 {
144 return m_owner; 131 return m_owner;
145 } 132 }
146 133
147 inline FrameTree& Frame::tree() const 134 inline FrameTree& Frame::tree() const
148 { 135 {
149 return m_treeNode; 136 return m_treeNode;
150 } 137 }
151 138
152 // Allow equality comparisons of Frames by reference or pointer, interchangeably . 139 // Allow equality comparisons of Frames by reference or pointer, interchangeably .
153 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame) 140 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame)
154 141
155 } // namespace blink 142 } // namespace blink
156 143
157 #endif // Frame_h 144 #endif // Frame_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/Frame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698