Index: chrome/browser/ui/views/location_bar/location_bar_view.cc |
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
index 118279d9511f00c80813211350d16d45da847009..76f08525e6307eebd78f3774533db4a578360638 100644 |
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc |
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
@@ -186,7 +186,9 @@ LocationBarView::LocationBarView(Browser* browser, |
open_pdf_in_reader_view_(NULL), |
script_bubble_icon_view_(NULL), |
star_view_(NULL), |
+#if defined(ENABLE_WEB_INTENTS) |
web_intents_button_view_(NULL), |
+#endif |
action_box_button_view_(NULL), |
mode_(mode), |
show_focus_rect_(false), |
@@ -286,10 +288,12 @@ void LocationBarView::Init() { |
zoom_view_->set_id(VIEW_ID_ZOOM_BUTTON); |
AddChildView(zoom_view_); |
+#if defined(ENABLE_WEB_INTENTS) |
web_intents_button_view_ = |
new WebIntentsButtonView(this, kWIBubbleBackgroundImages, font_, |
GetColor(ToolbarModel::NONE, TEXT)); |
AddChildView(web_intents_button_view_); |
+#endif |
open_pdf_in_reader_view_ = new OpenPDFInReaderView(this); |
AddChildView(open_pdf_in_reader_view_); |
@@ -418,7 +422,9 @@ void LocationBarView::Update(const WebContents* tab_for_state_restoring) { |
RefreshZoomView(); |
RefreshPageActionViews(); |
RefreshScriptBubble(); |
+#if defined(ENABLE_WEB_INTENTS) |
web_intents_button_view_->Update(GetWebContents()); |
+#endif |
open_pdf_in_reader_view_->Update( |
model_->GetInputInProgress() ? NULL : GetWebContents()); |
@@ -495,12 +501,14 @@ void LocationBarView::InvalidatePageActions() { |
} |
} |
+#if defined(ENABLE_WEB_INTENTS) |
void LocationBarView::UpdateWebIntentsButton() { |
web_intents_button_view_->Update(GetWebContents()); |
Layout(); |
SchedulePaint(); |
} |
+#endif |
void LocationBarView::UpdateOpenPDFInReaderPrompt() { |
open_pdf_in_reader_view_->Update( |
@@ -785,12 +793,14 @@ void LocationBarView::Layout() { |
(*i)->GetBuiltInHorizontalPadding(), (*i)); |
} |
} |
+#if defined(ENABLE_WEB_INTENTS) |
if (web_intents_button_view_->visible()) { |
right_decorations.AddDecoration( |
kBubbleLocationY, 0, false, 0, GetEdgeItemPadding(), GetItemPadding(), |
web_intents_button_view_->GetBuiltInHorizontalPadding(), |
web_intents_button_view_); |
} |
+#endif |
if (show_keyword_hint) { |
right_decorations.AddDecoration( |
kVerticalEdgeThickness, 0, true, 0, GetEdgeItemPadding(), |