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

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

Issue 683013002: Extract a DOMWindow interface from LocalDOMWindow and use it in the idl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix incorrect assumption Created 6 years, 1 month 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
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 { 55 {
56 DOMWindowQuota* supplement = static_cast<DOMWindowQuota*>(WillBeHeapSuppleme nt<LocalDOMWindow>::from(window, supplementName())); 56 DOMWindowQuota* supplement = static_cast<DOMWindowQuota*>(WillBeHeapSuppleme nt<LocalDOMWindow>::from(window, supplementName()));
57 if (!supplement) { 57 if (!supplement) {
58 supplement = new DOMWindowQuota(window); 58 supplement = new DOMWindowQuota(window);
59 provideTo(window, supplementName(), adoptPtrWillBeNoop(supplement)); 59 provideTo(window, supplementName(), adoptPtrWillBeNoop(supplement));
60 } 60 }
61 return *supplement; 61 return *supplement;
62 } 62 }
63 63
64 // static 64 // static
65 DeprecatedStorageInfo* DOMWindowQuota::webkitStorageInfo(LocalDOMWindow& window) 65 DeprecatedStorageInfo* DOMWindowQuota::webkitStorageInfo(DOMWindow& window)
haraken 2014/11/08 09:17:25 Ditto.
66 { 66 {
67 return DOMWindowQuota::from(window).webkitStorageInfo(); 67 return DOMWindowQuota::from(toLocalDOMWindow(window)).webkitStorageInfo();
68 } 68 }
69 69
70 DeprecatedStorageInfo* DOMWindowQuota::webkitStorageInfo() const 70 DeprecatedStorageInfo* DOMWindowQuota::webkitStorageInfo() const
71 { 71 {
72 if (!m_storageInfo && frame()) 72 if (!m_storageInfo && frame())
73 m_storageInfo = DeprecatedStorageInfo::create(); 73 m_storageInfo = DeprecatedStorageInfo::create();
74 return m_storageInfo.get(); 74 return m_storageInfo.get();
75 } 75 }
76 76
77 void DOMWindowQuota::trace(Visitor* visitor) 77 void DOMWindowQuota::trace(Visitor* visitor)
78 { 78 {
79 visitor->trace(m_storageInfo); 79 visitor->trace(m_storageInfo);
80 WillBeHeapSupplement<LocalDOMWindow>::trace(visitor); 80 WillBeHeapSupplement<LocalDOMWindow>::trace(visitor);
81 DOMWindowProperty::trace(visitor); 81 DOMWindowProperty::trace(visitor);
82 } 82 }
83 83
84 } // namespace blink 84 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698