| 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 const ViewHierarchyChangedDetails& details) override; | 282 const ViewHierarchyChangedDetails& details) override; |
| 283 | 283 |
| 284 // Overridden from ui::EventHandler: | 284 // Overridden from ui::EventHandler: |
| 285 void OnGestureEvent(ui::GestureEvent* event) override; | 285 void OnGestureEvent(ui::GestureEvent* event) override; |
| 286 | 286 |
| 287 // Overridden from ShelfModelObserver: | 287 // Overridden from ShelfModelObserver: |
| 288 void ShelfItemAdded(int model_index) override; | 288 void ShelfItemAdded(int model_index) override; |
| 289 void ShelfItemRemoved(int model_index, const ShelfItem& old_item) override; | 289 void ShelfItemRemoved(int model_index, const ShelfItem& old_item) override; |
| 290 void ShelfItemChanged(int model_index, const ShelfItem& old_item) override; | 290 void ShelfItemChanged(int model_index, const ShelfItem& old_item) override; |
| 291 void ShelfItemMoved(int start_index, int target_index) override; | 291 void ShelfItemMoved(int start_index, int target_index) override; |
| 292 void OnSetShelfItemDelegate(ShelfID, mojom::ShelfItemDelegate*) override; | 292 void OnSetShelfItemDelegate(ShelfID, ShelfItemDelegate*) override; |
| 293 | 293 |
| 294 // Handles the result of an item selection, records the |action| taken and | 294 // Handles the result of an item selection, records the |action| taken and |
| 295 // optionally shows an application menu with the given |menu_items|. | 295 // optionally shows an application menu with the given |menu_items|. |
| 296 void AfterItemSelected( | 296 void AfterItemSelected( |
| 297 const ShelfItem& item, | 297 const ShelfItem& item, |
| 298 views::Button* sender, | 298 views::Button* sender, |
| 299 std::unique_ptr<ui::Event> event, | 299 std::unique_ptr<ui::Event> event, |
| 300 views::InkDrop* ink_drop, | 300 views::InkDrop* ink_drop, |
| 301 ShelfAction action, | 301 ShelfAction action, |
| 302 base::Optional<std::vector<mojom::MenuItemPtr>> menu_items); | 302 base::Optional<std::vector<mojom::MenuItemPtr>> menu_items); |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 ShelfButtonPressedMetricTracker shelf_button_pressed_metric_tracker_; | 468 ShelfButtonPressedMetricTracker shelf_button_pressed_metric_tracker_; |
| 469 | 469 |
| 470 base::WeakPtrFactory<ShelfView> weak_factory_; | 470 base::WeakPtrFactory<ShelfView> weak_factory_; |
| 471 | 471 |
| 472 DISALLOW_COPY_AND_ASSIGN(ShelfView); | 472 DISALLOW_COPY_AND_ASSIGN(ShelfView); |
| 473 }; | 473 }; |
| 474 | 474 |
| 475 } // namespace ash | 475 } // namespace ash |
| 476 | 476 |
| 477 #endif // ASH_COMMON_SHELF_SHELF_VIEW_H_ | 477 #endif // ASH_COMMON_SHELF_SHELF_VIEW_H_ |
| OLD | NEW |