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

Side by Side Diff: ash/system/tray/tray_views.cc

Issue 10824295: Rid the world of the last of views::Event types: TouchEvent, GestureEvent, MouseWheelEvent, ScrollE… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/tray/tray_views.h ('k') | ash/system/web_notification/web_notification_tray.cc » ('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 (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
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
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
OLDNEW
« no previous file with comments | « ash/system/tray/tray_views.h ('k') | ash/system/web_notification/web_notification_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698