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

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

Issue 1214723012: Track whether a created WebContents has a resume pending. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing logic Created 5 years, 5 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 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 917
918 // Finds the new RenderWidgetHost and returns it. Note that this can only be 918 // Finds the new RenderWidgetHost and returns it. Note that this can only be
919 // called once as this call also removes it from the internal map. 919 // called once as this call also removes it from the internal map.
920 RenderWidgetHostView* GetCreatedWidget(int route_id); 920 RenderWidgetHostView* GetCreatedWidget(int route_id);
921 921
922 // Finds the new WebContentsImpl by route_id, initializes it for 922 // Finds the new WebContentsImpl by route_id, initializes it for
923 // renderer-initiated creation, and returns it. Note that this can only be 923 // renderer-initiated creation, and returns it. Note that this can only be
924 // called once as this call also removes it from the internal map. 924 // called once as this call also removes it from the internal map.
925 WebContentsImpl* GetCreatedWindow(int route_id); 925 WebContentsImpl* GetCreatedWindow(int route_id);
926 926
927 // Tracks that this WebContents needs to unblock requests to the renderer.
928 void SetIsResumePending() { is_resume_pending_ = true; }
929
927 // Tracking loading progress ------------------------------------------------- 930 // Tracking loading progress -------------------------------------------------
928 931
929 // Resets the tracking state of the current load progress. 932 // Resets the tracking state of the current load progress.
930 void ResetLoadProgressState(); 933 void ResetLoadProgressState();
931 934
932 // Notifies the delegate that the load progress was updated. 935 // Notifies the delegate that the load progress was updated.
933 void SendChangeLoadProgress(); 936 void SendChangeLoadProgress();
934 937
935 // Misc non-view stuff ------------------------------------------------------- 938 // Misc non-view stuff -------------------------------------------------------
936 939
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 net::LoadStateWithParam load_state_; 1088 net::LoadStateWithParam load_state_;
1086 base::string16 load_state_host_; 1089 base::string16 load_state_host_;
1087 1090
1088 base::TimeTicks loading_last_progress_update_; 1091 base::TimeTicks loading_last_progress_update_;
1089 1092
1090 // Upload progress, for displaying in the status bar. 1093 // Upload progress, for displaying in the status bar.
1091 // Set to zero when there is no significant upload happening. 1094 // Set to zero when there is no significant upload happening.
1092 uint64 upload_size_; 1095 uint64 upload_size_;
1093 uint64 upload_position_; 1096 uint64 upload_position_;
1094 1097
1098 // Whether this WebContents needs to resume loading after its creation.
1099 // See ResumeLoadingCreatedWebContents.
1100 bool is_resume_pending_;
1101
1095 // Data for current page ----------------------------------------------------- 1102 // Data for current page -----------------------------------------------------
1096 1103
1097 // When a title cannot be taken from any entry, this title will be used. 1104 // When a title cannot be taken from any entry, this title will be used.
1098 base::string16 page_title_when_no_navigation_entry_; 1105 base::string16 page_title_when_no_navigation_entry_;
1099 1106
1100 // When a navigation occurs, we record its contents MIME type. It can be 1107 // When a navigation occurs, we record its contents MIME type. It can be
1101 // used to check whether we can do something for some special contents. 1108 // used to check whether we can do something for some special contents.
1102 std::string contents_mime_type_; 1109 std::string contents_mime_type_;
1103 1110
1104 // The last reported character encoding, not canonicalized. 1111 // The last reported character encoding, not canonicalized.
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 // Adds/removes a callback called on creation of each new WebContents. 1297 // Adds/removes a callback called on creation of each new WebContents.
1291 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1298 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1292 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1299 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1293 1300
1294 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1301 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1295 }; 1302 };
1296 1303
1297 } // namespace content 1304 } // namespace content
1298 1305
1299 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1306 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698