| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #ifndef WebDataSource_h | 31 #ifndef WebDataSource_h |
| 32 #define WebDataSource_h | 32 #define WebDataSource_h |
| 33 | 33 |
| 34 #include "../platform/WebCommon.h" | 34 #include "../platform/WebCommon.h" |
| 35 #include "WebNavigationType.h" | 35 #include "WebNavigationType.h" |
| 36 #include "WebTextDirection.h" | 36 #include "WebTextDirection.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 class WebDocumentSubresourceFilter; |
| 40 class WebURL; | 41 class WebURL; |
| 41 class WebURLRequest; | 42 class WebURLRequest; |
| 42 class WebURLResponse; | 43 class WebURLResponse; |
| 43 template <typename T> class WebVector; | 44 template <typename T> class WebVector; |
| 44 | 45 |
| 45 class WebDataSource { | 46 class WebDataSource { |
| 46 public: | 47 public: |
| 47 class ExtraData { | 48 class ExtraData { |
| 48 public: | 49 public: |
| 49 virtual ~ExtraData() { } | 50 virtual ~ExtraData() { } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 virtual void setExtraData(ExtraData*) = 0; | 98 virtual void setExtraData(ExtraData*) = 0; |
| 98 | 99 |
| 99 // Sets the navigation start time for this datasource. Ordinarily, | 100 // Sets the navigation start time for this datasource. Ordinarily, |
| 100 // navigation start is determined in WebCore. But, in some situations, | 101 // navigation start is determined in WebCore. But, in some situations, |
| 101 // the embedder might have a better value and can override it here. This | 102 // the embedder might have a better value and can override it here. This |
| 102 // should be called before WebFrameClient::didCommitProvisionalLoad. | 103 // should be called before WebFrameClient::didCommitProvisionalLoad. |
| 103 // Calling it later may confuse users, because JavaScript may have run and | 104 // Calling it later may confuse users, because JavaScript may have run and |
| 104 // the user may have already recorded the original value. | 105 // the user may have already recorded the original value. |
| 105 virtual void setNavigationStartTime(double) = 0; | 106 virtual void setNavigationStartTime(double) = 0; |
| 106 | 107 |
| 108 // Allows the embedder to inject a filter that will be consulted for each |
| 109 // subsequent subresource load, and gets the final say in deciding whether |
| 110 // or not to allow the load. The passed-in filter object is deleted when the |
| 111 // datasource is destroyed or when a new filter is set. |
| 112 virtual void setSubresourceFilter(WebDocumentSubresourceFilter*) = 0; |
| 113 |
| 107 protected: | 114 protected: |
| 108 ~WebDataSource() { } | 115 ~WebDataSource() { } |
| 109 }; | 116 }; |
| 110 | 117 |
| 111 } // namespace blink | 118 } // namespace blink |
| 112 | 119 |
| 113 #endif | 120 #endif |
| OLD | NEW |