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

Unified Diff: content/browser/web_contents/touch_selection_controller_aura_client_impl.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: Rebased after addition of touch_handle_orientation file Created 5 years, 10 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: content/browser/web_contents/touch_selection_controller_aura_client_impl.h
diff --git a/content/browser/web_contents/touch_selection_controller_aura_client_impl.h b/content/browser/web_contents/touch_selection_controller_aura_client_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..04db2c4191a65ff77ea10448fb486cfdc5a72663
--- /dev/null
+++ b/content/browser/web_contents/touch_selection_controller_aura_client_impl.h
@@ -0,0 +1,48 @@
+// 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 CONTENT_BROWSER_WEB_CONTENTS_TOUCH_SELECTION_CONTROLLER_AURA_CLIENT_IMPL_H_
+#define CONTENT_BROWSER_WEB_CONTENTS_TOUCH_SELECTION_CONTROLLER_AURA_CLIENT_IMPL_H_
+
+#include "content/common/content_export.h"
+#include "ui/touch_selection/touch_selection_controller_aura.h"
+
+namespace gfx {
+class PointF;
+class Rect;
+}
+
+namespace content {
+class RenderWidgetHostViewAura;
+
+// Aura specific implementation of ui::TouchSelectionControllerAuraClient for a
+// RenderWidgetHostView.
+class CONTENT_EXPORT TouchSelectionControllerAuraClientImpl
+ : public ui::TouchSelectionControllerAuraClient {
+ public:
+ explicit TouchSelectionControllerAuraClientImpl(
+ RenderWidgetHostViewAura* rwhva);
+ ~TouchSelectionControllerAuraClientImpl() override;
+
+ private:
+ // ui::TouchSelectionControllerAuraClient:
+ void MoveCaret(const gfx::PointF& position) override;
+ void MoveRangeSelectionExtent(const gfx::PointF& extent) override;
+ void SelectBetweenCoordinates(const gfx::PointF& base,
+ const gfx::PointF& extent) override;
+ aura::Window* GetParentWindow() const override;
+ gfx::Rect GetClientBounds() const override;
+ bool IsCommandIdEnabled(int command_id) const override;
+ void ExecuteCommand(int command_id, int event_flags) override;
+ void OpenContextMenu(const gfx::PointF& point) override;
+
+ // Not owned, non-null for the lifetime of this object.
+ RenderWidgetHostViewAura* rwhva_;
+
+ DISALLOW_COPY_AND_ASSIGN(TouchSelectionControllerAuraClientImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_WEB_CONTENTS_TOUCH_SELECTION_CONTROLLER_AURA_CLIENT_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698