Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Side by Side Diff: ash/shelf/shelf_view.h

Issue 2876203003: Make shelf item can be dragged when context menu is opened.
Patch Set: Add widget observer for |owner_| in MenuHost. Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/shelf/shelf_button.cc ('k') | ash/shelf/shelf_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ash/shelf/shelf_button.cc ('k') | ash/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698