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..b5beb6670388cd5ebd06b9d74c54f6d9d5f936b1 |
--- /dev/null |
+++ b/content/browser/renderer_host/touch_handle_drawable_aura.h |
@@ -0,0 +1,57 @@ |
+// 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 void SetVisible(bool visible) 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_; |
+ bool visible_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(TouchHandleDrawableAura); |
+}; |
+ |
+} |
+ |
+#endif // CONTENT_BROWSER_RENDERER_HOST_TOUCH_HANDLE_DRAWABLE_AURA_H_ |