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

Unified Diff: chrome/browser/ui/views/location_bar/web_intents_button_view.cc

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/views/location_bar/web_intents_button_view.cc
diff --git a/chrome/browser/ui/views/location_bar/web_intents_button_view.cc b/chrome/browser/ui/views/location_bar/web_intents_button_view.cc
index 88fa270f15eadd6f6464b22ddf8c0c21427ba6f1..056620a55f547d85a9c1d884c7a27d2a3365960e 100644
--- a/chrome/browser/ui/views/location_bar/web_intents_button_view.cc
+++ b/chrome/browser/ui/views/location_bar/web_intents_button_view.cc
@@ -23,10 +23,12 @@ WebIntentsButtonView::WebIntentsButtonView(LocationBarView* parent,
}
void WebIntentsButtonView::Update(TabContents* tab_contents) {
- if (!tab_contents ||
- !tab_contents->web_intent_picker_controller() ||
- !tab_contents->web_intent_picker_controller()->
- ShowLocationBarPickerTool()) {
+ WebIntentPickerController* web_intent_picker_controller =
+ tab_contents ? WebIntentPickerController::FromWebContents(
+ tab_contents->web_contents())
+ : NULL;
+ if (!web_intent_picker_controller ||
+ !web_intent_picker_controller->ShowLocationBarPickerTool()) {
SetVisible(false);
return;
}
@@ -47,7 +49,8 @@ void WebIntentsButtonView::OnClick(LocationBarView* parent) {
if (!tab_contents)
return;
- tab_contents->web_intent_picker_controller()->LocationBarPickerToolClicked();
+ WebIntentPickerController::FromWebContents(tab_contents->web_contents())->
+ LocationBarPickerToolClicked();
}
int WebIntentsButtonView::GetTextAnimationSize(double state, int text_size) {

Powered by Google App Engine
This is Rietveld 408576698