Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 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. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SEARCH_ENGINES_PRIVATE_SEARCH_ENGINES_PRIV ATE_API_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_SEARCH_ENGINES_PRIVATE_SEARCH_ENGINES_PRIV ATE_API_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "chrome/browser/extensions/chrome_extension_function_details.h" | |
| 12 #include "extensions/browser/extension_function.h" | |
| 13 | |
| 14 namespace extensions { | |
| 15 | |
| 16 // Implements the chrome.searchEnginesPrivate.getDefaultSearchEngines method. | |
| 17 class SearchEnginesPrivateGetDefaultSearchEnginesFunction | |
| 18 : public UIThreadExtensionFunction { | |
| 19 public: | |
| 20 SearchEnginesPrivateGetDefaultSearchEnginesFunction(); | |
| 21 DECLARE_EXTENSION_FUNCTION("searchEnginesPrivate.getDefaultSearchEngines", | |
| 22 SEARCHENGINESPRIVATE_GETDEFAULTSEARCHENGINES); | |
| 23 | |
| 24 protected: | |
| 25 ~SearchEnginesPrivateGetDefaultSearchEnginesFunction() override; | |
| 26 | |
| 27 // ExtensionFunction overrides. | |
| 28 ResponseAction Run() override; | |
| 29 | |
| 30 private: | |
| 31 ChromeExtensionFunctionDetails chrome_details_; | |
| 32 | |
| 33 DISALLOW_COPY_AND_ASSIGN(SearchEnginesPrivateGetDefaultSearchEnginesFunction); | |
| 34 }; | |
| 35 | |
| 36 // Implements the chrome.searchEnginesPrivate.getAllPrefs method. | |
|
Jeremy Klein
2015/04/22 17:37:45
s/getAllPrefs/setDefaultSearchEngine/
Oren Blasberg
2015/04/22 18:25:41
Done.
| |
| 37 class SearchEnginesPrivateSetDefaultSearchEngineFunction | |
| 38 : public UIThreadExtensionFunction { | |
| 39 public: | |
| 40 SearchEnginesPrivateSetDefaultSearchEngineFunction(); | |
| 41 DECLARE_EXTENSION_FUNCTION("searchEnginesPrivate.setDefaultSearchEngine", | |
| 42 SEARCHENGINESPRIVATE_SETDEFAULTSEARCHENGINE); | |
| 43 | |
| 44 protected: | |
| 45 ~SearchEnginesPrivateSetDefaultSearchEngineFunction() override; | |
| 46 | |
| 47 // AsyncExtensionFunction overrides. | |
| 48 ResponseAction Run() override; | |
| 49 | |
| 50 private: | |
| 51 ChromeExtensionFunctionDetails chrome_details_; | |
| 52 | |
| 53 DISALLOW_COPY_AND_ASSIGN(SearchEnginesPrivateSetDefaultSearchEngineFunction); | |
| 54 }; | |
| 55 | |
| 56 } // namespace extensions | |
| 57 | |
| 58 #endif // CHROME_BROWSER_EXTENSIONS_API_SEARCH_ENGINES_PRIVATE_SEARCH_ENGINES_P RIVATE_API_H_ | |
| OLD | NEW |