OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_COMMON_EXTENSIONS_MANIFEST_HANDLERS_SETTINGS_OVERRIDES_HANDLER_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_SETTINGS_OVERRIDES_HANDLER_H_ |
6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_SETTINGS_OVERRIDES_HANDLER_H_ | 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_SETTINGS_OVERRIDES_HANDLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "chrome/common/extensions/api/manifest_types.h" | 11 #include "chrome/common/extensions/api/manifest_types.h" |
12 #include "extensions/common/extension.h" | 12 #include "extensions/common/extension.h" |
13 #include "extensions/common/manifest_handler.h" | 13 #include "extensions/common/manifest_handler.h" |
14 | 14 |
15 namespace extensions { | 15 namespace extensions { |
16 | 16 |
17 enum SettingsApiOverrideType { | 17 enum SettingsApiOverrideType { |
18 BUBBLE_TYPE_HOME_PAGE = 0, | 18 BUBBLE_TYPE_HOME_PAGE = 0, |
19 BUBBLE_TYPE_SEARCH_ENGINE, | 19 BUBBLE_TYPE_SEARCH_ENGINE, |
20 BUBBLE_TYPE_STARTUP_PAGES, | 20 BUBBLE_TYPE_STARTUP_PAGES, |
21 }; | 21 }; |
22 | 22 |
23 class ManifestPermission; | |
24 | |
25 // SettingsOverride is associated with "chrome_settings_overrides" manifest key. | 23 // SettingsOverride is associated with "chrome_settings_overrides" manifest key. |
26 // An extension can add a search engine as default or non-default, overwrite the | 24 // An extension can add a search engine as default or non-default, overwrite the |
27 // homepage and append a startup page to the list. | 25 // homepage and append a startup page to the list. |
28 struct SettingsOverrides : public Extension::ManifestData { | 26 struct SettingsOverrides : public Extension::ManifestData { |
29 SettingsOverrides(); | 27 SettingsOverrides(); |
30 ~SettingsOverrides() override; | 28 ~SettingsOverrides() override; |
31 | 29 |
32 static const SettingsOverrides* Get(const Extension* extension); | 30 static const SettingsOverrides* Get(const Extension* extension); |
33 | 31 |
34 std::unique_ptr<api::manifest_types::ChromeSettingsOverrides::Search_provider> | 32 std::unique_ptr<api::manifest_types::ChromeSettingsOverrides::Search_provider> |
(...skipping 13 matching lines...) Expand all Loading... |
48 bool Parse(Extension* extension, base::string16* error) override; | 46 bool Parse(Extension* extension, base::string16* error) override; |
49 | 47 |
50 private: | 48 private: |
51 const std::vector<std::string> Keys() const override; | 49 const std::vector<std::string> Keys() const override; |
52 | 50 |
53 DISALLOW_COPY_AND_ASSIGN(SettingsOverridesHandler); | 51 DISALLOW_COPY_AND_ASSIGN(SettingsOverridesHandler); |
54 }; | 52 }; |
55 | 53 |
56 } // namespace extensions | 54 } // namespace extensions |
57 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_SETTINGS_OVERRIDES_HANDLER
_H_ | 55 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_SETTINGS_OVERRIDES_HANDLER
_H_ |
OLD | NEW |