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

Unified Diff: mojo/shell/app_container.h

Issue 25895002: Simple shell that loads a dll and calls an entrypoint function passing in a handle to a pipe create… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: exports to template instantiations Created 7 years, 2 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
Index: mojo/shell/app_container.h
diff --git a/mojo/shell/app_container.h b/mojo/shell/app_container.h
new file mode 100644
index 0000000000000000000000000000000000000000..b02a361ca10967a466a9543fbeeb54eecfbded7c
--- /dev/null
+++ b/mojo/shell/app_container.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2013 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 MOJO_SHELL_APP_CONTAINER_H_
+#define MOJO_SHELL_APP_CONTAINER_H_
+
+#include "base/basictypes.h"
+#include "base/memory/weak_ptr.h"
+#include "mojo/public/system/core.h"
+
+namespace base {
+class Thread;
+}
+
+namespace mojo {
+namespace shell {
+
+// A container class that runs an app on its own thread.
+class AppContainer {
+ public:
+ AppContainer();
+ ~AppContainer();
+
+ void LaunchApp(const base::FilePath& app_path);
+
+ private:
+ void AppCompleted();
+
+ base::WeakPtrFactory<AppContainer> weak_factory_;
+
+ scoped_ptr<base::Thread> thread_;
+
+ // Following members are valid only on app thread.
+ Handle shell_handle_;
+
+ DISALLOW_COPY_AND_ASSIGN(AppContainer);
+};
+
+} // namespace shell
+} // namespace mojo
+
+#endif // MOJO_SHELL_APP_CONTAINER_H_

Powered by Google App Engine
This is Rietveld 408576698