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

Unified Diff: ash/common/wm/workspace_controller.cc

Issue 2297893002: Merges RootWindowControllerCommon into WmRootWindowController (Closed)
Patch Set: feedback Created 4 years, 4 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/common/wm/maximize_mode/maximize_mode_window_manager.cc ('k') | ash/common/wm_root_window_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/workspace_controller.cc
diff --git a/ash/common/wm/workspace_controller.cc b/ash/common/wm/workspace_controller.cc
index e29732631f133cbdc46150f24df116e5a6f6bd4d..06fbba7c501348332bced71d221bbb44ba210e59 100644
--- a/ash/common/wm/workspace_controller.cc
+++ b/ash/common/wm/workspace_controller.cc
@@ -52,7 +52,7 @@ WorkspaceController::~WorkspaceController() {
}
wm::WorkspaceWindowState WorkspaceController::GetWindowState() const {
- if (!viewport_->GetRootWindowController()->HasShelf())
+ if (!viewport_ || !viewport_->GetRootWindowController()->HasShelf())
return wm::WORKSPACE_WINDOW_STATE_DEFAULT;
const WmWindow* fullscreen = wm::GetWindowForFullscreenMode(viewport_);
@@ -73,7 +73,7 @@ wm::WorkspaceWindowState WorkspaceController::GetWindowState() const {
for (WmWindow* window : container->GetChildren()) {
wm::WindowState* window_state = window->GetWindowState();
if (window_state->ignored_by_shelf() ||
- !window->GetLayer()->GetTargetVisibility()) {
+ (window->GetLayer() && !window->GetLayer()->GetTargetVisibility())) {
continue;
}
if (window_state->IsMaximized())
« no previous file with comments | « ash/common/wm/maximize_mode/maximize_mode_window_manager.cc ('k') | ash/common/wm_root_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698