Chromium Code Reviews| 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 "chrome/browser/ui/fullscreen_controller.h" | 5 #include "chrome/browser/ui/fullscreen_controller.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "chrome/browser/content_settings/host_content_settings_map.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 163 // was not caused by it (i.e., previously it was in "browser fullscreen" | 163 // was not caused by it (i.e., previously it was in "browser fullscreen" |
| 164 // mode), we need to switch back to "browser fullscreen" mode. In this | 164 // mode), we need to switch back to "browser fullscreen" mode. In this |
| 165 // case, all we have to do is notifying the tab that it has exited "tab | 165 // case, all we have to do is notifying the tab that it has exited "tab |
| 166 // fullscreen" mode. | 166 // fullscreen" mode. |
| 167 NotifyTabOfExitIfNecessary(); | 167 NotifyTabOfExitIfNecessary(); |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 } | 170 } |
| 171 } | 171 } |
| 172 | 172 |
| 173 #if defined(OS_WIN) | |
| 174 void FullscreenController::ToggleMetroSnapMode(bool enable) { | |
|
sky
2012/06/11 17:04:31
Since this takes a boolean, it shouldn't be Toggle
robertshield
2012/06/11 21:06:57
Done.
| |
| 175 window_->ToggleMetroSnapMode(enable); | |
| 176 } | |
| 177 #endif | |
| 178 | |
| 173 #if defined(OS_MACOSX) | 179 #if defined(OS_MACOSX) |
| 174 void FullscreenController::TogglePresentationMode() { | 180 void FullscreenController::TogglePresentationMode() { |
| 175 TogglePresentationModeInternal(false); | 181 TogglePresentationModeInternal(false); |
| 176 } | 182 } |
| 177 #endif | 183 #endif |
| 178 | 184 |
| 179 void FullscreenController::ToggleFullscreenMode() { | 185 void FullscreenController::ToggleFullscreenMode() { |
| 180 extension_caused_fullscreen_ = GURL(); | 186 extension_caused_fullscreen_ = GURL(); |
| 181 ToggleFullscreenModeInternal(false); | 187 ToggleFullscreenModeInternal(false); |
| 182 } | 188 } |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 506 window_->ExitFullscreen(); | 512 window_->ExitFullscreen(); |
| 507 extension_caused_fullscreen_ = GURL(); | 513 extension_caused_fullscreen_ = GURL(); |
| 508 } | 514 } |
| 509 UpdateFullscreenExitBubbleContent(); | 515 UpdateFullscreenExitBubbleContent(); |
| 510 | 516 |
| 511 // Once the window has become fullscreen it'll call back to | 517 // Once the window has become fullscreen it'll call back to |
| 512 // WindowFullscreenStateChanged(). We don't do this immediately as | 518 // WindowFullscreenStateChanged(). We don't do this immediately as |
| 513 // BrowserWindow::EnterFullscreen() asks for bookmark_bar_state_, so we let | 519 // BrowserWindow::EnterFullscreen() asks for bookmark_bar_state_, so we let |
| 514 // the BrowserWindow invoke WindowFullscreenStateChanged when appropriate. | 520 // the BrowserWindow invoke WindowFullscreenStateChanged when appropriate. |
| 515 } | 521 } |
| OLD | NEW |