OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_TEST_BASE_VIEW_EVENT_TEST_PLATFORM_PART_H_ | 5 #ifndef CHROME_TEST_BASE_VIEW_EVENT_TEST_PLATFORM_PART_H_ |
6 #define CHROME_TEST_BASE_VIEW_EVENT_TEST_PLATFORM_PART_H_ | 6 #define CHROME_TEST_BASE_VIEW_EVENT_TEST_PLATFORM_PART_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
10 | 10 |
11 namespace ui { | 11 namespace ui { |
12 class ContextFactory; | 12 class ContextFactory; |
| 13 class ContextFactoryPrivate; |
13 } | 14 } |
14 | 15 |
15 // A helper class owned by tests that performs platform specific initialization. | 16 // A helper class owned by tests that performs platform specific initialization. |
16 // ViewEventTestPlatformPart behaves a bit like views::ViewsTestHelper, but on | 17 // ViewEventTestPlatformPart behaves a bit like views::ViewsTestHelper, but on |
17 // ChromeOS it will create an Ash shell environment, rather than using an | 18 // ChromeOS it will create an Ash shell environment, rather than using an |
18 // AuraTestHelper. | 19 // AuraTestHelper. |
19 class ViewEventTestPlatformPart { | 20 class ViewEventTestPlatformPart { |
20 public: | 21 public: |
21 virtual ~ViewEventTestPlatformPart() {} | 22 virtual ~ViewEventTestPlatformPart() {} |
22 | 23 |
23 // Set up the platform-specific environment. Teardown is performed in the | 24 // Set up the platform-specific environment. Teardown is performed in the |
24 // destructor. | 25 // destructor. |
25 static ViewEventTestPlatformPart* Create(ui::ContextFactory* context_factory); | 26 static ViewEventTestPlatformPart* Create( |
| 27 ui::ContextFactory* context_factory, |
| 28 ui::ContextFactoryPrivate* context_factory_private); |
26 | 29 |
27 // The Widget context for creating the test window. This will be the Ash root | 30 // The Widget context for creating the test window. This will be the Ash root |
28 // window on ChromeOS environments. Otherwise it should return NULL. | 31 // window on ChromeOS environments. Otherwise it should return NULL. |
29 virtual gfx::NativeWindow GetContext() = 0; | 32 virtual gfx::NativeWindow GetContext() = 0; |
30 | 33 |
31 protected: | 34 protected: |
32 ViewEventTestPlatformPart() {} | 35 ViewEventTestPlatformPart() {} |
33 | 36 |
34 private: | 37 private: |
35 DISALLOW_COPY_AND_ASSIGN(ViewEventTestPlatformPart); | 38 DISALLOW_COPY_AND_ASSIGN(ViewEventTestPlatformPart); |
36 }; | 39 }; |
37 | 40 |
38 #endif // CHROME_TEST_BASE_VIEW_EVENT_TEST_PLATFORM_PART_H_ | 41 #endif // CHROME_TEST_BASE_VIEW_EVENT_TEST_PLATFORM_PART_H_ |
OLD | NEW |