| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 class WebString; | 45 class WebString; |
| 46 class WebViewClient; | 46 class WebViewClient; |
| 47 struct WebMediaPlayerAction; | 47 struct WebMediaPlayerAction; |
| 48 struct WebPoint; | 48 struct WebPoint; |
| 49 template <typename T> class WebVector; | 49 template <typename T> class WebVector; |
| 50 | 50 |
| 51 class WebView : public WebWidget { | 51 class WebView : public WebWidget { |
| 52 public: | 52 public: |
| 53 // Initialization ------------------------------------------------------ | 53 // Initialization ------------------------------------------------------ |
| 54 | 54 |
| 55 // FIXME enable this once WebViewDelegate has been eliminated. | 55 // Creates a WebView that is NOT yet initialized. You will need to |
| 56 //WEBKIT_API WebView* create(WebViewClient*); | 56 // call initializeMainFrame to finish the initialization. It is valid |
| 57 // to pass a null WebViewClient pointer. |
| 58 WEBKIT_API static WebView* create(WebViewClient*); |
| 57 | 59 |
| 58 // After creating a WebView, you should immediately call this method. | 60 // After creating a WebView, you should immediately call this method. |
| 59 // You can optionally modify the settings before calling this method. | 61 // You can optionally modify the settings before calling this method. |
| 60 // The WebFrameClient will receive events for the main frame and any | 62 // The WebFrameClient will receive events for the main frame and any |
| 61 // child frames. | 63 // child frames. It is valid to pass a null WebFrameClient pointer. |
| 62 virtual void initializeMainFrame(WebFrameClient*) = 0; | 64 virtual void initializeMainFrame(WebFrameClient*) = 0; |
| 63 | 65 |
| 64 | 66 |
| 65 // Options ------------------------------------------------------------- | 67 // Options ------------------------------------------------------------- |
| 66 | 68 |
| 67 // The returned pointer is valid for the lifetime of the WebView. | 69 // The returned pointer is valid for the lifetime of the WebView. |
| 68 virtual WebSettings* settings() = 0; | 70 virtual WebSettings* settings() = 0; |
| 69 | 71 |
| 70 // Corresponds to the encoding of the main frame. Setting the page | 72 // Corresponds to the encoding of the main frame. Setting the page |
| 71 // encoding may cause the main frame to reload. | 73 // encoding may cause the main frame to reload. |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 // Notifies the WebView that autofill suggestions are available for a node. | 220 // Notifies the WebView that autofill suggestions are available for a node. |
| 219 virtual void applyAutofillSuggestions( | 221 virtual void applyAutofillSuggestions( |
| 220 const WebNode&, | 222 const WebNode&, |
| 221 const WebVector<WebString>& suggestions, | 223 const WebVector<WebString>& suggestions, |
| 222 int defaultSuggestionIndex) = 0; | 224 int defaultSuggestionIndex) = 0; |
| 223 | 225 |
| 224 // Hides the autofill popup if any are showing. | 226 // Hides the autofill popup if any are showing. |
| 225 virtual void hideAutofillPopup() = 0; | 227 virtual void hideAutofillPopup() = 0; |
| 226 | 228 |
| 227 | 229 |
| 228 // FIXME what about: | 230 // Visited link state -------------------------------------------------- |
| 229 // GetDelegate | 231 |
| 230 // AutofillSuggestionsForNode | 232 // Tells all WebView instances to update the visited link state for the |
| 231 // HideAutofillPopup | 233 // specified hash. |
| 234 WEBKIT_API static void updateVisitedLinkState(unsigned long long hash); |
| 235 |
| 236 // Tells all WebView instances to update the visited state for all |
| 237 // their links. |
| 238 WEBKIT_API static void resetVisitedLinkState(); |
| 239 |
| 232 | 240 |
| 233 protected: | 241 protected: |
| 234 ~WebView() {} | 242 ~WebView() {} |
| 235 }; | 243 }; |
| 236 | 244 |
| 237 } // namespace WebKit | 245 } // namespace WebKit |
| 238 | 246 |
| 239 #endif | 247 #endif |
| OLD | NEW |