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

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

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors 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 /* 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 m_inspectorAgent = nullptr; 92 m_inspectorAgent = nullptr;
93 } 93 }
94 94
95 if (m_hasClientForTest) { 95 if (m_hasClientForTest) {
96 m_client->controllerForTestRemoved(this); 96 m_client->controllerForTestRemoved(this);
97 m_hasClientForTest = false; 97 m_hasClientForTest = false;
98 } 98 }
99 #endif 99 #endif
100 } 100 }
101 101
102 void GeolocationController::persistentHostHasBeenDestroyed()
103 {
104 observeContext(0);
105 }
106
107 PassOwnPtrWillBeRawPtr<GeolocationController> GeolocationController::create(Loca lFrame& frame, GeolocationClient* client) 102 PassOwnPtrWillBeRawPtr<GeolocationController> GeolocationController::create(Loca lFrame& frame, GeolocationClient* client)
108 { 103 {
109 return adoptPtrWillBeNoop(new GeolocationController(frame, client)); 104 return adoptPtrWillBeNoop(new GeolocationController(frame, client));
110 } 105 }
111 106
112 void GeolocationController::addObserver(Geolocation* observer, bool enableHighAc curacy) 107 void GeolocationController::addObserver(Geolocation* observer, bool enableHighAc curacy)
113 { 108 {
114 // This may be called multiple times with the same observer, though removeOb server() 109 // This may be called multiple times with the same observer, though removeOb server()
115 // is called only once with each. 110 // is called only once with each.
116 bool wasEmpty = m_observers.isEmpty(); 111 bool wasEmpty = m_observers.isEmpty();
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 visitor->trace(m_inspectorAgent); 217 visitor->trace(m_inspectorAgent);
223 WillBeHeapSupplement<LocalFrame>::trace(visitor); 218 WillBeHeapSupplement<LocalFrame>::trace(visitor);
224 } 219 }
225 220
226 void provideGeolocationTo(LocalFrame& frame, GeolocationClient* client) 221 void provideGeolocationTo(LocalFrame& frame, GeolocationClient* client)
227 { 222 {
228 WillBeHeapSupplement<LocalFrame>::provideTo(frame, GeolocationController::su pplementName(), GeolocationController::create(frame, client)); 223 WillBeHeapSupplement<LocalFrame>::provideTo(frame, GeolocationController::su pplementName(), GeolocationController::create(frame, client));
229 } 224 }
230 225
231 } // namespace blink 226 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698