Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1320)

Unified Diff: ash/accelerators/accelerator_commands.cc

Issue 42353002: Introduce WindowStateDelegate::ToggleFullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: exclude accelerator_commands_browsertest on win Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/accelerators/accelerator_commands.h ('k') | ash/accelerators/accelerator_commands_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_commands.cc
diff --git a/ash/accelerators/accelerator_commands.cc b/ash/accelerators/accelerator_commands.cc
index 73f1b1a54387283c54298bb379c5143e60476bf4..003562e2b5d562a68db79a9913ea6d105711a5a2 100644
--- a/ash/accelerators/accelerator_commands.cc
+++ b/ash/accelerators/accelerator_commands.cc
@@ -37,10 +37,16 @@ void ToggleMaximized() {
return;
// Get out of fullscreen when in fullscreen mode.
if (window_state->IsFullscreen())
- Shell::GetInstance()->delegate()->ToggleFullscreen();
+ ToggleFullscreen();
else
window_state->ToggleMaximized();
}
+void ToggleFullscreen() {
+ wm::WindowState* window_state = wm::GetActiveWindowState();
+ if (window_state)
+ window_state->ToggleFullscreen();
+}
+
} // namespace accelerators
} // namespace ash
« no previous file with comments | « ash/accelerators/accelerator_commands.h ('k') | ash/accelerators/accelerator_commands_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698