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

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

Issue 1690633002: Revert of Remove the is_loading_ field from WebContentsImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 void RenderFrameForInterstitialPageCreated( 699 void RenderFrameForInterstitialPageCreated(
700 RenderFrameHost* render_frame_host) override; 700 RenderFrameHost* render_frame_host) override;
701 701
702 // Sets the passed interstitial as the currently showing interstitial. 702 // Sets the passed interstitial as the currently showing interstitial.
703 // No interstitial page should already be attached. 703 // No interstitial page should already be attached.
704 void AttachInterstitialPage(InterstitialPageImpl* interstitial_page) override; 704 void AttachInterstitialPage(InterstitialPageImpl* interstitial_page) override;
705 705
706 // Unsets the currently showing interstitial. 706 // Unsets the currently showing interstitial.
707 void DetachInterstitialPage() override; 707 void DetachInterstitialPage() override;
708 708
709 // Unpause the throbber if it was paused. 709 // Changes the IsLoading state and notifies the delegate as needed.
710 void DidProceedOnInterstitial() override; 710 // |details| is used to provide details on the load that just finished
711 // (but can be null if not applicable).
712 void SetIsLoading(bool is_loading,
713 bool to_different_document,
714 LoadNotificationDetails* details) override;
711 715
712 typedef base::Callback<void(WebContents*)> CreatedCallback; 716 typedef base::Callback<void(WebContents*)> CreatedCallback;
713 717
714 // Forces overscroll to be disabled (used by touch emulation). 718 // Forces overscroll to be disabled (used by touch emulation).
715 void SetForceDisableOverscrollContent(bool force_disable); 719 void SetForceDisableOverscrollContent(bool force_disable);
716 720
717 AudioStreamMonitor* audio_stream_monitor() { 721 AudioStreamMonitor* audio_stream_monitor() {
718 return &audio_stream_monitor_; 722 return &audio_stream_monitor_;
719 } 723 }
720 724
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 // |preferred_size_for_capture_| changes, to propagate the new value to the 1009 // |preferred_size_for_capture_| changes, to propagate the new value to the
1006 // |delegate_|. 1010 // |delegate_|.
1007 void OnPreferredSizeChanged(const gfx::Size& old_size); 1011 void OnPreferredSizeChanged(const gfx::Size& old_size);
1008 1012
1009 // Internal helper to create WebUI objects associated with |this|. |url| is 1013 // Internal helper to create WebUI objects associated with |this|. |url| is
1010 // used to determine which WebUI should be created (if any). |frame_name| 1014 // used to determine which WebUI should be created (if any). |frame_name|
1011 // corresponds to the name of a frame that the WebUI should be created for (or 1015 // corresponds to the name of a frame that the WebUI should be created for (or
1012 // the main frame if empty). 1016 // the main frame if empty).
1013 WebUI* CreateWebUI(const GURL& url, const std::string& frame_name); 1017 WebUI* CreateWebUI(const GURL& url, const std::string& frame_name);
1014 1018
1015 // Notifies the delegate of a change in loading state.
1016 // |details| is used to provide details on the load that just finished
1017 // (but can be null if not applicable).
1018 // |pause_throbber_for_interstitial_| will be used to update
1019 // pause_throbber_for_interstitial_.
1020 void LoadingStateChanged(bool is_loading,
1021 bool to_different_document,
1022 bool pause_throbber_for_interstitial,
1023 LoadNotificationDetails* details);
1024
1025 // Data for core operation --------------------------------------------------- 1019 // Data for core operation ---------------------------------------------------
1026 1020
1027 // Delegate for notifying our owner about stuff. Not owned by us. 1021 // Delegate for notifying our owner about stuff. Not owned by us.
1028 WebContentsDelegate* delegate_; 1022 WebContentsDelegate* delegate_;
1029 1023
1030 // Handles the back/forward list and loading. 1024 // Handles the back/forward list and loading.
1031 NavigationControllerImpl controller_; 1025 NavigationControllerImpl controller_;
1032 1026
1033 // The corresponding view. 1027 // The corresponding view.
1034 scoped_ptr<WebContentsView> view_; 1028 scoped_ptr<WebContentsView> view_;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 1066
1073 // If this WebContents is part of a "tree of WebContents", then this contains 1067 // If this WebContents is part of a "tree of WebContents", then this contains
1074 // information about the structure. 1068 // information about the structure.
1075 scoped_ptr<WebContentsTreeNode> node_; 1069 scoped_ptr<WebContentsTreeNode> node_;
1076 1070
1077 // SavePackage, lazily created. 1071 // SavePackage, lazily created.
1078 scoped_refptr<SavePackage> save_package_; 1072 scoped_refptr<SavePackage> save_package_;
1079 1073
1080 // Data for loading state ---------------------------------------------------- 1074 // Data for loading state ----------------------------------------------------
1081 1075
1076 // Indicates whether we're currently loading a resource.
1077 bool is_loading_;
1078
1082 // Indicates whether the current load is to a different document. Only valid 1079 // Indicates whether the current load is to a different document. Only valid
1083 // if is_loading_ is true. 1080 // if is_loading_ is true.
1084 bool is_load_to_different_document_; 1081 bool is_load_to_different_document_;
1085 1082
1086 // Indicates if the tab is considered crashed. 1083 // Indicates if the tab is considered crashed.
1087 base::TerminationStatus crashed_status_; 1084 base::TerminationStatus crashed_status_;
1088 int crashed_error_code_; 1085 int crashed_error_code_;
1089 1086
1090 // Whether this WebContents is waiting for a first-response for the 1087 // Whether this WebContents is waiting for a first-response for the
1091 // main resource of the page. This controls whether the throbber state is 1088 // main resource of the page. This controls whether the throbber state is
(...skipping 13 matching lines...) Expand all
1105 1102
1106 // Upload progress, for displaying in the status bar. 1103 // Upload progress, for displaying in the status bar.
1107 // Set to zero when there is no significant upload happening. 1104 // Set to zero when there is no significant upload happening.
1108 uint64_t upload_size_; 1105 uint64_t upload_size_;
1109 uint64_t upload_position_; 1106 uint64_t upload_position_;
1110 1107
1111 // Tracks that this WebContents needs to unblock requests to the renderer. 1108 // Tracks that this WebContents needs to unblock requests to the renderer.
1112 // See ResumeLoadingCreatedWebContents. 1109 // See ResumeLoadingCreatedWebContents.
1113 bool is_resume_pending_; 1110 bool is_resume_pending_;
1114 1111
1115 // Whether the throbber is suspended while an interstial page is showing.
1116 // This is set to false when the user proceeds in the interstitial.
1117 bool paused_throbber_for_interstitial_;
1118
1119 // Data for current page ----------------------------------------------------- 1112 // Data for current page -----------------------------------------------------
1120 1113
1121 // When a title cannot be taken from any entry, this title will be used. 1114 // When a title cannot be taken from any entry, this title will be used.
1122 base::string16 page_title_when_no_navigation_entry_; 1115 base::string16 page_title_when_no_navigation_entry_;
1123 1116
1124 // When a navigation occurs, we record its contents MIME type. It can be 1117 // When a navigation occurs, we record its contents MIME type. It can be
1125 // used to check whether we can do something for some special contents. 1118 // used to check whether we can do something for some special contents.
1126 std::string contents_mime_type_; 1119 std::string contents_mime_type_;
1127 1120
1128 // The last reported character encoding, not canonicalized. 1121 // The last reported character encoding, not canonicalized.
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 // Adds/removes a callback called on creation of each new WebContents. 1326 // Adds/removes a callback called on creation of each new WebContents.
1334 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1327 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1335 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1328 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1336 1329
1337 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1330 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1338 }; 1331 };
1339 1332
1340 } // namespace content 1333 } // namespace content
1341 1334
1342 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1335 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698