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 "chrome/common/extensions/api/manifest_types.h" | 8 #include "chrome/common/extensions/api/manifest_types.h" |
9 #include "extensions/common/extension.h" | 9 #include "extensions/common/extension.h" |
10 #include "extensions/common/manifest_handler.h" | 10 #include "extensions/common/manifest_handler.h" |
11 | 11 |
12 namespace extensions { | 12 namespace extensions { |
13 | 13 |
14 class ManifestPermission; | 14 class ManifestPermission; |
15 | 15 |
16 // SettingsOverride is associated with "chrome_settings_overrides" manifest key. | 16 // SettingsOverride is associated with "chrome_settings_overrides" manifest key. |
17 // An extension can add a search engine as default or non-default, overwrite the | 17 // An extension can add a search engine as default or non-default, overwrite the |
18 // homepage and append a startup page to the list. | 18 // homepage and append a startup page to the list. |
19 struct SettingsOverrides : public Extension::ManifestData { | 19 struct SettingsOverrides : public Extension::ManifestData { |
20 SettingsOverrides(); | 20 SettingsOverrides(); |
21 virtual ~SettingsOverrides(); | 21 virtual ~SettingsOverrides(); |
22 | 22 |
23 static const SettingsOverrides* Get(const Extension* extension); | 23 static const SettingsOverrides* Get(const Extension* extension); |
24 | 24 |
25 bool RemovesBookmarkButton() const; | 25 static bool RemovesBookmarkButton( |
| 26 const SettingsOverrides& settings_overrides); |
| 27 static bool RemovesBookmarkShortcut( |
| 28 const SettingsOverrides& settings_overrides); |
26 | 29 |
27 scoped_ptr<api::manifest_types::ChromeSettingsOverrides::Bookmarks_ui> | 30 scoped_ptr<api::manifest_types::ChromeSettingsOverrides::Bookmarks_ui> |
28 bookmarks_ui; | 31 bookmarks_ui; |
29 scoped_ptr<api::manifest_types::ChromeSettingsOverrides::Search_provider> | 32 scoped_ptr<api::manifest_types::ChromeSettingsOverrides::Search_provider> |
30 search_engine; | 33 search_engine; |
31 scoped_ptr<GURL> homepage; | 34 scoped_ptr<GURL> homepage; |
32 std::vector<GURL> startup_pages; | 35 std::vector<GURL> startup_pages; |
33 | 36 |
34 scoped_ptr<ManifestPermission> manifest_permission; | 37 scoped_ptr<ManifestPermission> manifest_permission; |
35 | 38 |
(...skipping 18 matching lines...) Expand all Loading... |
54 private: | 57 private: |
55 class ManifestPermissionImpl; | 58 class ManifestPermissionImpl; |
56 | 59 |
57 virtual const std::vector<std::string> Keys() const OVERRIDE; | 60 virtual const std::vector<std::string> Keys() const OVERRIDE; |
58 | 61 |
59 DISALLOW_COPY_AND_ASSIGN(SettingsOverridesHandler); | 62 DISALLOW_COPY_AND_ASSIGN(SettingsOverridesHandler); |
60 }; | 63 }; |
61 | 64 |
62 } // namespace extensions | 65 } // namespace extensions |
63 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_SETTINGS_OVERRIDES_HANDLER
_H_ | 66 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_SETTINGS_OVERRIDES_HANDLER
_H_ |
OLD | NEW |