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

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_view.cc

Issue 2346263003: Adjust positioning of bookmarks bubble for Harmony. (Closed)
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/toolbar/toolbar_view.h" 5 #include "chrome/browser/ui/views/toolbar/toolbar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/number_formatting.h" 10 #include "base/i18n/number_formatting.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 void ToolbarView::SetPaneFocusAndFocusAppMenu() { 292 void ToolbarView::SetPaneFocusAndFocusAppMenu() {
293 if (app_menu_button_) 293 if (app_menu_button_)
294 SetPaneFocus(app_menu_button_); 294 SetPaneFocus(app_menu_button_);
295 } 295 }
296 296
297 bool ToolbarView::IsAppMenuFocused() { 297 bool ToolbarView::IsAppMenuFocused() {
298 return app_menu_button_ && app_menu_button_->HasFocus(); 298 return app_menu_button_ && app_menu_button_->HasFocus();
299 } 299 }
300 300
301 views::View* ToolbarView::GetBookmarkBubbleAnchor() { 301 views::View* ToolbarView::GetBookmarkBubbleAnchor() {
302 if (ui::MaterialDesignController::IsSecondaryUiMaterial())
303 return location_bar();
304
302 views::View* star_view = location_bar()->star_view(); 305 views::View* star_view = location_bar()->star_view();
303 return (star_view && star_view->visible()) ? star_view : app_menu_button_; 306 return (star_view && star_view->visible()) ? star_view : app_menu_button_;
304 } 307 }
305 308
306 views::View* ToolbarView::GetSaveCreditCardBubbleAnchor() { 309 views::View* ToolbarView::GetSaveCreditCardBubbleAnchor() {
307 views::View* save_credit_card_icon_view = 310 views::View* save_credit_card_icon_view =
308 location_bar()->save_credit_card_icon_view(); 311 location_bar()->save_credit_card_icon_view();
309 return (save_credit_card_icon_view && save_credit_card_icon_view->visible()) 312 return (save_credit_card_icon_view && save_credit_card_icon_view->visible())
310 ? save_credit_card_icon_view 313 ? save_credit_card_icon_view
311 : app_menu_button_; 314 : app_menu_button_;
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 SchedulePaint(); 800 SchedulePaint();
798 } 801 }
799 802
800 int ToolbarView::content_shadow_height() const { 803 int ToolbarView::content_shadow_height() const {
801 #if defined(USE_ASH) 804 #if defined(USE_ASH)
802 return GetLayoutConstant(TOOLBAR_CONTENT_SHADOW_HEIGHT_ASH); 805 return GetLayoutConstant(TOOLBAR_CONTENT_SHADOW_HEIGHT_ASH);
803 #else 806 #else
804 return GetLayoutConstant(TOOLBAR_CONTENT_SHADOW_HEIGHT); 807 return GetLayoutConstant(TOOLBAR_CONTENT_SHADOW_HEIGHT);
805 #endif 808 #endif
806 } 809 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698