OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 return replication_state_; | 105 return replication_state_; |
106 } | 106 } |
107 | 107 |
108 void set_is_loading(bool is_loading) { | 108 void set_is_loading(bool is_loading) { |
109 is_loading_ = is_loading; | 109 is_loading_ = is_loading; |
110 } | 110 } |
111 bool is_loading() const { | 111 bool is_loading() const { |
112 return is_loading_; | 112 return is_loading_; |
113 } | 113 } |
114 | 114 |
115 void set_loading_progress(double loading_progress) { | |
116 loading_progress_ = loading_progress; | |
117 } | |
118 double get_loading_progress() const { return loading_progress_; } | |
clamy
2015/02/13 12:13:43
s/get_loading_progress()/loading_progress()
nit:
Fabrice (no longer in Chrome)
2015/02/13 18:04:24
Done.
clamy
2015/02/16 14:20:59
I don't see the modification to the accessor name
Fabrice (no longer in Chrome)
2015/02/20 12:58:58
Done.
| |
119 | |
115 RenderFrameHostImpl* current_frame_host() const { | 120 RenderFrameHostImpl* current_frame_host() const { |
116 return render_manager_.current_frame_host(); | 121 return render_manager_.current_frame_host(); |
117 } | 122 } |
118 | 123 |
119 bool IsDescendantOf(FrameTreeNode* other) const; | 124 bool IsDescendantOf(FrameTreeNode* other) const; |
120 | 125 |
121 private: | 126 private: |
122 void set_parent(FrameTreeNode* parent) { parent_ = parent; } | 127 void set_parent(FrameTreeNode* parent) { parent_ = parent; } |
123 | 128 |
124 // The next available browser-global FrameTreeNode ID. | 129 // The next available browser-global FrameTreeNode ID. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 // proxies for this frame. | 163 // proxies for this frame. |
159 FrameReplicationState replication_state_; | 164 FrameReplicationState replication_state_; |
160 | 165 |
161 // Boolean value indicating whether the frame is in the process of loading | 166 // Boolean value indicating whether the frame is in the process of loading |
162 // a document or not. In cross-process transfer navigation the DidStartLoading | 167 // a document or not. In cross-process transfer navigation the DidStartLoading |
163 // message is received from both existing RenderFrame and from the pending | 168 // message is received from both existing RenderFrame and from the pending |
164 // RenderFrame. However, there will be only one DidStopLoading message sent by | 169 // RenderFrame. However, there will be only one DidStopLoading message sent by |
165 // the pending-which-becomes-current RenderFrame. Since both renderers belong | 170 // the pending-which-becomes-current RenderFrame. Since both renderers belong |
166 // to the FrameTreeNode, it is better to ask it about the loading status than | 171 // to the FrameTreeNode, it is better to ask it about the loading status than |
167 // RenderFrameHost or using a counter to balance the events out. | 172 // RenderFrameHost or using a counter to balance the events out. |
168 bool is_loading_; | 173 bool is_loading_; |
carlosk
2015/02/13 15:05:41
Does the tracking of the loading progress happens
Fabrice (no longer in Chrome)
2015/02/13 18:04:24
This sounded good until I actually tried it and it
| |
169 | 174 |
175 // Double value representing the frame's completion progress (from 0 to 1). | |
176 double loading_progress_; | |
177 | |
170 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); | 178 DISALLOW_COPY_AND_ASSIGN(FrameTreeNode); |
171 }; | 179 }; |
172 | 180 |
173 } // namespace content | 181 } // namespace content |
174 | 182 |
175 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ | 183 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_ |
OLD | NEW |