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

Unified Diff: mojo/shell/app_container.h

Issue 72123002: Work in progress for end-to-end bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add base dep for sample_app Created 7 years, 1 month 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 | « mojo/public/bindings/mojom_bindings_generator.gypi ('k') | mojo/shell/app_container.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/app_container.h
diff --git a/mojo/shell/app_container.h b/mojo/shell/app_container.h
index ae6e27722af99f8db43b7c8a8d3b7d0c9208e1a1..09231d7679d355c43d893ac7d0cb39d7bc4b9336 100644
--- a/mojo/shell/app_container.h
+++ b/mojo/shell/app_container.h
@@ -8,12 +8,14 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "base/threading/simple_thread.h"
+#include "mojo/examples/hello_world_service/hello_world_service_impl.h"
#include "mojo/public/system/core.h"
#include "mojo/shell/loader.h"
namespace base {
class FilePath;
-class Thread;
+class PlatformThreadHandle;
}
namespace mojo {
@@ -25,7 +27,9 @@ namespace shell {
class Context;
// A container class that runs an app on its own thread.
-class AppContainer : public Loader::Delegate {
+class AppContainer
+ : public Loader::Delegate,
+ public base::DelegateSimpleThread::Delegate {
public:
explicit AppContainer(Context* context);
virtual ~AppContainer();
@@ -33,20 +37,24 @@ class AppContainer : public Loader::Delegate {
void Load(const GURL& app_url);
private:
- // From Loader::Delegate
+ // From Loader::Delegate.
virtual void DidCompleteLoad(const GURL& app_url,
const base::FilePath& app_path) OVERRIDE;
+ // From base::DelegateSimpleThread::Delegate.
+ virtual void Run() OVERRIDE;
sky 2013/11/15 17:11:56 In hopes of making code easier to maintain and rea
DaveMoore 2013/11/15 17:15:24 As said in comment, this is a WIP. When we make it
+
void AppCompleted();
Context* context_;
+ base::FilePath app_path_;
+ Handle app_handle_raw_;
+ base::Closure ack_closure_;
scoped_ptr<Loader::Job> request_;
- scoped_ptr<base::Thread> thread_;
+ scoped_ptr<base::DelegateSimpleThread> thread_;
+ scoped_ptr<examples::HelloWorldServiceImpl> hello_world_service_;
sky 2013/11/15 17:11:56 How come the appcontainer is depending upon an exa
abarth-chromium 2013/11/15 17:14:34 It's just temporary while we bring up the service
DaveMoore 2013/11/15 17:15:24 WIP. Next we will generalize and no longer have th
scoped_ptr<services::NativeViewportController> native_viewport_controller_;
- // Following members are valid only on app thread.
- Handle shell_handle_;
-
base::WeakPtrFactory<AppContainer> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(AppContainer);
« no previous file with comments | « mojo/public/bindings/mojom_bindings_generator.gypi ('k') | mojo/shell/app_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698