| 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_COMMON_SHELF_SHELF_VIEW_H_ | 5 #ifndef ASH_COMMON_SHELF_SHELF_VIEW_H_ |
| 6 #define ASH_COMMON_SHELF_SHELF_VIEW_H_ | 6 #define ASH_COMMON_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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 WmShelf* wm_shelf, | 70 WmShelf* wm_shelf, |
| 71 ShelfWidget* shelf_widget); | 71 ShelfWidget* shelf_widget); |
| 72 ~ShelfView() override; | 72 ~ShelfView() override; |
| 73 | 73 |
| 74 WmShelf* wm_shelf() const { return wm_shelf_; } | 74 WmShelf* wm_shelf() const { return wm_shelf_; } |
| 75 ShelfModel* model() const { return model_; } | 75 ShelfModel* model() const { return model_; } |
| 76 | 76 |
| 77 void Init(); | 77 void Init(); |
| 78 | 78 |
| 79 void OnShelfAlignmentChanged(); | 79 void OnShelfAlignmentChanged(); |
| 80 void SchedulePaintForAllButtons(); | |
| 81 | 80 |
| 82 // Returns the ideal bounds of the specified item, or an empty rect if id | 81 // Returns the ideal bounds of the specified item, or an empty rect if id |
| 83 // isn't know. If the item is in an overflow shelf, the overflow icon location | 82 // isn't know. If the item is in an overflow shelf, the overflow icon location |
| 84 // will be returned. | 83 // will be returned. |
| 85 gfx::Rect GetIdealBoundsOfItemIcon(ShelfID id); | 84 gfx::Rect GetIdealBoundsOfItemIcon(ShelfID id); |
| 86 | 85 |
| 87 // Repositions the icon for the specified item by the midpoint of the window. | 86 // Repositions the icon for the specified item by the midpoint of the window. |
| 88 void UpdatePanelIconPosition(ShelfID id, const gfx::Point& midpoint); | 87 void UpdatePanelIconPosition(ShelfID id, const gfx::Point& midpoint); |
| 89 | 88 |
| 90 // Returns true if we're showing a menu. | 89 // Returns true if we're showing a menu. |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 | 460 |
| 462 // Tracks UMA metrics based on shelf button press actions. | 461 // Tracks UMA metrics based on shelf button press actions. |
| 463 ShelfButtonPressedMetricTracker shelf_button_pressed_metric_tracker_; | 462 ShelfButtonPressedMetricTracker shelf_button_pressed_metric_tracker_; |
| 464 | 463 |
| 465 DISALLOW_COPY_AND_ASSIGN(ShelfView); | 464 DISALLOW_COPY_AND_ASSIGN(ShelfView); |
| 466 }; | 465 }; |
| 467 | 466 |
| 468 } // namespace ash | 467 } // namespace ash |
| 469 | 468 |
| 470 #endif // ASH_COMMON_SHELF_SHELF_VIEW_H_ | 469 #endif // ASH_COMMON_SHELF_SHELF_VIEW_H_ |
| OLD | NEW |