Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(397)

Unified Diff: chrome/test/base/view_event_test_platform_part.h

Issue 443553003: MacViews: Split ViewEventTestBase into platform-specific files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self-review: fix class comment, remove dead gyp cruft Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/base/view_event_test_base.cc ('k') | chrome/test/base/view_event_test_platform_part_ash.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/view_event_test_platform_part.h
diff --git a/chrome/test/base/view_event_test_platform_part.h b/chrome/test/base/view_event_test_platform_part.h
new file mode 100644
index 0000000000000000000000000000000000000000..4fe53fcd4ce4201e8fd0826b9452c014d037cb96
--- /dev/null
+++ b/chrome/test/base/view_event_test_platform_part.h
@@ -0,0 +1,38 @@
+// 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 CHROME_TEST_BASE_VIEW_EVENT_TEST_PLATFORM_PART_H_
+#define CHROME_TEST_BASE_VIEW_EVENT_TEST_PLATFORM_PART_H_
+
+#include "base/macros.h"
+#include "ui/gfx/native_widget_types.h"
+
+namespace ui {
+class ContextFactory;
+}
+
+// A helper class owned by tests that performs platform specific initialization.
+// ViewEventTestPlatformPart behaves a bit like views::ViewsTestHelper, but on
+// ChromeOS it will create an Ash shell environment, rather than using an
+// AuraTestHelper.
+class ViewEventTestPlatformPart {
+ public:
+ virtual ~ViewEventTestPlatformPart() {}
+
+ // Set up the platform-specific environment. Teardown is performed in the
+ // destructor.
+ static ViewEventTestPlatformPart* Create(ui::ContextFactory* context_factory);
+
+ // The Widget context for creating the test window. This will be the Ash root
+ // window on ChromeOS environments. Otherwise it should return NULL.
+ virtual gfx::NativeWindow GetContext() = 0;
+
+ protected:
+ ViewEventTestPlatformPart() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ViewEventTestPlatformPart);
+};
+
+#endif // CHROME_TEST_BASE_VIEW_EVENT_TEST_PLATFORM_PART_H_
« no previous file with comments | « chrome/test/base/view_event_test_base.cc ('k') | chrome/test/base/view_event_test_platform_part_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698