| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 UI_VIEWS_TOUCHUI_TOUCH_EDITING_MENU_H_ | 5 #ifndef UI_VIEWS_TOUCHUI_TOUCH_EDITING_MENU_H_ |
| 6 #define UI_VIEWS_TOUCHUI_TOUCH_EDITING_MENU_H_ | 6 #define UI_VIEWS_TOUCHUI_TOUCH_EDITING_MENU_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/point.h" | 8 #include "ui/gfx/point.h" |
| 9 #include "ui/views/bubble/bubble_delegate.h" | 9 #include "ui/views/bubble/bubble_delegate.h" |
| 10 #include "ui/views/controls/button/button.h" | 10 #include "ui/views/controls/button/button.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 void Close(); | 52 void Close(); |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 TouchEditingMenuView(TouchEditingMenuController* controller, | 55 TouchEditingMenuView(TouchEditingMenuController* controller, |
| 56 const gfx::Rect& anchor_rect, | 56 const gfx::Rect& anchor_rect, |
| 57 const gfx::Size& handle_image_size, | 57 const gfx::Size& handle_image_size, |
| 58 gfx::NativeView context); | 58 gfx::NativeView context); |
| 59 | 59 |
| 60 // views::WidgetDelegate overrides: | 60 // views::WidgetDelegate overrides: |
| 61 virtual void WindowClosing() OVERRIDE; | 61 virtual void WindowClosing() override; |
| 62 | 62 |
| 63 // Overridden from ButtonListener. | 63 // Overridden from ButtonListener. |
| 64 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE; | 64 virtual void ButtonPressed(Button* sender, const ui::Event& event) override; |
| 65 | 65 |
| 66 // Overridden from BubbleDelegateView. | 66 // Overridden from BubbleDelegateView. |
| 67 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 67 virtual void OnPaint(gfx::Canvas* canvas) override; |
| 68 | 68 |
| 69 // Queries the |controller_| for what elements to show in the menu and sizes | 69 // Queries the |controller_| for what elements to show in the menu and sizes |
| 70 // the menu appropriately. | 70 // the menu appropriately. |
| 71 void CreateButtons(); | 71 void CreateButtons(); |
| 72 | 72 |
| 73 // Helper method to create a single button. | 73 // Helper method to create a single button. |
| 74 Button* CreateButton(const base::string16& title, int tag); | 74 Button* CreateButton(const base::string16& title, int tag); |
| 75 | 75 |
| 76 TouchEditingMenuController* controller_; | 76 TouchEditingMenuController* controller_; |
| 77 | 77 |
| 78 DISALLOW_COPY_AND_ASSIGN(TouchEditingMenuView); | 78 DISALLOW_COPY_AND_ASSIGN(TouchEditingMenuView); |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 } // namespace views | 81 } // namespace views |
| 82 | 82 |
| 83 #endif // UI_VIEWS_TOUCHUI_TOUCH_SELECTION_CONTROLLER_IMPL_H_ | 83 #endif // UI_VIEWS_TOUCHUI_TOUCH_SELECTION_CONTROLLER_IMPL_H_ |
| OLD | NEW |