| 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_CONTENT_SETTINGS_INTERNAL_EXTENSION_PROV
IDER_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_INTERNAL_EXTENSION_PROV
IDER_H_ |
| 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_INTERNAL_EXTENSION_PROV
IDER_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_INTERNAL_EXTENSION_PROV
IDER_H_ |
| 7 | 7 |
| 8 #include <set> |
| 9 #include <string> |
| 10 |
| 8 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
| 10 #include "components/content_settings/core/browser/content_settings_observable_p
rovider.h" | 13 #include "components/content_settings/core/browser/content_settings_observable_p
rovider.h" |
| 11 #include "components/content_settings/core/browser/content_settings_origin_ident
ifier_value_map.h" | 14 #include "components/content_settings/core/browser/content_settings_origin_ident
ifier_value_map.h" |
| 12 #include "components/content_settings/core/common/content_settings.h" | 15 #include "components/content_settings/core/common/content_settings.h" |
| 13 #include "content/public/browser/notification_observer.h" | 16 #include "content/public/browser/notification_observer.h" |
| 14 #include "content/public/browser/notification_registrar.h" | 17 #include "content/public/browser/notification_registrar.h" |
| 15 | 18 |
| 16 class Profile; | 19 class Profile; |
| 17 | 20 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 43 void ClearAllContentSettingsRules(ContentSettingsType content_type) override; | 46 void ClearAllContentSettingsRules(ContentSettingsType content_type) override; |
| 44 | 47 |
| 45 void ShutdownOnUIThread() override; | 48 void ShutdownOnUIThread() override; |
| 46 | 49 |
| 47 // content::NotificationObserver implementation. | 50 // content::NotificationObserver implementation. |
| 48 void Observe(int type, | 51 void Observe(int type, |
| 49 const content::NotificationSource& source, | 52 const content::NotificationSource& source, |
| 50 const content::NotificationDetails& details) override; | 53 const content::NotificationDetails& details) override; |
| 51 | 54 |
| 52 private: | 55 private: |
| 56 void ApplyPluginContentSettingsForExtension( |
| 57 const extensions::Extension* extension, |
| 58 ContentSetting setting); |
| 53 void SetContentSettingForExtension(const extensions::Extension* extension, | 59 void SetContentSettingForExtension(const extensions::Extension* extension, |
| 54 ContentSetting setting); | 60 ContentSetting setting); |
| 55 void SetContentSettingForExtensionAndResource( | 61 void SetContentSettingForExtensionAndResource( |
| 56 const extensions::Extension* extension, | 62 const extensions::Extension* extension, |
| 57 const ResourceIdentifier& resource, | 63 const ResourceIdentifier& resource, |
| 58 ContentSetting setting); | 64 ContentSetting setting); |
| 59 | 65 |
| 60 OriginIdentifierValueMap value_map_; | 66 OriginIdentifierValueMap value_map_; |
| 61 | 67 |
| 62 // Used around accesses to the |value_map_| list to guarantee thread safety. | 68 // Used around accesses to the |value_map_| list to guarantee thread safety. |
| 63 mutable base::Lock lock_; | 69 mutable base::Lock lock_; |
| 64 scoped_ptr<content::NotificationRegistrar> registrar_; | 70 scoped_ptr<content::NotificationRegistrar> registrar_; |
| 65 | 71 |
| 72 // Extension IDs used by the Chrome Remote Desktop app. |
| 73 std::set<std::string> chrome_remote_desktop_; |
| 74 |
| 66 DISALLOW_COPY_AND_ASSIGN(InternalExtensionProvider); | 75 DISALLOW_COPY_AND_ASSIGN(InternalExtensionProvider); |
| 67 }; | 76 }; |
| 68 | 77 |
| 69 } // namespace content_settings | 78 } // namespace content_settings |
| 70 | 79 |
| 71 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_INTERNAL_EXTENSION_P
ROVIDER_H_ | 80 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_INTERNAL_EXTENSION_P
ROVIDER_H_ |
| OLD | NEW |