OLD | NEW |
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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 | 518 |
519 bool ShelfLayoutManager::IsHorizontalAlignment() const { | 519 bool ShelfLayoutManager::IsHorizontalAlignment() const { |
520 return alignment_ == SHELF_ALIGNMENT_BOTTOM || | 520 return alignment_ == SHELF_ALIGNMENT_BOTTOM || |
521 alignment_ == SHELF_ALIGNMENT_TOP; | 521 alignment_ == SHELF_ALIGNMENT_TOP; |
522 } | 522 } |
523 | 523 |
524 bool ShelfLayoutManager::FullscreenWithMinimalChrome() const { | 524 bool ShelfLayoutManager::FullscreenWithMinimalChrome() const { |
525 RootWindowController* controller = GetRootWindowController(root_window_); | 525 RootWindowController* controller = GetRootWindowController(root_window_); |
526 if (!controller) | 526 if (!controller) |
527 return false; | 527 return false; |
528 const aura::Window* window = controller->GetFullscreenWindow(); | 528 const aura::Window* window = controller->GetTopmostFullscreenWindow(); |
529 if (!window) | 529 if (!window) |
530 return false; | 530 return false; |
531 if (!window->GetProperty(kFullscreenUsesMinimalChromeKey)) | 531 if (!window->GetProperty(kFullscreenUsesMinimalChromeKey)) |
532 return false; | 532 return false; |
533 return true; | 533 return true; |
534 } | 534 } |
535 | 535 |
536 // static | 536 // static |
537 ShelfLayoutManager* ShelfLayoutManager::ForLauncher(aura::Window* window) { | 537 ShelfLayoutManager* ShelfLayoutManager::ForLauncher(aura::Window* window) { |
538 ShelfWidget* shelf = RootWindowController::ForLauncher(window)->shelf(); | 538 ShelfWidget* shelf = RootWindowController::ForLauncher(window)->shelf(); |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1121 return gfx::Insets(0, distance, 0, 0); | 1121 return gfx::Insets(0, distance, 0, 0); |
1122 case SHELF_ALIGNMENT_TOP: | 1122 case SHELF_ALIGNMENT_TOP: |
1123 return gfx::Insets(0, 0, distance, 0); | 1123 return gfx::Insets(0, 0, distance, 0); |
1124 } | 1124 } |
1125 NOTREACHED(); | 1125 NOTREACHED(); |
1126 return gfx::Insets(); | 1126 return gfx::Insets(); |
1127 } | 1127 } |
1128 | 1128 |
1129 } // namespace internal | 1129 } // namespace internal |
1130 } // namespace ash | 1130 } // namespace ash |
OLD | NEW |