| OLD | NEW |
| 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 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1870 ipc_params.mode = content::FileChooserParams::OpenFolder; | 1870 ipc_params.mode = content::FileChooserParams::OpenFolder; |
| 1871 else if (params.multiSelect) | 1871 else if (params.multiSelect) |
| 1872 ipc_params.mode = content::FileChooserParams::OpenMultiple; | 1872 ipc_params.mode = content::FileChooserParams::OpenMultiple; |
| 1873 else if (params.saveAs) | 1873 else if (params.saveAs) |
| 1874 ipc_params.mode = content::FileChooserParams::Save; | 1874 ipc_params.mode = content::FileChooserParams::Save; |
| 1875 else | 1875 else |
| 1876 ipc_params.mode = content::FileChooserParams::Open; | 1876 ipc_params.mode = content::FileChooserParams::Open; |
| 1877 ipc_params.title = params.title; | 1877 ipc_params.title = params.title; |
| 1878 ipc_params.default_file_name = | 1878 ipc_params.default_file_name = |
| 1879 webkit_glue::WebStringToFilePath(params.initialValue); | 1879 webkit_glue::WebStringToFilePath(params.initialValue); |
| 1880 ipc_params.accept_types.reserve(params.acceptMIMETypes.size()); | 1880 ipc_params.accept_types.reserve(params.acceptTypes.size()); |
| 1881 for (size_t i = 0; i < params.acceptMIMETypes.size(); ++i) | 1881 for (size_t i = 0; i < params.acceptTypes.size(); ++i) |
| 1882 ipc_params.accept_types.push_back(params.acceptMIMETypes[i]); | 1882 ipc_params.accept_types.push_back(params.acceptTypes[i]); |
| 1883 | 1883 |
| 1884 return ScheduleFileChooser(ipc_params, chooser_completion); | 1884 return ScheduleFileChooser(ipc_params, chooser_completion); |
| 1885 } | 1885 } |
| 1886 | 1886 |
| 1887 void RenderViewImpl::runModalAlertDialog(WebFrame* frame, | 1887 void RenderViewImpl::runModalAlertDialog(WebFrame* frame, |
| 1888 const WebString& message) { | 1888 const WebString& message) { |
| 1889 RunJavaScriptMessage(ui::JAVASCRIPT_MESSAGE_TYPE_ALERT, | 1889 RunJavaScriptMessage(ui::JAVASCRIPT_MESSAGE_TYPE_ALERT, |
| 1890 message, | 1890 message, |
| 1891 string16(), | 1891 string16(), |
| 1892 frame->document().url(), | 1892 frame->document().url(), |
| (...skipping 3590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5483 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5483 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5484 return !!RenderThreadImpl::current()->compositor_thread(); | 5484 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5485 } | 5485 } |
| 5486 | 5486 |
| 5487 void RenderViewImpl::OnJavaBridgeInit() { | 5487 void RenderViewImpl::OnJavaBridgeInit() { |
| 5488 DCHECK(!java_bridge_dispatcher_); | 5488 DCHECK(!java_bridge_dispatcher_); |
| 5489 #if defined(ENABLE_JAVA_BRIDGE) | 5489 #if defined(ENABLE_JAVA_BRIDGE) |
| 5490 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5490 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
| 5491 #endif | 5491 #endif |
| 5492 } | 5492 } |
| OLD | NEW |