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

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: add comment 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar/app_menu_button.cc » ('j') | 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/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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 // BookmarkButtonBase ----------------------------------------------- 198 // BookmarkButtonBase -----------------------------------------------
199 199
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(ui::MaterialDesignController::IsModeMaterial()); 208 if (ui::MaterialDesignController::IsModeMaterial()) {
209 set_has_ink_drop_action_on_click(true); 209 SetHasInkDrop(true);
210 set_has_ink_drop_action_on_click(true);
211 SetFocusPainter(nullptr);
212 }
210 show_animation_.reset(new gfx::SlideAnimation(this)); 213 show_animation_.reset(new gfx::SlideAnimation(this));
211 if (!animations_enabled) { 214 if (!animations_enabled) {
212 // For some reason during testing the events generated by animating 215 // For some reason during testing the events generated by animating
213 // throw off the test. So, don't animate while testing. 216 // throw off the test. So, don't animate while testing.
214 show_animation_->Reset(1); 217 show_animation_->Reset(1);
215 } else { 218 } else {
216 show_animation_->Show(); 219 show_animation_->Show();
217 } 220 }
218 } 221 }
219 222
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // BookmarkMenuButtonBase ----------------------------------------------------- 328 // BookmarkMenuButtonBase -----------------------------------------------------
326 329
327 // Base class for menu hosting buttons used on the bookmark bar. 330 // Base class for menu hosting buttons used on the bookmark bar.
328 class BookmarkMenuButtonBase : public views::MenuButton { 331 class BookmarkMenuButtonBase : public views::MenuButton {
329 public: 332 public:
330 BookmarkMenuButtonBase(const base::string16& title, 333 BookmarkMenuButtonBase(const base::string16& title,
331 views::MenuButtonListener* menu_button_listener, 334 views::MenuButtonListener* menu_button_listener,
332 bool show_menu_marker) 335 bool show_menu_marker)
333 : MenuButton(title, menu_button_listener, show_menu_marker) { 336 : MenuButton(title, menu_button_listener, show_menu_marker) {
334 SetHasInkDrop(ui::MaterialDesignController::IsModeMaterial()); 337 SetHasInkDrop(ui::MaterialDesignController::IsModeMaterial());
338 if (ui::MaterialDesignController::IsModeMaterial())
339 SetFocusPainter(nullptr);
335 } 340 }
336 341
337 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override { 342 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override {
338 return base::WrapUnique(new views::FloodFillInkDropRipple( 343 return base::WrapUnique(new views::FloodFillInkDropRipple(
339 CalculateInkDropBounds(size()), GetInkDropCenterBasedOnLastEvent(), 344 CalculateInkDropBounds(size()), GetInkDropCenterBasedOnLastEvent(),
340 GetInkDropBaseColor(), ink_drop_visible_opacity())); 345 GetInkDropBaseColor(), ink_drop_visible_opacity()));
341 } 346 }
342 347
343 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() 348 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
344 const override { 349 const override {
(...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 return; 2159 return;
2155 apps_page_shortcut_->SetVisible(visible); 2160 apps_page_shortcut_->SetVisible(visible);
2156 UpdateBookmarksSeparatorVisibility(); 2161 UpdateBookmarksSeparatorVisibility();
2157 LayoutAndPaint(); 2162 LayoutAndPaint();
2158 } 2163 }
2159 2164
2160 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { 2165 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() {
2161 if (UpdateOtherAndManagedButtonsVisibility()) 2166 if (UpdateOtherAndManagedButtonsVisibility())
2162 LayoutAndPaint(); 2167 LayoutAndPaint();
2163 } 2168 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar/app_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698