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

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, 7 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
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 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 ipc_params.mode = content::FileChooserParams::OpenFolder; 1868 ipc_params.mode = content::FileChooserParams::OpenFolder;
1869 else if (params.multiSelect) 1869 else if (params.multiSelect)
1870 ipc_params.mode = content::FileChooserParams::OpenMultiple; 1870 ipc_params.mode = content::FileChooserParams::OpenMultiple;
1871 else if (params.saveAs) 1871 else if (params.saveAs)
1872 ipc_params.mode = content::FileChooserParams::Save; 1872 ipc_params.mode = content::FileChooserParams::Save;
1873 else 1873 else
1874 ipc_params.mode = content::FileChooserParams::Open; 1874 ipc_params.mode = content::FileChooserParams::Open;
1875 ipc_params.title = params.title; 1875 ipc_params.title = params.title;
1876 ipc_params.default_file_name = 1876 ipc_params.default_file_name =
1877 webkit_glue::WebStringToFilePath(params.initialValue); 1877 webkit_glue::WebStringToFilePath(params.initialValue);
1878 ipc_params.accept_types.reserve(params.acceptMIMETypes.size()); 1878 ipc_params.accept_types.reserve(params.acceptTypes.size());
1879 for (size_t i = 0; i < params.acceptMIMETypes.size(); ++i) 1879 for (size_t i = 0; i < params.acceptTypes.size(); ++i)
1880 ipc_params.accept_types.push_back(params.acceptMIMETypes[i]); 1880 ipc_params.accept_types.push_back(params.acceptTypes[i]);
1881 1881
1882 return ScheduleFileChooser(ipc_params, chooser_completion); 1882 return ScheduleFileChooser(ipc_params, chooser_completion);
1883 } 1883 }
1884 1884
1885 void RenderViewImpl::runModalAlertDialog(WebFrame* frame, 1885 void RenderViewImpl::runModalAlertDialog(WebFrame* frame,
1886 const WebString& message) { 1886 const WebString& message) {
1887 RunJavaScriptMessage(ui::JAVASCRIPT_MESSAGE_TYPE_ALERT, 1887 RunJavaScriptMessage(ui::JAVASCRIPT_MESSAGE_TYPE_ALERT,
1888 message, 1888 message,
1889 string16(), 1889 string16(),
1890 frame->document().url(), 1890 frame->document().url(),
(...skipping 3582 matching lines...) Expand 10 before | Expand all | Expand 10 after
5473 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5473 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5474 return !!RenderThreadImpl::current()->compositor_thread(); 5474 return !!RenderThreadImpl::current()->compositor_thread();
5475 } 5475 }
5476 5476
5477 void RenderViewImpl::OnJavaBridgeInit() { 5477 void RenderViewImpl::OnJavaBridgeInit() {
5478 DCHECK(!java_bridge_dispatcher_); 5478 DCHECK(!java_bridge_dispatcher_);
5479 #if defined(ENABLE_JAVA_BRIDGE) 5479 #if defined(ENABLE_JAVA_BRIDGE)
5480 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5480 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5481 #endif 5481 #endif
5482 } 5482 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698