Index: ui/app_list/views/views_demo_app.h |
diff --git a/ui/app_list/views/views_demo_app.h b/ui/app_list/views/views_demo_app.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f4489c777cb404984df0f678c5bb439b9a0bc1b3 |
--- /dev/null |
+++ b/ui/app_list/views/views_demo_app.h |
@@ -0,0 +1,54 @@ |
+// 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 UI_APP_LIST_VIEWS_VIEWS_DEMO_APP_H_ |
+#define UI_APP_LIST_VIEWS_VIEWS_DEMO_APP_H_ |
+ |
+#include "base/callback_forward.h" |
+#include "base/macros.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "base/run_loop.h" |
+ |
+class ViewsDemoAppDelegate { |
+ public: |
+ ViewsDemoAppDelegate(); |
+ virtual ~ViewsDemoAppDelegate(); |
+ |
+ virtual void Init(); |
+ void Run(); |
+ |
+ protected: |
+ base::RunLoop* run_loop() { return run_loop_.get(); } |
+ |
+ private: |
+ scoped_ptr<base::RunLoop> run_loop_; |
+}; |
+ |
+class ViewsDemoApp { |
+ public: |
+ static scoped_ptr<ViewsDemoApp> Create( |
+ scoped_ptr<ViewsDemoAppDelegate> delegate); |
+ static int RunSubProcess(int argc, char** argv); |
+ |
+ virtual ~ViewsDemoApp(); |
+ |
+ virtual void Run() = 0; |
+ virtual void AddOption(const char* description, |
+ const base::Callback<void(bool)>& callback, |
+ bool initial_state); |
+ |
+ void InitOnMainThread(); |
+ |
+ protected: |
+ ViewsDemoApp(); |
+ |
+ private: |
+ class Impl; |
+ |
+ scoped_ptr<Impl> impl_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ViewsDemoApp); |
+}; |
+ |
+#endif // UI_APP_LIST_VIEWS_VIEWS_DEMO_APP_H_ |