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

Unified Diff: ash/mus/shell_delegate_mus.cc

Issue 2633293005: Converts mash to use Shell (Closed)
Patch Set: cleanup Created 3 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: ash/mus/shell_delegate_mus.cc
diff --git a/ash/mus/shell_delegate_mus.cc b/ash/mus/shell_delegate_mus.cc
index 41b69b7b9729a556184736fc9570b35014ad4033..def94acdda616b6c1bbf8921693ffa18ce8d5bf8 100644
--- a/ash/mus/shell_delegate_mus.cc
+++ b/ash/mus/shell_delegate_mus.cc
@@ -84,10 +84,11 @@ class SessionStateDelegateStub : public SessionStateDelegate {
} // namespace
-ShellDelegateMus::ShellDelegateMus(service_manager::Connector* connector)
- : connector_(connector) {
- // |connector_| may be null in tests.
-}
+ShellDelegateMus::ShellDelegateMus(
+ service_manager::Connector* connector,
+ std::unique_ptr<SystemTrayDelegate> system_tray_delegate)
+ : connector_(connector),
+ system_tray_delegate_(std::move(system_tray_delegate)) {}
ShellDelegateMus::~ShellDelegateMus() {}
@@ -146,6 +147,8 @@ ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) {
}
SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() {
+ if (system_tray_delegate_)
+ return system_tray_delegate_.release();
return new SystemTrayDelegateMus();
}

Powered by Google App Engine
This is Rietveld 408576698