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

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

Issue 2067013002: Removed InkDropFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed views:: -> ui:: compile error. 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 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(true); 208 SetHasInkDrop(ui::MaterialDesignController::IsModeMaterial());
209 set_has_ink_drop_action_on_click(true); 209 set_has_ink_drop_action_on_click(true);
210 show_animation_.reset(new gfx::SlideAnimation(this)); 210 show_animation_.reset(new gfx::SlideAnimation(this));
211 if (!animations_enabled) { 211 if (!animations_enabled) {
212 // For some reason during testing the events generated by animating 212 // For some reason during testing the events generated by animating
213 // throw off the test. So, don't animate while testing. 213 // throw off the test. So, don't animate while testing.
214 show_animation_->Reset(1); 214 show_animation_->Reset(1);
215 } else { 215 } else {
216 show_animation_->Show(); 216 show_animation_->Show();
217 } 217 }
218 } 218 }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 324
325 // BookmarkMenuButtonBase ----------------------------------------------------- 325 // BookmarkMenuButtonBase -----------------------------------------------------
326 326
327 // Base class for menu hosting buttons used on the bookmark bar. 327 // Base class for menu hosting buttons used on the bookmark bar.
328 class BookmarkMenuButtonBase : public views::MenuButton { 328 class BookmarkMenuButtonBase : public views::MenuButton {
329 public: 329 public:
330 BookmarkMenuButtonBase(const base::string16& title, 330 BookmarkMenuButtonBase(const base::string16& title,
331 views::MenuButtonListener* menu_button_listener, 331 views::MenuButtonListener* menu_button_listener,
332 bool show_menu_marker) 332 bool show_menu_marker)
333 : MenuButton(title, menu_button_listener, show_menu_marker) { 333 : MenuButton(title, menu_button_listener, show_menu_marker) {
334 SetHasInkDrop(true); 334 SetHasInkDrop(ui::MaterialDesignController::IsModeMaterial());
335 } 335 }
336 336
337 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override { 337 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override {
338 return base::WrapUnique(new views::FloodFillInkDropRipple( 338 return base::WrapUnique(new views::FloodFillInkDropRipple(
339 CalculateInkDropBounds(size()), GetInkDropCenter(), 339 CalculateInkDropBounds(size()), GetInkDropCenter(),
340 GetInkDropBaseColor())); 340 GetInkDropBaseColor()));
341 } 341 }
342 342
343 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() 343 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
344 const override { 344 const override {
(...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 return; 2154 return;
2155 apps_page_shortcut_->SetVisible(visible); 2155 apps_page_shortcut_->SetVisible(visible);
2156 UpdateBookmarksSeparatorVisibility(); 2156 UpdateBookmarksSeparatorVisibility();
2157 LayoutAndPaint(); 2157 LayoutAndPaint();
2158 } 2158 }
2159 2159
2160 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { 2160 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() {
2161 if (UpdateOtherAndManagedButtonsVisibility()) 2161 if (UpdateOtherAndManagedButtonsVisibility())
2162 LayoutAndPaint(); 2162 LayoutAndPaint();
2163 } 2163 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bar_control_button.cc ('k') | chrome/browser/ui/views/download/download_item_view_md.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698