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

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

Issue 1608053002: Remove now-unnecessary wrappers around gfx::Screen::GetScreen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-5
Patch Set: cros Created 4 years, 11 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/system/audio/tray_audio.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 "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 ui::WindowShowState* show_state) const { 77 ui::WindowShowState* show_state) const {
78 bool is_saved_bounds = !!saved_state; 78 bool is_saved_bounds = !!saved_state;
79 if (saved_state && params_.use_saved_placement) { 79 if (saved_state && params_.use_saved_placement) {
80 *bounds = saved_state->bounds; 80 *bounds = saved_state->bounds;
81 *show_state = saved_state->show_state; 81 *show_state = saved_state->show_state;
82 } else { 82 } else {
83 // Initial default bounds. 83 // Initial default bounds.
84 bounds->SetRect(10, 150, 300, 300); 84 bounds->SetRect(10, 150, 300, 300);
85 } 85 }
86 ash::WindowPositioner::GetBoundsAndShowStateForNewWindow( 86 ash::WindowPositioner::GetBoundsAndShowStateForNewWindow(
87 ash::Shell::GetScreen(), 87 gfx::Screen::GetScreen(), NULL, is_saved_bounds, *show_state, bounds,
88 NULL,
89 is_saved_bounds,
90 *show_state,
91 bounds,
92 show_state); 88 show_state);
93 return true; 89 return true;
94 } 90 }
95 91
96 views::View* ToplevelWindow::GetContentsView() { 92 views::View* ToplevelWindow::GetContentsView() {
97 return this; 93 return this;
98 } 94 }
99 95
100 bool ToplevelWindow::CanResize() const { 96 bool ToplevelWindow::CanResize() const {
101 return params_.can_resize; 97 return params_.can_resize;
102 } 98 }
103 99
104 bool ToplevelWindow::CanMaximize() const { 100 bool ToplevelWindow::CanMaximize() const {
105 return params_.can_maximize; 101 return params_.can_maximize;
106 } 102 }
107 103
108 bool ToplevelWindow::CanMinimize() const { 104 bool ToplevelWindow::CanMinimize() const {
109 return params_.can_maximize; 105 return params_.can_maximize;
110 } 106 }
111 107
112 } // namespace shell 108 } // namespace shell
113 } // namespace ash 109 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/content/client/shell_browser_main_parts.cc ('k') | ash/system/audio/tray_audio.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698