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

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

Issue 1080143003: Move DidStartLoading, DidStopLoading, DidChangeLoadProgress to RFHI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Rebase Created 5 years, 8 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 371
372 // Implementation of IPC::Sender. 372 // Implementation of IPC::Sender.
373 bool Send(IPC::Message* message) override; 373 bool Send(IPC::Message* message) override;
374 374
375 // RenderFrameHostDelegate --------------------------------------------------- 375 // RenderFrameHostDelegate ---------------------------------------------------
376 bool OnMessageReceived(RenderFrameHost* render_frame_host, 376 bool OnMessageReceived(RenderFrameHost* render_frame_host,
377 const IPC::Message& message) override; 377 const IPC::Message& message) override;
378 const GURL& GetMainFrameLastCommittedURL() const override; 378 const GURL& GetMainFrameLastCommittedURL() const override;
379 void RenderFrameCreated(RenderFrameHost* render_frame_host) override; 379 void RenderFrameCreated(RenderFrameHost* render_frame_host) override;
380 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; 380 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
381 void DidStartLoading(RenderFrameHost* render_frame_host,
382 bool to_different_document) override;
383 void DidStopLoading() override;
384 void SwappedOut(RenderFrameHost* render_frame_host) override; 381 void SwappedOut(RenderFrameHost* render_frame_host) override;
385 void DidDeferAfterResponseStarted( 382 void DidDeferAfterResponseStarted(
386 const TransitionLayerData& transition_data) override; 383 const TransitionLayerData& transition_data) override;
387 bool WillHandleDeferAfterResponseStarted() override; 384 bool WillHandleDeferAfterResponseStarted() override;
388 void WorkerCrashed(RenderFrameHost* render_frame_host) override; 385 void WorkerCrashed(RenderFrameHost* render_frame_host) override;
389 void ShowContextMenu(RenderFrameHost* render_frame_host, 386 void ShowContextMenu(RenderFrameHost* render_frame_host,
390 const ContextMenuParams& params) override; 387 const ContextMenuParams& params) override;
391 void RunJavaScriptMessage(RenderFrameHost* render_frame_host, 388 void RunJavaScriptMessage(RenderFrameHost* render_frame_host,
392 const base::string16& message, 389 const base::string16& message,
393 const base::string16& default_prompt, 390 const base::string16& default_prompt,
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 void NotifyChangedNavigationState(InvalidateTypes changed_flags) override; 537 void NotifyChangedNavigationState(InvalidateTypes changed_flags) override;
541 void AboutToNavigateRenderFrame( 538 void AboutToNavigateRenderFrame(
542 RenderFrameHostImpl* old_host, 539 RenderFrameHostImpl* old_host,
543 RenderFrameHostImpl* new_host) override; 540 RenderFrameHostImpl* new_host) override;
544 void DidStartNavigationToPendingEntry( 541 void DidStartNavigationToPendingEntry(
545 const GURL& url, 542 const GURL& url,
546 NavigationController::ReloadType reload_type) override; 543 NavigationController::ReloadType reload_type) override;
547 void RequestOpenURL(RenderFrameHostImpl* render_frame_host, 544 void RequestOpenURL(RenderFrameHostImpl* render_frame_host,
548 const OpenURLParams& params) override; 545 const OpenURLParams& params) override;
549 bool ShouldPreserveAbortedURLs() override; 546 bool ShouldPreserveAbortedURLs() override;
547 void DidStartLoading(FrameTreeNode* frame_tree_node,
548 bool to_different_document) override;
549 void DidStopLoading() override;
550 void DidChangeLoadProgress() override;
550 551
551 // RenderWidgetHostDelegate -------------------------------------------------- 552 // RenderWidgetHostDelegate --------------------------------------------------
552 553
553 void RenderWidgetDeleted(RenderWidgetHostImpl* render_widget_host) override; 554 void RenderWidgetDeleted(RenderWidgetHostImpl* render_widget_host) override;
554 void RenderWidgetGotFocus(RenderWidgetHostImpl* render_widget_host) override; 555 void RenderWidgetGotFocus(RenderWidgetHostImpl* render_widget_host) override;
555 void RenderWidgetWasResized(RenderWidgetHostImpl* render_widget_host, 556 void RenderWidgetWasResized(RenderWidgetHostImpl* render_widget_host,
556 bool width_changed) override; 557 bool width_changed) override;
557 void ScreenInfoChanged() override; 558 void ScreenInfoChanged() override;
558 bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, 559 bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
559 bool* is_keyboard_shortcut) override; 560 bool* is_keyboard_shortcut) override;
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 void OnDidLoadResourceFromMemoryCache(const GURL& url, 780 void OnDidLoadResourceFromMemoryCache(const GURL& url,
780 const std::string& security_info, 781 const std::string& security_info,
781 const std::string& http_request, 782 const std::string& http_request,
782 const std::string& mime_type, 783 const std::string& mime_type,
783 ResourceType resource_type); 784 ResourceType resource_type);
784 void OnDidDisplayInsecureContent(); 785 void OnDidDisplayInsecureContent();
785 void OnDidRunInsecureContent(const std::string& security_origin, 786 void OnDidRunInsecureContent(const std::string& security_origin,
786 const GURL& target_url); 787 const GURL& target_url);
787 void OnDocumentLoadedInFrame(); 788 void OnDocumentLoadedInFrame();
788 void OnDidFinishLoad(const GURL& url); 789 void OnDidFinishLoad(const GURL& url);
789 void OnDidStartLoading(bool to_different_document);
790 void OnDidStopLoading();
791 void OnDidChangeLoadProgress(double load_progress);
792 void OnGoToEntryAtOffset(int offset); 790 void OnGoToEntryAtOffset(int offset);
793 void OnUpdateZoomLimits(int minimum_percent, 791 void OnUpdateZoomLimits(int minimum_percent,
794 int maximum_percent); 792 int maximum_percent);
795 void OnEnumerateDirectory(int request_id, const base::FilePath& path); 793 void OnEnumerateDirectory(int request_id, const base::FilePath& path);
796 794
797 void OnRegisterProtocolHandler(const std::string& protocol, 795 void OnRegisterProtocolHandler(const std::string& protocol,
798 const GURL& url, 796 const GURL& url,
799 const base::string16& title, 797 const base::string16& title,
800 bool user_gesture); 798 bool user_gesture);
801 void OnUnregisterProtocolHandler(const std::string& protocol, 799 void OnUnregisterProtocolHandler(const std::string& protocol,
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 // called once as this call also removes it from the internal map. 910 // called once as this call also removes it from the internal map.
913 RenderWidgetHostView* GetCreatedWidget(int route_id); 911 RenderWidgetHostView* GetCreatedWidget(int route_id);
914 912
915 // Finds the new WebContentsImpl by route_id, initializes it for 913 // Finds the new WebContentsImpl by route_id, initializes it for
916 // renderer-initiated creation, and returns it. Note that this can only be 914 // renderer-initiated creation, and returns it. Note that this can only be
917 // called once as this call also removes it from the internal map. 915 // called once as this call also removes it from the internal map.
918 WebContentsImpl* GetCreatedWindow(int route_id); 916 WebContentsImpl* GetCreatedWindow(int route_id);
919 917
920 // Tracking loading progress ------------------------------------------------- 918 // Tracking loading progress -------------------------------------------------
921 919
922 // Resets the tracking state of the current load. 920 // Resets the tracking state of the current load progress.
923 void ResetLoadProgressState(); 921 void ResetLoadProgressState();
924 922
925 // Calculates the progress of the current load and notifies the delegate. 923 // Notifies the delegate that the load progress was updated.
926 void SendLoadProgressChanged(); 924 void SendChangeLoadProgress();
927 925
928 // Misc non-view stuff ------------------------------------------------------- 926 // Misc non-view stuff -------------------------------------------------------
929 927
930 // Sets the history for a specified RenderViewHost to |history_length| 928 // Sets the history for a specified RenderViewHost to |history_length|
931 // entries, with an offset of |history_offset|. 929 // entries, with an offset of |history_offset|.
932 void SetHistoryOffsetAndLengthForView(RenderViewHost* render_view_host, 930 void SetHistoryOffsetAndLengthForView(RenderViewHost* render_view_host,
933 int history_offset, 931 int history_offset,
934 int history_length); 932 int history_length);
935 933
936 // Helper functions for sending notifications. 934 // Helper functions for sending notifications.
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 1071
1074 // Map of SiteInstance ID to max page ID for this tab. A page ID is specific 1072 // Map of SiteInstance ID to max page ID for this tab. A page ID is specific
1075 // to a given tab and SiteInstance, and must be valid for the lifetime of the 1073 // to a given tab and SiteInstance, and must be valid for the lifetime of the
1076 // WebContentsImpl. 1074 // WebContentsImpl.
1077 std::map<int32, int32> max_page_ids_; 1075 std::map<int32, int32> max_page_ids_;
1078 1076
1079 // The current load state and the URL associated with it. 1077 // The current load state and the URL associated with it.
1080 net::LoadStateWithParam load_state_; 1078 net::LoadStateWithParam load_state_;
1081 base::string16 load_state_host_; 1079 base::string16 load_state_host_;
1082 1080
1083 double loading_total_progress_;
1084
1085 base::TimeTicks loading_last_progress_update_; 1081 base::TimeTicks loading_last_progress_update_;
1086 1082
1087 // Upload progress, for displaying in the status bar. 1083 // Upload progress, for displaying in the status bar.
1088 // Set to zero when there is no significant upload happening. 1084 // Set to zero when there is no significant upload happening.
1089 uint64 upload_size_; 1085 uint64 upload_size_;
1090 uint64 upload_position_; 1086 uint64 upload_position_;
1091 1087
1092 // Data for current page ----------------------------------------------------- 1088 // Data for current page -----------------------------------------------------
1093 1089
1094 // When a title cannot be taken from any entry, this title will be used. 1090 // When a title cannot be taken from any entry, this title will be used.
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 // Adds/removes a callback called on creation of each new WebContents. 1284 // Adds/removes a callback called on creation of each new WebContents.
1289 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1285 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1290 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1286 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1291 1287
1292 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1288 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1293 }; 1289 };
1294 1290
1295 } // namespace content 1291 } // namespace content
1296 1292
1297 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1293 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698