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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 2069733002: MD - Use real comboboxes in website settings popup. Hide borders (but (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 6 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 (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/bookmarks/bookmark_bar_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // Base class for non-menu hosting buttons used on the bookmark bar. 200 // Base class for non-menu hosting buttons used on the bookmark bar.
201 201
202 class BookmarkButtonBase : public views::LabelButton { 202 class BookmarkButtonBase : public views::LabelButton {
203 public: 203 public:
204 BookmarkButtonBase(views::ButtonListener* listener, 204 BookmarkButtonBase(views::ButtonListener* listener,
205 const base::string16& title) 205 const base::string16& title)
206 : LabelButton(listener, title) { 206 : LabelButton(listener, title) {
207 SetElideBehavior(kElideBehavior); 207 SetElideBehavior(kElideBehavior);
208 SetHasInkDrop(true); 208 SetHasInkDrop(true);
209 set_has_ink_drop_action_on_click(true); 209 set_has_ink_drop_action_on_click(true);
210 if (ui::MaterialDesignController::IsModeMaterial())
211 SetFocusPainter(nullptr);
210 show_animation_.reset(new gfx::SlideAnimation(this)); 212 show_animation_.reset(new gfx::SlideAnimation(this));
211 if (!animations_enabled) { 213 if (!animations_enabled) {
212 // For some reason during testing the events generated by animating 214 // For some reason during testing the events generated by animating
213 // throw off the test. So, don't animate while testing. 215 // throw off the test. So, don't animate while testing.
214 show_animation_->Reset(1); 216 show_animation_->Reset(1);
215 } else { 217 } else {
216 show_animation_->Show(); 218 show_animation_->Show();
217 } 219 }
218 } 220 }
219 221
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // BookmarkMenuButtonBase ----------------------------------------------------- 327 // BookmarkMenuButtonBase -----------------------------------------------------
326 328
327 // Base class for menu hosting buttons used on the bookmark bar. 329 // Base class for menu hosting buttons used on the bookmark bar.
328 class BookmarkMenuButtonBase : public views::MenuButton { 330 class BookmarkMenuButtonBase : public views::MenuButton {
329 public: 331 public:
330 BookmarkMenuButtonBase(const base::string16& title, 332 BookmarkMenuButtonBase(const base::string16& title,
331 views::MenuButtonListener* menu_button_listener, 333 views::MenuButtonListener* menu_button_listener,
332 bool show_menu_marker) 334 bool show_menu_marker)
333 : MenuButton(title, menu_button_listener, show_menu_marker) { 335 : MenuButton(title, menu_button_listener, show_menu_marker) {
334 SetHasInkDrop(true); 336 SetHasInkDrop(true);
337 if (ui::MaterialDesignController::IsModeMaterial())
338 SetFocusPainter(nullptr);
335 } 339 }
336 340
337 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override { 341 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override {
338 return base::WrapUnique(new views::FloodFillInkDropRipple( 342 return base::WrapUnique(new views::FloodFillInkDropRipple(
339 CalculateInkDropBounds(size()), GetInkDropCenter(), 343 CalculateInkDropBounds(size()), GetInkDropCenter(),
340 GetInkDropBaseColor())); 344 GetInkDropBaseColor()));
341 } 345 }
342 346
343 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() 347 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
344 const override { 348 const override {
(...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 return; 2158 return;
2155 apps_page_shortcut_->SetVisible(visible); 2159 apps_page_shortcut_->SetVisible(visible);
2156 UpdateBookmarksSeparatorVisibility(); 2160 UpdateBookmarksSeparatorVisibility();
2157 LayoutAndPaint(); 2161 LayoutAndPaint();
2158 } 2162 }
2159 2163
2160 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { 2164 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() {
2161 if (UpdateOtherAndManagedButtonsVisibility()) 2165 if (UpdateOtherAndManagedButtonsVisibility())
2162 LayoutAndPaint(); 2166 LayoutAndPaint();
2163 } 2167 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698