diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-22 18:07:51 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-22 18:07:51 +0000 |
commit | 36cf19b922c0b2f31dcab456fe2e36b1e12dbf4f (patch) | |
tree | dc451ce84eb1cd7a6d72e8a7be4b075bfde111b5 /chrome/browser/external_tab_container.cc | |
parent | 605fede7a976ee0859f1b7d19066553edef6d192 (diff) | |
download | chromium_src-36cf19b922c0b2f31dcab456fe2e36b1e12dbf4f.zip chromium_src-36cf19b922c0b2f31dcab456fe2e36b1e12dbf4f.tar.gz chromium_src-36cf19b922c0b2f31dcab456fe2e36b1e12dbf4f.tar.bz2 |
The ExternalTabContainer object which implements the TabContentsDelegate interface now implements the
ShowHtmlDialog function which is needed to support HTML dialog popups like those displayed by Gears.'
Fixes http://b/issue?id=1963582
Bug=1963582
Review URL: http://codereview.chromium.org/159162
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21289 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/external_tab_container.cc')
-rw-r--r-- | chrome/browser/external_tab_container.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/chrome/browser/external_tab_container.cc b/chrome/browser/external_tab_container.cc index 40dff0f..ab74af1 100644 --- a/chrome/browser/external_tab_container.cc +++ b/chrome/browser/external_tab_container.cc @@ -11,7 +11,7 @@ #include "base/logging.h" #include "base/win_util.h" #include "chrome/browser/automation/automation_provider.h" -#include "chrome/browser/browser.h" +#include "chrome/browser/browser_window.h" #include "chrome/browser/load_notification_details.h" #include "chrome/browser/profile.h" #include "chrome/browser/tab_contents/provisional_load_details.h" @@ -294,6 +294,17 @@ bool ExternalTabContainer::HandleKeyboardEvent( event.os_event.lParam); } +void ExternalTabContainer::ShowHtmlDialog(HtmlDialogUIDelegate* delegate, + gfx::NativeWindow parent_window) { + if (!browser_.get()) { + browser_.reset(Browser::CreateForPopup(tab_contents_->profile())); + } + + gfx::NativeWindow parent = parent_window ? parent_window + : GetParent(); + browser_->window()->ShowHTMLDialog(delegate, parent); +} + //////////////////////////////////////////////////////////////////////////////// // ExternalTabContainer, NotificationObserver implementation: @@ -384,6 +395,9 @@ void ExternalTabContainer::Observe(NotificationType type, void ExternalTabContainer::OnDestroy() { Uninitialize(GetNativeView()); WidgetWin::OnDestroy(); + if (browser_.get()) { + ::DestroyWindow(browser_->window()->GetNativeHandle()); + } } //////////////////////////////////////////////////////////////////////////////// |