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

Side by Side Diff: ash/launcher/alternate_app_list_button.cc

Issue 22291003: ash:Shelf Update Alternate Layout (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nl Created 7 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/launcher/alternate_app_list_button.h ('k') | ash/launcher/launcher_button.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "ash/launcher/alternate_app_list_button.h" 4 #include "ash/launcher/alternate_app_list_button.h"
5 5
6 #include "ash/ash_switches.h" 6 #include "ash/ash_switches.h"
7 #include "ash/launcher/launcher_button_host.h" 7 #include "ash/launcher/launcher_button_host.h"
8 #include "ash/launcher/launcher_types.h" 8 #include "ash/launcher/launcher_types.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shelf/shelf_widget.h" 10 #include "ash/shelf/shelf_widget.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 OnPaintFocusBorder(canvas); 140 OnPaintFocusBorder(canvas);
141 } 141 }
142 142
143 void AlternateAppListButton::GetAccessibleState( 143 void AlternateAppListButton::GetAccessibleState(
144 ui::AccessibleViewState* state) { 144 ui::AccessibleViewState* state) {
145 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON; 145 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
146 state->name = host_->GetAccessibleName(this); 146 state->name = host_->GetAccessibleName(this);
147 } 147 }
148 148
149 void AlternateAppListButton::OnGestureEvent(ui::GestureEvent* event) {
150 switch (event->type()) {
151 case ui::ET_GESTURE_SCROLL_BEGIN:
152 host_->PointerPressedOnButton(this, LauncherButtonHost::TOUCH, *event);
153 event->SetHandled();
154 return;
155 case ui::ET_GESTURE_SCROLL_UPDATE:
156 host_->PointerDraggedOnButton(this, LauncherButtonHost::TOUCH, *event);
157 event->SetHandled();
158 return;
159 case ui::ET_GESTURE_SCROLL_END:
160 case ui::ET_SCROLL_FLING_START:
161 host_->PointerReleasedOnButton(this, LauncherButtonHost::TOUCH, false);
162 event->SetHandled();
163 return;
164 default:
165 ImageButton::OnGestureEvent(event);
166 return;
167 }
168 }
169
170 } // namespace internal 149 } // namespace internal
171 } // namespace ash 150 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/alternate_app_list_button.h ('k') | ash/launcher/launcher_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698