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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 10887029: Only show chrome2mobile in action box if it is enabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 // or if the feature is disabled by a command line flag or chrome://flags. 294 // or if the feature is disabled by a command line flag or chrome://flags.
295 if (!profile_->IsOffTheRecord() && profile_->IsSyncAccessible() && 295 if (!profile_->IsOffTheRecord() && profile_->IsSyncAccessible() &&
296 ChromeToMobileService::IsChromeToMobileEnabled()) { 296 ChromeToMobileService::IsChromeToMobileEnabled()) {
297 chrome_to_mobile_view_ = new ChromeToMobileView(this, command_updater_); 297 chrome_to_mobile_view_ = new ChromeToMobileView(this, command_updater_);
298 AddChildView(chrome_to_mobile_view_); 298 AddChildView(chrome_to_mobile_view_);
299 chrome_to_mobile_view_->SetVisible( 299 chrome_to_mobile_view_->SetVisible(
300 ChromeToMobileServiceFactory::GetForProfile(profile_)->HasMobiles()); 300 ChromeToMobileServiceFactory::GetForProfile(profile_)->HasMobiles());
301 } 301 }
302 } 302 }
303 if (ActionBoxButtonView::IsActionBoxEnabled() && browser_) { 303 if (ActionBoxButtonView::IsActionBoxEnabled() && browser_) {
304 action_box_button_view_ = new ActionBoxButtonView(browser_, profile_); 304 action_box_button_view_ = new ActionBoxButtonView(browser_);
305 AddChildView(action_box_button_view_); 305 AddChildView(action_box_button_view_);
306 if (star_view_) 306 if (star_view_)
307 star_view_->SetVisible(false); 307 star_view_->SetVisible(false);
308 } 308 }
309 309
310 registrar_.Add(this, 310 registrar_.Add(this,
311 chrome::NOTIFICATION_EXTENSION_LOCATION_BAR_UPDATED, 311 chrome::NOTIFICATION_EXTENSION_LOCATION_BAR_UPDATED,
312 content::Source<Profile>(profile_)); 312 content::Source<Profile>(profile_));
313 313
314 // Initialize the location entry. We do this to avoid a black flash which is 314 // Initialize the location entry. We do this to avoid a black flash which is
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1519 } 1519 }
1520 1520
1521 void LocationBarView::CleanupFadeAnimation() { 1521 void LocationBarView::CleanupFadeAnimation() {
1522 // Since we're no longer animating we don't need our layer. 1522 // Since we're no longer animating we don't need our layer.
1523 SetPaintToLayer(false); 1523 SetPaintToLayer(false);
1524 // Bubble labels don't need a transparent background anymore. 1524 // Bubble labels don't need a transparent background anymore.
1525 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); 1525 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE);
1526 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); 1526 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE);
1527 } 1527 }
1528 #endif // USE_AURA 1528 #endif // USE_AURA
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698