| 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 <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 Pointer pointer, | 267 Pointer pointer, |
| 268 bool canceled) override; | 268 bool canceled) override; |
| 269 void MouseMovedOverButton(views::View* view) override; | 269 void MouseMovedOverButton(views::View* view) override; |
| 270 void MouseEnteredButton(views::View* view) override; | 270 void MouseEnteredButton(views::View* view) override; |
| 271 void MouseExitedButton(views::View* view) override; | 271 void MouseExitedButton(views::View* view) override; |
| 272 base::string16 GetAccessibleName(const views::View* view) override; | 272 base::string16 GetAccessibleName(const views::View* view) override; |
| 273 | 273 |
| 274 // Overridden from views::ButtonListener: | 274 // Overridden from views::ButtonListener: |
| 275 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 275 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 276 | 276 |
| 277 // Show the list of all running items for this |item|. It will return true | 277 // Show a list of all running items for this shelf |item|; it only shows a |
| 278 // when the menu was shown and false if there were no possible items to | 278 // menu if there are multiple running items. |source| specifies the view |
| 279 // choose from. |source| specifies the view which is responsible for showing | 279 // responsible for showing the menu, and the bubble will point towards it. |
| 280 // the menu, and the bubble will point towards it. | |
| 281 // The |event_flags| are the flags of the event which triggered this menu. | 280 // The |event_flags| are the flags of the event which triggered this menu. |
| 282 bool ShowListMenuForView(const ShelfItem& item, | 281 void ShowListMenuForView(const ShelfItem& item, |
| 283 views::View* source, | 282 views::View* source, |
| 284 const ui::Event& event); | 283 const ui::Event& event); |
| 285 | 284 |
| 286 // Overridden from views::ContextMenuController: | 285 // Overridden from views::ContextMenuController: |
| 287 void ShowContextMenuForView(views::View* source, | 286 void ShowContextMenuForView(views::View* source, |
| 288 const gfx::Point& point, | 287 const gfx::Point& point, |
| 289 ui::MenuSourceType source_type) override; | 288 ui::MenuSourceType source_type) override; |
| 290 | 289 |
| 291 // Show either a context or normal click menu of given |menu_model|. | 290 // Show either a context or normal click menu of given |menu_model|. |
| 292 // If |context_menu| is set, the displayed menu is a context menu and not | 291 // If |context_menu| is set, the displayed menu is a context menu and not |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 gfx::Point drag_origin_; | 358 gfx::Point drag_origin_; |
| 360 | 359 |
| 361 // Index |drag_view_| was initially at. | 360 // Index |drag_view_| was initially at. |
| 362 int start_drag_index_; | 361 int start_drag_index_; |
| 363 | 362 |
| 364 // Used for the context menu of a particular item. | 363 // Used for the context menu of a particular item. |
| 365 ShelfID context_menu_id_; | 364 ShelfID context_menu_id_; |
| 366 | 365 |
| 367 scoped_ptr<views::FocusSearch> focus_search_; | 366 scoped_ptr<views::FocusSearch> focus_search_; |
| 368 | 367 |
| 369 scoped_ptr<ui::MenuModel> context_menu_model_; | |
| 370 | |
| 371 scoped_ptr<views::MenuRunner> launcher_menu_runner_; | 368 scoped_ptr<views::MenuRunner> launcher_menu_runner_; |
| 372 | 369 |
| 373 base::ObserverList<ShelfIconObserver> observers_; | 370 base::ObserverList<ShelfIconObserver> observers_; |
| 374 | 371 |
| 375 // Amount content is inset on the left edge (or top edge for vertical | 372 // Amount content is inset on the left edge (or top edge for vertical |
| 376 // alignment). | 373 // alignment). |
| 377 int leading_inset_; | 374 int leading_inset_; |
| 378 | 375 |
| 379 ShelfGestureHandler gesture_handler_; | 376 ShelfGestureHandler gesture_handler_; |
| 380 | 377 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 | 442 |
| 446 // Tracks UMA metrics based on shelf button press actions. | 443 // Tracks UMA metrics based on shelf button press actions. |
| 447 ShelfButtonPressedMetricTracker shelf_button_pressed_metric_tracker_; | 444 ShelfButtonPressedMetricTracker shelf_button_pressed_metric_tracker_; |
| 448 | 445 |
| 449 DISALLOW_COPY_AND_ASSIGN(ShelfView); | 446 DISALLOW_COPY_AND_ASSIGN(ShelfView); |
| 450 }; | 447 }; |
| 451 | 448 |
| 452 } // namespace ash | 449 } // namespace ash |
| 453 | 450 |
| 454 #endif // ASH_SHELF_SHELF_VIEW_H_ | 451 #endif // ASH_SHELF_SHELF_VIEW_H_ |
| OLD | NEW |