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

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

Issue 2070143003: Add MD ink drop ripple to app list button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b612539_shelf_button_ripple
Patch Set: Rebased Created 4 years, 5 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_button.h" 5 #include "chrome/browser/ui/views/toolbar/toolbar_button.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 22 matching lines...) Expand all
33 ui::MenuModel* model) 33 ui::MenuModel* model)
34 : views::LabelButton(listener, base::string16()), 34 : views::LabelButton(listener, base::string16()),
35 profile_(profile), 35 profile_(profile),
36 model_(model), 36 model_(model),
37 menu_showing_(false), 37 menu_showing_(false),
38 y_position_on_lbuttondown_(0), 38 y_position_on_lbuttondown_(0),
39 show_menu_factory_(this) { 39 show_menu_factory_(this) {
40 set_has_ink_drop_action_on_click(true); 40 set_has_ink_drop_action_on_click(true);
41 set_context_menu_controller(this); 41 set_context_menu_controller(this);
42 if (ui::MaterialDesignController::IsModeMaterial()) { 42 if (ui::MaterialDesignController::IsModeMaterial()) {
43 SetHasInkDrop(true); 43 SetInkDropMode(InkDropMode::ON);
44 SetFocusPainter(nullptr); 44 SetFocusPainter(nullptr);
45 } 45 }
46 } 46 }
47 47
48 ToolbarButton::~ToolbarButton() {} 48 ToolbarButton::~ToolbarButton() {}
49 49
50 void ToolbarButton::Init() { 50 void ToolbarButton::Init() {
51 SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY); 51 SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY);
52 image()->EnableCanvasFlippingForRTLUI(true); 52 image()->EnableCanvasFlippingForRTLUI(true);
53 } 53 }
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 if (state() != STATE_DISABLED) 254 if (state() != STATE_DISABLED)
255 SetState(STATE_NORMAL); 255 SetState(STATE_NORMAL);
256 256
257 menu_runner_.reset(); 257 menu_runner_.reset();
258 menu_model_adapter_.reset(); 258 menu_model_adapter_.reset();
259 } 259 }
260 260
261 const char* ToolbarButton::GetClassName() const { 261 const char* ToolbarButton::GetClassName() const {
262 return "ToolbarButton"; 262 return "ToolbarButton";
263 } 263 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_action_view.cc ('k') | ui/app_list/presenter/app_list_presenter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698