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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 10414085: Modified the pepper file chooser API to support filtering files by extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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/public/common/file_chooser_params.h ('k') | ppapi/api/dev/ppb_file_chooser_dev.idl » ('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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after
1903 ipc_params.mode = content::FileChooserParams::OpenFolder; 1903 ipc_params.mode = content::FileChooserParams::OpenFolder;
1904 else if (params.multiSelect) 1904 else if (params.multiSelect)
1905 ipc_params.mode = content::FileChooserParams::OpenMultiple; 1905 ipc_params.mode = content::FileChooserParams::OpenMultiple;
1906 else if (params.saveAs) 1906 else if (params.saveAs)
1907 ipc_params.mode = content::FileChooserParams::Save; 1907 ipc_params.mode = content::FileChooserParams::Save;
1908 else 1908 else
1909 ipc_params.mode = content::FileChooserParams::Open; 1909 ipc_params.mode = content::FileChooserParams::Open;
1910 ipc_params.title = params.title; 1910 ipc_params.title = params.title;
1911 ipc_params.default_file_name = 1911 ipc_params.default_file_name =
1912 webkit_glue::WebStringToFilePath(params.initialValue); 1912 webkit_glue::WebStringToFilePath(params.initialValue);
1913 ipc_params.accept_types.reserve(params.acceptMIMETypes.size()); 1913 ipc_params.accept_types.reserve(params.acceptTypes.size());
1914 for (size_t i = 0; i < params.acceptMIMETypes.size(); ++i) 1914 for (size_t i = 0; i < params.acceptTypes.size(); ++i)
1915 ipc_params.accept_types.push_back(params.acceptMIMETypes[i]); 1915 ipc_params.accept_types.push_back(params.acceptTypes[i]);
1916 1916
1917 return ScheduleFileChooser(ipc_params, chooser_completion); 1917 return ScheduleFileChooser(ipc_params, chooser_completion);
1918 } 1918 }
1919 1919
1920 void RenderViewImpl::runModalAlertDialog(WebFrame* frame, 1920 void RenderViewImpl::runModalAlertDialog(WebFrame* frame,
1921 const WebString& message) { 1921 const WebString& message) {
1922 RunJavaScriptMessage(content::JAVASCRIPT_MESSAGE_TYPE_ALERT, 1922 RunJavaScriptMessage(content::JAVASCRIPT_MESSAGE_TYPE_ALERT,
1923 message, 1923 message,
1924 string16(), 1924 string16(),
1925 frame->document().url(), 1925 frame->document().url(),
(...skipping 3609 matching lines...) Expand 10 before | Expand all | Expand 10 after
5535 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5535 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5536 return !!RenderThreadImpl::current()->compositor_thread(); 5536 return !!RenderThreadImpl::current()->compositor_thread();
5537 } 5537 }
5538 5538
5539 void RenderViewImpl::OnJavaBridgeInit() { 5539 void RenderViewImpl::OnJavaBridgeInit() {
5540 DCHECK(!java_bridge_dispatcher_); 5540 DCHECK(!java_bridge_dispatcher_);
5541 #if defined(ENABLE_JAVA_BRIDGE) 5541 #if defined(ENABLE_JAVA_BRIDGE)
5542 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5542 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5543 #endif 5543 #endif
5544 } 5544 }
OLDNEW
« no previous file with comments | « content/public/common/file_chooser_params.h ('k') | ppapi/api/dev/ppb_file_chooser_dev.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698