Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: chrome/browser/extensions/api/search_engines_private/search_engines_private_api.h

Issue 1096143003: Add chrome.searchEnginesPrivate API and Search Settings page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a test Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698