Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: Source/web/StorageNamespaceProxy.cpp

Issue 22955006: Chrome::client() should return a ChromeClient reference. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/PopupContainer.cpp ('k') | Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 { 46 {
47 ASSERT(isMainThread()); 47 ASSERT(isMainThread());
48 static WebKit::WebStorageNamespace* localStorageNamespace = 0; 48 static WebKit::WebStorageNamespace* localStorageNamespace = 0;
49 if (!localStorageNamespace) 49 if (!localStorageNamespace)
50 localStorageNamespace = WebKit::Platform::current()->createLocalStorageN amespace(); 50 localStorageNamespace = WebKit::Platform::current()->createLocalStorageN amespace();
51 return adoptPtr(new StorageAreaProxy(adoptPtr(localStorageNamespace->createS torageArea(origin->toString())), LocalStorage)); 51 return adoptPtr(new StorageAreaProxy(adoptPtr(localStorageNamespace->createS torageArea(origin->toString())), LocalStorage));
52 } 52 }
53 53
54 PassOwnPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace(Page* pag e) 54 PassOwnPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace(Page* pag e)
55 { 55 {
56 WebKit::WebViewClient* webViewClient = static_cast<WebKit::WebViewImpl*>(pag e->chrome().client()->webView())->client(); 56 WebKit::WebViewClient* webViewClient = WebKit::WebViewImpl::fromPage(page)-> client();
57 return adoptPtr(new StorageNamespaceProxy(adoptPtr(webViewClient->createSess ionStorageNamespace()))); 57 return adoptPtr(new StorageNamespaceProxy(adoptPtr(webViewClient->createSess ionStorageNamespace())));
58 } 58 }
59 59
60 StorageNamespaceProxy::StorageNamespaceProxy(PassOwnPtr<WebKit::WebStorageNamesp ace> storageNamespace) 60 StorageNamespaceProxy::StorageNamespaceProxy(PassOwnPtr<WebKit::WebStorageNamesp ace> storageNamespace)
61 : m_storageNamespace(storageNamespace) 61 : m_storageNamespace(storageNamespace)
62 { 62 {
63 } 63 }
64 64
65 StorageNamespaceProxy::~StorageNamespaceProxy() 65 StorageNamespaceProxy::~StorageNamespaceProxy()
66 { 66 {
67 } 67 }
68 68
69 PassOwnPtr<StorageArea> StorageNamespaceProxy::storageArea(SecurityOrigin* origi n) 69 PassOwnPtr<StorageArea> StorageNamespaceProxy::storageArea(SecurityOrigin* origi n)
70 { 70 {
71 return adoptPtr(new StorageAreaProxy(adoptPtr(m_storageNamespace->createStor ageArea(origin->toString())), SessionStorage)); 71 return adoptPtr(new StorageAreaProxy(adoptPtr(m_storageNamespace->createStor ageArea(origin->toString())), SessionStorage));
72 } 72 }
73 73
74 bool StorageNamespaceProxy::isSameNamespace(const WebKit::WebStorageNamespace& s essionNamespace) 74 bool StorageNamespaceProxy::isSameNamespace(const WebKit::WebStorageNamespace& s essionNamespace)
75 { 75 {
76 return m_storageNamespace && m_storageNamespace->isSameNamespace(sessionName space); 76 return m_storageNamespace && m_storageNamespace->isSameNamespace(sessionName space);
77 } 77 }
78 78
79 } // namespace WebCore 79 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/web/PopupContainer.cpp ('k') | Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698