| 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 // WebCore provides hooks for several kinds of functionality, allowing separate | 5 // WebCore provides hooks for several kinds of functionality, allowing separate |
| 6 // classes termed "delegates" to receive notifications (in the form of direct | 6 // classes termed "delegates" to receive notifications (in the form of direct |
| 7 // function calls) when certain events are about to occur or have just occurred. | 7 // function calls) when certain events are about to occur or have just occurred. |
| 8 // In some cases, the delegate implements the needed functionality; in others, | 8 // In some cases, the delegate implements the needed functionality; in others, |
| 9 // the delegate has some control over the behavior but doesn't actually | 9 // the delegate has some control over the behavior but doesn't actually |
| 10 // implement it. For example, the UI delegate is responsible for showing a | 10 // implement it. For example, the UI delegate is responsible for showing a |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 // if the node is not a link, the URL will be an empty GURL. | 550 // if the node is not a link, the URL will be an empty GURL. |
| 551 virtual void UpdateTargetURL(WebView* webview, | 551 virtual void UpdateTargetURL(WebView* webview, |
| 552 const GURL& url) { | 552 const GURL& url) { |
| 553 } | 553 } |
| 554 | 554 |
| 555 // Called to display a file chooser prompt. The prompt should be pre- | 555 // Called to display a file chooser prompt. The prompt should be pre- |
| 556 // populated with the given initial_filename string. The WebViewDelegate | 556 // populated with the given initial_filename string. The WebViewDelegate |
| 557 // will own the WebFileChooserCallback object and is responsible for | 557 // will own the WebFileChooserCallback object and is responsible for |
| 558 // freeing it. | 558 // freeing it. |
| 559 virtual void RunFileChooser(bool multi_select, | 559 virtual void RunFileChooser(bool multi_select, |
| 560 const std::wstring& title, | 560 const string16& title, |
| 561 const std::wstring& initial_filename, | 561 const FilePath& initial_filename, |
| 562 const std::wstring& filter, | |
| 563 WebFileChooserCallback* file_chooser) { | 562 WebFileChooserCallback* file_chooser) { |
| 564 delete file_chooser; | 563 delete file_chooser; |
| 565 } | 564 } |
| 566 | 565 |
| 567 // @abstract Shows a context menu with commands relevant to a specific | 566 // @abstract Shows a context menu with commands relevant to a specific |
| 568 // element on the current page. | 567 // element on the current page. |
| 569 // @param webview The WebView sending the delegate method. | 568 // @param webview The WebView sending the delegate method. |
| 570 // @param node The node(s) the context menu is being invoked on | 569 // @param node The node(s) the context menu is being invoked on |
| 571 // @param x The x position of the mouse pointer (relative to the webview) | 570 // @param x The x position of the mouse pointer (relative to the webview) |
| 572 // @param y The y position of the mouse pointer (relative to the webview) | 571 // @param y The y position of the mouse pointer (relative to the webview) |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 virtual void DidAddHistoryItem() { } | 792 virtual void DidAddHistoryItem() { } |
| 794 | 793 |
| 795 WebViewDelegate() { } | 794 WebViewDelegate() { } |
| 796 virtual ~WebViewDelegate() { } | 795 virtual ~WebViewDelegate() { } |
| 797 | 796 |
| 798 private: | 797 private: |
| 799 DISALLOW_COPY_AND_ASSIGN(WebViewDelegate); | 798 DISALLOW_COPY_AND_ASSIGN(WebViewDelegate); |
| 800 }; | 799 }; |
| 801 | 800 |
| 802 #endif // WEBKIT_GLUE_WEBVIEW_DELEGATE_H_ | 801 #endif // WEBKIT_GLUE_WEBVIEW_DELEGATE_H_ |
| OLD | NEW |