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

Side by Side Diff: Source/modules/geolocation/GeolocationController.cpp

Issue 335573004: Oilpan: Notify supplements of Page and LocalFrame destruction. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 if (m_hasClientForTest) 89 if (m_hasClientForTest)
90 m_client->controllerForTestRemoved(this); 90 m_client->controllerForTestRemoved(this);
91 } 91 }
92 92
93 void GeolocationController::willBeDestroyed() 93 void GeolocationController::willBeDestroyed()
94 { 94 {
95 if (m_client) 95 if (m_client)
96 m_client->geolocationDestroyed(); 96 m_client->geolocationDestroyed();
97 } 97 }
98 98
99 void GeolocationController::persistentHostHasBeenDestroyed()
100 {
101 observeContext(0);
102 }
103
99 PassOwnPtrWillBeRawPtr<GeolocationController> GeolocationController::create(Loca lFrame& frame, GeolocationClient* client) 104 PassOwnPtrWillBeRawPtr<GeolocationController> GeolocationController::create(Loca lFrame& frame, GeolocationClient* client)
100 { 105 {
101 return adoptPtrWillBeNoop(new GeolocationController(frame, client)); 106 return adoptPtrWillBeNoop(new GeolocationController(frame, client));
102 } 107 }
103 108
104 void GeolocationController::addObserver(Geolocation* observer, bool enableHighAc curacy) 109 void GeolocationController::addObserver(Geolocation* observer, bool enableHighAc curacy)
105 { 110 {
106 // This may be called multiple times with the same observer, though removeOb server() 111 // This may be called multiple times with the same observer, though removeOb server()
107 // is called only once with each. 112 // is called only once with each.
108 bool wasEmpty = m_observers.isEmpty(); 113 bool wasEmpty = m_observers.isEmpty();
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 visitor->trace(m_highAccuracyObservers); 217 visitor->trace(m_highAccuracyObservers);
213 WillBeHeapSupplement<LocalFrame>::trace(visitor); 218 WillBeHeapSupplement<LocalFrame>::trace(visitor);
214 } 219 }
215 220
216 void provideGeolocationTo(LocalFrame& frame, GeolocationClient* client) 221 void provideGeolocationTo(LocalFrame& frame, GeolocationClient* client)
217 { 222 {
218 WillBeHeapSupplement<LocalFrame>::provideTo(frame, GeolocationController::su pplementName(), GeolocationController::create(frame, client)); 223 WillBeHeapSupplement<LocalFrame>::provideTo(frame, GeolocationController::su pplementName(), GeolocationController::create(frame, client));
219 } 224 }
220 225
221 } // namespace WebCore 226 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698