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

Side by Side Diff: chrome/renderer/render_view.cc

Issue 2825051: Add support for a directory file chooser command, which creates a file list b... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | « chrome/common/render_messages.h ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/renderer/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after
1961 1961
1962 void RenderView::updateSpellingUIWithMisspelledWord(const WebString& word) { 1962 void RenderView::updateSpellingUIWithMisspelledWord(const WebString& word) {
1963 Send(new ViewHostMsg_UpdateSpellingPanelWithMisspelledWord(routing_id_, 1963 Send(new ViewHostMsg_UpdateSpellingPanelWithMisspelledWord(routing_id_,
1964 word)); 1964 word));
1965 } 1965 }
1966 1966
1967 bool RenderView::runFileChooser( 1967 bool RenderView::runFileChooser(
1968 const WebKit::WebFileChooserParams& params, 1968 const WebKit::WebFileChooserParams& params,
1969 WebFileChooserCompletion* chooser_completion) { 1969 WebFileChooserCompletion* chooser_completion) {
1970 ViewHostMsg_RunFileChooser_Params ipc_params; 1970 ViewHostMsg_RunFileChooser_Params ipc_params;
1971 ipc_params.mode = params.multiSelect ? 1971 if (params.directory)
1972 ViewHostMsg_RunFileChooser_Params::OpenMultiple : 1972 ipc_params.mode = ViewHostMsg_RunFileChooser_Params::OpenFolder;
1973 ViewHostMsg_RunFileChooser_Params::Open; 1973 else if (params.multiSelect)
1974 ipc_params.mode = ViewHostMsg_RunFileChooser_Params::OpenMultiple;
1975 else
1976 ipc_params.mode = ViewHostMsg_RunFileChooser_Params::Open;
1974 ipc_params.title = params.title; 1977 ipc_params.title = params.title;
1975 ipc_params.default_file_name = 1978 ipc_params.default_file_name =
1976 webkit_glue::WebStringToFilePath(params.initialValue); 1979 webkit_glue::WebStringToFilePath(params.initialValue);
1977 1980
1978 return ScheduleFileChooser(ipc_params, chooser_completion); 1981 return ScheduleFileChooser(ipc_params, chooser_completion);
1979 } 1982 }
1980 1983
1981 void RenderView::runModalAlertDialog( 1984 void RenderView::runModalAlertDialog(
1982 WebFrame* frame, const WebString& message) { 1985 WebFrame* frame, const WebString& message) {
1983 RunJavaScriptMessage(MessageBoxFlags::kIsJavascriptAlert, 1986 RunJavaScriptMessage(MessageBoxFlags::kIsJavascriptAlert,
(...skipping 3568 matching lines...) Expand 10 before | Expand all | Expand 10 after
5552 PendingOpenFileSystem* request = pending_file_system_requests_.Lookup( 5555 PendingOpenFileSystem* request = pending_file_system_requests_.Lookup(
5553 request_id); 5556 request_id);
5554 DCHECK(request); 5557 DCHECK(request);
5555 if (accepted) 5558 if (accepted)
5556 request->callbacks->didOpenFileSystem(name, root_path); 5559 request->callbacks->didOpenFileSystem(name, root_path);
5557 else 5560 else
5558 request->callbacks->didFail(WebKit::WebFileErrorSecurity); 5561 request->callbacks->didFail(WebKit::WebFileErrorSecurity);
5559 request->callbacks = NULL; 5562 request->callbacks = NULL;
5560 pending_file_system_requests_.Remove(request_id); 5563 pending_file_system_requests_.Remove(request_id);
5561 } 5564 }
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698