#ifndef MOJO_PUBLIC_SHELL_APPLICATION_H_
#define MOJO_PUBLIC_SHELL_APPLICATION_H_
#include <vector>
#include "mojo/public/cpp/bindings/remote_ptr.h"
#include "mojo/public/cpp/shell/service.h"
#include "mojo/public/cpp/system/core.h"
#include "mojo/public/interfaces/shell/shell.mojom.h"
namespace mojo {
class Application : public internal::ServiceFactoryBase::Owner {
public:
explicit Application(ScopedShellHandle shell_handle);
explicit Application(MojoHandle shell_handle);
virtual ~Application();
virtual void AddServiceFactory(internal::ServiceFactoryBase* service_factory)
MOJO_OVERRIDE;
virtual void RemoveServiceFactory(
internal::ServiceFactoryBase* service_factory) MOJO_OVERRIDE;
protected:
virtual void AcceptConnection(const mojo::String& url,
ScopedMessagePipeHandle client_handle)
MOJO_OVERRIDE;
private:
typedef std::vector<internal::ServiceFactoryBase*> ServiceFactoryList;
ServiceFactoryList service_factories_;
};
}
#endif