| 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 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |