OLD | NEW |
| (Empty) |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "mojo/examples/html_viewer/webstoragenamespace_impl.h" | |
6 | |
7 #include <stdio.h> | |
8 | |
9 #include "third_party/WebKit/public/platform/WebStorageArea.h" | |
10 | |
11 namespace mojo { | |
12 namespace examples { | |
13 namespace { | |
14 | |
15 class DummyWebStorageAreaImpl : public blink::WebStorageArea { | |
16 public: | |
17 virtual unsigned length() { | |
18 return 0; | |
19 } | |
20 virtual blink::WebString key(unsigned index) { | |
21 return blink::WebString(); | |
22 } | |
23 virtual blink::WebString getItem(const blink::WebString& key) { | |
24 return blink::WebString(); | |
25 } | |
26 }; | |
27 | |
28 } // namespace | |
29 | |
30 WebStorageNamespaceImpl::WebStorageNamespaceImpl() { | |
31 } | |
32 | |
33 WebStorageNamespaceImpl::~WebStorageNamespaceImpl() { | |
34 } | |
35 | |
36 blink::WebStorageArea* WebStorageNamespaceImpl::createStorageArea( | |
37 const blink::WebString& origin) { | |
38 return new DummyWebStorageAreaImpl(); | |
39 } | |
40 | |
41 bool WebStorageNamespaceImpl::isSameNamespace( | |
42 const blink::WebStorageNamespace&) const { | |
43 return false; | |
44 } | |
45 | |
46 } // namespace examples | |
47 } // namespace mojo | |
OLD | NEW |