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 20 matching lines...) Expand all Loading... |
31 #ifndef WebStorageNamespace_h | 31 #ifndef WebStorageNamespace_h |
32 #define WebStorageNamespace_h | 32 #define WebStorageNamespace_h |
33 | 33 |
34 #include "WebCommon.h" | 34 #include "WebCommon.h" |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 class WebStorageArea; | 38 class WebStorageArea; |
39 class WebString; | 39 class WebString; |
40 | 40 |
41 // WebStorageNamespace represents a collection of StorageAreas. Typically, you'l
l have | 41 // WebStorageNamespace represents a collection of StorageAreas. Typically, |
42 // multiple StorageNamespaces to represent the SessionStorage for each tab and a
single | 42 // you'll have multiple StorageNamespaces to represent the SessionStorage for |
43 // StorageNamespace to represent LocalStorage for the entire browser. | 43 // each tab and a single StorageNamespace to represent LocalStorage for the |
| 44 // entire browser. |
44 class WebStorageNamespace { | 45 class WebStorageNamespace { |
45 public: | 46 public: |
46 virtual ~WebStorageNamespace() {} | 47 virtual ~WebStorageNamespace() {} |
47 | 48 |
48 // Create a new WebStorageArea object. Two subsequent calls with the same orig
in | 49 // Create a new WebStorageArea object. Two subsequent calls with the same |
49 // will return two different WebStorageArea objects that share the same backin
g store. | 50 // origin will return two different WebStorageArea objects that share the same |
50 // You should call delete on the returned object when you're finished. | 51 // backing store. You should call delete on the returned object when you're |
| 52 // finished. |
51 virtual WebStorageArea* createStorageArea(const WebString& origin) = 0; | 53 virtual WebStorageArea* createStorageArea(const WebString& origin) = 0; |
52 | 54 |
53 // Returns true of the two instances represent the same storage namespace. | 55 // Returns true of the two instances represent the same storage namespace. |
54 virtual bool isSameNamespace(const WebStorageNamespace&) const { | 56 virtual bool isSameNamespace(const WebStorageNamespace&) const { |
55 return false; | 57 return false; |
56 } | 58 } |
57 }; | 59 }; |
58 | 60 |
59 } // namespace blink | 61 } // namespace blink |
60 | 62 |
61 #endif // WebStorageNamespace_h | 63 #endif // WebStorageNamespace_h |
OLD | NEW |