| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 virtual void ButtonPressed(views::Button* sender, | 236 virtual void ButtonPressed(views::Button* sender, |
| 237 const ui::Event& event) OVERRIDE; | 237 const ui::Event& event) OVERRIDE; |
| 238 | 238 |
| 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 const ui::Event& event); |
| 247 | 247 |
| 248 // Overridden from views::ContextMenuController: | 248 // Overridden from views::ContextMenuController: |
| 249 virtual void ShowContextMenuForView(views::View* source, | 249 virtual void ShowContextMenuForView(views::View* source, |
| 250 const gfx::Point& point) OVERRIDE; | 250 const gfx::Point& point, |
| 251 ui::MenuSourceType source_type) OVERRIDE; |
| 251 | 252 |
| 252 // Show either a context or normal click menu of given |menu_model_adapter|. | 253 // 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 | 254 // If |context_menu| is set, the displayed menu is a context menu and not |
| 254 // a menu listing one or more running applications. | 255 // a menu listing one or more running applications. |
| 255 // The |click_point| is only used for |context_menu|'s. | 256 // The |click_point| is only used for |context_menu|'s. |
| 256 void ShowMenu(scoped_ptr<views::MenuModelAdapter> menu_model_adapter, | 257 void ShowMenu(scoped_ptr<views::MenuModelAdapter> menu_model_adapter, |
| 257 views::View* source, | 258 views::View* source, |
| 258 const gfx::Point& click_point, | 259 const gfx::Point& click_point, |
| 259 bool context_menu); | 260 bool context_menu, |
| 261 ui::MenuSourceType source_type); |
| 260 | 262 |
| 261 // Overridden from views::BoundsAnimatorObserver: | 263 // Overridden from views::BoundsAnimatorObserver: |
| 262 virtual void OnBoundsAnimatorProgressed( | 264 virtual void OnBoundsAnimatorProgressed( |
| 263 views::BoundsAnimator* animator) OVERRIDE; | 265 views::BoundsAnimator* animator) OVERRIDE; |
| 264 virtual void OnBoundsAnimatorDone(views::BoundsAnimator* animator) OVERRIDE; | 266 virtual void OnBoundsAnimatorDone(views::BoundsAnimator* animator) OVERRIDE; |
| 265 | 267 |
| 266 // Returns false if the click which closed the previous menu is the click | 268 // Returns false if the click which closed the previous menu is the click |
| 267 // which triggered this event. | 269 // which triggered this event. |
| 268 bool IsUsableEvent(const ui::Event& event); | 270 bool IsUsableEvent(const ui::Event& event); |
| 269 | 271 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 // The view which gets replaced by our drag icon proxy. | 371 // The view which gets replaced by our drag icon proxy. |
| 370 views::View* drag_replaced_view_; | 372 views::View* drag_replaced_view_; |
| 371 | 373 |
| 372 DISALLOW_COPY_AND_ASSIGN(LauncherView); | 374 DISALLOW_COPY_AND_ASSIGN(LauncherView); |
| 373 }; | 375 }; |
| 374 | 376 |
| 375 } // namespace internal | 377 } // namespace internal |
| 376 } // namespace ash | 378 } // namespace ash |
| 377 | 379 |
| 378 #endif // ASH_LAUNCHER_LAUNCHER_VIEW_H_ | 380 #endif // ASH_LAUNCHER_LAUNCHER_VIEW_H_ |
| OLD | NEW |