Delete chrome.mediaGalleriesPrivate because the functionality unique to it has since...
[chromium-blink-merge.git] / chrome / common / extensions / manifest_handlers / settings_overrides_handler.h
blobf813965a3ecf179a3151a61da9e53510fb5c6e5e
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
3 // found in the LICENSE file.
5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_SETTINGS_OVERRIDES_HANDLER_H_
6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_SETTINGS_OVERRIDES_HANDLER_H_
8 #include "chrome/common/extensions/api/manifest_types.h"
9 #include "extensions/common/extension.h"
10 #include "extensions/common/manifest_handler.h"
12 namespace extensions {
14 enum SettingsApiOverrideType {
15 BUBBLE_TYPE_HOME_PAGE = 0,
16 BUBBLE_TYPE_SEARCH_ENGINE,
17 BUBBLE_TYPE_STARTUP_PAGES,
20 class ManifestPermission;
22 // SettingsOverride is associated with "chrome_settings_overrides" manifest key.
23 // An extension can add a search engine as default or non-default, overwrite the
24 // homepage and append a startup page to the list.
25 struct SettingsOverrides : public Extension::ManifestData {
26 SettingsOverrides();
27 ~SettingsOverrides() override;
29 static const SettingsOverrides* Get(const Extension* extension);
31 scoped_ptr<api::manifest_types::ChromeSettingsOverrides::Search_provider>
32 search_engine;
33 scoped_ptr<GURL> homepage;
34 std::vector<GURL> startup_pages;
36 private:
37 DISALLOW_COPY_AND_ASSIGN(SettingsOverrides);
40 class SettingsOverridesHandler : public ManifestHandler {
41 public:
42 SettingsOverridesHandler();
43 ~SettingsOverridesHandler() override;
45 bool Parse(Extension* extension, base::string16* error) override;
47 private:
48 const std::vector<std::string> Keys() const override;
50 DISALLOW_COPY_AND_ASSIGN(SettingsOverridesHandler);
53 } // namespace extensions
54 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_HANDLERS_SETTINGS_OVERRIDES_HANDLER_H_