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

Unified Diff: mash/wm/window_manager_application.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/wm/window_manager_application.h ('k') | mash/wm/window_manager_apptest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/window_manager_application.cc
diff --git a/mash/wm/window_manager_application.cc b/mash/wm/window_manager_application.cc
index 1b262957a44bc5bbe1978e7d6e4944325f17b284..47570a512d40f485876c7e82c068a6c214aae68e 100644
--- a/mash/wm/window_manager_application.cc
+++ b/mash/wm/window_manager_application.cc
@@ -16,7 +16,7 @@
#include "mash/wm/user_window_controller_impl.h"
#include "mojo/services/tracing/public/cpp/tracing_impl.h"
#include "mojo/shell/public/cpp/application_connection.h"
-#include "mojo/shell/public/cpp/application_impl.h"
+#include "mojo/shell/public/cpp/shell.h"
#include "ui/mojo/init/ui_init.h"
#include "ui/views/mus/aura_init.h"
#include "ui/views/mus/display_converter.h"
@@ -25,7 +25,7 @@ namespace mash {
namespace wm {
WindowManagerApplication::WindowManagerApplication()
- : app_(nullptr), window_manager_factory_binding_(this) {}
+ : shell_(nullptr), window_manager_factory_binding_(this) {}
WindowManagerApplication::~WindowManagerApplication() {
// AcceleratorRegistrarImpl removes an observer in its destructor. Destroy
@@ -56,7 +56,7 @@ void WindowManagerApplication::OnRootWindowControllerGotRoot(
ui_init_.reset(new ui::mojo::UIInit(
views::GetDisplaysFromWindow(root_controller->root())));
- aura_init_.reset(new views::AuraInit(app_, "mash_wm_resources.pak"));
+ aura_init_.reset(new views::AuraInit(shell_, "mash_wm_resources.pak"));
}
void WindowManagerApplication::OnRootWindowControllerDoneInit(
@@ -103,12 +103,14 @@ void WindowManagerApplication::OnAcceleratorRegistrarDestroyed(
accelerator_registrars_.erase(registrar);
}
-void WindowManagerApplication::Initialize(mojo::ApplicationImpl* app) {
- app_ = app;
- tracing_.Initialize(app);
+void WindowManagerApplication::Initialize(mojo::Shell* shell,
+ const std::string& url,
+ uint32_t id) {
+ shell_ = shell;
+ tracing_.Initialize(shell, url);
mus::mojom::WindowManagerFactoryServicePtr wm_factory_service;
- app_->ConnectToService("mojo:mus", &wm_factory_service);
+ shell_->ConnectToService("mojo:mus", &wm_factory_service);
wm_factory_service->SetWindowManagerFactory(
window_manager_factory_binding_.CreateInterfacePtrAndBind());
« no previous file with comments | « mash/wm/window_manager_application.h ('k') | mash/wm/window_manager_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698