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

Side by Side Diff: third_party/WebKit/Source/modules/sensor/Sensor.h

Issue 2458453002: [sensors] Add Permission guard to the generic sensor apis.
Patch Set: Move permissions stuff to SensorProxy, remove aw related stuff Created 4 years, 1 month 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef Sensor_h 5 #ifndef Sensor_h
6 #define Sensor_h 6 #define Sensor_h
7 7
8 #include "bindings/core/v8/ActiveScriptWrappable.h" 8 #include "bindings/core/v8/ActiveScriptWrappable.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "core/dom/ActiveDOMObject.h" 10 #include "core/dom/ActiveDOMObject.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // ContextLifecycleObserver overrides. 80 // ContextLifecycleObserver overrides.
81 void contextDestroyed() override; 81 void contextDestroyed() override;
82 82
83 // SensorController::Observer overrides. 83 // SensorController::Observer overrides.
84 void onSensorInitialized() override; 84 void onSensorInitialized() override;
85 void onSensorReadingChanged() override; 85 void onSensorReadingChanged() override;
86 void onSensorError(ExceptionCode, 86 void onSensorError(ExceptionCode,
87 const String& sanitizedMessage, 87 const String& sanitizedMessage,
88 const String& unsanitizedMessage) override; 88 const String& unsanitizedMessage) override;
89 89
90 void onSensorPermissionChanged();
91
90 void onStartRequestCompleted(bool); 92 void onStartRequestCompleted(bool);
91 void onStopRequestCompleted(bool); 93 void onStopRequestCompleted(bool);
92 94
93 // PageVisibilityObserver overrides. 95 // PageVisibilityObserver overrides.
94 void pageVisibilityChanged() override; 96 void pageVisibilityChanged() override;
95 97
96 void startListening(); 98 void startListening();
97 void stopListening(); 99 void stopListening();
98 100
99 // Makes sensor reading refresh its values from the shared buffer. 101 // Makes sensor reading refresh its values from the shared buffer.
(...skipping 17 matching lines...) Expand all
117 SensorState m_state; 119 SensorState m_state;
118 Member<SensorProxy> m_sensorProxy; 120 Member<SensorProxy> m_sensorProxy;
119 std::unique_ptr<SensorPollingStrategy> m_polling; 121 std::unique_ptr<SensorPollingStrategy> m_polling;
120 SensorProxy::Reading m_storedData; 122 SensorProxy::Reading m_storedData;
121 SensorConfigurationPtr m_configuration; 123 SensorConfigurationPtr m_configuration;
122 }; 124 };
123 125
124 } // namespace blink 126 } // namespace blink
125 127
126 #endif // Sensor_h 128 #endif // Sensor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698