| 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 #ifndef WEBKIT_GLUE_WEBVIEW_H__ | 5 #ifndef WEBKIT_GLUE_WEBVIEW_H__ |
| 6 #define WEBKIT_GLUE_WEBVIEW_H__ | 6 #define WEBKIT_GLUE_WEBVIEW_H__ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 // Focus the first (last if reverse is true) focusable node. | 115 // Focus the first (last if reverse is true) focusable node. |
| 116 virtual void SetInitialFocus(bool reverse) = 0; | 116 virtual void SetInitialFocus(bool reverse) = 0; |
| 117 | 117 |
| 118 // Stores the focused node and clears it if |frame| is the focused frame. | 118 // Stores the focused node and clears it if |frame| is the focused frame. |
| 119 // TODO(jcampan): http://b/issue?id=1157486 this is needed to work-around | 119 // TODO(jcampan): http://b/issue?id=1157486 this is needed to work-around |
| 120 // issues caused by the fix for bug #792423 and should be removed when that | 120 // issues caused by the fix for bug #792423 and should be removed when that |
| 121 // bug is fixed. | 121 // bug is fixed. |
| 122 virtual void StoreFocusForFrame(WebFrame* frame) = 0; | 122 virtual void StoreFocusForFrame(WebFrame* frame) = 0; |
| 123 | 123 |
| 124 // Returns whether or not the focused control needs spell-checking. | |
| 125 // Currently, this function just retrieves the focused node and determines | |
| 126 // whether or not it is a <textarea> element or an element whose | |
| 127 // contenteditable attribute is true. | |
| 128 // TODO(hbono): Bug 740540: This code just implements the default behavior | |
| 129 // proposed in this issue. We should also retrieve "spellcheck" attributes | |
| 130 // for text fields and create a flag to over-write the default behavior. | |
| 131 virtual bool FocusedFrameNeedsSpellchecking() = 0; | |
| 132 | |
| 133 // Requests the webview to download an image. When done, the delegate is | 124 // Requests the webview to download an image. When done, the delegate is |
| 134 // notified by way of DidDownloadImage. Returns true if the request was | 125 // notified by way of DidDownloadImage. Returns true if the request was |
| 135 // successfully started, false otherwise. id is used to uniquely identify the | 126 // successfully started, false otherwise. id is used to uniquely identify the |
| 136 // request and passed back to the DidDownloadImage method. If the image has | 127 // request and passed back to the DidDownloadImage method. If the image has |
| 137 // multiple frames, the frame whose size is image_size is returned. If the | 128 // multiple frames, the frame whose size is image_size is returned. If the |
| 138 // image doesn't have a frame at the specified size, the first is returned. | 129 // image doesn't have a frame at the specified size, the first is returned. |
| 139 virtual bool DownloadImage(int id, const GURL& image_url, int image_size) = 0; | 130 virtual bool DownloadImage(int id, const GURL& image_url, int image_size) = 0; |
| 140 | 131 |
| 141 // Replace the standard setting for the WebView with |preferences|. | 132 // Replace the standard setting for the WebView with |preferences|. |
| 142 virtual void SetPreferences(const WebPreferences& preferences) = 0; | 133 virtual void SetPreferences(const WebPreferences& preferences) = 0; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 int64 node_id, | 192 int64 node_id, |
| 202 const std::vector<std::wstring>& suggestions, | 193 const std::vector<std::wstring>& suggestions, |
| 203 int default_suggestion_index) = 0; | 194 int default_suggestion_index) = 0; |
| 204 | 195 |
| 205 private: | 196 private: |
| 206 DISALLOW_EVIL_CONSTRUCTORS(WebView); | 197 DISALLOW_EVIL_CONSTRUCTORS(WebView); |
| 207 }; | 198 }; |
| 208 | 199 |
| 209 #endif // WEBKIT_GLUE_WEBVIEW_H__ | 200 #endif // WEBKIT_GLUE_WEBVIEW_H__ |
| 210 | 201 |
| OLD | NEW |