| 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 <utility> | 9 #include <utility> |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "ash/shelf/shelf_button_host.h" | 12 #include "ash/shelf/shelf_button_host.h" |
| 13 #include "ash/shelf/shelf_item_delegate.h" |
| 12 #include "ash/shelf/shelf_model_observer.h" | 14 #include "ash/shelf/shelf_model_observer.h" |
| 13 #include "ash/wm/gestures/shelf_gesture_handler.h" | 15 #include "ash/wm/gestures/shelf_gesture_handler.h" |
| 14 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
| 15 #include "ui/app_list/views/app_list_drag_and_drop_host.h" | 17 #include "ui/app_list/views/app_list_drag_and_drop_host.h" |
| 16 #include "ui/views/animation/bounds_animator_observer.h" | 18 #include "ui/views/animation/bounds_animator_observer.h" |
| 17 #include "ui/views/context_menu_controller.h" | 19 #include "ui/views/context_menu_controller.h" |
| 18 #include "ui/views/controls/button/button.h" | 20 #include "ui/views/controls/button/button.h" |
| 19 #include "ui/views/focus/focus_manager.h" | 21 #include "ui/views/focus/focus_manager.h" |
| 20 #include "ui/views/view.h" | 22 #include "ui/views/view.h" |
| 21 #include "ui/views/view_model.h" | 23 #include "ui/views/view_model.h" |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 Pointer pointer, | 271 Pointer pointer, |
| 270 bool canceled) override; | 272 bool canceled) override; |
| 271 void MouseMovedOverButton(views::View* view) override; | 273 void MouseMovedOverButton(views::View* view) override; |
| 272 void MouseEnteredButton(views::View* view) override; | 274 void MouseEnteredButton(views::View* view) override; |
| 273 void MouseExitedButton(views::View* view) override; | 275 void MouseExitedButton(views::View* view) override; |
| 274 base::string16 GetAccessibleName(const views::View* view) override; | 276 base::string16 GetAccessibleName(const views::View* view) override; |
| 275 | 277 |
| 276 // Overridden from views::ButtonListener: | 278 // Overridden from views::ButtonListener: |
| 277 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 279 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 278 | 280 |
| 281 // Records UMA statistics for the input source when an icon was activated. |
| 282 void RecordIconActivatedSource(const ui::Event& event); |
| 283 |
| 284 // Records UMA statistics for the action performed by activating an icon. |
| 285 void RecordIconActivatedAction( |
| 286 ShelfItemDelegate::PerformedAction performed_action); |
| 287 |
| 279 // Show the list of all running items for this |item|. It will return true | 288 // Show the list of all running items for this |item|. It will return true |
| 280 // when the menu was shown and false if there were no possible items to | 289 // when the menu was shown and false if there were no possible items to |
| 281 // choose from. |source| specifies the view which is responsible for showing | 290 // choose from. |source| specifies the view which is responsible for showing |
| 282 // the menu, and the bubble will point towards it. | 291 // the menu, and the bubble will point towards it. |
| 283 // The |event_flags| are the flags of the event which triggered this menu. | 292 // The |event_flags| are the flags of the event which triggered this menu. |
| 284 bool ShowListMenuForView(const ShelfItem& item, | 293 bool ShowListMenuForView(const ShelfItem& item, |
| 285 views::View* source, | 294 views::View* source, |
| 286 const ui::Event& event); | 295 const ui::Event& event); |
| 287 | 296 |
| 288 // Overridden from views::ContextMenuController: | 297 // Overridden from views::ContextMenuController: |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 // check if a repost event occurs on the same shelf item as previous one. If | 453 // check if a repost event occurs on the same shelf item as previous one. If |
| 445 // so, the repost event should be ignored. | 454 // so, the repost event should be ignored. |
| 446 int last_pressed_index_; | 455 int last_pressed_index_; |
| 447 | 456 |
| 448 DISALLOW_COPY_AND_ASSIGN(ShelfView); | 457 DISALLOW_COPY_AND_ASSIGN(ShelfView); |
| 449 }; | 458 }; |
| 450 | 459 |
| 451 } // namespace ash | 460 } // namespace ash |
| 452 | 461 |
| 453 #endif // ASH_SHELF_SHELF_VIEW_H_ | 462 #endif // ASH_SHELF_SHELF_VIEW_H_ |
| OLD | NEW |