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

Unified Diff: chrome/browser/extensions/api/web_navigation/web_navigation_api.cc

Issue 11359201: Remove TabContents from TabStripModelObserver::TabReplacedAt. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
index 7cb61a3995f9c9a5d2925a9bd3f2f6d05b3dcffc..5f8e3d2c5b99488cfee71d7716224c734682eb91 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
@@ -110,31 +110,25 @@ void WebNavigationEventRouter::OnBrowserRemoved(Browser* browser) {
void WebNavigationEventRouter::TabReplacedAt(
TabStripModel* tab_strip_model,
- TabContents* old_contents,
- TabContents* new_contents,
+ content::WebContents* old_contents,
+ content::WebContents* new_contents,
int index) {
WebNavigationTabObserver* tab_observer =
- WebNavigationTabObserver::Get(old_contents->web_contents());
+ WebNavigationTabObserver::Get(old_contents);
if (!tab_observer) {
// If you hit this DCHECK(), please add reproduction steps to
// http://crbug.com/109464.
- DCHECK(chrome::GetViewType(old_contents->web_contents()) !=
- chrome::VIEW_TYPE_TAB_CONTENTS);
+ DCHECK(chrome::GetViewType(old_contents) != chrome::VIEW_TYPE_TAB_CONTENTS);
return;
}
const FrameNavigationState& frame_navigation_state =
tab_observer->frame_navigation_state();
- if (!frame_navigation_state.IsValidUrl(
- old_contents->web_contents()->GetURL()) ||
- !frame_navigation_state.IsValidUrl(
- new_contents->web_contents()->GetURL()))
+ if (!frame_navigation_state.IsValidUrl(old_contents->GetURL()) ||
+ !frame_navigation_state.IsValidUrl(new_contents->GetURL()))
return;
- helpers::DispatchOnTabReplaced(
- old_contents->web_contents(),
- profile_,
- new_contents->web_contents());
+ helpers::DispatchOnTabReplaced(old_contents, profile_, new_contents);
}
void WebNavigationEventRouter::Observe(
« no previous file with comments | « chrome/browser/extensions/api/web_navigation/web_navigation_api.h ('k') | chrome/browser/extensions/browser_event_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698