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

Side by Side Diff: ash/system/toast/toast_overlay.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: Changed SetHasInkDrop to SetInkDropMode 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/system/toast/toast_overlay.h" 5 #include "ash/system/toast/toast_overlay.h"
6 6
7 #include "ash/common/shelf/wm_shelf.h" 7 #include "ash/common/shelf/wm_shelf.h"
8 #include "ash/common/shell_window_ids.h" 8 #include "ash/common/shell_window_ids.h"
9 #include "ash/common/wm_root_window_controller.h" 9 #include "ash/common/wm_root_window_controller.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 private: 106 private:
107 friend class ToastOverlay; // for ToastOverlay::ClickDismissButtonForTesting. 107 friend class ToastOverlay; // for ToastOverlay::ClickDismissButtonForTesting.
108 108
109 DISALLOW_COPY_AND_ASSIGN(ToastOverlayButton); 109 DISALLOW_COPY_AND_ASSIGN(ToastOverlayButton);
110 }; 110 };
111 111
112 ToastOverlayButton::ToastOverlayButton(views::ButtonListener* listener, 112 ToastOverlayButton::ToastOverlayButton(views::ButtonListener* listener,
113 const base::string16& text) 113 const base::string16& text)
114 : views::LabelButton(listener, text) { 114 : views::LabelButton(listener, text) {
115 SetHasInkDrop(true); 115 SetInkDropMode(INK_DROP_WITH_GESTURE_HANDLING);
116 set_has_ink_drop_action_on_click(true); 116 set_has_ink_drop_action_on_click(true);
117 set_ink_drop_base_color(SK_ColorWHITE); 117 set_ink_drop_base_color(SK_ColorWHITE);
118 118
119 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); 119 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
120 120
121 SetEnabledTextColors(kButtonTextColor); 121 SetEnabledTextColors(kButtonTextColor);
122 SetFontList(rb->GetFontList(kTextFontStyle)); 122 SetFontList(rb->GetFontList(kTextFontStyle));
123 123
124 // Treat the space below the baseline as a margin. 124 // Treat the space below the baseline as a margin.
125 int verticalSpacing = kToastVerticalSpacing - 125 int verticalSpacing = kToastVerticalSpacing -
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 views::Widget* ToastOverlay::widget_for_testing() { 288 views::Widget* ToastOverlay::widget_for_testing() {
289 return overlay_widget_.get(); 289 return overlay_widget_.get();
290 } 290 }
291 291
292 void ToastOverlay::ClickDismissButtonForTesting(const ui::Event& event) { 292 void ToastOverlay::ClickDismissButtonForTesting(const ui::Event& event) {
293 overlay_view_->button()->NotifyClick(event); 293 overlay_view_->button()->NotifyClick(event);
294 } 294 }
295 295
296 } // namespace ash 296 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698