OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_VIEWS_TOUCHUI_TOUCH_SELECTION_MENU_RUNNER_VIEWS_H_ |
| 6 #define UI_VIEWS_TOUCHUI_TOUCH_SELECTION_MENU_RUNNER_VIEWS_H_ |
| 7 |
| 8 #include "ui/touch_selection/touch_selection_menu_runner.h" |
| 9 #include "ui/views/touchui/touch_editing_menu.h" |
| 10 |
| 11 namespace views { |
| 12 |
| 13 // Views implementation for TouchSelectionMenuRunner. |
| 14 class TouchSelectionMenuRunnerViews : public ui::TouchSelectionMenuRunner, |
| 15 public TouchEditingMenuController { |
| 16 public: |
| 17 TouchSelectionMenuRunnerViews(); |
| 18 ~TouchSelectionMenuRunnerViews() override; |
| 19 |
| 20 private: |
| 21 // ui::TouchSelectionMenuRunner: |
| 22 void RunMenu(ui::TouchSelectionMenuClient* client, |
| 23 const gfx::Rect& anchor_rect, |
| 24 const gfx::Size& handle_image_size, |
| 25 aura::Window* context) override; |
| 26 void CloseMenu() override; |
| 27 bool IsRunning() const override; |
| 28 |
| 29 // TouchEditingMenuController: |
| 30 bool IsCommandIdEnabled(int command_id) const override; |
| 31 void ExecuteCommand(int command_id, int event_flags) override; |
| 32 void OpenContextMenu() override; |
| 33 void OnMenuClosed(TouchEditingMenuView* menu) override; |
| 34 |
| 35 TouchEditingMenuView* menu_; |
| 36 ui::TouchSelectionMenuClient* client_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(TouchSelectionMenuRunnerViews); |
| 39 }; |
| 40 |
| 41 } // namespace views |
| 42 |
| 43 #endif // UI_VIEWS_TOUCHUI_TOUCH_SELECTION_MENU_RUNNER_VIEWS_H_ |
OLD | NEW |