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

Side by Side Diff: components/content_settings/core/common/content_settings_types.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_ 5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_
6 #define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_ 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_
7 7
8 #include <cstddef> 8 #include <cstddef>
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, 42 CONTENT_SETTINGS_TYPE_DURABLE_STORAGE,
43 CONTENT_SETTINGS_TYPE_USB_CHOOSER_DATA, 43 CONTENT_SETTINGS_TYPE_USB_CHOOSER_DATA,
44 CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD, 44 CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD,
45 CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, 45 CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC,
46 CONTENT_SETTINGS_TYPE_AUTOPLAY, 46 CONTENT_SETTINGS_TYPE_AUTOPLAY,
47 // TODO(raymes): Deprecated. See crbug.com/681709. Remove after M60. 47 // TODO(raymes): Deprecated. See crbug.com/681709. Remove after M60.
48 CONTENT_SETTINGS_TYPE_PROMPT_NO_DECISION_COUNT, 48 CONTENT_SETTINGS_TYPE_PROMPT_NO_DECISION_COUNT,
49 CONTENT_SETTINGS_TYPE_IMPORTANT_SITE_INFO, 49 CONTENT_SETTINGS_TYPE_IMPORTANT_SITE_INFO,
50 CONTENT_SETTINGS_TYPE_PERMISSION_AUTOBLOCKER_DATA, 50 CONTENT_SETTINGS_TYPE_PERMISSION_AUTOBLOCKER_DATA,
51 CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, 51 CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER,
52 CONTENT_SETTINGS_TYPE_SENSORS,
53 CONTENT_SETTINGS_TYPE_AMBIENT_LIGHT_SENSOR,
54 CONTENT_SETTINGS_TYPE_MAGNETOMETER,
55 CONTENT_SETTINGS_TYPE_ORIENTATION_SENSOR,
56 // Auto grant. Always allow.
57 CONTENT_SETTINGS_TYPE_ACCELEROMETER,
58 CONTENT_SETTINGS_TYPE_GYROSCOPE,
52 59
53 // This is special-cased in the permissions layer to always allow, and as 60 // This is special-cased in the permissions layer to always allow, and as
54 // such doesn't have associated prefs data. 61 // such doesn't have associated prefs data.
55 CONTENT_SETTINGS_TYPE_MIDI, 62 CONTENT_SETTINGS_TYPE_MIDI,
56 63
57 // This is only here temporarily and will be removed when we further unify 64 // This is only here temporarily and will be removed when we further unify
58 // it with notifications, see crbug.com/563297. No prefs data is stored for 65 // it with notifications, see crbug.com/563297. No prefs data is stored for
59 // this content type, we instead share values with NOTIFICATIONS. 66 // this content type, we instead share values with NOTIFICATIONS.
60 CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, 67 CONTENT_SETTINGS_TYPE_PUSH_MESSAGING,
61 68
62 // This content setting type is for caching password protection service's 69 // This content setting type is for caching password protection service's
63 // verdicts of each origin. 70 // verdicts of each origin.
64 CONTENT_SETTINGS_TYPE_PASSWORD_PROTECTION, 71 CONTENT_SETTINGS_TYPE_PASSWORD_PROTECTION,
65 72
66 // WARNING: This enum is going to be removed soon. Do not depend on NUM_TYPES. 73 // WARNING: This enum is going to be removed soon. Do not depend on NUM_TYPES.
67 CONTENT_SETTINGS_NUM_TYPES_DO_NOT_USE, 74 CONTENT_SETTINGS_NUM_TYPES_DO_NOT_USE,
68 }; 75 };
69 76
70 struct ContentSettingsTypeHash { 77 struct ContentSettingsTypeHash {
71 std::size_t operator()(ContentSettingsType type) const { 78 std::size_t operator()(ContentSettingsType type) const {
72 return static_cast<std::size_t>(type); 79 return static_cast<std::size_t>(type);
73 } 80 }
74 }; 81 };
75 82
76 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_ 83 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_
OLDNEW
« no previous file with comments | « components/content_settings/core/common/content_settings.cc ('k') | components/infobars/core/infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698