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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 namespace WebCore { | 43 namespace WebCore { |
44 | 44 |
45 PassRefPtr<StorageNamespace> StorageNamespace::localStorageNamespace(const Strin
g& path, unsigned quota) | 45 PassRefPtr<StorageNamespace> StorageNamespace::localStorageNamespace(const Strin
g& path, unsigned quota) |
46 { | 46 { |
47 return adoptRef(new StorageNamespaceProxy(WebKit::webKitClient()->createLoca
lStorageNamespace(path, quota), LocalStorage)); | 47 return adoptRef(new StorageNamespaceProxy(WebKit::webKitClient()->createLoca
lStorageNamespace(path, quota), LocalStorage)); |
48 } | 48 } |
49 | 49 |
50 PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace(Page* pag
e, unsigned quota) | 50 PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace(Page* pag
e, unsigned quota) |
51 { | 51 { |
52 WebKit::ChromeClientImpl* chromeClientImpl = static_cast<WebKit::ChromeClien
tImpl*>(page->chrome()->client()); | 52 WebKit::WebViewClient* webViewClient = static_cast<WebKit::WebViewImpl*>(pag
e->chrome()->client()->webView())->client(); |
53 WebKit::WebViewClient* webViewClient = chromeClientImpl->webView()->client()
; | |
54 return adoptRef(new StorageNamespaceProxy(webViewClient->createSessionStorag
eNamespace(quota), SessionStorage)); | 53 return adoptRef(new StorageNamespaceProxy(webViewClient->createSessionStorag
eNamespace(quota), SessionStorage)); |
55 } | 54 } |
56 | 55 |
57 StorageNamespaceProxy::StorageNamespaceProxy(WebKit::WebStorageNamespace* storag
eNamespace, StorageType storageType) | 56 StorageNamespaceProxy::StorageNamespaceProxy(WebKit::WebStorageNamespace* storag
eNamespace, StorageType storageType) |
58 : m_storageNamespace(storageNamespace) | 57 : m_storageNamespace(storageNamespace) |
59 , m_storageType(storageType) | 58 , m_storageType(storageType) |
60 { | 59 { |
61 } | 60 } |
62 | 61 |
63 StorageNamespaceProxy::~StorageNamespaceProxy() | 62 StorageNamespaceProxy::~StorageNamespaceProxy() |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 } | 102 } |
104 | 103 |
105 void StorageNamespaceProxy::sync() | 104 void StorageNamespaceProxy::sync() |
106 { | 105 { |
107 ASSERT_NOT_REACHED(); | 106 ASSERT_NOT_REACHED(); |
108 } | 107 } |
109 | 108 |
110 } // namespace WebCore | 109 } // namespace WebCore |
111 | 110 |
112 #endif // ENABLE(DOM_STORAGE) | 111 #endif // ENABLE(DOM_STORAGE) |
OLD | NEW |