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

Unified Diff: content/shell/browser/shell_download_manager_delegate.cc

Issue 137993009: Remove more non-aura windows code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: renable the disabled tests Created 6 years, 11 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
« no previous file with comments | « content/shell/browser/shell.cc ('k') | content/shell/browser/shell_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_download_manager_delegate.cc
===================================================================
--- content/shell/browser/shell_download_manager_delegate.cc (revision 244775)
+++ content/shell/browser/shell_download_manager_delegate.cc (working copy)
@@ -28,6 +28,11 @@
#include "content/shell/common/shell_switches.h"
#include "net/base/net_util.h"
+#if defined(OS_WIN)
+#include "ui/aura/root_window.h"
+#include "ui/aura/window.h"
+#endif
+
namespace content {
ShellDownloadManagerDelegate::ShellDownloadManagerDelegate()
@@ -163,14 +168,15 @@
return;
base::FilePath result;
-#if defined(OS_WIN) && !defined(USE_AURA)
+#if defined(OS_WIN)
std::wstring file_part = base::FilePath(suggested_path).BaseName().value();
wchar_t file_name[MAX_PATH];
base::wcslcpy(file_name, file_part.c_str(), arraysize(file_name));
OPENFILENAME save_as;
ZeroMemory(&save_as, sizeof(save_as));
save_as.lStructSize = sizeof(OPENFILENAME);
- save_as.hwndOwner = item->GetWebContents()->GetView()->GetNativeView();
+ save_as.hwndOwner = item->GetWebContents()->GetView()->GetNativeView()->
+ GetDispatcher()->host()->GetAcceleratedWidget();
save_as.lpstrFile = file_name;
save_as.nMaxFile = arraysize(file_name);
« no previous file with comments | « content/shell/browser/shell.cc ('k') | content/shell/browser/shell_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698