summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/chromeos/media/media_player.cc4
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc7
-rw-r--r--chrome/browser/ui/browser.cc21
-rw-r--r--chrome/browser/ui/browser.h6
-rw-r--r--chrome/browser/ui/browser_navigator.cc2
-rw-r--r--chrome/browser/ui/browser_navigator_browsertest.cc2
-rw-r--r--chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript_test.mm2
-rw-r--r--chrome/browser/ui/panels/panel_browser_view_browsertest.cc2
-rw-r--r--chrome/browser/ui/panels/panel_browsertest.cc2
-rw-r--r--chrome/browser/ui/webui/active_downloads_ui.cc2
10 files changed, 24 insertions, 26 deletions
diff --git a/chrome/browser/chromeos/media/media_player.cc b/chrome/browser/chromeos/media/media_player.cc
index 90b3fad..f06b84a 100644
--- a/chrome/browser/chromeos/media/media_player.cc
+++ b/chrome/browser/chromeos/media/media_player.cc
@@ -200,7 +200,7 @@ void MediaPlayer::PopupPlaylist(Browser* creator) {
Profile* profile = BrowserList::GetLastActive()->profile();
playlist_browser_ = Browser::CreateForApp(Browser::TYPE_PANEL,
kMediaPlayerAppName,
- gfx::Size(),
+ gfx::Rect(),
profile);
registrar_.Add(this,
NotificationType::BROWSER_CLOSING,
@@ -225,7 +225,7 @@ void MediaPlayer::PopupMediaPlayer(Browser* creator) {
Profile* profile = BrowserList::GetLastActive()->profile();
mediaplayer_browser_ = Browser::CreateForApp(Browser::TYPE_PANEL,
kMediaPlayerAppName,
- gfx::Size(),
+ gfx::Rect(),
profile);
registrar_.Add(this,
NotificationType::BROWSER_CLOSING,
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index 0e034a7..44765ba 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -537,8 +537,9 @@ bool CreateWindowFunction::RunImpl() {
Browser* new_window;
if (app_name.empty()) {
new_window = Browser::CreateForType(window_type, window_profile);
+ new_window->window()->SetBounds(window_bounds);
} else {
- new_window = Browser::CreateForApp(window_type, app_name, gfx::Size(),
+ new_window = Browser::CreateForApp(window_type, app_name, popup_bounds,
window_profile);
}
for (std::vector<GURL>::iterator i = urls.begin(); i != urls.end(); ++i)
@@ -551,10 +552,6 @@ bool CreateWindowFunction::RunImpl() {
new_window->NewTab();
}
new_window->SelectNumberedTab(0);
- if (app_name.empty())
- new_window->window()->SetBounds(window_bounds);
- else
- new_window->window()->SetBounds(popup_bounds);
if (focused)
new_window->window()->Show();
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 1c3432ee..9b93f6d 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -386,7 +386,7 @@ Browser* Browser::CreateForType(Type type, Profile* profile) {
// static
Browser* Browser::CreateForApp(Type type,
const std::string& app_name,
- const gfx::Size& window_size,
+ const gfx::Rect& window_bounds,
Profile* profile) {
DCHECK(type != TYPE_TABBED);
DCHECK(!app_name.empty());
@@ -404,8 +404,8 @@ Browser* Browser::CreateForApp(Type type,
CreateParams params(type, profile);
params.app_name = app_name;
- if (!window_size.IsEmpty())
- params.initial_bounds.set_size(window_size);
+ if (!window_bounds.IsEmpty())
+ params.initial_bounds = window_bounds;
return CreateWithParams(params);
}
@@ -596,12 +596,13 @@ TabContents* Browser::OpenApplicationWindow(
Type type = extension && (container == extension_misc::LAUNCH_PANEL) ?
TYPE_PANEL : TYPE_POPUP;
- gfx::Size window_size;
- if (extension)
- window_size.SetSize(extension->launch_width(),
- extension->launch_height());
+ gfx::Rect window_bounds;
+ if (extension) {
+ window_bounds.set_width(extension->launch_width());
+ window_bounds.set_height(extension->launch_height());
+ }
- Browser* browser = Browser::CreateForApp(type, app_name, window_size,
+ Browser* browser = Browser::CreateForApp(type, app_name, window_bounds,
profile);
if (app_browser)
@@ -2717,7 +2718,7 @@ void Browser::DuplicateContentsAt(int index) {
if (is_app()) {
CHECK(!is_type_popup());
CHECK(!is_type_panel());
- browser = Browser::CreateForApp(TYPE_POPUP, app_name_, gfx::Size(),
+ browser = Browser::CreateForApp(TYPE_POPUP, app_name_, gfx::Rect(),
profile_);
} else if (is_type_popup()) {
browser = Browser::CreateForType(TYPE_POPUP, profile_);
@@ -3268,7 +3269,7 @@ void Browser::ConvertContentsToApplication(TabContents* contents) {
DetachContents(contents);
Browser* app_browser = Browser::CreateForApp(
- TYPE_POPUP, app_name, gfx::Size(), profile_);
+ TYPE_POPUP, app_name, gfx::Rect(), profile_);
TabContentsWrapper* wrapper =
TabContentsWrapper::GetCurrentWrapperForContents(contents);
if (!wrapper)
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 2b41d9e..867e785 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -154,11 +154,11 @@ class Browser : public TabHandlerDelegate,
// Like Create, but creates a toolbar-less "app" window for the specified
// app. |app_name| is required and is used to identify the window to the
- // shell. If |window_size| is set, it is used to determine the size of the
- // window to open.
+ // shell. If |window_bounds| is set, it is used to determine the bounds of
+ // the window to open.
static Browser* CreateForApp(Type type,
const std::string& app_name,
- const gfx::Size& window_size,
+ const gfx::Rect& window_bounds,
Profile* profile);
// Like Create, but creates a tabstrip-less and toolbar-less
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index 7fb0d5b..7e01e61 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -202,7 +202,7 @@ Browser* GetBrowserForDisposition(browser::NavigateParams* params) {
return Browser::CreateWithParams(browser_params);
} else {
return Browser::CreateForApp(Browser::TYPE_POPUP, app_name,
- params->window_bounds.size(), profile);
+ params->window_bounds, profile);
}
}
return NULL;
diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc
index c7d9b5f..2ccdbaa 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest.cc
@@ -42,7 +42,7 @@ Browser* BrowserNavigatorTest::CreateEmptyBrowserForType(Browser::Type type,
Browser* BrowserNavigatorTest::CreateEmptyBrowserForApp(Browser::Type type,
Profile* profile) {
Browser* browser = Browser::CreateForApp(Browser::TYPE_POPUP, "Test",
- gfx::Size(), profile);
+ gfx::Rect(), profile);
browser->AddBlankTab(true);
return browser;
}
diff --git a/chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript_test.mm b/chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript_test.mm
index 8a90442..c2f4837 100644
--- a/chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript_test.mm
+++ b/chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript_test.mm
@@ -22,7 +22,7 @@ IN_PROC_BROWSER_TEST_F(BrowserCrApplicationAppleScriptTest, Creation) {
Profile* profile = browser()->profile();
Browser* b1 = Browser::CreateForType(Browser::TYPE_POPUP, profile);
Browser* b2 = Browser::CreateForApp(Browser::TYPE_PANEL, "Test",
- gfx::Size(), profile);
+ gfx::Rect(), profile);
EXPECT_EQ(3U, [[NSApp appleScriptWindows] count]);
for (WindowAppleScript* window in [NSApp appleScriptWindows]) {
diff --git a/chrome/browser/ui/panels/panel_browser_view_browsertest.cc b/chrome/browser/ui/panels/panel_browser_view_browsertest.cc
index 954050e..eeed6ef 100644
--- a/chrome/browser/ui/panels/panel_browser_view_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_browser_view_browsertest.cc
@@ -73,7 +73,7 @@ class PanelBrowserViewTest : public InProcessBrowserTest {
PanelBrowserView* CreatePanelBrowserView(const std::string& panel_name) {
Browser* panel_browser = Browser::CreateForApp(Browser::TYPE_PANEL,
panel_name,
- gfx::Size(),
+ gfx::Rect(),
browser()->profile());
panel_browser->window()->Show();
return static_cast<PanelBrowserView*>(
diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc
index c75ca4b..bb1b852 100644
--- a/chrome/browser/ui/panels/panel_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_browsertest.cc
@@ -29,7 +29,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, CreatePanel) {
Browser* panel_browser = Browser::CreateForApp(Browser::TYPE_PANEL,
"PanelTest",
- gfx::Size(),
+ gfx::Rect(),
browser()->profile());
EXPECT_TRUE(panel_browser->is_type_panel());
panel_browser->window()->Show();
diff --git a/chrome/browser/ui/webui/active_downloads_ui.cc b/chrome/browser/ui/webui/active_downloads_ui.cc
index 94a75cd..fb35bd2 100644
--- a/chrome/browser/ui/webui/active_downloads_ui.cc
+++ b/chrome/browser/ui/webui/active_downloads_ui.cc
@@ -390,7 +390,7 @@ Browser* ActiveDownloadsUI::OpenPopup(Profile* profile) {
// Create new browser if no matching pop up is found.
if (browser == NULL) {
browser = Browser::CreateForApp(Browser::TYPE_PANEL, kActiveDownloadAppName,
- gfx::Size(), profile);
+ gfx::Rect(), profile);
browser::NavigateParams params(
browser,