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

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

Issue 12089102: Make most code on mac compile with enable_web_intents=0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ffff Created 7 years, 11 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
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(),
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698