OLD | NEW |
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 "ash/system/tray/tray_views.h" | 5 #include "ash/system/tray/tray_views.h" |
6 | 6 |
7 #include "ash/system/tray/tray_constants.h" | 7 #include "ash/system/tray/tray_constants.h" |
8 #include "ash/system/tray/tray_item_view.h" | 8 #include "ash/system/tray/tray_item_view.h" |
9 #include "grit/ash_strings.h" | 9 #include "grit/ash_strings.h" |
10 #include "grit/ui_resources.h" | 10 #include "grit/ui_resources.h" |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 void ActionableView::SetAccessibleName(const string16& name) { | 142 void ActionableView::SetAccessibleName(const string16& name) { |
143 accessible_name_ = name; | 143 accessible_name_ = name; |
144 } | 144 } |
145 | 145 |
146 void ActionableView::OnPaintFocusBorder(gfx::Canvas* canvas) { | 146 void ActionableView::OnPaintFocusBorder(gfx::Canvas* canvas) { |
147 if (HasFocus() && (focusable() || IsAccessibilityFocusable())) | 147 if (HasFocus() && (focusable() || IsAccessibilityFocusable())) |
148 DrawBorder(canvas, GetLocalBounds()); | 148 DrawBorder(canvas, GetLocalBounds()); |
149 } | 149 } |
150 | 150 |
151 ui::GestureStatus ActionableView::OnGestureEvent( | 151 ui::GestureStatus ActionableView::OnGestureEvent( |
152 const views::GestureEvent& event) { | 152 const ui::GestureEvent& event) { |
153 if (event.type() == ui::ET_GESTURE_TAP) { | 153 if (event.type() == ui::ET_GESTURE_TAP) { |
154 return PerformAction(event) ? ui::GESTURE_STATUS_CONSUMED : | 154 return PerformAction(event) ? ui::GESTURE_STATUS_CONSUMED : |
155 ui::GESTURE_STATUS_UNKNOWN; | 155 ui::GESTURE_STATUS_UNKNOWN; |
156 } | 156 } |
157 return ui::GESTURE_STATUS_UNKNOWN; | 157 return ui::GESTURE_STATUS_UNKNOWN; |
158 } | 158 } |
159 | 159 |
160 void ActionableView::GetAccessibleState(ui::AccessibleViewState* state) { | 160 void ActionableView::GetAccessibleState(ui::AccessibleViewState* state) { |
161 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON; | 161 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON; |
162 state->name = accessible_name_; | 162 state->name = accessible_name_; |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 tray_view->set_border(views::Border::CreateEmptyBorder( | 649 tray_view->set_border(views::Border::CreateEmptyBorder( |
650 kTrayLabelItemVerticalPaddingVeriticalAlignment, | 650 kTrayLabelItemVerticalPaddingVeriticalAlignment, |
651 horizontal_padding, | 651 horizontal_padding, |
652 kTrayLabelItemVerticalPaddingVeriticalAlignment, | 652 kTrayLabelItemVerticalPaddingVeriticalAlignment, |
653 horizontal_padding)); | 653 horizontal_padding)); |
654 } | 654 } |
655 } | 655 } |
656 | 656 |
657 } // namespace internal | 657 } // namespace internal |
658 } // namespace ash | 658 } // namespace ash |
OLD | NEW |