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

Side by Side Diff: ash/wm/window_util.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, 1 month 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/window_util.h ('k') | ash/wm/workspace/workspace_layout_manager.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_util.h" 5 #include "ash/wm/window_util.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 void CenterWindow(aura::Window* window) { 57 void CenterWindow(aura::Window* window) {
58 const gfx::Display display = 58 const gfx::Display display =
59 Shell::GetScreen()->GetDisplayNearestWindow(window); 59 Shell::GetScreen()->GetDisplayNearestWindow(window);
60 gfx::Rect center = display.work_area(); 60 gfx::Rect center = display.work_area();
61 center.ClampToCenteredSize(window->bounds().size()); 61 center.ClampToCenteredSize(window->bounds().size());
62 window->SetBoundsInScreen(center, display); 62 window->SetBoundsInScreen(center, display);
63 } 63 }
64 64
65 void SetAnimateToFullscreen(aura::Window* window, bool animate) {
66 window->SetProperty(ash::internal::kAnimateToFullscreenKey, animate);
67 }
68
69 void AdjustBoundsToEnsureMinimumWindowVisibility(const gfx::Rect& visible_area, 65 void AdjustBoundsToEnsureMinimumWindowVisibility(const gfx::Rect& visible_area,
70 gfx::Rect* bounds) { 66 gfx::Rect* bounds) {
71 AdjustBoundsToEnsureWindowVisibility( 67 AdjustBoundsToEnsureWindowVisibility(
72 visible_area, kMinimumOnScreenArea, kMinimumOnScreenArea, bounds); 68 visible_area, kMinimumOnScreenArea, kMinimumOnScreenArea, bounds);
73 } 69 }
74 70
75 void AdjustBoundsToEnsureWindowVisibility(const gfx::Rect& visible_area, 71 void AdjustBoundsToEnsureWindowVisibility(const gfx::Rect& visible_area,
76 int min_width, 72 int min_width,
77 int min_height, 73 int min_height,
78 gfx::Rect* bounds) { 74 gfx::Rect* bounds) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 114 }
119 115
120 void ReparentTransientChildrenOfChild(aura::Window* window, 116 void ReparentTransientChildrenOfChild(aura::Window* window,
121 aura::Window* child) { 117 aura::Window* child) {
122 for (size_t i = 0; i < child->transient_children().size(); ++i) 118 for (size_t i = 0; i < child->transient_children().size(); ++i)
123 ReparentChildWithTransientChildren(window, child->transient_children()[i]); 119 ReparentChildWithTransientChildren(window, child->transient_children()[i]);
124 } 120 }
125 121
126 } // namespace wm 122 } // namespace wm
127 } // namespace ash 123 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_util.h ('k') | ash/wm/workspace/workspace_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698