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 ASH_SHELF_SHELF_VIEW_H_ | 5 #ifndef ASH_SHELF_SHELF_VIEW_H_ |
6 #define ASH_SHELF_SHELF_VIEW_H_ | 6 #define ASH_SHELF_SHELF_VIEW_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 29 matching lines...) Expand all Loading... | |
40 namespace ash { | 40 namespace ash { |
41 class AppListButton; | 41 class AppListButton; |
42 class DragImageView; | 42 class DragImageView; |
43 class OverflowBubble; | 43 class OverflowBubble; |
44 class OverflowButton; | 44 class OverflowButton; |
45 class ScopedTargetRootWindow; | 45 class ScopedTargetRootWindow; |
46 class Shelf; | 46 class Shelf; |
47 class ShelfButton; | 47 class ShelfButton; |
48 class ShelfDelegate; | 48 class ShelfDelegate; |
49 class ShelfIconObserver; | 49 class ShelfIconObserver; |
50 class ShelfItemDelegateManager; | 50 class ShelfItemDelegateManager; |
msw
2016/07/21 21:30:53
nit: remove (and do a 'git gs' to find others?)
James Cook
2016/07/22 01:20:08
Done here and everywhere.
| |
51 class ShelfModel; | 51 class ShelfModel; |
52 struct ShelfItem; | 52 struct ShelfItem; |
53 class WmShelf; | 53 class WmShelf; |
54 | 54 |
55 namespace test { | 55 namespace test { |
56 class ShelfViewTestAPI; | 56 class ShelfViewTestAPI; |
57 } | 57 } |
58 | 58 |
59 extern const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_BOTTOM; | 59 extern const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_BOTTOM; |
60 extern const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_LEFT; | 60 extern const int SHELF_ALIGNMENT_UMA_ENUM_VALUE_LEFT; |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
281 const ViewHierarchyChangedDetails& details) override; | 281 const ViewHierarchyChangedDetails& details) override; |
282 | 282 |
283 // Overridden from ui::EventHandler: | 283 // Overridden from ui::EventHandler: |
284 void OnGestureEvent(ui::GestureEvent* event) override; | 284 void OnGestureEvent(ui::GestureEvent* event) override; |
285 | 285 |
286 // Overridden from ShelfModelObserver: | 286 // Overridden from ShelfModelObserver: |
287 void ShelfItemAdded(int model_index) override; | 287 void ShelfItemAdded(int model_index) override; |
288 void ShelfItemRemoved(int model_index, ShelfID id) override; | 288 void ShelfItemRemoved(int model_index, ShelfID id) override; |
289 void ShelfItemChanged(int model_index, const ShelfItem& old_item) override; | 289 void ShelfItemChanged(int model_index, const ShelfItem& old_item) override; |
290 void ShelfItemMoved(int start_index, int target_index) override; | 290 void ShelfItemMoved(int start_index, int target_index) override; |
291 void OnSetShelfItemDelegate(ShelfID id, | |
292 ShelfItemDelegate* item_delegate) override; | |
291 | 293 |
292 // Overridden from InkDropButtonListener: | 294 // Overridden from InkDropButtonListener: |
293 void ButtonPressed(views::Button* sender, | 295 void ButtonPressed(views::Button* sender, |
294 const ui::Event& event, | 296 const ui::Event& event, |
295 views::InkDrop* ink_drop) override; | 297 views::InkDrop* ink_drop) override; |
296 | 298 |
297 // Show a list of all running items for this shelf |item|; it only shows a | 299 // Show a list of all running items for this shelf |item|; it only shows a |
298 // menu if there are multiple running items. |source| specifies the view | 300 // menu if there are multiple running items. |source| specifies the view |
299 // responsible for showing the menu, and the bubble will point towards it. | 301 // responsible for showing the menu, and the bubble will point towards it. |
300 // The |event_flags| are the flags of the event which triggered this menu. | 302 // The |event_flags| are the flags of the event which triggered this menu. |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
438 | 440 |
439 // The view which gets replaced by our drag icon proxy. | 441 // The view which gets replaced by our drag icon proxy. |
440 views::View* drag_replaced_view_; | 442 views::View* drag_replaced_view_; |
441 | 443 |
442 // True when the icon was dragged off the shelf. | 444 // True when the icon was dragged off the shelf. |
443 bool dragged_off_shelf_; | 445 bool dragged_off_shelf_; |
444 | 446 |
445 // The rip off view when a snap back operation is underway. | 447 // The rip off view when a snap back operation is underway. |
446 views::View* snap_back_from_rip_off_view_; | 448 views::View* snap_back_from_rip_off_view_; |
447 | 449 |
448 // Holds ShelfItemDelegateManager. | |
449 ShelfItemDelegateManager* item_manager_; | |
450 | |
451 // True when this ShelfView is used for Overflow Bubble. | 450 // True when this ShelfView is used for Overflow Bubble. |
452 bool overflow_mode_; | 451 bool overflow_mode_; |
453 | 452 |
454 // Holds a pointer to main ShelfView when a ShelfView is in overflow mode. | 453 // Holds a pointer to main ShelfView when a ShelfView is in overflow mode. |
455 ShelfView* main_shelf_; | 454 ShelfView* main_shelf_; |
456 | 455 |
457 // True when ripped item from overflow bubble is entered into Shelf. | 456 // True when ripped item from overflow bubble is entered into Shelf. |
458 bool dragged_off_from_overflow_to_shelf_; | 457 bool dragged_off_from_overflow_to_shelf_; |
459 | 458 |
460 // True if the event is a repost event from a event which has just closed the | 459 // True if the event is a repost event from a event which has just closed the |
461 // menu of the same shelf item. | 460 // menu of the same shelf item. |
462 bool is_repost_event_on_same_item_; | 461 bool is_repost_event_on_same_item_; |
463 | 462 |
464 // Record the index for the last pressed shelf item. This variable is used to | 463 // Record the index for the last pressed shelf item. This variable is used to |
465 // check if a repost event occurs on the same shelf item as previous one. If | 464 // check if a repost event occurs on the same shelf item as previous one. If |
466 // so, the repost event should be ignored. | 465 // so, the repost event should be ignored. |
467 int last_pressed_index_; | 466 int last_pressed_index_; |
468 | 467 |
469 // Tracks UMA metrics based on shelf button press actions. | 468 // Tracks UMA metrics based on shelf button press actions. |
470 ShelfButtonPressedMetricTracker shelf_button_pressed_metric_tracker_; | 469 ShelfButtonPressedMetricTracker shelf_button_pressed_metric_tracker_; |
471 | 470 |
472 DISALLOW_COPY_AND_ASSIGN(ShelfView); | 471 DISALLOW_COPY_AND_ASSIGN(ShelfView); |
473 }; | 472 }; |
474 | 473 |
475 } // namespace ash | 474 } // namespace ash |
476 | 475 |
477 #endif // ASH_SHELF_SHELF_VIEW_H_ | 476 #endif // ASH_SHELF_SHELF_VIEW_H_ |
OLD | NEW |