OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_VIEWS_TEST_WIDGET_TEST_H_ | 5 #ifndef UI_VIEWS_TEST_WIDGET_TEST_H_ |
6 #define UI_VIEWS_TEST_WIDGET_TEST_H_ | 6 #define UI_VIEWS_TEST_WIDGET_TEST_H_ |
7 | 7 |
8 #include "ui/gfx/native_widget_types.h" | 8 #include "ui/gfx/native_widget_types.h" |
9 #include "ui/views/test/views_test_base.h" | 9 #include "ui/views/test/views_test_base.h" |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 namespace test { | 45 namespace test { |
46 | 46 |
47 // A widget that assumes mouse capture always works. It won't on Aura in | 47 // A widget that assumes mouse capture always works. It won't on Aura in |
48 // testing, so we mock it. | 48 // testing, so we mock it. |
49 class NativeWidgetCapture : public PlatformNativeWidget { | 49 class NativeWidgetCapture : public PlatformNativeWidget { |
50 public: | 50 public: |
51 explicit NativeWidgetCapture(internal::NativeWidgetDelegate* delegate); | 51 explicit NativeWidgetCapture(internal::NativeWidgetDelegate* delegate); |
52 virtual ~NativeWidgetCapture(); | 52 virtual ~NativeWidgetCapture(); |
53 | 53 |
54 virtual void SetCapture() OVERRIDE; | 54 virtual void SetCapture() override; |
55 virtual void ReleaseCapture() OVERRIDE; | 55 virtual void ReleaseCapture() override; |
56 virtual bool HasCapture() const OVERRIDE; | 56 virtual bool HasCapture() const override; |
57 | 57 |
58 private: | 58 private: |
59 bool mouse_capture_; | 59 bool mouse_capture_; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(NativeWidgetCapture); | 61 DISALLOW_COPY_AND_ASSIGN(NativeWidgetCapture); |
62 }; | 62 }; |
63 | 63 |
64 class WidgetTest : public ViewsTestBase { | 64 class WidgetTest : public ViewsTestBase { |
65 public: | 65 public: |
66 WidgetTest(); | 66 WidgetTest(); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 static ui::EventProcessor* GetEventProcessor(Widget* widget); | 99 static ui::EventProcessor* GetEventProcessor(Widget* widget); |
100 | 100 |
101 private: | 101 private: |
102 DISALLOW_COPY_AND_ASSIGN(WidgetTest); | 102 DISALLOW_COPY_AND_ASSIGN(WidgetTest); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace test | 105 } // namespace test |
106 } // namespace views | 106 } // namespace views |
107 | 107 |
108 #endif // UI_VIEWS_TEST_WIDGET_TEST_H_ | 108 #endif // UI_VIEWS_TEST_WIDGET_TEST_H_ |
OLD | NEW |