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

Unified Diff: chrome/browser/extensions/extension_tabs_module.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, 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_tabs_module.cc
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index 8ffff04aae38cc16a72b0c3cae589e87be417c8b..ef450fdec583db4284b61d6b5b19149618a86ba9 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -61,6 +61,7 @@
#include "skia/ext/image_operations.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/base/ui_base_types.h"
#include "ui/gfx/codec/jpeg_codec.h"
#include "ui/gfx/codec/png_codec.h"
@@ -595,17 +596,20 @@ bool CreateWindowFunction::RunImpl() {
#endif
// Create a new BrowserWindow.
- Browser* new_window;
+ Browser::CreateParams create_params;
if (extension_id.empty()) {
- new_window = Browser::CreateForType(window_type, window_profile);
- new_window->window()->SetBounds(window_bounds);
+ create_params = Browser::CreateParams(window_type, window_profile);
+ create_params.initial_bounds = window_bounds;
} else {
- new_window = Browser::CreateForApp(
+ create_params = Browser::CreateParams::CreateForApp(
window_type,
web_app::GenerateApplicationNameFromExtensionId(extension_id),
(window_type == Browser::TYPE_PANEL ? panel_bounds : popup_bounds),
window_profile);
}
+ create_params.initial_show_state = ui::SHOW_STATE_NORMAL;
+ Browser* new_window = Browser::CreateWithParams(create_params);
+
for (std::vector<GURL>::iterator i = urls.begin(); i != urls.end(); ++i) {
TabContentsWrapper* tab = new_window->AddSelectedTabWithURL(
*i, content::PAGE_TRANSITION_LINK);

Powered by Google App Engine
This is Rietveld 408576698