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

Unified Diff: chrome/browser/ui/bookmarks/bookmark_tab_helper.cc

Issue 9030010: Move most of the remaining users of WebContentsObserver::tab_contents() to use web_contents(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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
« no previous file with comments | « chrome/browser/ui/alternate_error_tab_observer.cc ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
===================================================================
--- chrome/browser/ui/bookmarks/bookmark_tab_helper.cc (revision 115777)
+++ chrome/browser/ui/bookmarks/bookmark_tab_helper.cc (working copy)
@@ -42,22 +42,22 @@
}
bool BookmarkTabHelper::ShouldShowBookmarkBar() {
- if (tab_contents()->ShowingInterstitialPage())
+ if (web_contents()->ShowingInterstitialPage())
return false;
// See TabContents::GetWebUIForCurrentState() comment for more info. This case
// is very similar, but for non-first loads, we want to use the committed
// entry. This is so the bookmarks bar disappears at the same time the page
// does.
- if (tab_contents()->GetController().GetLastCommittedEntry()) {
+ if (web_contents()->GetController().GetLastCommittedEntry()) {
// Not the first load, always use the committed Web UI.
- return CanShowBookmarkBar(tab_contents()->GetCommittedWebUI());
+ return CanShowBookmarkBar(web_contents()->GetCommittedWebUI());
}
// When it's the first load, we know either the pending one or the committed
// one will have the Web UI in it (see GetWebUIForCurrentState), and only one
// of them will be valid, so we can just check both.
- return CanShowBookmarkBar(tab_contents()->GetWebUI());
+ return CanShowBookmarkBar(web_contents()->GetWebUI());
}
void BookmarkTabHelper::DidNavigateMainFrame(
@@ -101,10 +101,10 @@
void BookmarkTabHelper::UpdateStarredStateForCurrentURL() {
Profile* profile =
- Profile::FromBrowserContext(tab_contents()->GetBrowserContext());
+ Profile::FromBrowserContext(web_contents()->GetBrowserContext());
BookmarkModel* model = profile->GetBookmarkModel();
const bool old_state = is_starred_;
- is_starred_ = (model && model->IsBookmarked(tab_contents()->GetURL()));
+ is_starred_ = (model && model->IsBookmarked(web_contents()->GetURL()));
if (is_starred_ != old_state && delegate())
delegate()->URLStarredChanged(tab_contents_wrapper_, is_starred_);
« no previous file with comments | « chrome/browser/ui/alternate_error_tab_observer.cc ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698