Index: ash/wm/window_state.cc |
diff --git a/ash/wm/window_state.cc b/ash/wm/window_state.cc |
index 2afba08d68f104fde02c523099d592422e59e859..f79023c1de00b3b0fff4ec209adbb05c1f3debf1 100644 |
--- a/ash/wm/window_state.cc |
+++ b/ash/wm/window_state.cc |
@@ -28,6 +28,7 @@ bool WindowState::IsMaximizedOrFullscreenState(ui::WindowShowState show_state) { |
WindowState::WindowState(aura::Window* window) |
: window_(window), |
+ fullscreen_type_(FULLSCREEN_TYPE_OTHER), |
tracked_by_workspace_(true), |
window_position_managed_(false), |
bounds_changed_by_user_(false), |
@@ -60,6 +61,13 @@ bool WindowState::IsFullscreen() const { |
return GetShowState() == ui::SHOW_STATE_FULLSCREEN; |
} |
+bool WindowState::IsImmersiveFullscreen() const { |
+ if (!IsFullscreen()) |
+ return false; |
+ return fullscreen_type_ == FULLSCREEN_TYPE_IMMERSIVE_MINIMAL_CHROME || |
+ fullscreen_type_ == FULLSCREEN_TYPE_IMMERSIVE_NO_CHROME; |
+} |
+ |
bool WindowState::IsMaximizedOrFullscreen() const { |
return IsMaximizedOrFullscreenState(GetShowState()); |
} |
@@ -191,6 +199,17 @@ void WindowState::ClearRestoreBounds() { |
window_->ClearProperty(aura::client::kRestoreBoundsKey); |
} |
+void WindowState::SetFullscreenType(FullscreenType type) { |
James Cook
2013/10/17 16:56:24
Do you need to be able to change the fullscreen ty
pkotwicz
2013/10/17 22:14:27
I now ignore calls to SetFullscreenType() when not
|
+ if (fullscreen_type_ == type) |
+ return; |
+ FullscreenType old = fullscreen_type_; |
+ fullscreen_type_ = type; |
+ if (IsFullscreen()) { |
+ FOR_EACH_OBSERVER(WindowStateObserver, observer_list_, |
+ OnWindowFullscreenTypeChanged(this, old)); |
+ } |
+} |
+ |
void WindowState::SetPreAutoManageWindowBounds( |
const gfx::Rect& bounds) { |
pre_auto_manage_window_bounds_.reset(new gfx::Rect(bounds)); |