| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // Returns true if a tooltip should be shown for the shelf item |view|. | 115 // Returns true if a tooltip should be shown for the shelf item |view|. |
| 116 bool ShouldShowTooltipForView(const views::View* view) const; | 116 bool ShouldShowTooltipForView(const views::View* view) const; |
| 117 | 117 |
| 118 // Returns the title of the shelf item |view|. | 118 // Returns the title of the shelf item |view|. |
| 119 base::string16 GetTitleForView(const views::View* view) const; | 119 base::string16 GetTitleForView(const views::View* view) const; |
| 120 | 120 |
| 121 // Returns rectangle bounding all visible launcher items. Used screen | 121 // Returns rectangle bounding all visible launcher items. Used screen |
| 122 // coordinate system. | 122 // coordinate system. |
| 123 gfx::Rect GetVisibleItemsBoundsInScreen(); | 123 gfx::Rect GetVisibleItemsBoundsInScreen(); |
| 124 | 124 |
| 125 // InkDropButtonListener: |
| 126 void ButtonPressed(views::Button* sender, |
| 127 const ui::Event& event, |
| 128 views::InkDrop* ink_drop) override; |
| 129 |
| 125 // Overridden from FocusTraversable: | 130 // Overridden from FocusTraversable: |
| 126 views::FocusSearch* GetFocusSearch() override; | 131 views::FocusSearch* GetFocusSearch() override; |
| 127 FocusTraversable* GetFocusTraversableParent() override; | 132 FocusTraversable* GetFocusTraversableParent() override; |
| 128 View* GetFocusTraversableParentView() override; | 133 View* GetFocusTraversableParentView() override; |
| 129 | 134 |
| 130 // Overridden from app_list::ApplicationDragAndDropHost: | 135 // Overridden from app_list::ApplicationDragAndDropHost: |
| 131 void CreateDragIconProxy(const gfx::Point& location_in_screen_coordinates, | 136 void CreateDragIconProxy(const gfx::Point& location_in_screen_coordinates, |
| 132 const gfx::ImageSkia& icon, | 137 const gfx::ImageSkia& icon, |
| 133 views::View* replaced_view, | 138 views::View* replaced_view, |
| 134 const gfx::Vector2d& cursor_offset_from_center, | 139 const gfx::Vector2d& cursor_offset_from_center, |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 void OnGestureEvent(ui::GestureEvent* event) override; | 290 void OnGestureEvent(ui::GestureEvent* event) override; |
| 286 | 291 |
| 287 // Overridden from ShelfModelObserver: | 292 // Overridden from ShelfModelObserver: |
| 288 void ShelfItemAdded(int model_index) override; | 293 void ShelfItemAdded(int model_index) override; |
| 289 void ShelfItemRemoved(int model_index, ShelfID id) override; | 294 void ShelfItemRemoved(int model_index, ShelfID id) override; |
| 290 void ShelfItemChanged(int model_index, const ShelfItem& old_item) override; | 295 void ShelfItemChanged(int model_index, const ShelfItem& old_item) override; |
| 291 void ShelfItemMoved(int start_index, int target_index) override; | 296 void ShelfItemMoved(int start_index, int target_index) override; |
| 292 void OnSetShelfItemDelegate(ShelfID id, | 297 void OnSetShelfItemDelegate(ShelfID id, |
| 293 ShelfItemDelegate* item_delegate) override; | 298 ShelfItemDelegate* item_delegate) override; |
| 294 | 299 |
| 295 // Overridden from InkDropButtonListener: | |
| 296 void ButtonPressed(views::Button* sender, | |
| 297 const ui::Event& event, | |
| 298 views::InkDrop* ink_drop) override; | |
| 299 | |
| 300 // Show a list of all running items for this shelf |item|; it only shows a | 300 // Show a list of all running items for this shelf |item|; it only shows a |
| 301 // menu if there are multiple running items. |source| specifies the view | 301 // menu if there are multiple running items. |source| specifies the view |
| 302 // responsible for showing the menu, and the bubble will point towards it. | 302 // responsible for showing the menu, and the bubble will point towards it. |
| 303 // The |event_flags| are the flags of the event which triggered this menu. | 303 // The |event_flags| are the flags of the event which triggered this menu. |
| 304 // Returns |true| if a menu is shown. | 304 // Returns |true| if a menu is shown. |
| 305 bool ShowListMenuForView(const ShelfItem& item, | 305 bool ShowListMenuForView(const ShelfItem& item, |
| 306 views::View* source, | 306 views::View* source, |
| 307 const ui::Event& event, | 307 const ui::Event& event, |
| 308 views::InkDrop* ink_drop); | 308 views::InkDrop* ink_drop); |
| 309 | 309 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 | 468 |
| 469 // Tracks UMA metrics based on shelf button press actions. | 469 // Tracks UMA metrics based on shelf button press actions. |
| 470 ShelfButtonPressedMetricTracker shelf_button_pressed_metric_tracker_; | 470 ShelfButtonPressedMetricTracker shelf_button_pressed_metric_tracker_; |
| 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 |