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

Unified Diff: third_party/WebKit/Source/modules/sensor/SensorProviderProxy.h

Issue 2458453002: [sensors] Add Permission guard to the generic sensor apis.
Patch Set: Fix comments 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/sensor/SensorProviderProxy.h
diff --git a/third_party/WebKit/Source/modules/sensor/SensorProviderProxy.h b/third_party/WebKit/Source/modules/sensor/SensorProviderProxy.h
index fc89f5407584eaa57d837ad5ab1825b271abdf7b..2dac3a90818a53ddc0b0aea24da509de94d7a4dc 100644
--- a/third_party/WebKit/Source/modules/sensor/SensorProviderProxy.h
+++ b/third_party/WebKit/Source/modules/sensor/SensorProviderProxy.h
@@ -5,11 +5,13 @@
#ifndef SensorProviderProxy_h
#define SensorProviderProxy_h
+#include "core/dom/ExecutionContext.h"
shalamov 2016/11/16 19:03:49 nit: already included in cpp, forward declare
riju_ 2016/11/18 09:29:35 Acknowledged.
#include "core/frame/LocalFrame.h"
#include "device/generic_sensor/public/interfaces/sensor.mojom-blink.h"
#include "device/generic_sensor/public/interfaces/sensor_provider.mojom-blink.h"
#include "platform/Supplementable.h"
#include "platform/heap/Handle.h"
+#include "public/platform/modules/permissions/permission.mojom-blink.h"
namespace blink {
@@ -30,6 +32,7 @@ class SensorProviderProxy final
~SensorProviderProxy();
SensorProxy* createSensor(device::mojom::blink::SensorType,
+ ExecutionContext*,
std::unique_ptr<SensorReadingFactory>);
SensorProxy* getSensor(device::mojom::blink::SensorType);
@@ -47,11 +50,13 @@ class SensorProviderProxy final
}
void onSensorProviderConnectionError();
+ void onPermissionServiceConnectionError();
using SensorsSet = HeapHashSet<WeakMember<SensorProxy>>;
SensorsSet m_sensors;
device::mojom::blink::SensorProviderPtr m_sensorProvider;
+ mojom::blink::PermissionServicePtr m_permissionService;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698