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

Unified Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 24108003: [Cleanup] Rename WindowSettings to WindowState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase fix Created 7 years, 3 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
Index: chrome/browser/ui/ash/chrome_shell_delegate.cc
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index 116aee885bbbca2081516d220ac8b961d7563999..191b4e01ec3582d35bd11fdcb0c9ad01fcff4166 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -11,6 +11,7 @@
#include "ash/magnifier/magnifier_constants.h"
#include "ash/session_state_delegate.h"
#include "ash/system/tray/system_tray_delegate.h"
+#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
#include "base/command_line.h"
#include "base/prefs/pref_service.h"
@@ -158,11 +159,12 @@ void ChromeShellDelegate::ToggleFullscreen() {
aura::Window* window = ash::wm::GetActiveWindow();
if (!window)
return;
+ ash::wm::WindowState* window_state = ash::wm::GetWindowState(window);
- bool is_fullscreen = ash::wm::IsWindowFullscreen(window);
+ bool is_fullscreen = window_state->IsFullscreen();
// Windows which cannot be maximized should not be fullscreened.
- if (!is_fullscreen && !ash::wm::CanMaximizeWindow(window))
+ if (!is_fullscreen && !window_state->CanMaximize())
return;
Browser* browser = chrome::FindBrowserWithWindow(window);
@@ -184,7 +186,7 @@ void ChromeShellDelegate::ToggleFullscreen() {
}
#endif // OS_WIN
if (browser->is_app() && browser->app_type() != Browser::APP_TYPE_CHILD)
- ash::wm::ToggleMaximizedWindow(window);
+ window_state->ToggleMaximized();
else
chrome::ToggleFullscreenMode(browser);
return;
@@ -207,12 +209,13 @@ void ChromeShellDelegate::ToggleMaximized() {
if (!window)
return;
+ ash::wm::WindowState* window_state = ash::wm::GetWindowState(window);
// Get out of fullscreen when in fullscreen mode.
- if (ash::wm::IsWindowFullscreen(window)) {
+ if (window_state->IsFullscreen()) {
ToggleFullscreen();
return;
}
- ash::wm::ToggleMaximizedWindow(window);
+ window_state->ToggleMaximized();
}
void ChromeShellDelegate::RestoreTab() {
« no previous file with comments | « chrome/browser/sessions/session_restore.cc ('k') | chrome/browser/ui/ash/chrome_shell_delegate_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698