Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(774)

Unified Diff: ui/views/touchui/touch_selection_menu_runner_views.h

Issue 698253004: Reland: Implement Aura side of unified touch text selection for contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed overrides in TouchHandleDrawableAura Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..7a0399dbed453fcab399a0598fd29b9bcd8f24ba
--- /dev/null
+++ b/ui/views/touchui/touch_selection_menu_runner_views.h
@@ -0,0 +1,45 @@
+// Copyright 2014 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"
+#include "ui/views/views_export.h"
+
+namespace views {
+
+// ...
+class VIEWS_EXPORT TouchSelectionMenuRunnerViews
+ : public ui::TouchSelectionMenuRunner,
+ public TouchEditingMenuController {
+ public:
+ TouchSelectionMenuRunnerViews();
+ ~TouchSelectionMenuRunnerViews() override;
+
+ private:
+ // Overriden from 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;
+
+ // Overriden from 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_

Powered by Google App Engine
This is Rietveld 408576698