| OLD | NEW |
| 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 "chrome/browser/ui/window_sizer/window_sizer.h" | 5 #include "chrome/browser/ui/window_sizer/window_sizer.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/browser/ui/browser_list.h" | 16 #include "chrome/browser/ui/browser_list.h" |
| 17 #include "chrome/browser/ui/browser_window.h" | 17 #include "chrome/browser/ui/browser_window.h" |
| 18 #include "chrome/browser/ui/browser_window_state.h" | 18 #include "chrome/browser/ui/browser_window_state.h" |
| 19 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
| 20 #include "components/prefs/pref_service.h" | 20 #include "components/prefs/pref_service.h" |
| 21 #include "ui/base/ui_base_switches.h" | 21 #include "ui/base/ui_base_switches.h" |
| 22 #include "ui/display/display.h" | 22 #include "ui/display/display.h" |
| 23 #include "ui/display/screen.h" | 23 #include "ui/display/screen.h" |
| 24 | 24 |
| 25 #if defined(USE_ASH) | 25 #if defined(USE_ASH) |
| 26 #include "ash/common/ash_switches.h" | 26 #include "ash/ash_switches.h" |
| 27 #include "ash/common/wm/window_positioner.h" // nogncheck | |
| 28 #include "ash/shell.h" // nogncheck | 27 #include "ash/shell.h" // nogncheck |
| 28 #include "ash/wm/window_positioner.h" // nogncheck |
| 29 #include "chrome/browser/ui/ash/ash_util.h" // nogncheck | 29 #include "chrome/browser/ui/ash/ash_util.h" // nogncheck |
| 30 #endif | 30 #endif |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 // Minimum height of the visible part of a window. | 34 // Minimum height of the visible part of a window. |
| 35 const int kMinVisibleHeight = 30; | 35 const int kMinVisibleHeight = 30; |
| 36 // Minimum width of the visible part of a window. | 36 // Minimum width of the visible part of a window. |
| 37 const int kMinVisibleWidth = 30; | 37 const int kMinVisibleWidth = 30; |
| 38 | 38 |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 430 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 431 switches::kStartMaximized)) | 431 switches::kStartMaximized)) |
| 432 return ui::SHOW_STATE_MAXIMIZED; | 432 return ui::SHOW_STATE_MAXIMIZED; |
| 433 | 433 |
| 434 if (browser_->initial_show_state() != ui::SHOW_STATE_DEFAULT) | 434 if (browser_->initial_show_state() != ui::SHOW_STATE_DEFAULT) |
| 435 return browser_->initial_show_state(); | 435 return browser_->initial_show_state(); |
| 436 | 436 |
| 437 // Otherwise we use the default which can be overridden later on. | 437 // Otherwise we use the default which can be overridden later on. |
| 438 return ui::SHOW_STATE_DEFAULT; | 438 return ui::SHOW_STATE_DEFAULT; |
| 439 } | 439 } |
| OLD | NEW |