summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-02 03:22:34 +0000
committerscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-02 03:22:34 +0000
commita4be18fc5f8f54c9fb0a0611065ee28bc9b9217a (patch)
tree418b8b6fd18064b21e090908c993827d47c03c10
parent3d410baab7a532b04859deccc607457550746651 (diff)
downloadchromium_src-a4be18fc5f8f54c9fb0a0611065ee28bc9b9217a.zip
chromium_src-a4be18fc5f8f54c9fb0a0611065ee28bc9b9217a.tar.gz
chromium_src-a4be18fc5f8f54c9fb0a0611065ee28bc9b9217a.tar.bz2
Enable external protocol dialog on Windows Aura
R=ben@chromium.org BUG=295499 Review URL: https://codereview.chromium.org/25589002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226387 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/views/external_protocol_dialog.cc11
-rw-r--r--chrome/browser/ui/views/stubs_aura.cc2
-rw-r--r--chrome/chrome_browser_ui.gypi4
3 files changed, 7 insertions, 10 deletions
diff --git a/chrome/browser/ui/views/external_protocol_dialog.cc b/chrome/browser/ui/views/external_protocol_dialog.cc
index 3405c5c..a7ae8af 100644
--- a/chrome/browser/ui/views/external_protocol_dialog.cc
+++ b/chrome/browser/ui/views/external_protocol_dialog.cc
@@ -156,13 +156,10 @@ ExternalProtocolDialog::ExternalProtocolDialog(WebContents* web_contents,
l10n_util::GetStringUTF16(IDS_EXTERNAL_PROTOCOL_CHECKBOX_TEXT));
// Dialog is top level if we don't have a web_contents associated with us.
- HWND root_hwnd = NULL;
- if (web_contents_) {
- root_hwnd = GetAncestor(web_contents_->GetView()->GetContentNativeView(),
- GA_ROOT);
- }
-
- CreateBrowserModalDialogViews(this, root_hwnd)->Show();
+ gfx::NativeWindow parent_window = NULL;
+ if (web_contents_)
+ parent_window = web_contents_->GetView()->GetTopLevelNativeWindow();
+ CreateBrowserModalDialogViews(this, parent_window)->Show();
}
// static
diff --git a/chrome/browser/ui/views/stubs_aura.cc b/chrome/browser/ui/views/stubs_aura.cc
index 0b819e1..5a77b51 100644
--- a/chrome/browser/ui/views/stubs_aura.cc
+++ b/chrome/browser/ui/views/stubs_aura.cc
@@ -40,7 +40,7 @@ void ShowAboutIPCDialog() {
} // namespace chrome
-#if !defined(OS_CHROMEOS)
+#if !defined(OS_CHROMEOS) && !defined(OS_WIN)
// static
void ExternalProtocolHandler::RunExternalProtocolDialog(
const GURL& url, int render_process_host_id, int routing_id) {
diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi
index 5e8b020..ad4d5cd 100644
--- a/chrome/chrome_browser_ui.gypi
+++ b/chrome/chrome_browser_ui.gypi
@@ -2746,7 +2746,6 @@
['exclude', '^browser/ui/views/about_ipc_dialog.cc'],
['exclude', '^browser/ui/views/app_menu_button_win.cc'],
['exclude', '^browser/ui/views/dropdown_bar_host_win.cc'],
- ['exclude', '^browser/ui/views/external_protocol_dialog.cc'],
['exclude', '^browser/ui/views/find_bar_host_win.cc'],
['exclude', '^browser/ui/views/frame/browser_frame_win.cc'],
['exclude', '^browser/ui/views/frame/browser_frame_win.h'],
@@ -2794,9 +2793,10 @@
],
}, {
'sources/': [
- ['exclude', '^browser/ui/views/hwnd_util.h'],
+ ['exclude', '^browser/ui/views/external_protocol_dialog.cc'],
['exclude', '^browser/ui/views/frame/glass_browser_frame_view.cc'],
['exclude', '^browser/ui/views/frame/glass_browser_frame_view.h'],
+ ['exclude', '^browser/ui/views/hwnd_util.h'],
],
}],
],