| OLD | NEW |
| 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 <cmath> | 8 #include <cmath> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 2001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2012 } | 2012 } |
| 2013 | 2013 |
| 2014 void RenderView::updateSpellingUIWithMisspelledWord(const WebString& word) { | 2014 void RenderView::updateSpellingUIWithMisspelledWord(const WebString& word) { |
| 2015 Send(new ViewHostMsg_UpdateSpellingPanelWithMisspelledWord(routing_id_, | 2015 Send(new ViewHostMsg_UpdateSpellingPanelWithMisspelledWord(routing_id_, |
| 2016 word)); | 2016 word)); |
| 2017 } | 2017 } |
| 2018 | 2018 |
| 2019 bool RenderView::runFileChooser( | 2019 bool RenderView::runFileChooser( |
| 2020 const WebKit::WebFileChooserParams& params, | 2020 const WebKit::WebFileChooserParams& params, |
| 2021 WebFileChooserCompletion* chooser_completion) { | 2021 WebFileChooserCompletion* chooser_completion) { |
| 2022 // Do not open the file dialog in a hidden RenderView. |
| 2023 if (is_hidden()) |
| 2024 return false; |
| 2022 ViewHostMsg_RunFileChooser_Params ipc_params; | 2025 ViewHostMsg_RunFileChooser_Params ipc_params; |
| 2023 if (params.directory) | 2026 if (params.directory) |
| 2024 ipc_params.mode = ViewHostMsg_RunFileChooser_Params::OpenFolder; | 2027 ipc_params.mode = ViewHostMsg_RunFileChooser_Params::OpenFolder; |
| 2025 else if (params.multiSelect) | 2028 else if (params.multiSelect) |
| 2026 ipc_params.mode = ViewHostMsg_RunFileChooser_Params::OpenMultiple; | 2029 ipc_params.mode = ViewHostMsg_RunFileChooser_Params::OpenMultiple; |
| 2027 else | 2030 else |
| 2028 ipc_params.mode = ViewHostMsg_RunFileChooser_Params::Open; | 2031 ipc_params.mode = ViewHostMsg_RunFileChooser_Params::Open; |
| 2029 ipc_params.title = params.title; | 2032 ipc_params.title = params.title; |
| 2030 ipc_params.default_file_name = | 2033 ipc_params.default_file_name = |
| 2031 webkit_glue::WebStringToFilePath(params.initialValue); | 2034 webkit_glue::WebStringToFilePath(params.initialValue); |
| (...skipping 3915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5947 } | 5950 } |
| 5948 | 5951 |
| 5949 void RenderView::OnAsyncFileOpened(base::PlatformFileError error_code, | 5952 void RenderView::OnAsyncFileOpened(base::PlatformFileError error_code, |
| 5950 IPC::PlatformFileForTransit file_for_transit, | 5953 IPC::PlatformFileForTransit file_for_transit, |
| 5951 int message_id) { | 5954 int message_id) { |
| 5952 pepper_delegate_.OnAsyncFileOpened( | 5955 pepper_delegate_.OnAsyncFileOpened( |
| 5953 error_code, | 5956 error_code, |
| 5954 IPC::PlatformFileForTransitToPlatformFile(file_for_transit), | 5957 IPC::PlatformFileForTransitToPlatformFile(file_for_transit), |
| 5955 message_id); | 5958 message_id); |
| 5956 } | 5959 } |
| OLD | NEW |