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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 , m_inspectorAgent() | 44 , m_inspectorAgent() |
45 { | 45 { |
46 // FIXME: Once GeolocationInspectorAgent is per frame, there will be a 1:1 r
elationship between | 46 // FIXME: Once GeolocationInspectorAgent is per frame, there will be a 1:1 r
elationship between |
47 // it and this class. Until then, there's one GeolocationInspectorAgent per
page that the main | 47 // it and this class. Until then, there's one GeolocationInspectorAgent per
page that the main |
48 // frame is responsible for creating. | 48 // frame is responsible for creating. |
49 if (frame.isMainFrame()) { | 49 if (frame.isMainFrame()) { |
50 OwnPtr<GeolocationInspectorAgent> geolocationAgent(GeolocationInspectorA
gent::create()); | 50 OwnPtr<GeolocationInspectorAgent> geolocationAgent(GeolocationInspectorA
gent::create()); |
51 m_inspectorAgent = geolocationAgent.get(); | 51 m_inspectorAgent = geolocationAgent.get(); |
52 frame.page()->inspectorController().registerModuleAgent(geolocationAgent
.release()); | 52 frame.page()->inspectorController().registerModuleAgent(geolocationAgent
.release()); |
53 } else { | 53 } else { |
54 m_inspectorAgent = GeolocationController::from(frame.page()->mainFrame()
)->m_inspectorAgent; | 54 m_inspectorAgent = GeolocationController::from(frame.page()->deprecatedL
ocalMainFrame())->m_inspectorAgent; |
55 } | 55 } |
56 | 56 |
57 m_inspectorAgent->AddController(this); | 57 m_inspectorAgent->AddController(this); |
58 | 58 |
59 if (!frame.isMainFrame()) { | 59 if (!frame.isMainFrame()) { |
60 // internals.setGeolocationClientMock is per page. | 60 // internals.setGeolocationClientMock is per page. |
61 GeolocationController* mainController = GeolocationController::from(fram
e.page()->mainFrame()); | 61 GeolocationController* mainController = GeolocationController::from(fram
e.page()->deprecatedLocalMainFrame()); |
62 if (mainController->hasClientForTest()) | 62 if (mainController->hasClientForTest()) |
63 setClientForTest(mainController->client()); | 63 setClientForTest(mainController->client()); |
64 } | 64 } |
65 } | 65 } |
66 | 66 |
67 void GeolocationController::startUpdatingIfNeeded() | 67 void GeolocationController::startUpdatingIfNeeded() |
68 { | 68 { |
69 if (m_isClientUpdating) | 69 if (m_isClientUpdating) |
70 return; | 70 return; |
71 m_isClientUpdating = true; | 71 m_isClientUpdating = true; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 visitor->trace(m_highAccuracyObservers); | 219 visitor->trace(m_highAccuracyObservers); |
220 WillBeHeapSupplement<LocalFrame>::trace(visitor); | 220 WillBeHeapSupplement<LocalFrame>::trace(visitor); |
221 } | 221 } |
222 | 222 |
223 void provideGeolocationTo(LocalFrame& frame, GeolocationClient* client) | 223 void provideGeolocationTo(LocalFrame& frame, GeolocationClient* client) |
224 { | 224 { |
225 WillBeHeapSupplement<LocalFrame>::provideTo(frame, GeolocationController::su
pplementName(), GeolocationController::create(frame, client)); | 225 WillBeHeapSupplement<LocalFrame>::provideTo(frame, GeolocationController::su
pplementName(), GeolocationController::create(frame, client)); |
226 } | 226 } |
227 | 227 |
228 } // namespace WebCore | 228 } // namespace WebCore |
OLD | NEW |