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

Side by Side Diff: Source/modules/geolocation/GeolocationInspectorAgent.h

Issue 256843004: Get the WebGeolocationClient from WebFrameClient instead of WebViewClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix linking errors 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef GeolocationInspectorAgent_h 31 #ifndef GeolocationInspectorAgent_h
32 #define GeolocationInspectorAgent_h 32 #define GeolocationInspectorAgent_h
33 33
34 34
35 #include "core/inspector/InspectorBaseAgent.h" 35 #include "core/inspector/InspectorBaseAgent.h"
36 #include "modules/geolocation/GeolocationPosition.h" 36 #include "modules/geolocation/GeolocationPosition.h"
37 #include "wtf/HashMap.h" 37 #include "wtf/HashSet.h"
38 #include "wtf/text/WTFString.h" 38 #include "wtf/text/WTFString.h"
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 class GeolocationController; 42 class GeolocationController;
43 43
44 typedef String ErrorString; 44 typedef String ErrorString;
45 45
46 class GeolocationInspectorAgent FINAL : public InspectorBaseAgent<GeolocationIns pectorAgent>, public InspectorBackendDispatcher::GeolocationCommandHandler { 46 class GeolocationInspectorAgent FINAL : public InspectorBaseAgent<GeolocationIns pectorAgent>, public InspectorBackendDispatcher::GeolocationCommandHandler {
47 WTF_MAKE_NONCOPYABLE(GeolocationInspectorAgent); 47 WTF_MAKE_NONCOPYABLE(GeolocationInspectorAgent);
48 public: 48 public:
49 static PassOwnPtr<GeolocationInspectorAgent> create(GeolocationController*); 49 static PassOwnPtr<GeolocationInspectorAgent> create();
50 virtual ~GeolocationInspectorAgent(); 50 virtual ~GeolocationInspectorAgent();
51 51
52 // Protocol methods. 52 // Protocol methods.
53 virtual void setGeolocationOverride(ErrorString*, const double*, const doubl e*, const double*) OVERRIDE; 53 virtual void setGeolocationOverride(ErrorString*, const double*, const doubl e*, const double*) OVERRIDE;
54 virtual void clearGeolocationOverride(ErrorString*) OVERRIDE; 54 virtual void clearGeolocationOverride(ErrorString*) OVERRIDE;
55 55
56 // Instrumentation method. 56 // Instrumentation method.
57 GeolocationPosition* overrideGeolocationPosition(GeolocationPosition*); 57 GeolocationPosition* overrideGeolocationPosition(GeolocationPosition*);
58 58
59 void AddController(GeolocationController*);
60 void RemoveController(GeolocationController*);
61
59 private: 62 private:
60 explicit GeolocationInspectorAgent(GeolocationController*); 63 GeolocationInspectorAgent();
61 GeolocationController* m_controller; 64 WTF::HashSet<GeolocationController*> m_controllers;
62 bool m_geolocationOverridden; 65 bool m_geolocationOverridden;
63 RefPtrWillBePersistent<GeolocationPosition> m_geolocationPosition; 66 RefPtrWillBePersistent<GeolocationPosition> m_geolocationPosition;
64 RefPtrWillBePersistent<GeolocationPosition> m_platformGeolocationPosition; 67 RefPtrWillBePersistent<GeolocationPosition> m_platformGeolocationPosition;
65 }; 68 };
66 69
67 70
68 } // namespace WebCore 71 } // namespace WebCore
69 72
70 73
71 #endif // !defined(GeolocationInspectorAgent_h) 74 #endif // !defined(GeolocationInspectorAgent_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698