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

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

Issue 10959045: Switch WebIntentPickerController to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/location_bar/web_intents_button_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/web_intents_button_decoration.mm b/chrome/browser/ui/cocoa/location_bar/web_intents_button_decoration.mm
index aba6c6ae0cc20e5e424b6e6aed7c293bb91552d7..d575b67f224bc6d1a510d3cd5c143001ac7dc414 100644
--- a/chrome/browser/ui/cocoa/location_bar/web_intents_button_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/web_intents_button_decoration.mm
@@ -153,11 +153,12 @@ bool WebIntentsButtonDecoration::AcceptsMousePress() {
bool WebIntentsButtonDecoration::OnMousePressed(NSRect frame) {
// Get host. This should be shared on linux/win/osx medium-term.
Browser* browser = browser::GetLastActiveBrowser();
- TabContents* tabContents = chrome::GetActiveTabContents(browser);
- if (!tabContents)
+ content::WebContents* web_contents = chrome::GetActiveWebContents(browser);
+ if (!web_contents)
return true;
- tabContents->web_intent_picker_controller()->LocationBarPickerToolClicked();
+ WebIntentPickerController::FromWebContents(web_contents)->
+ LocationBarPickerToolClicked();
return true;
}
@@ -211,9 +212,9 @@ void WebIntentsButtonDecoration::DrawInFrame(
}
void WebIntentsButtonDecoration::Update(TabContents* tab_contents) {
- WebIntentPickerController* intentsController =
- tab_contents->web_intent_picker_controller();
- SetVisible(intentsController->ShowLocationBarPickerTool());
+ WebIntentPickerController* intents_controller =
+ WebIntentPickerController::FromWebContents(tab_contents->web_contents());
+ SetVisible(intents_controller->ShowLocationBarPickerTool());
if (IsVisible()) {
if (!ranAnimation_ && !animation_) {

Powered by Google App Engine
This is Rietveld 408576698