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

Side by Side Diff: ash/shell/toplevel_window.cc

Issue 1900443002: Removes aura dependencies from WindowPositioner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nuke GetWorkAreaForWindowInParent and fix windows Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « ash/shell/content/client/shell_browser_main_parts.cc ('k') | ash/shell/window_type_launcher.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/shell/toplevel_window.h" 5 #include "ash/shell/toplevel_window.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/window_positioner.h" 8 #include "ash/wm/window_positioner.h"
9 #include "ash/wm/window_state.h" 9 #include "ash/wm/window_state.h"
10 #include "ash/wm/window_state_aura.h" 10 #include "ash/wm/window_state_aura.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 gfx::Rect* bounds, 77 gfx::Rect* bounds,
78 ui::WindowShowState* show_state) const { 78 ui::WindowShowState* show_state) const {
79 bool is_saved_bounds = !!saved_state; 79 bool is_saved_bounds = !!saved_state;
80 if (saved_state && params_.use_saved_placement) { 80 if (saved_state && params_.use_saved_placement) {
81 *bounds = saved_state->bounds; 81 *bounds = saved_state->bounds;
82 *show_state = saved_state->show_state; 82 *show_state = saved_state->show_state;
83 } else { 83 } else {
84 // Initial default bounds. 84 // Initial default bounds.
85 bounds->SetRect(10, 150, 300, 300); 85 bounds->SetRect(10, 150, 300, 300);
86 } 86 }
87 ash::WindowPositioner::GetBoundsAndShowStateForNewWindow( 87 WindowPositioner::GetBoundsAndShowStateForNewWindow(
88 gfx::Screen::GetScreen(), NULL, is_saved_bounds, *show_state, bounds, 88 nullptr, is_saved_bounds, *show_state, bounds, show_state);
89 show_state);
90 return true; 89 return true;
91 } 90 }
92 91
93 views::View* ToplevelWindow::GetContentsView() { 92 views::View* ToplevelWindow::GetContentsView() {
94 return this; 93 return this;
95 } 94 }
96 95
97 bool ToplevelWindow::CanResize() const { 96 bool ToplevelWindow::CanResize() const {
98 return params_.can_resize; 97 return params_.can_resize;
99 } 98 }
100 99
101 bool ToplevelWindow::CanMaximize() const { 100 bool ToplevelWindow::CanMaximize() const {
102 return params_.can_maximize; 101 return params_.can_maximize;
103 } 102 }
104 103
105 bool ToplevelWindow::CanMinimize() const { 104 bool ToplevelWindow::CanMinimize() const {
106 return params_.can_maximize; 105 return params_.can_maximize;
107 } 106 }
108 107
109 } // namespace shell 108 } // namespace shell
110 } // namespace ash 109 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/content/client/shell_browser_main_parts.cc ('k') | ash/shell/window_type_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698