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

Side by Side Diff: chrome/browser/ui/window_sizer/window_sizer.cc

Issue 2700523004: Remove docked windows entirely in M59. (Closed)
Patch Set: Rebase Created 3 years, 9 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
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 "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"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 int work_area_left = 0; 73 int work_area_left = 0;
74 int work_area_bottom = 0; 74 int work_area_bottom = 0;
75 int work_area_right = 0; 75 int work_area_right = 0;
76 if (wp_pref) { 76 if (wp_pref) {
77 wp_pref->GetInteger("work_area_top", &work_area_top); 77 wp_pref->GetInteger("work_area_top", &work_area_top);
78 wp_pref->GetInteger("work_area_left", &work_area_left); 78 wp_pref->GetInteger("work_area_left", &work_area_left);
79 wp_pref->GetInteger("work_area_bottom", &work_area_bottom); 79 wp_pref->GetInteger("work_area_bottom", &work_area_bottom);
80 wp_pref->GetInteger("work_area_right", &work_area_right); 80 wp_pref->GetInteger("work_area_right", &work_area_right);
81 if (*show_state == ui::SHOW_STATE_DEFAULT && maximized) 81 if (*show_state == ui::SHOW_STATE_DEFAULT && maximized)
82 *show_state = ui::SHOW_STATE_MAXIMIZED; 82 *show_state = ui::SHOW_STATE_MAXIMIZED;
83 #if defined(USE_ASH)
84 // TODO(afakhry): Remove Docked Windows in M58.
85 if (ash::switches::DockedWindowsEnabled()) {
86 bool docked = false;
87 wp_pref->GetBoolean("docked", &docked);
88 if (*show_state == ui::SHOW_STATE_DEFAULT && docked &&
89 !browser_->is_type_tabbed()) {
90 *show_state = ui::SHOW_STATE_DOCKED;
91 }
92 }
93 #endif // USE_ASH
94 } 83 }
95 work_area->SetRect(work_area_left, work_area_top, 84 work_area->SetRect(work_area_left, work_area_top,
96 std::max(0, work_area_right - work_area_left), 85 std::max(0, work_area_right - work_area_left),
97 std::max(0, work_area_bottom - work_area_top)); 86 std::max(0, work_area_bottom - work_area_top));
98 87
99 return has_prefs; 88 return has_prefs;
100 } 89 }
101 90
102 bool GetLastActiveWindowState( 91 bool GetLastActiveWindowState(
103 gfx::Rect* bounds, 92 gfx::Rect* bounds,
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 419 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
431 switches::kStartMaximized)) 420 switches::kStartMaximized))
432 return ui::SHOW_STATE_MAXIMIZED; 421 return ui::SHOW_STATE_MAXIMIZED;
433 422
434 if (browser_->initial_show_state() != ui::SHOW_STATE_DEFAULT) 423 if (browser_->initial_show_state() != ui::SHOW_STATE_DEFAULT)
435 return browser_->initial_show_state(); 424 return browser_->initial_show_state();
436 425
437 // Otherwise we use the default which can be overridden later on. 426 // Otherwise we use the default which can be overridden later on.
438 return ui::SHOW_STATE_DEFAULT; 427 return ui::SHOW_STATE_DEFAULT;
439 } 428 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698