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

Side by Side Diff: content/browser/web_contents/web_contents_impl.h

Issue 925623002: Refactor the loading tracking logic in WebContentsImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments consistency. 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 1056
1057 // Map of SiteInstance ID to max page ID for this tab. A page ID is specific 1057 // Map of SiteInstance ID to max page ID for this tab. A page ID is specific
1058 // to a given tab and SiteInstance, and must be valid for the lifetime of the 1058 // to a given tab and SiteInstance, and must be valid for the lifetime of the
1059 // WebContentsImpl. 1059 // WebContentsImpl.
1060 std::map<int32, int32> max_page_ids_; 1060 std::map<int32, int32> max_page_ids_;
1061 1061
1062 // The current load state and the URL associated with it. 1062 // The current load state and the URL associated with it.
1063 net::LoadStateWithParam load_state_; 1063 net::LoadStateWithParam load_state_;
1064 base::string16 load_state_host_; 1064 base::string16 load_state_host_;
1065 1065
1066 // LoadingProgressMap maps FrameTreeNode IDs to a double representing that
1067 // frame's completion (from 0 to 1).
1068 typedef base::hash_map<int64, double> LoadingProgressMap;
1069 LoadingProgressMap loading_progresses_;
1070 double loading_total_progress_; 1066 double loading_total_progress_;
1071 1067
1072 base::TimeTicks loading_last_progress_update_; 1068 base::TimeTicks loading_last_progress_update_;
1073 1069
1074 // Counter to track how many frames have sent start notifications but not
1075 // stop notifications.
1076 int loading_frames_in_progress_;
1077
1078 // Upload progress, for displaying in the status bar. 1070 // Upload progress, for displaying in the status bar.
1079 // Set to zero when there is no significant upload happening. 1071 // Set to zero when there is no significant upload happening.
1080 uint64 upload_size_; 1072 uint64 upload_size_;
1081 uint64 upload_position_; 1073 uint64 upload_position_;
1082 1074
1083 // Data for current page ----------------------------------------------------- 1075 // Data for current page -----------------------------------------------------
1084 1076
1085 // When a title cannot be taken from any entry, this title will be used. 1077 // When a title cannot be taken from any entry, this title will be used.
1086 base::string16 page_title_when_no_navigation_entry_; 1078 base::string16 page_title_when_no_navigation_entry_;
1087 1079
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 // Adds/removes a callback called on creation of each new WebContents. 1264 // Adds/removes a callback called on creation of each new WebContents.
1273 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1265 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1274 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1266 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1275 1267
1276 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1268 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1277 }; 1269 };
1278 1270
1279 } // namespace content 1271 } // namespace content
1280 1272
1281 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1273 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698