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.setSelectedSearchEngine method. |
| 37 class SearchEnginesPrivateSetSelectedSearchEngineFunction |
| 38 : public UIThreadExtensionFunction { |
| 39 public: |
| 40 SearchEnginesPrivateSetSelectedSearchEngineFunction(); |
| 41 DECLARE_EXTENSION_FUNCTION("searchEnginesPrivate.setSelectedSearchEngine", |
| 42 SEARCHENGINESPRIVATE_SETSELECTEDSEARCHENGINE); |
| 43 |
| 44 protected: |
| 45 ~SearchEnginesPrivateSetSelectedSearchEngineFunction() override; |
| 46 |
| 47 // AsyncExtensionFunction overrides. |
| 48 ResponseAction Run() override; |
| 49 |
| 50 private: |
| 51 ChromeExtensionFunctionDetails chrome_details_; |
| 52 |
| 53 DISALLOW_COPY_AND_ASSIGN(SearchEnginesPrivateSetSelectedSearchEngineFunction); |
| 54 }; |
| 55 |
| 56 } // namespace extensions |
| 57 |
| 58 #endif // CHROME_BROWSER_EXTENSIONS_API_SEARCH_ENGINES_PRIVATE_SEARCH_ENGINES_P
RIVATE_API_H_ |
OLD | NEW |