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..f9674cffa2c43c8de6550db20afe67f8227322af |
--- /dev/null |
+++ b/chrome/browser/sensor/sensor_permission_infobar_delegate_android.cc |
@@ -0,0 +1,41 @@ |
+// 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::PermissionType::SENSORS, |
+ 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 { |
+ // TODO (riju): |
+ // return IDR_ANDROID_INFOBAR_SENSORS; |
+ // as of now reuse MIDI's icon |
+ return IDR_ANDROID_INFOBAR_MIDI; |
+ // return 1; |
+} |
+ |
+int SensorPermissionInfoBarDelegateAndroid::GetMessageResourceId() const { |
+ // TODO (riju): |
+ return IDS_SENSORS_INFOBAR_QUESTION; |
+} |