Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ |
| 6 #define UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 215 | 215 |
| 216 // Invoked when |page_flip_timer_| fires. | 216 // Invoked when |page_flip_timer_| fires. |
| 217 void OnPageFlipTimer(); | 217 void OnPageFlipTimer(); |
| 218 | 218 |
| 219 // Updates |model_| to move item represented by |item_view| to |target| slot. | 219 // Updates |model_| to move item represented by |item_view| to |target| slot. |
| 220 void MoveItemInModel(views::View* item_view, const Index& target); | 220 void MoveItemInModel(views::View* item_view, const Index& target); |
| 221 | 221 |
| 222 // Cancels any context menus showing for app items on the current page. | 222 // Cancels any context menus showing for app items on the current page. |
| 223 void CancelContextMenusOnCurrentPage(); | 223 void CancelContextMenusOnCurrentPage(); |
| 224 | 224 |
| 225 bool IsPointWithinDragBuffer(const gfx::Point& point) const; | |
|
xiyuan
2013/07/19 16:24:04
nit: Add a comment for this method.
koz (OOO until 15th September)
2013/07/22 00:26:14
Done.
| |
| 226 | |
| 225 // Overridden from views::ButtonListener: | 227 // Overridden from views::ButtonListener: |
| 226 virtual void ButtonPressed(views::Button* sender, | 228 virtual void ButtonPressed(views::Button* sender, |
| 227 const ui::Event& event) OVERRIDE; | 229 const ui::Event& event) OVERRIDE; |
| 228 | 230 |
| 229 // Overridden from ListModelObserver: | 231 // Overridden from ListModelObserver: |
| 230 virtual void ListItemsAdded(size_t start, size_t count) OVERRIDE; | 232 virtual void ListItemsAdded(size_t start, size_t count) OVERRIDE; |
| 231 virtual void ListItemsRemoved(size_t start, size_t count) OVERRIDE; | 233 virtual void ListItemsRemoved(size_t start, size_t count) OVERRIDE; |
| 232 virtual void ListItemMoved(size_t index, size_t target_index) OVERRIDE; | 234 virtual void ListItemMoved(size_t index, size_t target_index) OVERRIDE; |
| 233 virtual void ListItemsChanged(size_t start, size_t count) OVERRIDE; | 235 virtual void ListItemsChanged(size_t start, size_t count) OVERRIDE; |
| 234 | 236 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 266 | 268 |
| 267 // The point where the drag started in AppListItemView coordinates. | 269 // The point where the drag started in AppListItemView coordinates. |
| 268 gfx::Point drag_view_offset_; | 270 gfx::Point drag_view_offset_; |
| 269 | 271 |
| 270 // The point where the drag started in GridView coordinates. | 272 // The point where the drag started in GridView coordinates. |
| 271 gfx::Point drag_start_grid_view_; | 273 gfx::Point drag_start_grid_view_; |
| 272 | 274 |
| 273 // The location of |drag_view_| when the drag started. | 275 // The location of |drag_view_| when the drag started. |
| 274 gfx::Point drag_view_start_; | 276 gfx::Point drag_view_start_; |
| 275 | 277 |
| 278 // Page the drag started on. | |
| 279 int drag_start_page_; | |
| 280 | |
| 276 #if defined(OS_WIN) && !defined(USE_AURA) | 281 #if defined(OS_WIN) && !defined(USE_AURA) |
| 277 // Created when a drag is started (ie: drag exceeds the drag threshold), but | 282 // Created when a drag is started (ie: drag exceeds the drag threshold), but |
| 278 // not Run() until supplied with a shortcut path. | 283 // not Run() until supplied with a shortcut path. |
| 279 scoped_refptr<SynchronousDrag> synchronous_drag_; | 284 scoped_refptr<SynchronousDrag> synchronous_drag_; |
| 280 #endif | 285 #endif |
| 281 | 286 |
| 282 Pointer drag_pointer_; | 287 Pointer drag_pointer_; |
| 283 Index drop_target_; | 288 Index drop_target_; |
| 284 | 289 |
| 285 // An application target drag and drop host which accepts dnd operations. | 290 // An application target drag and drop host which accepts dnd operations. |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 303 int page_flip_delay_in_ms_; | 308 int page_flip_delay_in_ms_; |
| 304 | 309 |
| 305 views::BoundsAnimator bounds_animator_; | 310 views::BoundsAnimator bounds_animator_; |
| 306 | 311 |
| 307 DISALLOW_COPY_AND_ASSIGN(AppsGridView); | 312 DISALLOW_COPY_AND_ASSIGN(AppsGridView); |
| 308 }; | 313 }; |
| 309 | 314 |
| 310 } // namespace app_list | 315 } // namespace app_list |
| 311 | 316 |
| 312 #endif // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ | 317 #endif // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ |
| OLD | NEW |