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

Side by Side Diff: ash/common/system/tray/actionable_view.cc

Issue 2482043002: [ash-md] Updated layout of Brightness and Audio system menu rows to the material design spec. (Closed)
Patch Set: Fixed the volume slider to transition to the detailed view on <return> keypress. Created 4 years, 1 month 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 | « ash/common/system/tray/actionable_view.h ('k') | ash/common/system/tray/tray_constants.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "ash/common/system/tray/actionable_view.h" 5 #include "ash/common/system/tray/actionable_view.h"
6 6
7 #include "ash/common/ash_constants.h" 7 #include "ash/common/ash_constants.h"
8 #include "ash/common/system/tray/system_tray.h" 8 #include "ash/common/system/tray/system_tray.h"
9 #include "ash/common/system/tray/system_tray_item.h" 9 #include "ash/common/system/tray/system_tray_item.h"
10 #include "ash/common/system/tray/tray_constants.h" 10 #include "ash/common/system/tray/tray_constants.h"
11 #include "ui/accessibility/ax_node_data.h" 11 #include "ui/accessibility/ax_node_data.h"
12 #include "ui/events/keycodes/keyboard_codes.h"
12 #include "ui/gfx/canvas.h" 13 #include "ui/gfx/canvas.h"
13 #include "ui/gfx/geometry/rect_f.h" 14 #include "ui/gfx/geometry/rect_f.h"
14 #include "ui/views/animation/flood_fill_ink_drop_ripple.h" 15 #include "ui/views/animation/flood_fill_ink_drop_ripple.h"
15 #include "ui/views/animation/ink_drop_highlight.h" 16 #include "ui/views/animation/ink_drop_highlight.h"
16 #include "ui/views/animation/ink_drop_impl.h" 17 #include "ui/views/animation/ink_drop_impl.h"
17 18
18 namespace ash { 19 namespace ash {
19 20
20 // static 21 // static
21 const char ActionableView::kViewClassName[] = "tray/ActionableView"; 22 const char ActionableView::kViewClassName[] = "tray/ActionableView";
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 121
121 if (action_performed) { 122 if (action_performed) {
122 AnimateInkDrop(views::InkDropState::ACTION_TRIGGERED, 123 AnimateInkDrop(views::InkDropState::ACTION_TRIGGERED,
123 ui::LocatedEvent::FromIfValid(&event)); 124 ui::LocatedEvent::FromIfValid(&event));
124 } else { 125 } else {
125 AnimateInkDrop(views::InkDropState::HIDDEN, 126 AnimateInkDrop(views::InkDropState::HIDDEN,
126 ui::LocatedEvent::FromIfValid(&event)); 127 ui::LocatedEvent::FromIfValid(&event));
127 } 128 }
128 } 129 }
129 130
131 ButtonListenerActionableView::ButtonListenerActionableView(
132 SystemTrayItem* owner,
133 views::ButtonListener* listener)
134 : ActionableView(owner), listener_(listener) {}
135
136 bool ButtonListenerActionableView::PerformAction(const ui::Event& event) {
137 listener_->ButtonPressed(this, event);
138 return true;
139 }
140
130 } // namespace ash 141 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/actionable_view.h ('k') | ash/common/system/tray/tray_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698