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

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

Issue 9968078: Honor window size for chrome.windows.create when parent window is maximized. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extraneous logging Created 8 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/browser_navigator.h" 5 #include "chrome/browser/ui/browser_navigator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 params->source_contents->extension_tab_helper()->is_app()) { 154 params->source_contents->extension_tab_helper()->is_app()) {
155 app_name = web_app::GenerateApplicationNameFromExtensionId( 155 app_name = web_app::GenerateApplicationNameFromExtensionId(
156 params->source_contents->extension_tab_helper()-> 156 params->source_contents->extension_tab_helper()->
157 extension_app()->id()); 157 extension_app()->id());
158 } 158 }
159 if (app_name.empty()) { 159 if (app_name.empty()) {
160 Browser::CreateParams browser_params(Browser::TYPE_POPUP, profile); 160 Browser::CreateParams browser_params(Browser::TYPE_POPUP, profile);
161 browser_params.initial_bounds = params->window_bounds; 161 browser_params.initial_bounds = params->window_bounds;
162 return Browser::CreateWithParams(browser_params); 162 return Browser::CreateWithParams(browser_params);
163 } else { 163 } else {
164 return Browser::CreateForApp(Browser::TYPE_POPUP, app_name, 164 return Browser::CreateWithParams(
165 params->window_bounds, profile); 165 Browser::CreateParams::CreateForApp(
166 Browser::TYPE_POPUP, app_name, params->window_bounds,
167 profile));
166 } 168 }
167 } 169 }
168 return NULL; 170 return NULL;
169 } 171 }
170 case NEW_WINDOW: 172 case NEW_WINDOW:
171 // Make a new normal browser window. 173 // Make a new normal browser window.
172 if (profile) { 174 if (profile) {
173 Browser* browser = new Browser(Browser::TYPE_TABBED, profile); 175 Browser* browser = new Browser(Browser::TYPE_TABBED, profile);
174 browser->InitBrowserWindow(); 176 browser->InitBrowserWindow();
175 return browser; 177 return browser;
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 popup_bounds.height() > max_height || 700 popup_bounds.height() > max_height ||
699 popup_bounds.width() == 0 || 701 popup_bounds.width() == 0 ||
700 popup_bounds.height() == 0) { 702 popup_bounds.height() == 0) {
701 return NEW_FOREGROUND_TAB; 703 return NEW_FOREGROUND_TAB;
702 } 704 }
703 return NEW_POPUP; 705 return NEW_POPUP;
704 } 706 }
705 #endif 707 #endif
706 708
707 } // namespace browser 709 } // namespace browser
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698