| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 void ShelfItemRemoved(int model_index, const ShelfItem& old_item) override; | 308 void ShelfItemRemoved(int model_index, const ShelfItem& old_item) override; |
| 309 void ShelfItemChanged(int model_index, const ShelfItem& old_item) override; | 309 void ShelfItemChanged(int model_index, const ShelfItem& old_item) override; |
| 310 void ShelfItemMoved(int start_index, int target_index) override; | 310 void ShelfItemMoved(int start_index, int target_index) override; |
| 311 void ShelfItemDelegateChanged(const ShelfID& id, | 311 void ShelfItemDelegateChanged(const ShelfID& id, |
| 312 ShelfItemDelegate* delegate) override; | 312 ShelfItemDelegate* delegate) override; |
| 313 | 313 |
| 314 // Handles the result when querying ShelfItemDelegates for context menu items. | 314 // Handles the result when querying ShelfItemDelegates for context menu items. |
| 315 // Shows a default shelf context menu with optional extra custom |menu_items|. | 315 // Shows a default shelf context menu with optional extra custom |menu_items|. |
| 316 void AfterGetContextMenuItems(const ShelfID& shelf_id, | 316 void AfterGetContextMenuItems(const ShelfID& shelf_id, |
| 317 const gfx::Point& point, | 317 const gfx::Point& point, |
| 318 views::View* source, |
| 318 ui::MenuSourceType source_type, | 319 ui::MenuSourceType source_type, |
| 319 std::vector<mojom::MenuItemPtr> menu_items); | 320 std::vector<mojom::MenuItemPtr> menu_items); |
| 320 | 321 |
| 321 // Handles the result of an item selection, records the |action| taken and | 322 // Handles the result of an item selection, records the |action| taken and |
| 322 // optionally shows an application menu with the given |menu_items|. | 323 // optionally shows an application menu with the given |menu_items|. |
| 323 void AfterItemSelected( | 324 void AfterItemSelected( |
| 324 const ShelfItem& item, | 325 const ShelfItem& item, |
| 325 views::Button* sender, | 326 views::Button* sender, |
| 326 std::unique_ptr<ui::Event> event, | 327 std::unique_ptr<ui::Event> event, |
| 327 views::InkDrop* ink_drop, | 328 views::InkDrop* ink_drop, |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 ShelfButtonPressedMetricTracker shelf_button_pressed_metric_tracker_; | 505 ShelfButtonPressedMetricTracker shelf_button_pressed_metric_tracker_; |
| 505 | 506 |
| 506 base::WeakPtrFactory<ShelfView> weak_factory_; | 507 base::WeakPtrFactory<ShelfView> weak_factory_; |
| 507 | 508 |
| 508 DISALLOW_COPY_AND_ASSIGN(ShelfView); | 509 DISALLOW_COPY_AND_ASSIGN(ShelfView); |
| 509 }; | 510 }; |
| 510 | 511 |
| 511 } // namespace ash | 512 } // namespace ash |
| 512 | 513 |
| 513 #endif // ASH_SHELF_SHELF_VIEW_H_ | 514 #endif // ASH_SHELF_SHELF_VIEW_H_ |
| OLD | NEW |