| 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_WEBDATASOURCE_H_ | 5 #ifndef WEBKIT_GLUE_WEBDATASOURCE_H_ |
| 6 #define WEBKIT_GLUE_WEBDATASOURCE_H_ | 6 #define WEBKIT_GLUE_WEBDATASOURCE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 WebNavigationTypeLinkClicked, | 25 WebNavigationTypeLinkClicked, |
| 26 WebNavigationTypeFormSubmitted, | 26 WebNavigationTypeFormSubmitted, |
| 27 WebNavigationTypeBackForward, | 27 WebNavigationTypeBackForward, |
| 28 WebNavigationTypeReload, | 28 WebNavigationTypeReload, |
| 29 WebNavigationTypeFormResubmitted, | 29 WebNavigationTypeFormResubmitted, |
| 30 WebNavigationTypeOther | 30 WebNavigationTypeOther |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 class WebDataSource { | 33 class WebDataSource { |
| 34 public: | 34 public: |
| 35 // A base class for extra data that may be associated with this datasource. |
| 36 // See Set/GetExtraData below. |
| 37 class ExtraData { |
| 38 public: |
| 39 virtual ~ExtraData() {} |
| 40 }; |
| 41 |
| 35 virtual ~WebDataSource() {} | 42 virtual ~WebDataSource() {} |
| 36 | 43 |
| 37 // Returns a reference to the original request data that created the | 44 // Returns a reference to the original request data that created the |
| 38 // datasource. This request will be unmodified by WebKit. | 45 // datasource. This request will be unmodified by WebKit. |
| 39 // | 46 // |
| 40 // Note that this will be a different physical object than the WebRequest | 47 // Note that this will be a different physical object than the WebRequest |
| 41 // that was specified in the load request initiated by the embedder, but the | 48 // that was specified in the load request initiated by the embedder, but the |
| 42 // data members will be copied. | 49 // data members will be copied. |
| 43 // | 50 // |
| 44 // This call will update the request with the latest information from WebKit, | 51 // This call will update the request with the latest information from WebKit, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // Returns the time all dependent resources have been loaded and onload() | 119 // Returns the time all dependent resources have been loaded and onload() |
| 113 // has been called. This corresponds to the DidFinishLoadForFrame delegate | 120 // has been called. This corresponds to the DidFinishLoadForFrame delegate |
| 114 // notification. | 121 // notification. |
| 115 virtual base::Time GetFinishLoadTime() const = 0; | 122 virtual base::Time GetFinishLoadTime() const = 0; |
| 116 | 123 |
| 117 // Returns the first time a layout was performed | 124 // Returns the first time a layout was performed |
| 118 virtual base::Time GetFirstLayoutTime() const = 0; | 125 virtual base::Time GetFirstLayoutTime() const = 0; |
| 119 | 126 |
| 120 // Returns the reason the document was loaded. | 127 // Returns the reason the document was loaded. |
| 121 virtual WebNavigationType GetNavigationType() const = 0; | 128 virtual WebNavigationType GetNavigationType() const = 0; |
| 129 |
| 130 // Extra data associated with this datasource. If non-null, the extra data |
| 131 // pointer will be deleted when the datasource is destroyed. Setting the |
| 132 // extra data pointer will cause any existing non-null extra data pointer to |
| 133 // be deleted. |
| 134 virtual ExtraData* GetExtraData() const = 0; |
| 135 virtual void SetExtraData(ExtraData* extra_data) = 0; |
| 122 }; | 136 }; |
| 123 | 137 |
| 124 #endif // #ifndef WEBKIT_GLUE_WEBDATASOURCE_H_ | 138 #endif // #ifndef WEBKIT_GLUE_WEBDATASOURCE_H_ |
| OLD | NEW |