OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/browser/in_process_webkit/browser_webkitplatformsupport_impl.h
" | 5 #include "content/browser/in_process_webkit/browser_webkitplatformsupport_impl.h
" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 9 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
10 #include "content/browser/in_process_webkit/dom_storage_message_filter.h" | |
11 #include "content/browser/in_process_webkit/indexed_db_key_utility_client.h" | 10 #include "content/browser/in_process_webkit/indexed_db_key_utility_client.h" |
12 #include "content/common/indexed_db/indexed_db_key.h" | 11 #include "content/common/indexed_db/indexed_db_key.h" |
13 #include "content/public/common/serialized_script_value.h" | 12 #include "content/public/common/serialized_script_value.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerialize
dScriptValue.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSerialize
dScriptValue.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" |
18 #include "webkit/glue/webkit_glue.h" | 17 #include "webkit/glue/webkit_glue.h" |
19 | 18 |
20 BrowserWebKitPlatformSupportImpl::BrowserWebKitPlatformSupportImpl() { | 19 BrowserWebKitPlatformSupportImpl::BrowserWebKitPlatformSupportImpl() { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 WebKit::WebPluginListBuilder* builder) { | 108 WebKit::WebPluginListBuilder* builder) { |
110 NOTREACHED(); | 109 NOTREACHED(); |
111 } | 110 } |
112 | 111 |
113 WebKit::WebData BrowserWebKitPlatformSupportImpl::loadResource( | 112 WebKit::WebData BrowserWebKitPlatformSupportImpl::loadResource( |
114 const char* name) { | 113 const char* name) { |
115 NOTREACHED(); | 114 NOTREACHED(); |
116 return WebKit::WebData(); | 115 return WebKit::WebData(); |
117 } | 116 } |
118 | 117 |
119 WebKit::WebStorageNamespace* | |
120 BrowserWebKitPlatformSupportImpl::createLocalStorageNamespace( | |
121 const WebKit::WebString& path, unsigned quota) { | |
122 // The "WebStorage" interface is used for renderer WebKit -> browser WebKit | |
123 // communication only. "WebStorageClient" will be used for browser WebKit -> | |
124 // renderer WebKit. So this will never be implemented. | |
125 NOTREACHED(); | |
126 return 0; | |
127 } | |
128 | |
129 void BrowserWebKitPlatformSupportImpl::dispatchStorageEvent( | |
130 const WebKit::WebString& key, const WebKit::WebString& old_value, | |
131 const WebKit::WebString& new_value, const WebKit::WebString& origin, | |
132 const WebKit::WebURL& url, bool is_local_storage) { | |
133 #ifdef ENABLE_NEW_DOM_STORAGE_BACKEND | |
134 NOTREACHED(); | |
135 #else | |
136 // TODO(jorlow): Implement | |
137 if (!is_local_storage) | |
138 return; | |
139 | |
140 DOMStorageMessageFilter::DispatchStorageEvent(key, old_value, new_value, | |
141 origin, url, is_local_storage); | |
142 #endif | |
143 } | |
144 | |
145 WebKit::WebSharedWorkerRepository* | 118 WebKit::WebSharedWorkerRepository* |
146 BrowserWebKitPlatformSupportImpl::sharedWorkerRepository() { | 119 BrowserWebKitPlatformSupportImpl::sharedWorkerRepository() { |
147 NOTREACHED(); | 120 NOTREACHED(); |
148 return NULL; | 121 return NULL; |
149 } | 122 } |
150 | 123 |
151 int BrowserWebKitPlatformSupportImpl::databaseDeleteFile( | 124 int BrowserWebKitPlatformSupportImpl::databaseDeleteFile( |
152 const WebKit::WebString& vfs_file_name, bool sync_dir) { | 125 const WebKit::WebString& vfs_file_name, bool sync_dir) { |
153 const FilePath path = webkit_glue::WebStringToFilePath(vfs_file_name); | 126 const FilePath path = webkit_glue::WebStringToFilePath(vfs_file_name); |
154 return file_util::Delete(path, false) ? 0 : 1; | 127 return file_util::Delete(path, false) ? 0 : 1; |
(...skipping 24 matching lines...) Expand all Loading... |
179 const WebKit::WebIDBKey& key, const WebKit::WebSerializedScriptValue& value, | 152 const WebKit::WebIDBKey& key, const WebKit::WebSerializedScriptValue& value, |
180 const WebKit::WebString& keyPath) { | 153 const WebKit::WebString& keyPath) { |
181 return IndexedDBKeyUtilityClient::InjectIDBKeyIntoSerializedValue( | 154 return IndexedDBKeyUtilityClient::InjectIDBKeyIntoSerializedValue( |
182 IndexedDBKey(key), content::SerializedScriptValue(value), keyPath); | 155 IndexedDBKey(key), content::SerializedScriptValue(value), keyPath); |
183 } | 156 } |
184 | 157 |
185 GpuChannelHostFactory* | 158 GpuChannelHostFactory* |
186 BrowserWebKitPlatformSupportImpl::GetGpuChannelHostFactory() { | 159 BrowserWebKitPlatformSupportImpl::GetGpuChannelHostFactory() { |
187 return content::BrowserGpuChannelHostFactory::instance(); | 160 return content::BrowserGpuChannelHostFactory::instance(); |
188 } | 161 } |
OLD | NEW |