Chromium Code Reviews| 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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 338 // Notifies the delegate of a DOMContentLoaded event. | 338 // Notifies the delegate of a DOMContentLoaded event. |
| 339 // This is called when the html resource has been loaded, but | 339 // This is called when the html resource has been loaded, but |
| 340 // not necessarily all subresources (images, stylesheets). So, this is called | 340 // not necessarily all subresources (images, stylesheets). So, this is called |
| 341 // before DidFinishLoadForFrame. | 341 // before DidFinishLoadForFrame. |
| 342 virtual void DidFinishDocumentLoadForFrame(WebView* webview, WebFrame* frame) { | 342 virtual void DidFinishDocumentLoadForFrame(WebView* webview, WebFrame* frame) { |
| 343 } | 343 } |
| 344 | 344 |
| 345 // This method is called when we load a resource from an in-memory cache. | 345 // This method is called when we load a resource from an in-memory cache. |
| 346 // A return value of |false| indicates the load should proceed, but WebCore | 346 // A return value of |false| indicates the load should proceed, but WebCore |
| 347 // appears to largely ignore the return value. | 347 // appears to largely ignore the return value. |
| 348 virtual bool DidLoadResourceFromMemoryCache(WebView* webview, | 348 virtual bool DidLoadResourceFromMemoryCache( |
| 349 const WebRequest& request, | 349 WebView* webview, |
| 350 const WebResponse& response, | 350 const WebRequest& request, |
| 351 WebFrame* frame) { | 351 const WebResponse& response, |
| 352 WebFrame* frame, | |
| 353 const std::string& frame_origin, | |
|
jcampan
2009/03/16 18:43:54
Would it make sense to make the frame origins gett
abarth-chromium
2009/03/16 21:34:21
I'm not sure that makes sense. It's not really a
| |
| 354 const std::string& main_frame_origin) { | |
| 352 return false; | 355 return false; |
| 353 } | 356 } |
| 354 | 357 |
| 355 // This is called after javascript onload handlers have been fired. | 358 // This is called after javascript onload handlers have been fired. |
| 356 virtual void DidHandleOnloadEventsForFrame(WebView* webview, WebFrame* frame) { | 359 virtual void DidHandleOnloadEventsForFrame(WebView* webview, WebFrame* frame) { |
| 357 } | 360 } |
| 358 | 361 |
| 359 // This method is called when anchors within a page have been clicked. | 362 // This method is called when anchors within a page have been clicked. |
| 360 // It is very similar to DidCommitLoadForFrame. | 363 // It is very similar to DidCommitLoadForFrame. |
| 361 virtual void DidChangeLocationWithinPageForFrame(WebView* webview, | 364 virtual void DidChangeLocationWithinPageForFrame(WebView* webview, |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 773 virtual void DidAddHistoryItem() { } | 776 virtual void DidAddHistoryItem() { } |
| 774 | 777 |
| 775 WebViewDelegate() { } | 778 WebViewDelegate() { } |
| 776 virtual ~WebViewDelegate() { } | 779 virtual ~WebViewDelegate() { } |
| 777 | 780 |
| 778 private: | 781 private: |
| 779 DISALLOW_COPY_AND_ASSIGN(WebViewDelegate); | 782 DISALLOW_COPY_AND_ASSIGN(WebViewDelegate); |
| 780 }; | 783 }; |
| 781 | 784 |
| 782 #endif // WEBKIT_GLUE_WEBVIEW_DELEGATE_H_ | 785 #endif // WEBKIT_GLUE_WEBVIEW_DELEGATE_H_ |
| OLD | NEW |