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

Side by Side Diff: ash/launcher/launcher_view.h

Issue 10828265: Replace views::LocatedEvent with ui::LocatedEvent (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_host.h ('k') | ash/launcher/launcher_view.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 #ifndef ASH_LAUNCHER_LAUNCHER_VIEW_H_ 5 #ifndef ASH_LAUNCHER_LAUNCHER_VIEW_H_
6 #define ASH_LAUNCHER_LAUNCHER_VIEW_H_ 6 #define ASH_LAUNCHER_LAUNCHER_VIEW_H_
7 7
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 void AnimateToIdealBounds(); 137 void AnimateToIdealBounds();
138 138
139 // Creates the view used to represent |item|. 139 // Creates the view used to represent |item|.
140 views::View* CreateViewForItem(const LauncherItem& item); 140 views::View* CreateViewForItem(const LauncherItem& item);
141 141
142 // Fades |view| from an opacity of 0 to 1. This is when adding a new item. 142 // Fades |view| from an opacity of 0 to 1. This is when adding a new item.
143 void FadeIn(views::View* view); 143 void FadeIn(views::View* view);
144 144
145 // Invoked when the pointer has moved enough to trigger a drag. Sets 145 // Invoked when the pointer has moved enough to trigger a drag. Sets
146 // internal state in preparation for the drag. 146 // internal state in preparation for the drag.
147 void PrepareForDrag(Pointer pointer, const views::LocatedEvent& event); 147 void PrepareForDrag(Pointer pointer, const ui::LocatedEvent& event);
148 148
149 // Invoked when the mouse is dragged. Updates the models as appropriate. 149 // Invoked when the mouse is dragged. Updates the models as appropriate.
150 void ContinueDrag(const views::LocatedEvent& event); 150 void ContinueDrag(const ui::LocatedEvent& event);
151 151
152 // Returns true if |typea| and |typeb| should be in the same drag range. 152 // Returns true if |typea| and |typeb| should be in the same drag range.
153 bool SameDragType(LauncherItemType typea, LauncherItemType typeb) const; 153 bool SameDragType(LauncherItemType typea, LauncherItemType typeb) const;
154 154
155 // Returns the range (in the model) the item at the specified index can be 155 // Returns the range (in the model) the item at the specified index can be
156 // dragged to. 156 // dragged to.
157 std::pair<int, int> GetDragRange(int index); 157 std::pair<int, int> GetDragRange(int index);
158 158
159 // If there is a drag operation in progress it's canceled. If |modified_index| 159 // If there is a drag operation in progress it's canceled. If |modified_index|
160 // is valid, the new position of the corresponding item is returned. 160 // is valid, the new position of the corresponding item is returned.
(...skipping 19 matching lines...) Expand all
180 virtual void LauncherItemAdded(int model_index) OVERRIDE; 180 virtual void LauncherItemAdded(int model_index) OVERRIDE;
181 virtual void LauncherItemRemoved(int model_index, LauncherID id) OVERRIDE; 181 virtual void LauncherItemRemoved(int model_index, LauncherID id) OVERRIDE;
182 virtual void LauncherItemChanged(int model_index, 182 virtual void LauncherItemChanged(int model_index,
183 const ash::LauncherItem& old_item) OVERRIDE; 183 const ash::LauncherItem& old_item) OVERRIDE;
184 virtual void LauncherItemMoved(int start_index, int target_index) OVERRIDE; 184 virtual void LauncherItemMoved(int start_index, int target_index) OVERRIDE;
185 185
186 // Overridden from LauncherButtonHost: 186 // Overridden from LauncherButtonHost:
187 virtual void PointerPressedOnButton( 187 virtual void PointerPressedOnButton(
188 views::View* view, 188 views::View* view,
189 Pointer pointer, 189 Pointer pointer,
190 const views::LocatedEvent& event) OVERRIDE; 190 const ui::LocatedEvent& event) OVERRIDE;
191 virtual void PointerDraggedOnButton( 191 virtual void PointerDraggedOnButton(
192 views::View* view, 192 views::View* view,
193 Pointer pointer, 193 Pointer pointer,
194 const views::LocatedEvent& event) OVERRIDE; 194 const ui::LocatedEvent& event) OVERRIDE;
195 virtual void PointerReleasedOnButton(views::View* view, 195 virtual void PointerReleasedOnButton(views::View* view,
196 Pointer pointer, 196 Pointer pointer,
197 bool canceled) OVERRIDE; 197 bool canceled) OVERRIDE;
198 virtual void MouseMovedOverButton(views::View* view) OVERRIDE; 198 virtual void MouseMovedOverButton(views::View* view) OVERRIDE;
199 virtual void MouseEnteredButton(views::View* view) OVERRIDE; 199 virtual void MouseEnteredButton(views::View* view) OVERRIDE;
200 virtual void MouseExitedButton(views::View* view) OVERRIDE; 200 virtual void MouseExitedButton(views::View* view) OVERRIDE;
201 virtual ShelfAlignment GetShelfAlignment() const OVERRIDE; 201 virtual ShelfAlignment GetShelfAlignment() const OVERRIDE;
202 virtual string16 GetAccessibleName(const views::View* view) OVERRIDE; 202 virtual string16 GetAccessibleName(const views::View* view) OVERRIDE;
203 203
204 // Overridden from views::ButtonListener: 204 // Overridden from views::ButtonListener:
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 // alignment). 272 // alignment).
273 int leading_inset_; 273 int leading_inset_;
274 274
275 DISALLOW_COPY_AND_ASSIGN(LauncherView); 275 DISALLOW_COPY_AND_ASSIGN(LauncherView);
276 }; 276 };
277 277
278 } // namespace internal 278 } // namespace internal
279 } // namespace ash 279 } // namespace ash
280 280
281 #endif // ASH_LAUNCHER_LAUNCHER_VIEW_H_ 281 #endif // ASH_LAUNCHER_LAUNCHER_VIEW_H_
OLDNEW
« no previous file with comments | « ash/launcher/launcher_button_host.h ('k') | ash/launcher/launcher_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698