OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_TOUCH_HANDLE_DRAWABLE_AURA_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_TOUCH_HANDLE_DRAWABLE_AURA_H_ |
| 7 |
| 8 #include "content/browser/renderer_host/input/touch_handle.h" |
| 9 #include "ui/aura/window_delegate.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 class TouchHandleDrawableAura : public TouchHandleDrawable, |
| 14 public aura::WindowDelegate { |
| 15 public: |
| 16 explicit TouchHandleDrawableAura(aura::Window* parent); |
| 17 virtual ~TouchHandleDrawableAura(); |
| 18 |
| 19 private: |
| 20 // Overriden from TouchHandleDrawable. |
| 21 virtual void SetEnabled(bool enabled) override; |
| 22 virtual void SetOrientation(TouchHandleOrientation orientation) override; |
| 23 virtual void SetAlpha(float alpha) override; |
| 24 virtual void SetFocus(const gfx::PointF& position) override; |
| 25 virtual void SetVisible(bool visible) override; |
| 26 virtual bool IntersectsWith(const gfx::RectF& rect) const override; |
| 27 |
| 28 // Overriden from aura::WindowDelegate. |
| 29 virtual gfx::Size GetMinimumSize() const override; |
| 30 virtual gfx::Size GetMaximumSize() const override; |
| 31 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, |
| 32 const gfx::Rect& new_bounds) override; |
| 33 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) override; |
| 34 virtual int GetNonClientComponent(const gfx::Point& point) const override; |
| 35 virtual bool ShouldDescendIntoChildForEventHandling( |
| 36 aura::Window* child, |
| 37 const gfx::Point& location) override; |
| 38 virtual bool CanFocus() override; |
| 39 virtual void OnCaptureLost() override; |
| 40 virtual void OnPaint(gfx::Canvas* canvas) override; |
| 41 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) override; |
| 42 virtual void OnWindowDestroying(aura::Window* window) override; |
| 43 virtual void OnWindowDestroyed(aura::Window* window) override; |
| 44 virtual void OnWindowTargetVisibilityChanged(bool visible) override; |
| 45 virtual bool HasHitTestMask() const override; |
| 46 virtual void GetHitTestMask(gfx::Path* mask) const override; |
| 47 |
| 48 scoped_ptr<aura::Window> window_; |
| 49 bool enabled_; |
| 50 bool visible_; |
| 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(TouchHandleDrawableAura); |
| 53 }; |
| 54 |
| 55 } |
| 56 |
| 57 #endif // CONTENT_BROWSER_RENDERER_HOST_TOUCH_HANDLE_DRAWABLE_AURA_H_ |
OLD | NEW |