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

Unified Diff: content/browser/renderer_host/touch_handle_drawable_aura.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 SetVisible removal and Mikhail's directional handles patch Created 6 years, 1 month 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/renderer_host/touch_handle_drawable_aura.h
diff --git a/content/browser/renderer_host/touch_handle_drawable_aura.h b/content/browser/renderer_host/touch_handle_drawable_aura.h
new file mode 100644
index 0000000000000000000000000000000000000000..8c3d42c72fb4610585f78b21d4e527bf17ce349c
--- /dev/null
+++ b/content/browser/renderer_host/touch_handle_drawable_aura.h
@@ -0,0 +1,56 @@
+// 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 CONTENT_BROWSER_RENDERER_HOST_TOUCH_HANDLE_DRAWABLE_AURA_H_
+#define CONTENT_BROWSER_RENDERER_HOST_TOUCH_HANDLE_DRAWABLE_AURA_H_
+
+#include "content/browser/renderer_host/input/touch_handle.h"
+#include "ui/aura/window_delegate.h"
+
+namespace content {
+
+class TouchHandleDrawableAura : public TouchHandleDrawable,
+ public aura::WindowDelegate {
+ public:
+ explicit TouchHandleDrawableAura(aura::Window* parent);
+ virtual ~TouchHandleDrawableAura();
+
+ private:
+ // Overriden from TouchHandleDrawable.
+ virtual void SetEnabled(bool enabled) override;
+ virtual void SetOrientation(TouchHandleOrientation orientation) override;
+ virtual void SetAlpha(float alpha) override;
+ virtual void SetFocus(const gfx::PointF& position) override;
+ virtual bool IntersectsWith(const gfx::RectF& rect) const override;
+
+ // Overriden from aura::WindowDelegate.
+ virtual gfx::Size GetMinimumSize() const override;
+ virtual gfx::Size GetMaximumSize() const override;
+ virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) override;
+ virtual gfx::NativeCursor GetCursor(const gfx::Point& point) override;
+ virtual int GetNonClientComponent(const gfx::Point& point) const override;
+ virtual bool ShouldDescendIntoChildForEventHandling(
+ aura::Window* child,
+ const gfx::Point& location) override;
+ virtual bool CanFocus() override;
+ virtual void OnCaptureLost() override;
+ virtual void OnPaint(gfx::Canvas* canvas) override;
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override;
+ virtual void OnWindowDestroying(aura::Window* window) override;
+ virtual void OnWindowDestroyed(aura::Window* window) override;
+ virtual void OnWindowTargetVisibilityChanged(bool visible) override;
+ virtual bool HasHitTestMask() const override;
+ virtual void GetHitTestMask(gfx::Path* mask) const override;
+
+ scoped_ptr<aura::Window> window_;
+ bool enabled_;
+ float alpha_;
+
+ DISALLOW_COPY_AND_ASSIGN(TouchHandleDrawableAura);
+};
+
+}
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_TOUCH_HANDLE_DRAWABLE_AURA_H_

Powered by Google App Engine
This is Rietveld 408576698