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

Unified Diff: mash/shell/shell_application_delegate.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 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 | « mash/shell/shell_application_delegate.h ('k') | mash/task_viewer/task_viewer_application_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/shell/shell_application_delegate.cc
diff --git a/mash/shell/shell_application_delegate.cc b/mash/shell/shell_application_delegate.cc
index ec16135837ea0f91b81c7c5756cace08c8ed0fd9..560eddea526daa362b7e3a020ded997e154e6f14 100644
--- a/mash/shell/shell_application_delegate.cc
+++ b/mash/shell/shell_application_delegate.cc
@@ -6,18 +6,20 @@
#include "base/bind.h"
#include "mojo/shell/public/cpp/application_connection.h"
-#include "mojo/shell/public/cpp/application_impl.h"
+#include "mojo/shell/public/cpp/shell.h"
namespace mash {
namespace shell {
ShellApplicationDelegate::ShellApplicationDelegate()
- : app_(nullptr), screen_locked_(false) {}
+ : shell_(nullptr), screen_locked_(false) {}
ShellApplicationDelegate::~ShellApplicationDelegate() {}
-void ShellApplicationDelegate::Initialize(mojo::ApplicationImpl* app) {
- app_ = app;
+void ShellApplicationDelegate::Initialize(mojo::Shell* shell,
+ const std::string& url,
+ uint32_t id) {
+ shell_ = shell;
StartBrowserDriver();
StartWindowManager();
StartWallpaper();
@@ -116,7 +118,7 @@ void ShellApplicationDelegate::StartRestartableService(
// TODO(beng): This would be the place to insert logic that counted restarts
// to avoid infinite crash-restart loops.
scoped_ptr<mojo::ApplicationConnection> connection =
- app_->ConnectToApplication(url);
+ shell_->ConnectToApplication(url);
connection->SetRemoteServiceProviderConnectionErrorHandler(restart_callback);
connections_[url] = std::move(connection);
}
« no previous file with comments | « mash/shell/shell_application_delegate.h ('k') | mash/task_viewer/task_viewer_application_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698