Index: ui/views/touchui/touch_selection_menu_runner_views.h |
diff --git a/ui/views/touchui/touch_selection_menu_runner_views.h b/ui/views/touchui/touch_selection_menu_runner_views.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d91b4ad97974fe6702176ec4e1a73d58d9f148cf |
--- /dev/null |
+++ b/ui/views/touchui/touch_selection_menu_runner_views.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_VIEWS_TOUCHUI_TOUCH_SELECTION_MENU_RUNNER_VIEWS_H_ |
+#define UI_VIEWS_TOUCHUI_TOUCH_SELECTION_MENU_RUNNER_VIEWS_H_ |
+ |
+#include "ui/touch_selection/touch_selection_menu_runner.h" |
+#include "ui/views/touchui/touch_editing_menu.h" |
+ |
+namespace views { |
+ |
+// Views implementation for TouchSelectionMenuRunner. |
+class TouchSelectionMenuRunnerViews : public ui::TouchSelectionMenuRunner, |
+ public TouchEditingMenuController { |
+ public: |
+ TouchSelectionMenuRunnerViews(); |
+ ~TouchSelectionMenuRunnerViews() override; |
+ |
+ private: |
+ // ui::TouchSelectionMenuRunner: |
+ void RunMenu(ui::TouchSelectionMenuClient* client, |
+ const gfx::Rect& anchor_rect, |
+ const gfx::Size& handle_image_size, |
+ aura::Window* context) override; |
+ void CloseMenu() override; |
+ bool IsRunning() const override; |
+ |
+ // TouchEditingMenuController: |
+ bool IsCommandIdEnabled(int command_id) const override; |
+ void ExecuteCommand(int command_id, int event_flags) override; |
+ void OpenContextMenu() override; |
+ void OnMenuClosed(TouchEditingMenuView* menu) override; |
+ |
+ TouchEditingMenuView* menu_; |
+ ui::TouchSelectionMenuClient* client_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(TouchSelectionMenuRunnerViews); |
+}; |
+ |
+} // namespace views |
+ |
+#endif // UI_VIEWS_TOUCHUI_TOUCH_SELECTION_MENU_RUNNER_VIEWS_H_ |