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/app_list_button.cc

Issue 10832282: Replace views::MouseEvent with ui::MouseEvent (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/app_list_button.h ('k') | ash/launcher/launcher_button.h » ('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/app_list_button.h" 5 #include "ash/launcher/app_list_button.h"
6 6
7 #include "ash/launcher/launcher_button_host.h" 7 #include "ash/launcher/launcher_button_host.h"
8 #include "ui/base/accessibility/accessible_view_state.h" 8 #include "ui/base/accessibility/accessible_view_state.h"
9 #include "ui/base/animation/animation_delegate.h" 9 #include "ui/base/animation/animation_delegate.h"
10 #include "ui/base/animation/throb_animation.h" 10 #include "ui/base/animation/throb_animation.h"
(...skipping 15 matching lines...) Expand all
26 namespace internal { 26 namespace internal {
27 27
28 AppListButton::AppListButton(views::ButtonListener* listener, 28 AppListButton::AppListButton(views::ButtonListener* listener,
29 LauncherButtonHost* host) 29 LauncherButtonHost* host)
30 : views::ImageButton(listener), 30 : views::ImageButton(listener),
31 host_(host) {} 31 host_(host) {}
32 32
33 AppListButton::~AppListButton() { 33 AppListButton::~AppListButton() {
34 } 34 }
35 35
36 bool AppListButton::OnMousePressed(const views::MouseEvent& event) { 36 bool AppListButton::OnMousePressed(const ui::MouseEvent& event) {
37 ImageButton::OnMousePressed(event); 37 ImageButton::OnMousePressed(event);
38 host_->PointerPressedOnButton(this, LauncherButtonHost::MOUSE, event); 38 host_->PointerPressedOnButton(this, LauncherButtonHost::MOUSE, event);
39 return true; 39 return true;
40 } 40 }
41 41
42 void AppListButton::OnMouseReleased(const views::MouseEvent& event) { 42 void AppListButton::OnMouseReleased(const ui::MouseEvent& event) {
43 ImageButton::OnMouseReleased(event); 43 ImageButton::OnMouseReleased(event);
44 host_->PointerReleasedOnButton(this, LauncherButtonHost::MOUSE, false); 44 host_->PointerReleasedOnButton(this, LauncherButtonHost::MOUSE, false);
45 } 45 }
46 46
47 void AppListButton::OnMouseCaptureLost() { 47 void AppListButton::OnMouseCaptureLost() {
48 host_->PointerReleasedOnButton(this, LauncherButtonHost::MOUSE, true); 48 host_->PointerReleasedOnButton(this, LauncherButtonHost::MOUSE, true);
49 ImageButton::OnMouseCaptureLost(); 49 ImageButton::OnMouseCaptureLost();
50 } 50 }
51 51
52 bool AppListButton::OnMouseDragged(const views::MouseEvent& event) { 52 bool AppListButton::OnMouseDragged(const ui::MouseEvent& event) {
53 ImageButton::OnMouseDragged(event); 53 ImageButton::OnMouseDragged(event);
54 host_->PointerDraggedOnButton(this, LauncherButtonHost::MOUSE, event); 54 host_->PointerDraggedOnButton(this, LauncherButtonHost::MOUSE, event);
55 return true; 55 return true;
56 } 56 }
57 57
58 void AppListButton::OnMouseMoved(const views::MouseEvent& event) { 58 void AppListButton::OnMouseMoved(const ui::MouseEvent& event) {
59 ImageButton::OnMouseMoved(event); 59 ImageButton::OnMouseMoved(event);
60 host_->MouseMovedOverButton(this); 60 host_->MouseMovedOverButton(this);
61 } 61 }
62 62
63 void AppListButton::OnMouseEntered(const views::MouseEvent& event) { 63 void AppListButton::OnMouseEntered(const ui::MouseEvent& event) {
64 ImageButton::OnMouseEntered(event); 64 ImageButton::OnMouseEntered(event);
65 host_->MouseEnteredButton(this); 65 host_->MouseEnteredButton(this);
66 } 66 }
67 67
68 void AppListButton::OnMouseExited(const views::MouseEvent& event) { 68 void AppListButton::OnMouseExited(const ui::MouseEvent& event) {
69 ImageButton::OnMouseExited(event); 69 ImageButton::OnMouseExited(event);
70 host_->MouseExitedButton(this); 70 host_->MouseExitedButton(this);
71 } 71 }
72 72
73 void AppListButton::GetAccessibleState(ui::AccessibleViewState* state) { 73 void AppListButton::GetAccessibleState(ui::AccessibleViewState* state) {
74 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON; 74 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
75 state->name = host_->GetAccessibleName(this); 75 state->name = host_->GetAccessibleName(this);
76 } 76 }
77 77
78 } // namespace internal 78 } // namespace internal
79 } // namespace ash 79 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/app_list_button.h ('k') | ash/launcher/launcher_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698