| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 | 8 |
| 9 MSVC_PUSH_WARNING_LEVEL(0); | 9 MSVC_PUSH_WARNING_LEVEL(0); |
| 10 #include "Cursor.h" | 10 #include "Cursor.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 using WebKit::WebMouseEvent; | 45 using WebKit::WebMouseEvent; |
| 46 | 46 |
| 47 // Callback class that's given to the WebViewDelegate during a file choose | 47 // Callback class that's given to the WebViewDelegate during a file choose |
| 48 // operation. | 48 // operation. |
| 49 class WebFileChooserCallbackImpl : public WebFileChooserCallback { | 49 class WebFileChooserCallbackImpl : public WebFileChooserCallback { |
| 50 public: | 50 public: |
| 51 WebFileChooserCallbackImpl(PassRefPtr<WebCore::FileChooser> file_chooser) | 51 WebFileChooserCallbackImpl(PassRefPtr<WebCore::FileChooser> file_chooser) |
| 52 : file_chooser_(file_chooser) { | 52 : file_chooser_(file_chooser) { |
| 53 } | 53 } |
| 54 | 54 |
| 55 void OnFileChoose(const std::vector<std::wstring>& file_names) { | 55 virtual void OnFileChoose(const std::vector<FilePath>& file_names) { |
| 56 if (file_names.empty()) { | 56 if (file_names.empty()) { |
| 57 file_chooser_->chooseFile(WebCore::String("")); | 57 file_chooser_->chooseFile(WebCore::String("")); |
| 58 } else if (file_names.size() == 1) { | 58 } else if (file_names.size() == 1) { |
| 59 file_chooser_->chooseFile( | 59 file_chooser_->chooseFile( |
| 60 webkit_glue::StdWStringToString(file_names.front())); | 60 webkit_glue::FilePathStringToString(file_names.front().value())); |
| 61 } else { | 61 } else { |
| 62 Vector<WebCore::String> paths; | 62 Vector<WebCore::String> paths; |
| 63 for (std::vector<std::wstring>::const_iterator filename = | 63 for (std::vector<FilePath>::const_iterator filename = |
| 64 file_names.begin(); filename != file_names.end(); ++filename) { | 64 file_names.begin(); filename != file_names.end(); ++filename) { |
| 65 paths.append(webkit_glue::StdWStringToString(*filename)); | 65 paths.append(webkit_glue::FilePathStringToString((*filename).value())); |
| 66 } | 66 } |
| 67 file_chooser_->chooseFiles(paths); | 67 file_chooser_->chooseFiles(paths); |
| 68 } | 68 } |
| 69 } | 69 } |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 RefPtr<WebCore::FileChooser> file_chooser_; | 72 RefPtr<WebCore::FileChooser> file_chooser_; |
| 73 DISALLOW_COPY_AND_ASSIGN(WebFileChooserCallbackImpl); | 73 DISALLOW_COPY_AND_ASSIGN(WebFileChooserCallbackImpl); |
| 74 }; | 74 }; |
| 75 | 75 |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 WebViewDelegate* delegate = webview_->delegate(); | 602 WebViewDelegate* delegate = webview_->delegate(); |
| 603 if (delegate) | 603 if (delegate) |
| 604 delegate->DisableSuddenTermination(); | 604 delegate->DisableSuddenTermination(); |
| 605 } | 605 } |
| 606 | 606 |
| 607 void ChromeClientImpl::formStateDidChange(const WebCore::Node*) { | 607 void ChromeClientImpl::formStateDidChange(const WebCore::Node*) { |
| 608 WebViewDelegate* delegate = webview_->delegate(); | 608 WebViewDelegate* delegate = webview_->delegate(); |
| 609 if (delegate) | 609 if (delegate) |
| 610 delegate->OnNavStateChanged(webview_); | 610 delegate->OnNavStateChanged(webview_); |
| 611 } | 611 } |
| OLD | NEW |