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

Side by Side Diff: ash/launcher/launcher_button.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/launcher/launcher_button.h ('k') | ash/launcher/overflow_bubble.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/launcher/launcher_button.h" 5 #include "ash/launcher/launcher_button.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/launcher/launcher_button_host.h" 10 #include "ash/launcher/launcher_button_host.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 host_->MouseEnteredButton(this); 359 host_->MouseEnteredButton(this);
360 } 360 }
361 361
362 void LauncherButton::OnMouseExited(const ui::MouseEvent& event) { 362 void LauncherButton::OnMouseExited(const ui::MouseEvent& event) {
363 ClearState(STATE_HOVERED); 363 ClearState(STATE_HOVERED);
364 CustomButton::OnMouseExited(event); 364 CustomButton::OnMouseExited(event);
365 host_->MouseExitedButton(this); 365 host_->MouseExitedButton(this);
366 } 366 }
367 367
368 ui::GestureStatus LauncherButton::OnGestureEvent( 368 ui::GestureStatus LauncherButton::OnGestureEvent(
369 const views::GestureEvent& event) { 369 const ui::GestureEvent& event) {
370 switch (event.type()) { 370 switch (event.type()) {
371 case ui::ET_GESTURE_TAP_DOWN: 371 case ui::ET_GESTURE_TAP_DOWN:
372 AddState(STATE_HOVERED); 372 AddState(STATE_HOVERED);
373 return CustomButton::OnGestureEvent(event); 373 return CustomButton::OnGestureEvent(event);
374 case ui::ET_GESTURE_END: 374 case ui::ET_GESTURE_END:
375 ClearState(STATE_HOVERED); 375 ClearState(STATE_HOVERED);
376 return CustomButton::OnGestureEvent(event); 376 return CustomButton::OnGestureEvent(event);
377 case ui::ET_GESTURE_SCROLL_BEGIN: 377 case ui::ET_GESTURE_SCROLL_BEGIN:
378 host_->PointerPressedOnButton(this, LauncherButtonHost::TOUCH, event); 378 host_->PointerPressedOnButton(this, LauncherButtonHost::TOUCH, event);
379 return ui::GESTURE_STATUS_CONSUMED; 379 return ui::GESTURE_STATUS_CONSUMED;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 bar_->SetVerticalAlignment(views::ImageView::CENTER); 502 bar_->SetVerticalAlignment(views::ImageView::CENTER);
503 break; 503 break;
504 } 504 }
505 505
506 Layout(); 506 Layout();
507 SchedulePaint(); 507 SchedulePaint();
508 } 508 }
509 509
510 } // namespace internal 510 } // namespace internal
511 } // namespace ash 511 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher_button.h ('k') | ash/launcher/overflow_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698