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

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

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

Powered by Google App Engine
This is Rietveld 408576698