OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
6 #define CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 // Fields describing the current mic/camera state. If a page has attempted to | 48 // Fields describing the current mic/camera state. If a page has attempted to |
49 // access a device, the XXX_ACCESSED bit will be set. If access was blocked, | 49 // access a device, the XXX_ACCESSED bit will be set. If access was blocked, |
50 // XXX_BLOCKED will be set. | 50 // XXX_BLOCKED will be set. |
51 typedef uint32_t MicrophoneCameraState; | 51 typedef uint32_t MicrophoneCameraState; |
52 static const MicrophoneCameraState MICROPHONE_CAMERA_NOT_ACCESSED = 0; | 52 static const MicrophoneCameraState MICROPHONE_CAMERA_NOT_ACCESSED = 0; |
53 static const MicrophoneCameraState MICROPHONE_ACCESSED = 1 << 0; | 53 static const MicrophoneCameraState MICROPHONE_ACCESSED = 1 << 0; |
54 static const MicrophoneCameraState MICROPHONE_BLOCKED = 1 << 1; | 54 static const MicrophoneCameraState MICROPHONE_BLOCKED = 1 << 1; |
55 static const MicrophoneCameraState CAMERA_ACCESSED = 1 << 2; | 55 static const MicrophoneCameraState CAMERA_ACCESSED = 1 << 2; |
56 static const MicrophoneCameraState CAMERA_BLOCKED = 1 << 3; | 56 static const MicrophoneCameraState CAMERA_BLOCKED = 1 << 3; |
57 | 57 |
58 // UMA statistics for the mixed content shield | |
59 enum { | |
60 MIXEDSCRIPT_DISPLAYED_SHIELD = 0, | |
61 MIXEDSCRIPT_DISPLAYED_BUBBLE, | |
62 MIXEDSCRIPT_CLICKED_ALLOW, | |
63 MIXEDSCRIPT_CLICKED_LEARN_MORE, | |
64 MIXEDSCRIPT_NUM_ACTIONS | |
65 }; | |
66 | |
67 static void RecordMixedScriptAction(int action); | |
Ilya Sherman
2014/10/16 22:05:13
nit: Please give the enum a name, and set the vari
| |
68 | |
58 // Classes that want to be notified about site data events must implement | 69 // Classes that want to be notified about site data events must implement |
59 // this abstract class and add themselves as observer to the | 70 // this abstract class and add themselves as observer to the |
60 // |TabSpecificContentSettings|. | 71 // |TabSpecificContentSettings|. |
61 class SiteDataObserver { | 72 class SiteDataObserver { |
62 public: | 73 public: |
63 explicit SiteDataObserver( | 74 explicit SiteDataObserver( |
64 TabSpecificContentSettings* tab_specific_content_settings); | 75 TabSpecificContentSettings* tab_specific_content_settings); |
65 virtual ~SiteDataObserver(); | 76 virtual ~SiteDataObserver(); |
66 | 77 |
67 // Called whenever site data is accessed. | 78 // Called whenever site data is accessed. |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
445 std::string media_stream_requested_audio_device_; | 456 std::string media_stream_requested_audio_device_; |
446 std::string media_stream_requested_video_device_; | 457 std::string media_stream_requested_video_device_; |
447 | 458 |
448 // Observer to watch for content settings changed. | 459 // Observer to watch for content settings changed. |
449 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; | 460 ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_; |
450 | 461 |
451 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); | 462 DISALLOW_COPY_AND_ASSIGN(TabSpecificContentSettings); |
452 }; | 463 }; |
453 | 464 |
454 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ | 465 #endif // CHROME_BROWSER_CONTENT_SETTINGS_TAB_SPECIFIC_CONTENT_SETTINGS_H_ |
OLD | NEW |