| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_ | 5 #ifndef UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_ |
| 6 #define UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_ | 6 #define UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 void OnBoundsChanged(const gfx::Rect& old_bounds, | 48 void OnBoundsChanged(const gfx::Rect& old_bounds, |
| 49 const gfx::Rect& new_bounds) override; | 49 const gfx::Rect& new_bounds) override; |
| 50 ui::TextInputClient* GetFocusedTextInputClient() override; | 50 ui::TextInputClient* GetFocusedTextInputClient() override; |
| 51 gfx::NativeCursor GetCursor(const gfx::Point& point) override; | 51 gfx::NativeCursor GetCursor(const gfx::Point& point) override; |
| 52 int GetNonClientComponent(const gfx::Point& point) const override; | 52 int GetNonClientComponent(const gfx::Point& point) const override; |
| 53 bool ShouldDescendIntoChildForEventHandling( | 53 bool ShouldDescendIntoChildForEventHandling( |
| 54 Window* child, | 54 Window* child, |
| 55 const gfx::Point& location) override; | 55 const gfx::Point& location) override; |
| 56 bool CanFocus() override; | 56 bool CanFocus() override; |
| 57 void OnCaptureLost() override; | 57 void OnCaptureLost() override; |
| 58 void OnPaint(gfx::Canvas* canvas) override; | 58 void OnPaint(const ui::PaintContext& context) override; |
| 59 void OnDeviceScaleFactorChanged(float device_scale_factor) override; | 59 void OnDeviceScaleFactorChanged(float device_scale_factor) override; |
| 60 void OnWindowDestroying(Window* window) override; | 60 void OnWindowDestroying(Window* window) override; |
| 61 void OnWindowDestroyed(Window* window) override; | 61 void OnWindowDestroyed(Window* window) override; |
| 62 void OnWindowTargetVisibilityChanged(bool visible) override; | 62 void OnWindowTargetVisibilityChanged(bool visible) override; |
| 63 bool HasHitTestMask() const override; | 63 bool HasHitTestMask() const override; |
| 64 void GetHitTestMask(gfx::Path* mask) const override; | 64 void GetHitTestMask(gfx::Path* mask) const override; |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 int window_component_; | 67 int window_component_; |
| 68 bool delete_on_destroyed_; | 68 bool delete_on_destroyed_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 79 class ColorTestWindowDelegate : public TestWindowDelegate { | 79 class ColorTestWindowDelegate : public TestWindowDelegate { |
| 80 public: | 80 public: |
| 81 explicit ColorTestWindowDelegate(SkColor color); | 81 explicit ColorTestWindowDelegate(SkColor color); |
| 82 ~ColorTestWindowDelegate() override; | 82 ~ColorTestWindowDelegate() override; |
| 83 | 83 |
| 84 ui::KeyboardCode last_key_code() const { return last_key_code_; } | 84 ui::KeyboardCode last_key_code() const { return last_key_code_; } |
| 85 | 85 |
| 86 // Overridden from TestWindowDelegate: | 86 // Overridden from TestWindowDelegate: |
| 87 void OnKeyEvent(ui::KeyEvent* event) override; | 87 void OnKeyEvent(ui::KeyEvent* event) override; |
| 88 void OnWindowDestroyed(Window* window) override; | 88 void OnWindowDestroyed(Window* window) override; |
| 89 void OnPaint(gfx::Canvas* canvas) override; | 89 void OnPaint(const ui::PaintContext& context) override; |
| 90 | 90 |
| 91 private: | 91 private: |
| 92 SkColor color_; | 92 SkColor color_; |
| 93 ui::KeyboardCode last_key_code_; | 93 ui::KeyboardCode last_key_code_; |
| 94 | 94 |
| 95 DISALLOW_COPY_AND_ASSIGN(ColorTestWindowDelegate); | 95 DISALLOW_COPY_AND_ASSIGN(ColorTestWindowDelegate); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 // A simple WindowDelegate that has a hit-test mask. | 98 // A simple WindowDelegate that has a hit-test mask. |
| 99 class MaskedWindowDelegate : public TestWindowDelegate { | 99 class MaskedWindowDelegate : public TestWindowDelegate { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 int key_release_count_; | 145 int key_release_count_; |
| 146 int gesture_count_; | 146 int gesture_count_; |
| 147 | 147 |
| 148 DISALLOW_COPY_AND_ASSIGN(EventCountDelegate); | 148 DISALLOW_COPY_AND_ASSIGN(EventCountDelegate); |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 } // namespace test | 151 } // namespace test |
| 152 } // namespace aura | 152 } // namespace aura |
| 153 | 153 |
| 154 #endif // UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_ | 154 #endif // UI_AURA_TEST_TEST_WINDOW_DELEGATE_H_ |
| OLD | NEW |