| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |