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

Side by Side Diff: third_party/WebKit/Source/modules/quota/DOMWindowQuota.cpp

Issue 2598463004: Replace DOMWindowProperty in DOMWindow's supplements with ContextClient (Closed)
Patch Set: Created 3 years, 12 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 20 matching lines...) Expand all
31 #include "modules/quota/DOMWindowQuota.h" 31 #include "modules/quota/DOMWindowQuota.h"
32 32
33 #include "core/frame/LocalDOMWindow.h" 33 #include "core/frame/LocalDOMWindow.h"
34 #include "core/frame/LocalFrame.h" 34 #include "core/frame/LocalFrame.h"
35 #include "modules/quota/DeprecatedStorageInfo.h" 35 #include "modules/quota/DeprecatedStorageInfo.h"
36 #include "wtf/PassRefPtr.h" 36 #include "wtf/PassRefPtr.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 DOMWindowQuota::DOMWindowQuota(LocalDOMWindow& window) 40 DOMWindowQuota::DOMWindowQuota(LocalDOMWindow& window)
41 : DOMWindowProperty(window.frame()) {} 41 : ContextClient(window.frame()) {}
42 42
43 const char* DOMWindowQuota::supplementName() { 43 const char* DOMWindowQuota::supplementName() {
44 return "DOMWindowQuota"; 44 return "DOMWindowQuota";
45 } 45 }
46 46
47 // static 47 // static
48 DOMWindowQuota& DOMWindowQuota::from(LocalDOMWindow& window) { 48 DOMWindowQuota& DOMWindowQuota::from(LocalDOMWindow& window) {
49 DOMWindowQuota* supplement = static_cast<DOMWindowQuota*>( 49 DOMWindowQuota* supplement = static_cast<DOMWindowQuota*>(
50 Supplement<LocalDOMWindow>::from(window, supplementName())); 50 Supplement<LocalDOMWindow>::from(window, supplementName()));
51 if (!supplement) { 51 if (!supplement) {
(...skipping 10 matching lines...) Expand all
62 62
63 DeprecatedStorageInfo* DOMWindowQuota::webkitStorageInfo() const { 63 DeprecatedStorageInfo* DOMWindowQuota::webkitStorageInfo() const {
64 if (!m_storageInfo && frame()) 64 if (!m_storageInfo && frame())
65 m_storageInfo = DeprecatedStorageInfo::create(); 65 m_storageInfo = DeprecatedStorageInfo::create();
66 return m_storageInfo.get(); 66 return m_storageInfo.get();
67 } 67 }
68 68
69 DEFINE_TRACE(DOMWindowQuota) { 69 DEFINE_TRACE(DOMWindowQuota) {
70 visitor->trace(m_storageInfo); 70 visitor->trace(m_storageInfo);
71 Supplement<LocalDOMWindow>::trace(visitor); 71 Supplement<LocalDOMWindow>::trace(visitor);
72 DOMWindowProperty::trace(visitor); 72 ContextClient::trace(visitor);
73 } 73 }
74 74
75 } // namespace blink 75 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698