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

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

Issue 55303006: Make sure the non browser/non app widget is fully visible when created on ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/shell/toplevel_window.h ('k') | ash/wm/window_positioner.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/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/screen_ash.h" 8 #include "ash/screen_ash.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/wm/window_positioner.h" 10 #include "ash/wm/window_positioner.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 void ToplevelWindow::SaveWindowPlacement(const gfx::Rect& bounds, 70 void ToplevelWindow::SaveWindowPlacement(const gfx::Rect& bounds,
71 ui::WindowShowState show_state) { 71 ui::WindowShowState show_state) {
72 if (!saved_state) 72 if (!saved_state)
73 saved_state = new SavedState; 73 saved_state = new SavedState;
74 saved_state->bounds = bounds; 74 saved_state->bounds = bounds;
75 saved_state->show_state = show_state; 75 saved_state->show_state = show_state;
76 } 76 }
77 77
78 bool ToplevelWindow::GetSavedWindowPlacement( 78 bool ToplevelWindow::GetSavedWindowPlacement(
79 const views::Widget* widget,
79 gfx::Rect* bounds, 80 gfx::Rect* bounds,
80 ui::WindowShowState* show_state) const { 81 ui::WindowShowState* show_state) const {
81 bool is_saved_bounds = !!saved_state; 82 bool is_saved_bounds = !!saved_state;
82 if (saved_state) { 83 if (saved_state) {
83 *bounds = saved_state->bounds; 84 *bounds = saved_state->bounds;
84 *show_state = saved_state->show_state; 85 *show_state = saved_state->show_state;
85 } else { 86 } else {
86 // Initial default bounds. 87 // Initial default bounds.
87 bounds->SetRect(10, 150, 300, 300); 88 bounds->SetRect(10, 150, 300, 300);
88 } 89 }
(...skipping 14 matching lines...) Expand all
103 bool ToplevelWindow::CanResize() const { 104 bool ToplevelWindow::CanResize() const {
104 return params_.can_resize; 105 return params_.can_resize;
105 } 106 }
106 107
107 bool ToplevelWindow::CanMaximize() const { 108 bool ToplevelWindow::CanMaximize() const {
108 return params_.can_maximize; 109 return params_.can_maximize;
109 } 110 }
110 111
111 } // namespace shell 112 } // namespace shell
112 } // namespace ash 113 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/toplevel_window.h ('k') | ash/wm/window_positioner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698