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

Side by Side Diff: chrome/browser/sensor/sensor_permission_infobar_delegate_android.cc

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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/sensor/sensor_permission_infobar_delegate_android.h"
6
7 #include "chrome/browser/android/android_theme_resources.h"
8 #include "chrome/grit/generated_resources.h"
9
10 SensorPermissionInfoBarDelegateAndroid::SensorPermissionInfoBarDelegateAndroid(
11 const GURL& requesting_frame,
12 bool user_gesture,
13 Profile* profile,
14 const PermissionSetCallback& callback)
15 : PermissionInfoBarDelegate(requesting_frame,
16 content::PermissionType::SENSORS,
17 CONTENT_SETTINGS_TYPE_SENSORS,
18 user_gesture,
19 profile,
20 callback) {}
21
22 SensorPermissionInfoBarDelegateAndroid::
23 ~SensorPermissionInfoBarDelegateAndroid() {}
24
25 infobars::InfoBarDelegate::InfoBarIdentifier
26 SensorPermissionInfoBarDelegateAndroid::GetIdentifier() const {
27 return SENSORS_PERMISSION_INFOBAR_DELEGATE_ANDROID;
28 }
29
30 int SensorPermissionInfoBarDelegateAndroid::GetIconId() const {
31 // TODO (riju):
32 // return IDR_ANDROID_INFOBAR_SENSORS;
33 // as of now reuse MIDI's icon
34 return IDR_ANDROID_INFOBAR_MIDI;
35 // return 1;
36 }
37
38 int SensorPermissionInfoBarDelegateAndroid::GetMessageResourceId() const {
39 // TODO (riju):
40 return IDS_SENSORS_INFOBAR_QUESTION;
41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698