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

Side by Side Diff: third_party/WebKit/Source/modules/storage/Storage.cpp

Issue 2592823003: Replace the remaining DOMWindowProperty with ContextClient (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 18 matching lines...) Expand all
29 #include "wtf/PassRefPtr.h" 29 #include "wtf/PassRefPtr.h"
30 #include "wtf/text/WTFString.h" 30 #include "wtf/text/WTFString.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 Storage* Storage::create(LocalFrame* frame, StorageArea* storageArea) { 34 Storage* Storage::create(LocalFrame* frame, StorageArea* storageArea) {
35 return new Storage(frame, storageArea); 35 return new Storage(frame, storageArea);
36 } 36 }
37 37
38 Storage::Storage(LocalFrame* frame, StorageArea* storageArea) 38 Storage::Storage(LocalFrame* frame, StorageArea* storageArea)
39 : DOMWindowProperty(frame), m_storageArea(storageArea) { 39 : ContextClient(frame), m_storageArea(storageArea) {
40 DCHECK(frame); 40 DCHECK(frame);
41 DCHECK(m_storageArea); 41 DCHECK(m_storageArea);
42 } 42 }
43 43
44 String Storage::anonymousNamedGetter(const AtomicString& name, 44 String Storage::anonymousNamedGetter(const AtomicString& name,
45 ExceptionState& exceptionState) { 45 ExceptionState& exceptionState) {
46 bool found = contains(name, exceptionState); 46 bool found = contains(name, exceptionState);
47 if (exceptionState.hadException() || !found) 47 if (exceptionState.hadException() || !found)
48 return String(); 48 return String();
49 String result = getItem(name, exceptionState); 49 String result = getItem(name, exceptionState);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 if (name == "length") 95 if (name == "length")
96 return false; 96 return false;
97 bool found = contains(name, exceptionState); 97 bool found = contains(name, exceptionState);
98 if (exceptionState.hadException() || !found) 98 if (exceptionState.hadException() || !found)
99 return false; 99 return false;
100 return true; 100 return true;
101 } 101 }
102 102
103 DEFINE_TRACE(Storage) { 103 DEFINE_TRACE(Storage) {
104 visitor->trace(m_storageArea); 104 visitor->trace(m_storageArea);
105 DOMWindowProperty::trace(visitor); 105 ContextClient::trace(visitor);
106 } 106 }
107 107
108 } // namespace blink 108 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/storage/Storage.h ('k') | third_party/WebKit/Source/web/WebPluginContainerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698