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

Unified Diff: chrome/browser/sensor/sensor_permission_infobar_delegate_android.cc

Issue 2458453002: [sensors] Add Permission guard to the generic sensor apis.
Patch Set: rebase + blink reformat Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sensor/sensor_permission_infobar_delegate_android.cc
diff --git a/chrome/browser/sensor/sensor_permission_infobar_delegate_android.cc b/chrome/browser/sensor/sensor_permission_infobar_delegate_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6354357e008cff0bc27372f8d07920aeded2a2b7
--- /dev/null
+++ b/chrome/browser/sensor/sensor_permission_infobar_delegate_android.cc
@@ -0,0 +1,35 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/sensor/sensor_permission_infobar_delegate_android.h"
+
+#include "chrome/browser/android/android_theme_resources.h"
+#include "chrome/grit/generated_resources.h"
+
+SensorPermissionInfoBarDelegateAndroid::SensorPermissionInfoBarDelegateAndroid(
+ const GURL& requesting_frame,
+ bool user_gesture,
+ Profile* profile,
+ const PermissionSetCallback& callback)
+ : PermissionInfoBarDelegate(requesting_frame,
+ CONTENT_SETTINGS_TYPE_SENSORS,
+ user_gesture,
+ profile,
+ callback) {}
+
+SensorPermissionInfoBarDelegateAndroid::
+ ~SensorPermissionInfoBarDelegateAndroid() {}
+
+infobars::InfoBarDelegate::InfoBarIdentifier
+SensorPermissionInfoBarDelegateAndroid::GetIdentifier() const {
+ return SENSORS_PERMISSION_INFOBAR_DELEGATE_ANDROID;
+}
+
+int SensorPermissionInfoBarDelegateAndroid::GetIconId() const {
+ return IDR_ANDROID_INFOBAR_SENSORS;
+}
+
+int SensorPermissionInfoBarDelegateAndroid::GetMessageResourceId() const {
+ return IDS_SENSORS_INFOBAR_QUESTION;
+}

Powered by Google App Engine
This is Rietveld 408576698