| 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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 GetAlignment() == SHELF_ALIGNMENT_TOP; | 537 GetAlignment() == SHELF_ALIGNMENT_TOP; |
| 538 } | 538 } |
| 539 | 539 |
| 540 bool ShelfLayoutManager::FullscreenWithMinimalChrome() const { | 540 bool ShelfLayoutManager::FullscreenWithMinimalChrome() const { |
| 541 RootWindowController* controller = GetRootWindowController(root_window_); | 541 RootWindowController* controller = GetRootWindowController(root_window_); |
| 542 if (!controller) | 542 if (!controller) |
| 543 return false; | 543 return false; |
| 544 const aura::Window* window = controller->GetTopmostFullscreenWindow(); | 544 const aura::Window* window = controller->GetTopmostFullscreenWindow(); |
| 545 if (!window) | 545 if (!window) |
| 546 return false; | 546 return false; |
| 547 if (!window->GetProperty(kFullscreenUsesMinimalChromeKey)) | 547 return window->GetProperty(kFullscreenTypeKey) == |
| 548 return false; | 548 wm::FULLSCREEN_TYPE_IMMERSIVE_MINIMAL_CHROME; |
| 549 return true; | |
| 550 } | 549 } |
| 551 | 550 |
| 552 // static | 551 // static |
| 553 ShelfLayoutManager* ShelfLayoutManager::ForLauncher(aura::Window* window) { | 552 ShelfLayoutManager* ShelfLayoutManager::ForLauncher(aura::Window* window) { |
| 554 ShelfWidget* shelf = RootWindowController::ForLauncher(window)->shelf(); | 553 ShelfWidget* shelf = RootWindowController::ForLauncher(window)->shelf(); |
| 555 return shelf ? shelf->shelf_layout_manager() : NULL; | 554 return shelf ? shelf->shelf_layout_manager() : NULL; |
| 556 } | 555 } |
| 557 | 556 |
| 558 //////////////////////////////////////////////////////////////////////////////// | 557 //////////////////////////////////////////////////////////////////////////////// |
| 559 // ShelfLayoutManager, private: | 558 // ShelfLayoutManager, private: |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1155 return gfx::Insets(0, distance, 0, 0); | 1154 return gfx::Insets(0, distance, 0, 0); |
| 1156 case SHELF_ALIGNMENT_TOP: | 1155 case SHELF_ALIGNMENT_TOP: |
| 1157 return gfx::Insets(0, 0, distance, 0); | 1156 return gfx::Insets(0, 0, distance, 0); |
| 1158 } | 1157 } |
| 1159 NOTREACHED(); | 1158 NOTREACHED(); |
| 1160 return gfx::Insets(); | 1159 return gfx::Insets(); |
| 1161 } | 1160 } |
| 1162 | 1161 |
| 1163 } // namespace internal | 1162 } // namespace internal |
| 1164 } // namespace ash | 1163 } // namespace ash |
| OLD | NEW |