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

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

Issue 908453003: Blink changes to record interest rects for http://w3c.github.io/frame-timing/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review comments (and re-sync) Created 5 years, 9 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
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame); 94 Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame);
95 Frame* findUnsafeParentScrollPropagationBoundary(); 95 Frame* findUnsafeParentScrollPropagationBoundary();
96 96
97 void finishSwapFrom(Frame*); 97 void finishSwapFrom(Frame*);
98 98
99 bool canNavigate(const Frame&); 99 bool canNavigate(const Frame&);
100 virtual void printNavigationErrorMessage(const Frame&, const char* reason) = 0; 100 virtual void printNavigationErrorMessage(const Frame&, const char* reason) = 0;
101 101
102 LayoutPart* ownerLayoutObject() const; // LayoutObject for the element that contains this frame. 102 LayoutPart* ownerLayoutObject() const; // LayoutObject for the element that contains this frame.
103 103
104 int64_t frameID() const { return m_frameID; }
105
104 Settings* settings() const; // can be null 106 Settings* settings() const; // can be null
105 107
106 // isLoading() is true when the embedder should think a load is in progress. 108 // isLoading() is true when the embedder should think a load is in progress.
107 // In the case of LocalFrames, it means that the frame has sent a didStartLo ading() 109 // In the case of LocalFrames, it means that the frame has sent a didStartLo ading()
108 // callback, but not the matching didStopLoading(). Inside blink, you probab ly 110 // callback, but not the matching didStopLoading(). Inside blink, you probab ly
109 // want Document::loadEventFinished() instead. 111 // want Document::loadEventFinished() instead.
110 void setIsLoading(bool isLoading) { m_isLoading = isLoading; } 112 void setIsLoading(bool isLoading) { m_isLoading = isLoading; }
111 bool isLoading() const { return m_isLoading; } 113 bool isLoading() const { return m_isLoading; }
112 virtual bool isLoadingAsChild() const { return isLoading(); } 114 virtual bool isLoadingAsChild() const { return isLoading(); }
113 115
114 protected: 116 protected:
115 Frame(FrameClient*, FrameHost*, FrameOwner*); 117 Frame(FrameClient*, FrameHost*, FrameOwner*);
116 118
117 virtual WindowProxyManager* windowProxyManager() const = 0; 119 virtual WindowProxyManager* windowProxyManager() const = 0;
118 120
119 mutable FrameTree m_treeNode; 121 mutable FrameTree m_treeNode;
120 122
121 RawPtrWillBeMember<FrameHost> m_host; 123 RawPtrWillBeMember<FrameHost> m_host;
122 RawPtrWillBeMember<FrameOwner> m_owner; 124 RawPtrWillBeMember<FrameOwner> m_owner;
123 125
124 private: 126 private:
125 FrameClient* m_client; 127 FrameClient* m_client;
128 // Needed to identify Frame Timing requests.
129 int64_t m_frameID;
126 bool m_isLoading; 130 bool m_isLoading;
127 }; 131 };
128 132
129 inline FrameClient* Frame::client() const 133 inline FrameClient* Frame::client() const
130 { 134 {
131 return m_client; 135 return m_client;
132 } 136 }
133 137
134 inline FrameOwner* Frame::owner() const 138 inline FrameOwner* Frame::owner() const
135 { 139 {
136 return m_owner; 140 return m_owner;
137 } 141 }
138 142
139 inline FrameTree& Frame::tree() const 143 inline FrameTree& Frame::tree() const
140 { 144 {
141 return m_treeNode; 145 return m_treeNode;
142 } 146 }
143 147
144 // Allow equality comparisons of Frames by reference or pointer, interchangeably . 148 // Allow equality comparisons of Frames by reference or pointer, interchangeably .
145 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame) 149 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Frame)
146 150
147 } // namespace blink 151 } // namespace blink
148 152
149 #endif // Frame_h 153 #endif // Frame_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698