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 4628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4639 // This could happen if we navigated to a different page before the user | 4639 // This could happen if we navigated to a different page before the user |
4640 // closed the chooser. | 4640 // closed the chooser. |
4641 if (file_chooser_completions_.empty()) | 4641 if (file_chooser_completions_.empty()) |
4642 return; | 4642 return; |
4643 | 4643 |
4644 // Convert Chrome's SelectedFileInfo list to WebKit's. | 4644 // Convert Chrome's SelectedFileInfo list to WebKit's. |
4645 WebVector<WebFileChooserCompletion::SelectedFileInfo> selected_files( | 4645 WebVector<WebFileChooserCompletion::SelectedFileInfo> selected_files( |
4646 files.size()); | 4646 files.size()); |
4647 for (size_t i = 0; i < files.size(); ++i) { | 4647 for (size_t i = 0; i < files.size(); ++i) { |
4648 WebFileChooserCompletion::SelectedFileInfo selected_file; | 4648 WebFileChooserCompletion::SelectedFileInfo selected_file; |
4649 selected_file.path = webkit_glue::FilePathToWebString(files[i].path); | 4649 selected_file.path = webkit_glue::FilePathToWebString(files[i].real_path); |
4650 selected_file.displayName = webkit_glue::FilePathStringToWebString( | 4650 selected_file.displayName = webkit_glue::FilePathStringToWebString( |
4651 files[i].display_name); | 4651 files[i].display_name); |
4652 selected_files[i] = selected_file; | 4652 selected_files[i] = selected_file; |
4653 } | 4653 } |
4654 | 4654 |
4655 if (file_chooser_completions_.front()->completion) | 4655 if (file_chooser_completions_.front()->completion) |
4656 file_chooser_completions_.front()->completion->didChooseFile( | 4656 file_chooser_completions_.front()->completion->didChooseFile( |
4657 selected_files); | 4657 selected_files); |
4658 file_chooser_completions_.pop_front(); | 4658 file_chooser_completions_.pop_front(); |
4659 | 4659 |
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5705 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5705 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5706 return !!RenderThreadImpl::current()->compositor_thread(); | 5706 return !!RenderThreadImpl::current()->compositor_thread(); |
5707 } | 5707 } |
5708 | 5708 |
5709 void RenderViewImpl::OnJavaBridgeInit() { | 5709 void RenderViewImpl::OnJavaBridgeInit() { |
5710 DCHECK(!java_bridge_dispatcher_); | 5710 DCHECK(!java_bridge_dispatcher_); |
5711 #if defined(ENABLE_JAVA_BRIDGE) | 5711 #if defined(ENABLE_JAVA_BRIDGE) |
5712 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5712 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
5713 #endif | 5713 #endif |
5714 } | 5714 } |
OLD | NEW |