| 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 4640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4651 // This could happen if we navigated to a different page before the user | 4651 // This could happen if we navigated to a different page before the user |
| 4652 // closed the chooser. | 4652 // closed the chooser. |
| 4653 if (file_chooser_completions_.empty()) | 4653 if (file_chooser_completions_.empty()) |
| 4654 return; | 4654 return; |
| 4655 | 4655 |
| 4656 // Convert Chrome's SelectedFileInfo list to WebKit's. | 4656 // Convert Chrome's SelectedFileInfo list to WebKit's. |
| 4657 WebVector<WebFileChooserCompletion::SelectedFileInfo> selected_files( | 4657 WebVector<WebFileChooserCompletion::SelectedFileInfo> selected_files( |
| 4658 files.size()); | 4658 files.size()); |
| 4659 for (size_t i = 0; i < files.size(); ++i) { | 4659 for (size_t i = 0; i < files.size(); ++i) { |
| 4660 WebFileChooserCompletion::SelectedFileInfo selected_file; | 4660 WebFileChooserCompletion::SelectedFileInfo selected_file; |
| 4661 selected_file.path = webkit_glue::FilePathToWebString(files[i].path); | 4661 selected_file.path = webkit_glue::FilePathToWebString(files[i].local_path); |
| 4662 selected_file.displayName = webkit_glue::FilePathStringToWebString( | 4662 selected_file.displayName = webkit_glue::FilePathStringToWebString( |
| 4663 files[i].display_name); | 4663 files[i].display_name); |
| 4664 selected_files[i] = selected_file; | 4664 selected_files[i] = selected_file; |
| 4665 } | 4665 } |
| 4666 | 4666 |
| 4667 if (file_chooser_completions_.front()->completion) | 4667 if (file_chooser_completions_.front()->completion) |
| 4668 file_chooser_completions_.front()->completion->didChooseFile( | 4668 file_chooser_completions_.front()->completion->didChooseFile( |
| 4669 selected_files); | 4669 selected_files); |
| 4670 file_chooser_completions_.pop_front(); | 4670 file_chooser_completions_.pop_front(); |
| 4671 | 4671 |
| (...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5717 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5717 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5718 return !!RenderThreadImpl::current()->compositor_thread(); | 5718 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5719 } | 5719 } |
| 5720 | 5720 |
| 5721 void RenderViewImpl::OnJavaBridgeInit() { | 5721 void RenderViewImpl::OnJavaBridgeInit() { |
| 5722 DCHECK(!java_bridge_dispatcher_); | 5722 DCHECK(!java_bridge_dispatcher_); |
| 5723 #if defined(ENABLE_JAVA_BRIDGE) | 5723 #if defined(ENABLE_JAVA_BRIDGE) |
| 5724 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5724 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
| 5725 #endif | 5725 #endif |
| 5726 } | 5726 } |
| OLD | NEW |