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

Side by Side Diff: ui/views/controls/button/custom_button.cc

Issue 2178163002: Add ink drop ripple to shelf overflow button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments Created 4 years, 4 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 | « ui/views/animation/ink_drop_host_view.cc ('k') | no next file » | 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 "ui/views/controls/button/custom_button.h" 5 #include "ui/views/controls/button/custom_button.h"
6 6
7 #include "ui/accessibility/ax_view_state.h" 7 #include "ui/accessibility/ax_view_state.h"
8 #include "ui/base/material_design/material_design_controller.h" 8 #include "ui/base/material_design/material_design_controller.h"
9 #include "ui/events/event.h" 9 #include "ui/events/event.h"
10 #include "ui/events/event_utils.h" 10 #include "ui/events/event_utils.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 void CustomButton::NotifyClick(const ui::Event& event) { 464 void CustomButton::NotifyClick(const ui::Event& event) {
465 if (has_ink_drop_action_on_click_) { 465 if (has_ink_drop_action_on_click_) {
466 AnimateInkDrop(InkDropState::ACTION_TRIGGERED, 466 AnimateInkDrop(InkDropState::ACTION_TRIGGERED,
467 ui::LocatedEvent::FromIfValid(&event)); 467 ui::LocatedEvent::FromIfValid(&event));
468 } 468 }
469 Button::NotifyClick(event); 469 Button::NotifyClick(event);
470 } 470 }
471 471
472 void CustomButton::OnClickCanceled(const ui::Event& event) { 472 void CustomButton::OnClickCanceled(const ui::Event& event) {
473 AnimateInkDrop(views::InkDropState::HIDDEN, 473 if (ink_drop()->GetTargetInkDropState() != views::InkDropState::ACTIVATED) {
bruthig 2016/07/26 21:24:27 I think I'd feel better if this were configurable
mohsen 2016/08/17 05:31:35 I changed the code such that OnClickCanceled() is
474 ui::LocatedEvent::FromIfValid(&event)); 474 AnimateInkDrop(views::InkDropState::HIDDEN,
475 ui::LocatedEvent::FromIfValid(&event));
476 }
475 Button::OnClickCanceled(event); 477 Button::OnClickCanceled(event);
476 } 478 }
477 479
478 } // namespace views 480 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/animation/ink_drop_host_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698