OLD | NEW |
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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 namespace WebCore { | 36 namespace WebCore { |
37 | 37 |
38 GeolocationController::GeolocationController(Page& page, GeolocationClient* clie
nt) | 38 GeolocationController::GeolocationController(Page& page, GeolocationClient* clie
nt) |
39 : PageLifecycleObserver(&page) | 39 : PageLifecycleObserver(&page) |
40 , m_client(client) | 40 , m_client(client) |
41 , m_hasClientForTest(false) | 41 , m_hasClientForTest(false) |
42 , m_isClientUpdating(false) | 42 , m_isClientUpdating(false) |
43 , m_inspectorAgent() | 43 , m_inspectorAgent() |
44 { | 44 { |
45 OwnPtr<GeolocationInspectorAgent> geolocationAgent(GeolocationInspectorAgent
::create(this)); | 45 OwnPtrWillBeRawPtr<GeolocationInspectorAgent> geolocationAgent(GeolocationIn
spectorAgent::create(this)); |
46 m_inspectorAgent = geolocationAgent.get(); | 46 m_inspectorAgent = geolocationAgent.get(); |
47 page.inspectorController().registerModuleAgent(geolocationAgent.release()); | 47 page.inspectorController().registerModuleAgent(geolocationAgent.release()); |
48 } | 48 } |
49 | 49 |
50 void GeolocationController::startUpdatingIfNeeded() | 50 void GeolocationController::startUpdatingIfNeeded() |
51 { | 51 { |
52 if (m_isClientUpdating) | 52 if (m_isClientUpdating) |
53 return; | 53 return; |
54 m_isClientUpdating = true; | 54 m_isClientUpdating = true; |
55 m_client->startUpdating(); | 55 m_client->startUpdating(); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 visitor->trace(m_highAccuracyObservers); | 186 visitor->trace(m_highAccuracyObservers); |
187 WillBeHeapSupplement<Page>::trace(visitor); | 187 WillBeHeapSupplement<Page>::trace(visitor); |
188 } | 188 } |
189 | 189 |
190 void provideGeolocationTo(Page& page, GeolocationClient* client) | 190 void provideGeolocationTo(Page& page, GeolocationClient* client) |
191 { | 191 { |
192 WillBeHeapSupplement<Page>::provideTo(page, GeolocationController::supplemen
tName(), GeolocationController::create(page, client)); | 192 WillBeHeapSupplement<Page>::provideTo(page, GeolocationController::supplemen
tName(), GeolocationController::create(page, client)); |
193 } | 193 } |
194 | 194 |
195 } // namespace WebCore | 195 } // namespace WebCore |
OLD | NEW |