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

Unified Diff: ash/mus/bridge/wm_shell_mus.cc

Issue 2694623016: chromeos: Makes AshTestBase/Helper target mash when appropriate (Closed)
Patch Set: feedback Created 3 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 | « ash/mus/bridge/wm_shell_mus.h ('k') | ash/mus/test/wm_test_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/bridge/wm_shell_mus.cc
diff --git a/ash/mus/bridge/wm_shell_mus.cc b/ash/mus/bridge/wm_shell_mus.cc
index f63f414f6868f88078f264740d95f6fea1f05357..814fc5f802d9dc937c30270334c650097a1dd120 100644
--- a/ash/mus/bridge/wm_shell_mus.cc
+++ b/ash/mus/bridge/wm_shell_mus.cc
@@ -117,12 +117,14 @@ WmShellMus::WmShellMus(
WmWindow* primary_root_window,
std::unique_ptr<ShellDelegate> shell_delegate,
WindowManager* window_manager,
- views::PointerWatcherEventRouter* pointer_watcher_event_router)
+ views::PointerWatcherEventRouter* pointer_watcher_event_router,
+ bool create_session_state_delegate_stub)
: WmShell(std::move(shell_delegate)),
window_manager_(window_manager),
primary_root_window_(primary_root_window),
- pointer_watcher_event_router_(pointer_watcher_event_router),
- session_state_delegate_(new SessionStateDelegateStub) {
+ pointer_watcher_event_router_(pointer_watcher_event_router) {
+ if (create_session_state_delegate_stub)
+ session_state_delegate_ = base::MakeUnique<SessionStateDelegateStub>();
DCHECK(primary_root_window_);
WmShell::Set(this);
@@ -370,7 +372,9 @@ void WmShellMus::OnOverviewModeEnded() {
}
SessionStateDelegate* WmShellMus::GetSessionStateDelegate() {
- return session_state_delegate_.get();
+ return session_state_delegate_
+ ? session_state_delegate_.get()
+ : Shell::GetInstance()->session_state_delegate();
}
void WmShellMus::AddDisplayObserver(WmDisplayObserver* observer) {
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.h ('k') | ash/mus/test/wm_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698