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

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

Issue 13139004: Deprecate Browser::TYPE_PANEL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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 | Annotate | Revision Log
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 DCHECK(show_state); 103 DCHECK(show_state);
104 // Applications are always restored with the same position. 104 // Applications are always restored with the same position.
105 if (!app_name_.empty()) 105 if (!app_name_.empty())
106 return false; 106 return false;
107 107
108 // If a reference browser is set, use its window. Otherwise find last 108 // If a reference browser is set, use its window. Otherwise find last
109 // active. Panels are never used as reference browsers as panels are 109 // active. Panels are never used as reference browsers as panels are
110 // specially positioned. 110 // specially positioned.
111 BrowserWindow* window = NULL; 111 BrowserWindow* window = NULL;
112 // Window may be null if browser is just starting up. 112 // Window may be null if browser is just starting up.
113 if (browser_ && browser_->window() && !browser_->window()->IsPanel()) { 113 if (browser_ && browser_->window()) {
114 window = browser_->window(); 114 window = browser_->window();
115 } else { 115 } else {
116 // This code is only ran on the native desktop (on the ash desktop, 116 // This code is only ran on the native desktop (on the ash desktop,
117 // GetBoundsOverrideAsh should take over below before this is reached). 117 // GetBoundsOverrideAsh should take over below before this is reached).
118 // TODO(gab): This code should go in a native desktop specific window 118 // TODO(gab): This code should go in a native desktop specific window
119 // sizer as part of fixing crbug.com/175812. 119 // sizer as part of fixing crbug.com/175812.
120 const BrowserList* native_browser_list = 120 const BrowserList* native_browser_list =
121 BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_NATIVE); 121 BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_NATIVE);
122 for (BrowserList::const_reverse_iterator it = 122 for (BrowserList::const_reverse_iterator it =
123 native_browser_list->begin_last_active(); 123 native_browser_list->begin_last_active();
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 399
400 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kStartMaximized)) 400 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kStartMaximized))
401 return ui::SHOW_STATE_MAXIMIZED; 401 return ui::SHOW_STATE_MAXIMIZED;
402 402
403 if (browser_->initial_show_state() != ui::SHOW_STATE_DEFAULT) 403 if (browser_->initial_show_state() != ui::SHOW_STATE_DEFAULT)
404 return browser_->initial_show_state(); 404 return browser_->initial_show_state();
405 405
406 // Otherwise we use the default which can be overridden later on. 406 // Otherwise we use the default which can be overridden later on.
407 return ui::SHOW_STATE_DEFAULT; 407 return ui::SHOW_STATE_DEFAULT;
408 } 408 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/window_sizer/window_sizer_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698