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

Side by Side Diff: Source/modules/credentialmanager/NavigatorCredentials.cpp

Issue 552733003: Oilpan: make DOMWindowProperty a GC mixin. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Pacify GC plugin wrt LocalDOMWindow::trace() Created 6 years, 3 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 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "modules/credentialmanager/NavigatorCredentials.h" 6 #include "modules/credentialmanager/NavigatorCredentials.h"
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/frame/LocalDOMWindow.h" 9 #include "core/frame/LocalDOMWindow.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
11 #include "core/frame/Navigator.h" 11 #include "core/frame/Navigator.h"
12 #include "modules/credentialmanager/CredentialsContainer.h" 12 #include "modules/credentialmanager/CredentialsContainer.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 NavigatorCredentials::NavigatorCredentials(Navigator& navigator) 16 NavigatorCredentials::NavigatorCredentials(Navigator& navigator)
17 : DOMWindowProperty(navigator.frame()) 17 : DOMWindowProperty(navigator.frame())
18 { 18 {
19 } 19 }
20 20
21 NavigatorCredentials::~NavigatorCredentials() 21 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(NavigatorCredentials);
22 {
23 }
24 22
25 NavigatorCredentials& NavigatorCredentials::from(Navigator& navigator) 23 NavigatorCredentials& NavigatorCredentials::from(Navigator& navigator)
26 { 24 {
27 NavigatorCredentials* supplement = static_cast<NavigatorCredentials*>(WillBe HeapSupplement<Navigator>::from(navigator, supplementName())); 25 NavigatorCredentials* supplement = static_cast<NavigatorCredentials*>(WillBe HeapSupplement<Navigator>::from(navigator, supplementName()));
28 if (!supplement) { 26 if (!supplement) {
29 supplement = new NavigatorCredentials(navigator); 27 supplement = new NavigatorCredentials(navigator);
30 provideTo(navigator, supplementName(), adoptPtrWillBeNoop(supplement)); 28 provideTo(navigator, supplementName(), adoptPtrWillBeNoop(supplement));
31 } 29 }
32 return *supplement; 30 return *supplement;
33 } 31 }
(...skipping 12 matching lines...) Expand all
46 { 44 {
47 if (!m_credentialsContainer && frame()) 45 if (!m_credentialsContainer && frame())
48 m_credentialsContainer = CredentialsContainer::create(); 46 m_credentialsContainer = CredentialsContainer::create();
49 return m_credentialsContainer.get(); 47 return m_credentialsContainer.get();
50 } 48 }
51 49
52 void NavigatorCredentials::trace(Visitor* visitor) 50 void NavigatorCredentials::trace(Visitor* visitor)
53 { 51 {
54 visitor->trace(m_credentialsContainer); 52 visitor->trace(m_credentialsContainer);
55 WillBeHeapSupplement<Navigator>::trace(visitor); 53 WillBeHeapSupplement<Navigator>::trace(visitor);
54 DOMWindowProperty::trace(visitor);
56 } 55 }
57 56
58 } // namespace blink 57 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698