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

Side by Side Diff: ash/wm/window_state.cc

Issue 83343006: Enable immersive fullscreen for hosted apps part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/header_painter.cc ('k') | chrome/browser/ui/views/frame/browser_frame_ash.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/wm/window_state.h" 5 #include "ash/wm/window_state.h"
6 6
7 #include "ash/ash_switches.h"
7 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
8 #include "ash/screen_ash.h" 9 #include "ash/screen_ash.h"
9 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
10 #include "ash/wm/window_properties.h" 11 #include "ash/wm/window_properties.h"
11 #include "ash/wm/window_state_delegate.h" 12 #include "ash/wm/window_state_delegate.h"
12 #include "ash/wm/window_state_observer.h" 13 #include "ash/wm/window_state_observer.h"
13 #include "ash/wm/window_util.h" 14 #include "ash/wm/window_util.h"
14 #include "ash/wm/wm_types.h" 15 #include "ash/wm/wm_types.h"
16 #include "base/command_line.h"
15 #include "ui/aura/client/aura_constants.h" 17 #include "ui/aura/client/aura_constants.h"
16 #include "ui/aura/window.h" 18 #include "ui/aura/window.h"
17 #include "ui/aura/window_delegate.h" 19 #include "ui/aura/window_delegate.h"
18 #include "ui/gfx/display.h" 20 #include "ui/gfx/display.h"
19 #include "ui/views/corewm/window_util.h" 21 #include "ui/views/corewm/window_util.h"
20 22
21 namespace ash { 23 namespace ash {
22 namespace wm { 24 namespace wm {
23 25
24 // static 26 // static
(...skipping 12 matching lines...) Expand all
37 ignored_by_shelf_(false), 39 ignored_by_shelf_(false),
38 can_consume_system_keys_(false), 40 can_consume_system_keys_(false),
39 top_row_keys_are_function_keys_(false), 41 top_row_keys_are_function_keys_(false),
40 window_resizer_(NULL), 42 window_resizer_(NULL),
41 always_restores_to_restore_bounds_(false), 43 always_restores_to_restore_bounds_(false),
42 hide_shelf_when_fullscreen_(true), 44 hide_shelf_when_fullscreen_(true),
43 animate_to_fullscreen_(true), 45 animate_to_fullscreen_(true),
44 minimum_visibility_(false), 46 minimum_visibility_(false),
45 window_show_type_(ToWindowShowType(GetShowState())) { 47 window_show_type_(ToWindowShowType(GetShowState())) {
46 window_->AddObserver(this); 48 window_->AddObserver(this);
49
50 #if defined(OS_CHROMEOS)
51 // NOTE(pkotwicz): Animating to immersive fullscreen does not look good. When
52 // the kAshEnableImmersiveFullscreenForAllWindows flag is set most windows
53 // can be put into immersive fullscreen. It is not worth the added complexity
54 // to only animate to fullscreen if the window is put into immersive
55 // fullscreen.
56 animate_to_fullscreen_ = !CommandLine::ForCurrentProcess()->HasSwitch(
57 switches::kAshEnableImmersiveFullscreenForAllWindows);
58 #endif
47 } 59 }
48 60
49 WindowState::~WindowState() { 61 WindowState::~WindowState() {
50 } 62 }
51 63
52 void WindowState::SetDelegate(scoped_ptr<WindowStateDelegate> delegate) { 64 void WindowState::SetDelegate(scoped_ptr<WindowStateDelegate> delegate) {
53 DCHECK(!delegate_.get()); 65 DCHECK(!delegate_.get());
54 delegate_ = delegate.Pass(); 66 delegate_ = delegate.Pass();
55 } 67 }
56 68
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 } 335 }
324 return settings; 336 return settings;
325 } 337 }
326 338
327 const WindowState* GetWindowState(const aura::Window* window) { 339 const WindowState* GetWindowState(const aura::Window* window) {
328 return GetWindowState(const_cast<aura::Window*>(window)); 340 return GetWindowState(const_cast<aura::Window*>(window));
329 } 341 }
330 342
331 } // namespace wm 343 } // namespace wm
332 } // namespace ash 344 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/header_painter.cc ('k') | chrome/browser/ui/views/frame/browser_frame_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698