summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation
diff options
context:
space:
mode:
authorjoshia@google.com <joshia@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-28 21:50:39 +0000
committerjoshia@google.com <joshia@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-28 21:50:39 +0000
commit31fb110528230784dc006c182edfa1003a2b9be8 (patch)
tree1643403af67a179f2439ca565f203f5a2c780872 /chrome/browser/automation
parent875ac10e1efb37bff2182aa82e4da47830c09a6b (diff)
downloadchromium_src-31fb110528230784dc006c182edfa1003a2b9be8.zip
chromium_src-31fb110528230784dc006c182edfa1003a2b9be8.tar.gz
chromium_src-31fb110528230784dc006c182edfa1003a2b9be8.tar.bz2
Better control over window creation of external tabs
Improving automation interface to offer better control over window creation of external tabs. The changes allow us to specify a parent window, initial size and window style. Review URL: http://codereview.chromium.org/19048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8828 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r--chrome/browser/automation/automation_provider.cc10
-rw-r--r--chrome/browser/automation/automation_provider.h3
2 files changed, 10 insertions, 3 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index fe947c5..0b52891 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -2051,17 +2051,23 @@ void AutomationProvider::CloseBrowser(const IPC::Message& message,
}
}
-void AutomationProvider::CreateExternalTab(const IPC::Message& message) {
+void AutomationProvider::CreateExternalTab(const IPC::Message& message,
+ HWND parent,
+ const gfx::Rect& dimensions,
+ unsigned int style) {
int tab_handle = 0;
HWND tab_container_window = NULL;
ExternalTabContainer *external_tab_container =
new ExternalTabContainer(this);
- external_tab_container->Init(profile_);
+ external_tab_container->Init(profile_, parent, dimensions, style);
TabContents* tab_contents = external_tab_container->tab_contents();
if (tab_contents) {
tab_handle = tab_tracker_->Add(tab_contents->controller());
tab_container_window = *external_tab_container;
+ } else {
+ delete external_tab_container;
}
+
Send(new AutomationMsg_CreateExternalTabResponse(message.routing_id(),
tab_container_window,
tab_handle));
diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h
index 0022369..841bfce 100644
--- a/chrome/browser/automation/automation_provider.h
+++ b/chrome/browser/automation/automation_provider.h
@@ -237,7 +237,8 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>,
const std::string& html_text);
void HideInterstitialPage(const IPC::Message& message, int tab_handle);
- void CreateExternalTab(const IPC::Message& message);
+ void CreateExternalTab(const IPC::Message& message, HWND parent,
+ const gfx::Rect& dimensions, unsigned int style);
void NavigateInExternalTab(const IPC::Message& message, int handle,
const GURL& url);
// The container of an externally hosted tab calls this to reflect any