OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/fullscreen.h" | 5 #include "chrome/browser/fullscreen.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "chrome/browser/ui/ash/ash_util.h" | 9 #include "chrome/browser/ui/ash/ash_util.h" |
10 #include "ui/display/display.h" | 10 #include "ui/display/display.h" |
11 #include "ui/display/screen.h" | 11 #include "ui/display/screen.h" |
12 | 12 |
13 bool IsFullScreenMode(int64_t display_id) { | 13 bool IsFullScreenMode(int64_t display_id) { |
14 if (ash_util::IsRunningInMash()) { | 14 if (IsRunningInMash()) { |
15 // TODO: http://crbug.com/640390. | 15 // TODO: http://crbug.com/640390. |
16 NOTIMPLEMENTED(); | 16 NOTIMPLEMENTED(); |
17 return false; | 17 return false; |
18 } | 18 } |
19 | 19 |
20 for (ash::RootWindowController* controller : | 20 for (ash::RootWindowController* controller : |
21 ash::Shell::GetInstance()->GetAllRootWindowControllers()) { | 21 ash::Shell::GetInstance()->GetAllRootWindowControllers()) { |
22 if (display::Screen::GetScreen() | 22 if (display::Screen::GetScreen() |
23 ->GetDisplayNearestWindow(controller->GetRootWindow()) | 23 ->GetDisplayNearestWindow(controller->GetRootWindow()) |
24 .id() == display_id) { | 24 .id() == display_id) { |
25 return controller && controller->GetWindowForFullscreenMode(); | 25 return controller && controller->GetWindowForFullscreenMode(); |
26 } | 26 } |
27 } | 27 } |
28 | 28 |
29 return false; | 29 return false; |
30 } | 30 } |
OLD | NEW |