| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 3830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3841 base::string16 ignored_result; | 3841 base::string16 ignored_result; |
| 3842 Send(new FrameHostMsg_RunBeforeUnloadConfirm( | 3842 Send(new FrameHostMsg_RunBeforeUnloadConfirm( |
| 3843 routing_id_, frame_->document().url(), is_reload, &success, | 3843 routing_id_, frame_->document().url(), is_reload, &success, |
| 3844 &ignored_result)); | 3844 &ignored_result)); |
| 3845 return success; | 3845 return success; |
| 3846 } | 3846 } |
| 3847 | 3847 |
| 3848 bool RenderFrameImpl::runFileChooser( | 3848 bool RenderFrameImpl::runFileChooser( |
| 3849 const blink::WebFileChooserParams& params, | 3849 const blink::WebFileChooserParams& params, |
| 3850 blink::WebFileChooserCompletion* chooser_completion) { | 3850 blink::WebFileChooserCompletion* chooser_completion) { |
| 3851 // Do not open the file dialog in a hidden RenderView. | 3851 // Do not open the file dialog in a hidden RenderFrame. |
| 3852 if (render_view_->is_hidden()) | 3852 if (IsHidden()) |
| 3853 return false; | 3853 return false; |
| 3854 | 3854 |
| 3855 FileChooserParams ipc_params; | 3855 FileChooserParams ipc_params; |
| 3856 if (params.directory) | 3856 if (params.directory) |
| 3857 ipc_params.mode = FileChooserParams::UploadFolder; | 3857 ipc_params.mode = FileChooserParams::UploadFolder; |
| 3858 else if (params.multiSelect) | 3858 else if (params.multiSelect) |
| 3859 ipc_params.mode = FileChooserParams::OpenMultiple; | 3859 ipc_params.mode = FileChooserParams::OpenMultiple; |
| 3860 else if (params.saveAs) | 3860 else if (params.saveAs) |
| 3861 ipc_params.mode = FileChooserParams::Save; | 3861 ipc_params.mode = FileChooserParams::Save; |
| 3862 else | 3862 else |
| (...skipping 2443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6306 // event target. Potentially a Pepper plugin will receive the event. | 6306 // event target. Potentially a Pepper plugin will receive the event. |
| 6307 // In order to tell whether a plugin gets the last mouse event and which it | 6307 // In order to tell whether a plugin gets the last mouse event and which it |
| 6308 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6308 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6309 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6309 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6310 // |pepper_last_mouse_event_target_|. | 6310 // |pepper_last_mouse_event_target_|. |
| 6311 pepper_last_mouse_event_target_ = nullptr; | 6311 pepper_last_mouse_event_target_ = nullptr; |
| 6312 #endif | 6312 #endif |
| 6313 } | 6313 } |
| 6314 | 6314 |
| 6315 } // namespace content | 6315 } // namespace content |
| OLD | NEW |