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

Side by Side Diff: ash/shelf/shelf_layout_manager.cc

Issue 100903002: Ignore fullscreen windows which are behind other windows for fullscreen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove static cast. Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shelf/shelf_layout_manager.h" 5 #include "ash/shelf/shelf_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <cstring> 9 #include <cstring>
10 #include <string> 10 #include <string>
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 535
536 bool ShelfLayoutManager::IsHorizontalAlignment() const { 536 bool ShelfLayoutManager::IsHorizontalAlignment() const {
537 return GetAlignment() == SHELF_ALIGNMENT_BOTTOM || 537 return GetAlignment() == SHELF_ALIGNMENT_BOTTOM ||
538 GetAlignment() == SHELF_ALIGNMENT_TOP; 538 GetAlignment() == SHELF_ALIGNMENT_TOP;
539 } 539 }
540 540
541 bool ShelfLayoutManager::FullscreenWithHiddenShelf() const { 541 bool ShelfLayoutManager::FullscreenWithHiddenShelf() const {
542 RootWindowController* controller = GetRootWindowController(root_window_); 542 RootWindowController* controller = GetRootWindowController(root_window_);
543 if (!controller) 543 if (!controller)
544 return false; 544 return false;
545 const aura::Window* window = controller->GetTopmostFullscreenWindow(); 545 const aura::Window* window = controller->GetWindowForFullscreenMode();
546 if (!window) 546 if (!window)
547 return false; 547 return false;
548 return wm::GetWindowState(window)->hide_shelf_when_fullscreen(); 548 return wm::GetWindowState(window)->hide_shelf_when_fullscreen();
549 } 549 }
550 550
551 // static 551 // static
552 ShelfLayoutManager* ShelfLayoutManager::ForLauncher(aura::Window* window) { 552 ShelfLayoutManager* ShelfLayoutManager::ForLauncher(aura::Window* window) {
553 ShelfWidget* shelf = RootWindowController::ForLauncher(window)->shelf(); 553 ShelfWidget* shelf = RootWindowController::ForLauncher(window)->shelf();
554 return shelf ? shelf->shelf_layout_manager() : NULL; 554 return shelf ? shelf->shelf_layout_manager() : NULL;
555 } 555 }
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 return gfx::Insets(0, distance, 0, 0); 1158 return gfx::Insets(0, distance, 0, 0);
1159 case SHELF_ALIGNMENT_TOP: 1159 case SHELF_ALIGNMENT_TOP:
1160 return gfx::Insets(0, 0, distance, 0); 1160 return gfx::Insets(0, 0, distance, 0);
1161 } 1161 }
1162 NOTREACHED(); 1162 NOTREACHED();
1163 return gfx::Insets(); 1163 return gfx::Insets();
1164 } 1164 }
1165 1165
1166 } // namespace internal 1166 } // namespace internal
1167 } // namespace ash 1167 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698