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

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

Issue 135723003: Move DidCommitProvisionalLoad code from RenderView to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit tests and removed WebContents::DidNavigate Created 6 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 | Annotate | Revision Log
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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 // RenderFrameHostDelegate has the same method, so list it there because this 321 // RenderFrameHostDelegate has the same method, so list it there because this
322 // interface is going away. 322 // interface is going away.
323 // virtual WebContents* GetAsWebContents() OVERRIDE; 323 // virtual WebContents* GetAsWebContents() OVERRIDE;
324 virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE; 324 virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE;
325 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; 325 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE;
326 virtual void RenderViewReady(RenderViewHost* render_view_host) OVERRIDE; 326 virtual void RenderViewReady(RenderViewHost* render_view_host) OVERRIDE;
327 virtual void RenderViewTerminated(RenderViewHost* render_view_host, 327 virtual void RenderViewTerminated(RenderViewHost* render_view_host,
328 base::TerminationStatus status, 328 base::TerminationStatus status,
329 int error_code) OVERRIDE; 329 int error_code) OVERRIDE;
330 virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; 330 virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE;
331 virtual void DidNavigate(
332 RenderViewHost* render_view_host,
333 const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE;
334 virtual void UpdateState(RenderViewHost* render_view_host, 331 virtual void UpdateState(RenderViewHost* render_view_host,
335 int32 page_id, 332 int32 page_id,
336 const PageState& page_state) OVERRIDE; 333 const PageState& page_state) OVERRIDE;
337 virtual void UpdateTitle(RenderViewHost* render_view_host, 334 virtual void UpdateTitle(RenderViewHost* render_view_host,
338 int32 page_id, 335 int32 page_id,
339 const base::string16& title, 336 const base::string16& title,
340 base::i18n::TextDirection title_direction) OVERRIDE; 337 base::i18n::TextDirection title_direction) OVERRIDE;
341 virtual void UpdateEncoding(RenderViewHost* render_view_host, 338 virtual void UpdateEncoding(RenderViewHost* render_view_host,
342 const std::string& encoding) OVERRIDE; 339 const std::string& encoding) OVERRIDE;
343 virtual void UpdateTargetURL(int32 page_id, const GURL& url) OVERRIDE; 340 virtual void UpdateTargetURL(int32 page_id, const GURL& url) OVERRIDE;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 const GURL& validated_url, 454 const GURL& validated_url,
458 bool is_error_page, 455 bool is_error_page,
459 bool is_iframe_srcdoc) OVERRIDE; 456 bool is_iframe_srcdoc) OVERRIDE;
460 virtual void DidFailProvisionalLoadWithError( 457 virtual void DidFailProvisionalLoadWithError(
461 RenderFrameHostImpl* render_frame_host, 458 RenderFrameHostImpl* render_frame_host,
462 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) 459 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params)
463 OVERRIDE; 460 OVERRIDE;
464 virtual void DidRedirectProvisionalLoad( 461 virtual void DidRedirectProvisionalLoad(
465 RenderFrameHostImpl* render_frame_host, 462 RenderFrameHostImpl* render_frame_host,
466 const GURL& validated_target_url) OVERRIDE; 463 const GURL& validated_target_url) OVERRIDE;
464 virtual void DidCommitProvisionalLoad(
465 int64 frame_id,
466 const base::string16& frame_unique_name,
467 bool is_main_frame,
468 const GURL& url,
469 PageTransition transition_type,
470 RenderFrameHostImpl* render_frame_host) OVERRIDE;
471 virtual void DidNavigateMainFramePostCommit(
472 const LoadCommittedDetails& details,
473 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) OVERRIDE;
474 virtual void DidNavigateAnyFramePostCommit(
475 RenderFrameHostImpl* render_frame_host,
476 const LoadCommittedDetails& details,
477 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) OVERRIDE;
478 virtual void SetMainFrameMimeType(const std::string& mime_type) OVERRIDE;
479 virtual bool CanOverscrollContent() OVERRIDE;
467 virtual void NotifyChangedNavigationState( 480 virtual void NotifyChangedNavigationState(
468 InvalidateTypes changed_flags) OVERRIDE; 481 InvalidateTypes changed_flags) OVERRIDE;
469 virtual void AboutToNavigateRenderFrame( 482 virtual void AboutToNavigateRenderFrame(
470 RenderFrameHostImpl* render_frame_host) OVERRIDE; 483 RenderFrameHostImpl* render_frame_host) OVERRIDE;
471 virtual void DidStartNavigationToPendingEntry( 484 virtual void DidStartNavigationToPendingEntry(
472 RenderFrameHostImpl* render_frame_host, 485 RenderFrameHostImpl* render_frame_host,
473 const GURL& url, 486 const GURL& url,
474 NavigationController::ReloadType reload_type) OVERRIDE; 487 NavigationController::ReloadType reload_type) OVERRIDE;
475 488
476 // RenderWidgetHostDelegate -------------------------------------------------- 489 // RenderWidgetHostDelegate --------------------------------------------------
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 void SetNotWaitingForResponse() { waiting_for_response_ = false; } 752 void SetNotWaitingForResponse() { waiting_for_response_ = false; }
740 753
741 // Navigation helpers -------------------------------------------------------- 754 // Navigation helpers --------------------------------------------------------
742 // 755 //
743 // These functions are helpers for Navigate() and DidNavigate(). 756 // These functions are helpers for Navigate() and DidNavigate().
744 757
745 // Handles post-navigation tasks in DidNavigate AFTER the entry has been 758 // Handles post-navigation tasks in DidNavigate AFTER the entry has been
746 // committed to the navigation controller. Note that the navigation entry is 759 // committed to the navigation controller. Note that the navigation entry is
747 // not provided since it may be invalid/changed after being committed. The 760 // not provided since it may be invalid/changed after being committed. The
748 // current navigation entry is in the NavigationController at this point. 761 // current navigation entry is in the NavigationController at this point.
749 void DidNavigateMainFramePostCommit(
750 const LoadCommittedDetails& details,
751 const ViewHostMsg_FrameNavigate_Params& params);
752 void DidNavigateAnyFramePostCommit(
753 RenderViewHost* render_view_host,
754 const LoadCommittedDetails& details,
755 const ViewHostMsg_FrameNavigate_Params& params);
756
757 // Specifies whether the passed in URL should be assigned as the site of the
758 // current SiteInstance, if it does not yet have a site.
759 bool ShouldAssignSiteForURL(const GURL& url);
760 762
761 // If our controller was restored, update the max page ID associated with the 763 // If our controller was restored, update the max page ID associated with the
762 // given RenderViewHost to be larger than the number of restored entries. 764 // given RenderViewHost to be larger than the number of restored entries.
763 // This is called in CreateRenderView before any navigations in the RenderView 765 // This is called in CreateRenderView before any navigations in the RenderView
764 // have begun, to prevent any races in updating RenderView::next_page_id. 766 // have begun, to prevent any races in updating RenderView::next_page_id.
765 void UpdateMaxPageIDIfNecessary(RenderViewHost* rvh); 767 void UpdateMaxPageIDIfNecessary(RenderViewHost* rvh);
766 768
767 // Saves the given title to the navigation entry and does associated work. It 769 // Saves the given title to the navigation entry and does associated work. It
768 // will update history and the view for the new title, and also synthesize 770 // will update history and the view for the new title, and also synthesize
769 // titles for file URLs that have none (so we require that the URL of the 771 // titles for file URLs that have none (so we require that the URL of the
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 // Whether this WebContents is responsible for displaying a subframe in a 1046 // Whether this WebContents is responsible for displaying a subframe in a
1045 // different process from its parent page. 1047 // different process from its parent page.
1046 bool is_subframe_; 1048 bool is_subframe_;
1047 1049
1048 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); 1050 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
1049 }; 1051 };
1050 1052
1051 } // namespace content 1053 } // namespace content
1052 1054
1053 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1055 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698