Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MOJO_SHELL_APP_CONTAINER_H_ | |
| 6 #define MOJO_SHELL_APP_CONTAINER_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/memory/weak_ptr.h" | |
| 10 #include "mojo/public/system/core.h" | |
| 11 | |
| 12 namespace base { | |
| 13 class Thread; | |
| 14 } | |
| 15 | |
| 16 namespace mojo { | |
| 17 namespace shell { | |
| 18 | |
| 19 // A container class that runs an app on its own thread. | |
| 20 class AppContainer { | |
| 21 public: | |
| 22 AppContainer(); | |
| 23 ~AppContainer(); | |
| 24 | |
| 25 void LaunchApp(const base::FilePath& app_path); | |
| 26 | |
| 27 private: | |
| 28 void AppCompleted(); | |
| 29 | |
| 30 base::WeakPtrFactory<AppContainer> weak_factory_; | |
| 31 | |
| 32 scoped_ptr<base::Thread> thread_; | |
| 33 | |
| 34 // Following members are valid only on app thread. | |
| 35 MojoHandle shell_handle_; | |
|
darin (slow to review)
2013/10/04 21:47:14
nit: might want to use the C++ version of this: mo
| |
| 36 | |
| 37 DISALLOW_COPY_AND_ASSIGN(AppContainer); | |
| 38 }; | |
| 39 | |
| 40 } // namespace shell | |
| 41 } // namespace mojo | |
| 42 | |
| 43 #endif // MOJO_SHELL_APP_CONTAINER_H_ | |
| OLD | NEW |