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

Side by Side Diff: content/shell/shell_download_manager_delegate.cc

Issue 10054038: Support WebView in ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/shell/shell_aura.cc ('k') | ui/views/examples/examples_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/shell_download_manager_delegate.h" 5 #include "content/shell/shell_download_manager_delegate.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <commdlg.h> 9 #include <commdlg.h>
10 #endif 10 #endif
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 return; 98 return;
99 download->SetFileCheckResults(state); 99 download->SetFileCheckResults(state);
100 download_manager_->RestartDownload(download_id); 100 download_manager_->RestartDownload(download_id);
101 } 101 }
102 102
103 void ShellDownloadManagerDelegate::ChooseDownloadPath( 103 void ShellDownloadManagerDelegate::ChooseDownloadPath(
104 WebContents* web_contents, 104 WebContents* web_contents,
105 const FilePath& suggested_path, 105 const FilePath& suggested_path,
106 int32 download_id) { 106 int32 download_id) {
107 FilePath result; 107 FilePath result;
108 #if defined(OS_WIN) 108 #if defined(OS_WIN) && !defined(USE_AURA)
109 std::wstring file_part = FilePath(suggested_path).BaseName().value(); 109 std::wstring file_part = FilePath(suggested_path).BaseName().value();
110 wchar_t file_name[MAX_PATH]; 110 wchar_t file_name[MAX_PATH];
111 base::wcslcpy(file_name, file_part.c_str(), arraysize(file_name)); 111 base::wcslcpy(file_name, file_part.c_str(), arraysize(file_name));
112 OPENFILENAME save_as; 112 OPENFILENAME save_as;
113 ZeroMemory(&save_as, sizeof(save_as)); 113 ZeroMemory(&save_as, sizeof(save_as));
114 save_as.lStructSize = sizeof(OPENFILENAME); 114 save_as.lStructSize = sizeof(OPENFILENAME);
115 save_as.hwndOwner = web_contents->GetNativeView(); 115 save_as.hwndOwner = web_contents->GetNativeView();
116 save_as.lpstrFile = file_name; 116 save_as.lpstrFile = file_name;
117 save_as.nMaxFile = arraysize(file_name); 117 save_as.nMaxFile = arraysize(file_name);
118 118
(...skipping 12 matching lines...) Expand all
131 #endif 131 #endif
132 132
133 if (result.empty()) { 133 if (result.empty()) {
134 download_manager_->FileSelectionCanceled(download_id); 134 download_manager_->FileSelectionCanceled(download_id);
135 } else { 135 } else {
136 download_manager_->FileSelected(result, download_id); 136 download_manager_->FileSelected(result, download_id);
137 } 137 }
138 } 138 }
139 139
140 } // namespace content 140 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_aura.cc ('k') | ui/views/examples/examples_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698