OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // LICENSE file. |
4 | 4 |
5 #include "chrome/renderer/renderer_webkitclient_impl.h" | 5 #include "chrome/renderer/renderer_webkitclient_impl.h" |
6 | 6 |
7 #if defined(USE_SYSTEM_SQLITE) | 7 #if defined(USE_SYSTEM_SQLITE) |
8 #include <sqlite3.h> | 8 #include <sqlite3.h> |
9 #else | 9 #else |
10 #include "third_party/sqlite/preprocessed/sqlite3.h" | 10 #include "third_party/sqlite/preprocessed/sqlite3.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 thread->Send(new ViewHostMsg_SuddenTerminationChanged(enabled)); | 198 thread->Send(new ViewHostMsg_SuddenTerminationChanged(enabled)); |
199 } | 199 } |
200 | 200 |
201 WebStorageNamespace* RendererWebKitClientImpl::createLocalStorageNamespace( | 201 WebStorageNamespace* RendererWebKitClientImpl::createLocalStorageNamespace( |
202 const WebString& path, unsigned quota) { | 202 const WebString& path, unsigned quota) { |
203 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) | 203 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) |
204 return WebStorageNamespace::createLocalStorageNamespace(path, quota); | 204 return WebStorageNamespace::createLocalStorageNamespace(path, quota); |
205 return new RendererWebStorageNamespaceImpl(DOM_STORAGE_LOCAL); | 205 return new RendererWebStorageNamespaceImpl(DOM_STORAGE_LOCAL); |
206 } | 206 } |
207 | 207 |
208 WebStorageNamespace* RendererWebKitClientImpl::createSessionStorageNamespace() { | |
209 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) | |
210 return WebStorageNamespace::createSessionStorageNamespace(); | |
211 return new RendererWebStorageNamespaceImpl(DOM_STORAGE_SESSION); | |
212 } | |
213 | |
214 void RendererWebKitClientImpl::dispatchStorageEvent( | 208 void RendererWebKitClientImpl::dispatchStorageEvent( |
215 const WebString& key, const WebString& old_value, | 209 const WebString& key, const WebString& old_value, |
216 const WebString& new_value, const WebString& origin, | 210 const WebString& new_value, const WebString& origin, |
217 const WebKit::WebURL& url, bool is_local_storage) { | 211 const WebKit::WebURL& url, bool is_local_storage) { |
218 DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)); | 212 DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)); |
219 // Inefficient, but only used in single process mode. | 213 // Inefficient, but only used in single process mode. |
220 scoped_ptr<WebStorageEventDispatcher> event_dispatcher( | 214 scoped_ptr<WebStorageEventDispatcher> event_dispatcher( |
221 WebStorageEventDispatcher::create()); | 215 WebStorageEventDispatcher::create()); |
222 event_dispatcher->dispatchStorageEvent(key, old_value, new_value, origin, | 216 event_dispatcher->dispatchStorageEvent(key, old_value, new_value, origin, |
223 url, is_local_storage); | 217 url, is_local_storage); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 const WebKit::WebString& challenge, | 378 const WebKit::WebString& challenge, |
385 const WebKit::WebURL& url) { | 379 const WebKit::WebURL& url) { |
386 std::string signed_public_key; | 380 std::string signed_public_key; |
387 RenderThread::current()->Send(new ViewHostMsg_Keygen( | 381 RenderThread::current()->Send(new ViewHostMsg_Keygen( |
388 static_cast<uint32>(key_size_index), | 382 static_cast<uint32>(key_size_index), |
389 challenge.utf8(), | 383 challenge.utf8(), |
390 GURL(url), | 384 GURL(url), |
391 &signed_public_key)); | 385 &signed_public_key)); |
392 return WebString::fromUTF8(signed_public_key); | 386 return WebString::fromUTF8(signed_public_key); |
393 } | 387 } |
OLD | NEW |