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

Unified Diff: mojo/public/shell/service.h

Issue 162213002: Change mojo demo apps to use Application. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add shell() to ServiceFactory::Owner Created 6 years, 10 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 | « mojo/public/shell/lib/service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/shell/service.h
diff --git a/mojo/public/shell/service.h b/mojo/public/shell/service.h
index 1a68353a165fa6c7a1de312da387f1ef220539e9..bd3b0af847ff65a2e960b67ff5f6c98bb672b4e4 100644
--- a/mojo/public/shell/service.h
+++ b/mojo/public/shell/service.h
@@ -63,9 +63,11 @@ namespace mojo {
namespace internal {
class ServiceFactoryBase {
public:
- class Owner {
+ class Owner : public ShellClient {
public:
- virtual Shell* GetShell() = 0;
+ Owner(ScopedShellHandle shell_handle);
+ ~Owner();
+ Shell* shell() { return shell_.get(); }
virtual void AddServiceFactory(
internal::ServiceFactoryBase* service_factory) = 0;
virtual void RemoveServiceFactory(
@@ -76,10 +78,11 @@ class ServiceFactoryBase {
Owner* owner) {
service_factory->owner_ = owner;
}
+ RemotePtr<Shell> shell_;
};
ServiceFactoryBase() : owner_(NULL) {}
virtual ~ServiceFactoryBase();
- Shell* GetShell() { return owner_->GetShell(); }
+ Shell* shell() { return owner_->shell(); }
virtual void AcceptConnection(const std::string& url,
ScopedMessagePipeHandle client_handle) = 0;
@@ -152,6 +155,7 @@ class Service : public ServiceInterface {
&reaper_);
}
+ Shell* shell() { return service_factory_->shell(); }
Context* context() const { return service_factory_->context(); }
typename ServiceInterface::_Peer* client() { return client_.get(); }
« no previous file with comments | « mojo/public/shell/lib/service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698