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

Unified Diff: chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm

Issue 11418043: Remove TabContents from OmniboxEditController and friends. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cros 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/ui/cocoa/location_bar/page_action_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
index a64bbcf27158f063617b8ef8ec4f4182736c9de6..d054edb25652b437079b1e71a82fd4680e1afcf8 100644
--- a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
@@ -55,7 +55,7 @@ PageActionDecoration::PageActionDecoration(
preview_enabled_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(scoped_icon_animation_observer_(
page_action->GetIconAnimation(
- SessionID::IdForTab(owner->GetTabContents()->web_contents())),
+ SessionID::IdForTab(owner->GetWebContents())),
this)) {
const Extension* extension = browser->profile()->GetExtensionService()->
GetExtensionById(page_action->extension_id(), false);
@@ -115,15 +115,15 @@ bool PageActionDecoration::OnMousePressed(NSRect frame) {
}
bool PageActionDecoration::ActivatePageAction(NSRect frame) {
- TabContents* tab_contents = owner_->GetTabContents();
- if (!tab_contents) {
+ WebContents* web_contents = owner_->GetWebContents();
+ if (!web_contents) {
// We don't want other code to try and handle this click. Returning true
// prevents this by indicating that we handled it.
return true;
}
LocationBarController* controller =
- extensions::TabHelper::FromWebContents(tab_contents->web_contents())->
+ extensions::TabHelper::FromWebContents(web_contents)->
location_bar_controller();
// 1 is left click.
@@ -153,9 +153,9 @@ bool PageActionDecoration::ActivatePageAction(NSRect frame) {
void PageActionDecoration::OnIconUpdated() {
// If we have no owner, that means this class is still being constructed.
- TabContents* tab_contents = owner_ ? owner_->GetTabContents() : NULL;
- if (tab_contents) {
- UpdateVisibility(tab_contents->web_contents(), current_url_);
+ WebContents* web_contents = owner_ ? owner_->GetWebContents() : NULL;
+ if (web_contents) {
+ UpdateVisibility(web_contents, current_url_);
owner_->RedrawDecoration(this);
}
}

Powered by Google App Engine
This is Rietveld 408576698