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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 // Called to determine if drag-n-drop operations may initiate a page | 170 // Called to determine if drag-n-drop operations may initiate a page |
171 // navigation. | 171 // navigation. |
172 virtual bool acceptsLoadDrops() { return true; } | 172 virtual bool acceptsLoadDrops() { return true; } |
173 | 173 |
174 // Take focus away from the WebView by focusing an adjacent UI element | 174 // Take focus away from the WebView by focusing an adjacent UI element |
175 // in the containing window. | 175 // in the containing window. |
176 virtual void focusNext() {} | 176 virtual void focusNext() {} |
177 virtual void focusPrevious() {} | 177 virtual void focusPrevious() {} |
178 | 178 |
179 // Called when a new node gets focused. |fromNode| is the previously focused n
ode, |toNode| | 179 // Called when a new node gets focused. |fromNode| is the previously focused |
180 // is the newly focused node. Either can be null. | 180 // node, |toNode| is the newly focused node. Either can be null. |
181 virtual void focusedNodeChanged(const WebNode& fromNode, | 181 virtual void focusedNodeChanged(const WebNode& fromNode, |
182 const WebNode& toNode) {} | 182 const WebNode& toNode) {} |
183 | 183 |
184 // Indicates two things: | 184 // Indicates two things: |
185 // 1) This view may have a new layout now. | 185 // 1) This view may have a new layout now. |
186 // 2) Calling layout() is a no-op. | 186 // 2) Calling layout() is a no-op. |
187 // After calling WebWidget::layout(), expect to get this notification | 187 // After calling WebWidget::layout(), expect to get this notification |
188 // unless the view did not need a layout. | 188 // unless the view did not need a layout. |
189 virtual void didUpdateLayout() {} | 189 virtual void didUpdateLayout() {} |
190 | 190 |
191 // Return true to swallow the input event if the embedder will start a disambi
guation popup | 191 // Return true to swallow the input event if the embedder will start a |
| 192 // disambiguation popup |
192 virtual bool didTapMultipleTargets(const WebSize& visualViewportOffset, | 193 virtual bool didTapMultipleTargets(const WebSize& visualViewportOffset, |
193 const WebRect& touchRect, | 194 const WebRect& touchRect, |
194 const WebVector<WebRect>& targetRects) { | 195 const WebVector<WebRect>& targetRects) { |
195 return false; | 196 return false; |
196 } | 197 } |
197 | 198 |
198 // Returns comma separated list of accept languages. | 199 // Returns comma separated list of accept languages. |
199 virtual WebString acceptLanguages() { return WebString(); } | 200 virtual WebString acceptLanguages() { return WebString(); } |
200 | 201 |
201 // Called when the View has changed size as a result of an auto-resize. | 202 // Called when the View has changed size as a result of an auto-resize. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 // (e.g., email addresses, phone numbers). | 255 // (e.g., email addresses, phone numbers). |
255 virtual WebURL detectContentIntentAt(const WebHitTestResult&) { | 256 virtual WebURL detectContentIntentAt(const WebHitTestResult&) { |
256 return WebURL(); | 257 return WebURL(); |
257 } | 258 } |
258 | 259 |
259 // Schedules a new content intent with the provided url. | 260 // Schedules a new content intent with the provided url. |
260 // The boolean flag is set to true when the user gesture has been applied | 261 // The boolean flag is set to true when the user gesture has been applied |
261 // to the element from the main frame. | 262 // to the element from the main frame. |
262 virtual void scheduleContentIntent(const WebURL&, bool isMainFrame) {} | 263 virtual void scheduleContentIntent(const WebURL&, bool isMainFrame) {} |
263 | 264 |
264 // Cancels any previously scheduled content intents that have not yet launched
. | 265 // Cancels any previously scheduled content intents that have not yet |
| 266 // launched. |
265 virtual void cancelScheduledContentIntents() {} | 267 virtual void cancelScheduledContentIntents() {} |
266 | 268 |
267 // Draggable regions ---------------------------------------------------- | 269 // Draggable regions ---------------------------------------------------- |
268 | 270 |
269 // Informs the browser that the draggable regions have been updated. | 271 // Informs the browser that the draggable regions have been updated. |
270 virtual void draggableRegionsChanged() {} | 272 virtual void draggableRegionsChanged() {} |
271 | 273 |
272 // TODO(lfg): These methods are only exposed through WebViewClient while we | 274 // TODO(lfg): These methods are only exposed through WebViewClient while we |
273 // refactor WebView to not inherit from WebWidget. | 275 // refactor WebView to not inherit from WebWidget. |
274 // WebWidgetClient overrides. | 276 // WebWidgetClient overrides. |
(...skipping 18 matching lines...) Expand all Loading... |
293 void show(WebNavigationPolicy) override {} | 295 void show(WebNavigationPolicy) override {} |
294 virtual WebWidgetClient* widgetClient() { return this; } | 296 virtual WebWidgetClient* widgetClient() { return this; } |
295 | 297 |
296 protected: | 298 protected: |
297 ~WebViewClient() {} | 299 ~WebViewClient() {} |
298 }; | 300 }; |
299 | 301 |
300 } // namespace blink | 302 } // namespace blink |
301 | 303 |
302 #endif | 304 #endif |
OLD | NEW |