| 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_SHELL_WINDOW_TYPE_LAUNCHER_H_ | 5 #ifndef ASH_SHELL_WINDOW_TYPE_LAUNCHER_H_ |
| 6 #define ASH_SHELL_WINDOW_TYPE_LAUNCHER_H_ | 6 #define ASH_SHELL_WINDOW_TYPE_LAUNCHER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "ui/views/context_menu_controller.h" | 11 #include "ui/views/context_menu_controller.h" |
| 12 #include "ui/views/controls/button/button.h" | 12 #include "ui/views/controls/button/button.h" |
| 13 #include "ui/views/controls/menu/menu_delegate.h" | 13 #include "ui/views/controls/menu/menu_delegate.h" |
| 14 #include "ui/views/widget/widget_delegate.h" | 14 #include "ui/views/widget/widget_delegate.h" |
| 15 | 15 |
| 16 namespace views { | 16 namespace views { |
| 17 class MenuRunner; | 17 class MenuRunner; |
| 18 class LabelButton; | |
| 19 } | 18 } |
| 20 | 19 |
| 21 namespace ash { | 20 namespace ash { |
| 22 namespace shell { | 21 namespace shell { |
| 23 | 22 |
| 24 // The contents view/delegate of a window that shows some buttons that create | 23 // The contents view/delegate of a window that shows some buttons that create |
| 25 // various window types. | 24 // various window types. |
| 26 class WindowTypeLauncher : public views::WidgetDelegateView, | 25 class WindowTypeLauncher : public views::WidgetDelegateView, |
| 27 public views::ButtonListener, | 26 public views::ButtonListener, |
| 28 public views::MenuDelegate, | 27 public views::MenuDelegate, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 54 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 53 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 55 | 54 |
| 56 // Overridden from views::MenuDelegate: | 55 // Overridden from views::MenuDelegate: |
| 57 void ExecuteCommand(int id, int event_flags) override; | 56 void ExecuteCommand(int id, int event_flags) override; |
| 58 | 57 |
| 59 // Override from views::ContextMenuController: | 58 // Override from views::ContextMenuController: |
| 60 void ShowContextMenuForView(views::View* source, | 59 void ShowContextMenuForView(views::View* source, |
| 61 const gfx::Point& point, | 60 const gfx::Point& point, |
| 62 ui::MenuSourceType source_type) override; | 61 ui::MenuSourceType source_type) override; |
| 63 | 62 |
| 64 views::LabelButton* create_button_; | 63 views::Button* create_button_; |
| 65 views::LabelButton* panel_button_; | 64 views::Button* panel_button_; |
| 66 views::LabelButton* create_nonresizable_button_; | 65 views::Button* create_nonresizable_button_; |
| 67 views::LabelButton* bubble_button_; | 66 views::Button* bubble_button_; |
| 68 views::LabelButton* lock_button_; | 67 views::Button* lock_button_; |
| 69 views::LabelButton* widgets_button_; | 68 views::Button* widgets_button_; |
| 70 views::LabelButton* system_modal_button_; | 69 views::Button* system_modal_button_; |
| 71 views::LabelButton* window_modal_button_; | 70 views::Button* window_modal_button_; |
| 72 views::LabelButton* child_modal_button_; | 71 views::Button* child_modal_button_; |
| 73 views::LabelButton* transient_button_; | 72 views::Button* transient_button_; |
| 74 views::LabelButton* examples_button_; | 73 views::Button* examples_button_; |
| 75 views::LabelButton* show_hide_window_button_; | 74 views::Button* show_hide_window_button_; |
| 76 views::LabelButton* show_web_notification_; | 75 views::Button* show_web_notification_; |
| 77 std::unique_ptr<views::MenuRunner> menu_runner_; | 76 std::unique_ptr<views::MenuRunner> menu_runner_; |
| 78 | 77 |
| 79 DISALLOW_COPY_AND_ASSIGN(WindowTypeLauncher); | 78 DISALLOW_COPY_AND_ASSIGN(WindowTypeLauncher); |
| 80 }; | 79 }; |
| 81 | 80 |
| 82 } // namespace shell | 81 } // namespace shell |
| 83 } // namespace ash | 82 } // namespace ash |
| 84 | 83 |
| 85 #endif // ASH_SHELL_WINDOW_TYPE_LAUNCHER_H_ | 84 #endif // ASH_SHELL_WINDOW_TYPE_LAUNCHER_H_ |
| OLD | NEW |