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

Unified Diff: shell/application_manager/shell_impl.cc

Issue 868463008: Remove Client relationship between mojo.Shell/mojo.Application (Closed) Base URL: git@github.com:domokit/mojo.git@app_impl_init
Patch Set: fix android Created 5 years, 11 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: shell/application_manager/shell_impl.cc
diff --git a/shell/application_manager/shell_impl.cc b/shell/application_manager/shell_impl.cc
index d1af2646c544abac1d02f884ccc802766b4819e9..81ce9059117e1cb13f2fff92185a6df73d1ba7e6 100644
--- a/shell/application_manager/shell_impl.cc
+++ b/shell/application_manager/shell_impl.cc
@@ -10,25 +10,32 @@
namespace mojo {
-ShellImpl::ShellImpl(InterfaceRequest<Shell> shell_request,
+ShellImpl::ShellImpl(ApplicationPtr application,
ApplicationManager* manager,
const GURL& requested_url,
const GURL& url)
: manager_(manager),
requested_url_(requested_url),
url_(url),
- binding_(this, shell_request.Pass()) {
+ application_(application.Pass()),
+ binding_(this) {
binding_.set_error_handler(this);
}
ShellImpl::~ShellImpl() {
}
+void ShellImpl::InitializeApplication(Array<String> args) {
+ ShellPtr shell;
+ binding_.Bind(GetProxy(&shell));
+ application_->Initialize(shell.Pass(), args.Pass());
+}
+
void ShellImpl::ConnectToClient(const GURL& requestor_url,
InterfaceRequest<ServiceProvider> services,
ServiceProviderPtr exposed_services) {
- client()->AcceptConnection(String::From(requestor_url), services.Pass(),
- exposed_services.Pass());
+ application_->AcceptConnection(String::From(requestor_url), services.Pass(),
+ exposed_services.Pass());
}
// Shell implementation:

Powered by Google App Engine
This is Rietveld 408576698