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

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

Issue 10905296: Adjusted action box menu position relative to omnibox and action box menu button. (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
« no previous file with comments | « chrome/browser/ui/views/location_bar/action_box_button_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 AddChildView(web_intents_button_view_); 304 AddChildView(web_intents_button_view_);
305 305
306 if (browser_defaults::bookmarks_enabled && (mode_ == NORMAL)) { 306 if (browser_defaults::bookmarks_enabled && (mode_ == NORMAL)) {
307 // Note: condition above means that the star icon is hidden in popups and in 307 // Note: condition above means that the star icon is hidden in popups and in
308 // the app launcher. 308 // the app launcher.
309 star_view_ = new StarView(command_updater_); 309 star_view_ = new StarView(command_updater_);
310 AddChildView(star_view_); 310 AddChildView(star_view_);
311 star_view_->SetVisible(true); 311 star_view_->SetVisible(true);
312 } 312 }
313 if (extensions::switch_utils::IsActionBoxEnabled() && browser_) { 313 if (extensions::switch_utils::IsActionBoxEnabled() && browser_) {
314 action_box_button_view_ = new ActionBoxButtonView(browser_); 314 gfx::Point menu_offset(
315 (mode_ == NORMAL) ? kNormalHorizontalEdgeThickness : 0,
316 kVerticalEdgeThickness);
317 action_box_button_view_ = new ActionBoxButtonView(browser_, menu_offset);
315 AddChildView(action_box_button_view_); 318 AddChildView(action_box_button_view_);
319
316 if (star_view_) 320 if (star_view_)
317 star_view_->SetVisible(false); 321 star_view_->SetVisible(false);
318 } 322 }
319 323
320 registrar_.Add(this, 324 registrar_.Add(this,
321 chrome::NOTIFICATION_EXTENSION_LOCATION_BAR_UPDATED, 325 chrome::NOTIFICATION_EXTENSION_LOCATION_BAR_UPDATED,
322 content::Source<Profile>(profile_)); 326 content::Source<Profile>(profile_));
323 327
324 // Initialize the location entry. We do this to avoid a black flash which is 328 // Initialize the location entry. We do this to avoid a black flash which is
325 // visible when the location entry has just been initialized. 329 // visible when the location entry has just been initialized.
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 } 1555 }
1552 1556
1553 void LocationBarView::CleanupFadeAnimation() { 1557 void LocationBarView::CleanupFadeAnimation() {
1554 // Since we're no longer animating we don't need our layer. 1558 // Since we're no longer animating we don't need our layer.
1555 SetPaintToLayer(false); 1559 SetPaintToLayer(false);
1556 // Bubble labels don't need a transparent background anymore. 1560 // Bubble labels don't need a transparent background anymore.
1557 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); 1561 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE);
1558 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); 1562 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE);
1559 } 1563 }
1560 #endif // USE_AURA 1564 #endif // USE_AURA
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/action_box_button_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698