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

Unified Diff: ash/mus/shell_delegate_mus.cc

Issue 2633293005: Converts mash to use Shell (Closed)
Patch Set: feedback 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
« no previous file with comments | « ash/mus/shell_delegate_mus.h ('k') | ash/mus/test/wm_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..053e0cb64aa2db38120eec4edb76b3d8c6852c7c 100644
--- a/ash/mus/shell_delegate_mus.cc
+++ b/ash/mus/shell_delegate_mus.cc
@@ -84,9 +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_for_test)
+ : connector_(connector),
+ system_tray_delegate_for_test_(std::move(system_tray_delegate_for_test)) {
}
ShellDelegateMus::~ShellDelegateMus() {}
@@ -146,6 +148,8 @@ ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) {
}
SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() {
+ if (system_tray_delegate_for_test_)
+ return system_tray_delegate_for_test_.release();
return new SystemTrayDelegateMus();
}
« no previous file with comments | « ash/mus/shell_delegate_mus.h ('k') | ash/mus/test/wm_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698