| 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_LAUNCHER_LAUNCHER_VIEW_H_ | 5 #ifndef ASH_LAUNCHER_LAUNCHER_VIEW_H_ |
| 6 #define ASH_LAUNCHER_LAUNCHER_VIEW_H_ | 6 #define ASH_LAUNCHER_LAUNCHER_VIEW_H_ |
| 7 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // Show the list of all running items for this |item|. It will return true | 239 // Show the list of all running items for this |item|. It will return true |
| 240 // when the menu was shown and false if there were no possible items to | 240 // when the menu was shown and false if there were no possible items to |
| 241 // choose from. |source| specifies the view which is responsible for showing | 241 // choose from. |source| specifies the view which is responsible for showing |
| 242 // the menu, and the bubble will point towards it. | 242 // the menu, and the bubble will point towards it. |
| 243 // The |event_flags| are the flags of the event which triggered this menu. | 243 // The |event_flags| are the flags of the event which triggered this menu. |
| 244 bool ShowListMenuForView(const LauncherItem& item, | 244 bool ShowListMenuForView(const LauncherItem& item, |
| 245 views::View* source, | 245 views::View* source, |
| 246 int event_flags); | 246 int event_flags); |
| 247 | 247 |
| 248 // Overridden from views::ContextMenuController: | 248 // Overridden from views::ContextMenuController: |
| 249 virtual void ShowContextMenuForView(views::View* source, | 249 virtual void ShowContextMenuForView( |
| 250 const gfx::Point& point) OVERRIDE; | 250 views::View* source, |
| 251 const gfx::Point& point, |
| 252 ui::ContextMenuSourceType source_type) OVERRIDE; |
| 251 | 253 |
| 252 // Show either a context or normal click menu of given |menu_model_adapter|. | 254 // Show either a context or normal click menu of given |menu_model_adapter|. |
| 253 // If |context_menu| is set, the displayed menu is a context menu and not | 255 // If |context_menu| is set, the displayed menu is a context menu and not |
| 254 // a menu listing one or more running applications. | 256 // a menu listing one or more running applications. |
| 255 // The |click_point| is only used for |context_menu|'s. | 257 // The |click_point| is only used for |context_menu|'s. |
| 256 void ShowMenu(scoped_ptr<views::MenuModelAdapter> menu_model_adapter, | 258 void ShowMenu(scoped_ptr<views::MenuModelAdapter> menu_model_adapter, |
| 257 views::View* source, | 259 views::View* source, |
| 258 const gfx::Point& click_point, | 260 const gfx::Point& click_point, |
| 259 bool context_menu); | 261 bool context_menu, |
| 262 ui::ContextMenuSourceType source_type); |
| 260 | 263 |
| 261 // Overridden from views::BoundsAnimatorObserver: | 264 // Overridden from views::BoundsAnimatorObserver: |
| 262 virtual void OnBoundsAnimatorProgressed( | 265 virtual void OnBoundsAnimatorProgressed( |
| 263 views::BoundsAnimator* animator) OVERRIDE; | 266 views::BoundsAnimator* animator) OVERRIDE; |
| 264 virtual void OnBoundsAnimatorDone(views::BoundsAnimator* animator) OVERRIDE; | 267 virtual void OnBoundsAnimatorDone(views::BoundsAnimator* animator) OVERRIDE; |
| 265 | 268 |
| 266 // Returns false if the click which closed the previous menu is the click | 269 // Returns false if the click which closed the previous menu is the click |
| 267 // which triggered this event. | 270 // which triggered this event. |
| 268 bool IsUsableEvent(const ui::Event& event); | 271 bool IsUsableEvent(const ui::Event& event); |
| 269 | 272 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 // The view which gets replaced by our drag icon proxy. | 372 // The view which gets replaced by our drag icon proxy. |
| 370 views::View* drag_replaced_view_; | 373 views::View* drag_replaced_view_; |
| 371 | 374 |
| 372 DISALLOW_COPY_AND_ASSIGN(LauncherView); | 375 DISALLOW_COPY_AND_ASSIGN(LauncherView); |
| 373 }; | 376 }; |
| 374 | 377 |
| 375 } // namespace internal | 378 } // namespace internal |
| 376 } // namespace ash | 379 } // namespace ash |
| 377 | 380 |
| 378 #endif // ASH_LAUNCHER_LAUNCHER_VIEW_H_ | 381 #endif // ASH_LAUNCHER_LAUNCHER_VIEW_H_ |
| OLD | NEW |