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

Unified Diff: ash/mus/window_manager.cc

Issue 2777223002: Gets chrome --mus some what working (Closed)
Patch Set: fix mac Created 3 years, 9 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 | « ash/mus/window_manager.h ('k') | ash/mus/window_manager_application.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/window_manager.cc
diff --git a/ash/mus/window_manager.cc b/ash/mus/window_manager.cc
index ccae4d91e0212a5d87c3c114cf13fa21f642228f..ffe8c7916f4c78d4db2f09d9ff0c969f26d9b606 100644
--- a/ash/mus/window_manager.cc
+++ b/ash/mus/window_manager.cc
@@ -23,6 +23,7 @@
#include "ash/mus/shell_delegate_mus.h"
#include "ash/mus/top_level_window_factory.h"
#include "ash/mus/window_properties.h"
+#include "ash/public/cpp/config.h"
#include "ash/public/cpp/shelf_types.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/public/cpp/window_properties.h"
@@ -71,8 +72,10 @@ struct WindowManager::DragState {
};
// TODO: need to register OSExchangeDataProviderMus. http://crbug.com/665077.
-WindowManager::WindowManager(service_manager::Connector* connector)
+WindowManager::WindowManager(service_manager::Connector* connector,
+ Config config)
: connector_(connector),
+ config_(config),
wm_state_(base::MakeUnique<::wm::WMState>()),
property_converter_(base::MakeUnique<aura::PropertyConverter>()) {
property_converter_->RegisterProperty(
@@ -99,7 +102,8 @@ WindowManager::~WindowManager() {
void WindowManager::Init(
std::unique_ptr<aura::WindowTreeClient> window_tree_client,
- const scoped_refptr<base::SequencedWorkerPool>& blocking_pool) {
+ const scoped_refptr<base::SequencedWorkerPool>& blocking_pool,
+ std::unique_ptr<ShellDelegate> shell_delegate) {
blocking_pool_ = blocking_pool;
DCHECK(window_manager_client_);
DCHECK(!window_tree_client_);
@@ -136,6 +140,13 @@ void WindowManager::Init(
pointer_watcher_event_router_->AttachToCaptureClient(capture_client);
window_tree_client_->capture_synchronizer()->AttachToCaptureClient(
capture_client);
+
+ if (shell_delegate)
+ shell_delegate_ = std::move(shell_delegate);
+}
+
+bool WindowManager::WaitForInitialDisplays() {
+ return window_manager_client_->WaitForInitialDisplays();
}
void WindowManager::DeleteAllRootWindowControllers() {
@@ -209,9 +220,8 @@ void WindowManager::CreateShell(
this, pointer_watcher_event_router_.get(),
create_session_state_delegate_stub_for_test_);
// Shell::CreateInstance() takes ownership of ShellDelegate.
- init_params.delegate = shell_delegate_for_test_
- ? shell_delegate_for_test_.release()
- : new ShellDelegateMus(connector_);
+ init_params.delegate = shell_delegate_ ? shell_delegate_.release()
+ : new ShellDelegateMus(connector_);
init_params.primary_window_tree_host = window_tree_host.release();
init_params.wm_shell = wm_shell;
init_params.blocking_pool = blocking_pool_.get();
« no previous file with comments | « ash/mus/window_manager.h ('k') | ash/mus/window_manager_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698