OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "public/web/WebGeolocationError.h" | 32 #include "public/web/WebGeolocationError.h" |
33 #include "public/web/WebGeolocationPosition.h" | 33 #include "public/web/WebGeolocationPosition.h" |
34 #include "wtf/RefCounted.h" | 34 #include "wtf/RefCounted.h" |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 // TODO(Oilpan): once GeolocationController is always on the heap, | 38 // TODO(Oilpan): once GeolocationController is always on the heap, |
39 // shorten out this GeolocationControllerPrivate intermediary. | 39 // shorten out this GeolocationControllerPrivate intermediary. |
40 class GeolocationControllerPrivate final : public GarbageCollected<GeolocationCo
ntrollerPrivate> { | 40 class GeolocationControllerPrivate final : public GarbageCollected<GeolocationCo
ntrollerPrivate> { |
41 public: | 41 public: |
42 static RawPtr<GeolocationControllerPrivate> create(GeolocationController* co
ntroller) | 42 static GeolocationControllerPrivate* create(GeolocationController* controlle
r) |
43 { | 43 { |
44 return new GeolocationControllerPrivate(controller); | 44 return new GeolocationControllerPrivate(controller); |
45 } | 45 } |
46 | 46 |
47 static GeolocationController& controller(const WebPrivatePtr<GeolocationCont
rollerPrivate>& controller) | 47 static GeolocationController& controller(const WebPrivatePtr<GeolocationCont
rollerPrivate>& controller) |
48 { | 48 { |
49 DCHECK(!controller.isNull()); | 49 DCHECK(!controller.isNull()); |
50 DCHECK(controller->m_controller); | 50 DCHECK(controller->m_controller); |
51 return *controller->m_controller; | 51 return *controller->m_controller; |
52 } | 52 } |
(...skipping 29 matching lines...) Expand all Loading... |
82 { | 82 { |
83 GeolocationControllerPrivate::controller(m_private).positionChanged(static_c
ast<GeolocationPosition*>(webPosition)); | 83 GeolocationControllerPrivate::controller(m_private).positionChanged(static_c
ast<GeolocationPosition*>(webPosition)); |
84 } | 84 } |
85 | 85 |
86 void WebGeolocationController::errorOccurred(const WebGeolocationError& webError
) | 86 void WebGeolocationController::errorOccurred(const WebGeolocationError& webError
) |
87 { | 87 { |
88 GeolocationControllerPrivate::controller(m_private).errorOccurred(static_cas
t<GeolocationError*>(webError)); | 88 GeolocationControllerPrivate::controller(m_private).errorOccurred(static_cas
t<GeolocationError*>(webError)); |
89 } | 89 } |
90 | 90 |
91 } // namespace blink | 91 } // namespace blink |
OLD | NEW |