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/ui/browser_commands_mac.h" | 5 #include "chrome/browser/ui/browser_commands_mac.h" |
6 | 6 |
7 #include "base/mac/mac_util.h" | 7 #include "base/mac/mac_util.h" |
| 8 #include "chrome/browser/fullscreen.h" |
8 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_commands.h" | 10 #include "chrome/browser/ui/browser_commands.h" |
10 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" | 11 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" |
11 | 12 |
12 namespace chrome { | 13 namespace chrome { |
13 | 14 |
14 void ToggleFullscreenWithChromeOrFallback(Browser* browser) { | 15 void ToggleFullscreenWithChromeOrFallback(Browser* browser) { |
15 if (base::mac::IsOSLionOrLater()) | 16 if (chrome::mac::SupportsSystemFullscreen()) |
16 browser->fullscreen_controller()->ToggleFullscreenWithChrome(); | 17 browser->fullscreen_controller()->ToggleFullscreenWithChrome(); |
17 else | 18 else |
18 ToggleFullscreenMode(browser); | 19 ToggleFullscreenMode(browser); |
19 } | 20 } |
20 | 21 |
21 } // namespace chrome | 22 } // namespace chrome |
OLD | NEW |