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

Unified Diff: ash/wm/window_state.h

Issue 42353002: Introduce WindowStateDelegate::ToggleFullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: ash/wm/window_state.h
diff --git a/ash/wm/window_state.h b/ash/wm/window_state.h
index 8c68e2466b5116aa0bb965c1e2d9d99d9040ab3f..66dfffc0c95146f4a87c4f1faaf4eb55fd3851bf 100644
--- a/ash/wm/window_state.h
+++ b/ash/wm/window_state.h
@@ -6,6 +6,7 @@
#define ASH_WM_WINDOW_STATE_H_
#include "ash/ash_export.h"
+#include "ash/wm/window_state_delegate.h"
#include "ash/wm/wm_types.h"
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
@@ -23,6 +24,7 @@ class Rect;
namespace ash {
namespace wm {
+class WindowStateDelegate;
class WindowStateObserver;
// WindowState manages and defines ash specific window state and
@@ -46,6 +48,8 @@ class ASH_EXPORT WindowState : public aura::WindowObserver {
aura::Window* window() { return window_; }
const aura::Window* window() const { return window_; }
+ void SetDelegate(WindowStateDelegate* delegate);
+
// Returns the window's current show state.
ui::WindowShowState GetShowState() const;
@@ -81,6 +85,7 @@ class ASH_EXPORT WindowState : public aura::WindowObserver {
void Deactivate();
void Restore();
void ToggleMaximized();
+ void ToggleFullscreen();
void SnapLeft(const gfx::Rect& bounds);
void SnapRight(const gfx::Rect& bounds);
@@ -122,6 +127,15 @@ class ASH_EXPORT WindowState : public aura::WindowObserver {
always_restores_to_restore_bounds_ = value;
}
+ // Sets/gets the flag to suppress the cross-fade animation for
+ // the transition to the fullscreen state.
+ bool animate_to_fullscreen() const {
+ return animate_to_fullscreen_;
+ }
+ void set_animate_to_fullscreen(bool value) {
+ animate_to_fullscreen_ = value;
+ }
+
// Gets/Sets the bounds of the window before it was moved by the auto window
// management. As long as it was not auto-managed, it will return NULL.
const gfx::Rect* pre_auto_manage_window_bounds() const {
@@ -208,6 +222,7 @@ class ASH_EXPORT WindowState : public aura::WindowObserver {
// The owner of this window settings.
aura::Window* window_;
+ scoped_ptr<WindowStateDelegate> delegate_;
bool tracked_by_workspace_;
bool window_position_managed_;
@@ -217,8 +232,8 @@ class ASH_EXPORT WindowState : public aura::WindowObserver {
bool ignored_by_shelf_;
bool can_consume_system_keys_;
bool top_row_keys_are_function_keys_;
-
bool always_restores_to_restore_bounds_;
+ bool animate_to_fullscreen_;
// A property to remember the window position which was set before the
// auto window position manager changed the window bounds, so that it can get
« no previous file with comments | « ash/wm/window_properties.cc ('k') | ash/wm/window_state.cc » ('j') | ash/wm/window_state.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698