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

Side by Side Diff: chrome/browser/ui/webui/settings/search_engines_handler.h

Issue 2572963004: MD Settings: Add "Show Google Now cards in the launcher" row in Search section. (Closed)
Patch Set: Rebase Created 4 years 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_BROWSER_UI_WEBUI_SETTINGS_SEARCH_ENGINES_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_SEARCH_ENGINES_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SEARCH_ENGINES_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SEARCH_ENGINES_HANDLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const base::string16& title, 47 const base::string16& title,
48 const base::string16& keyword, 48 const base::string16& keyword,
49 const std::string& url) override; 49 const std::string& url) override;
50 50
51 // SettingsPageUIHandler implementation. 51 // SettingsPageUIHandler implementation.
52 void RegisterMessages() override; 52 void RegisterMessages() override;
53 void OnJavascriptAllowed() override; 53 void OnJavascriptAllowed() override;
54 void OnJavascriptDisallowed() override; 54 void OnJavascriptDisallowed() override;
55 55
56 private: 56 private:
57 // Retrieves all search engines and returns the to WebUI. 57 // Retrieves all search engines and returns them to WebUI.
58 void HandleGetSearchEnginesList(const base::ListValue* args); 58 void HandleGetSearchEnginesList(const base::ListValue* args);
59 59
60 std::unique_ptr<base::DictionaryValue> GetSearchEnginesList(); 60 std::unique_ptr<base::DictionaryValue> GetSearchEnginesList();
61 61
62 // Removes the search engine at the given index. Called from WebUI. 62 // Removes the search engine at the given index. Called from WebUI.
63 void HandleRemoveSearchEngine(const base::ListValue* args); 63 void HandleRemoveSearchEngine(const base::ListValue* args);
64 64
65 // Sets the search engine at the given index to be default. Called from WebUI. 65 // Sets the search engine at the given index to be default. Called from WebUI.
66 void HandleSetDefaultSearchEngine(const base::ListValue* args); 66 void HandleSetDefaultSearchEngine(const base::ListValue* args);
67 67
(...skipping 24 matching lines...) Expand all
92 int index, 92 int index,
93 bool is_default); 93 bool is_default);
94 94
95 // Returns a dictionary to pass to WebUI representing the extension. 95 // Returns a dictionary to pass to WebUI representing the extension.
96 base::DictionaryValue* CreateDictionaryForExtension( 96 base::DictionaryValue* CreateDictionaryForExtension(
97 const extensions::Extension& extension); 97 const extensions::Extension& extension);
98 98
99 // WebUI call to request a dictionary of hotword related properties. 99 // WebUI call to request a dictionary of hotword related properties.
100 void HandleGetHotwordInfo(const base::ListValue* args); 100 void HandleGetHotwordInfo(const base::ListValue* args);
101 101
102 // WebUI call to request the availability of Google Now cards.
103 void HandleGetGoogleNowAvailability(const base::ListValue* args);
104
102 // Constructs a SearchPageHotwordInfo dictionary. 105 // Constructs a SearchPageHotwordInfo dictionary.
103 std::unique_ptr<base::DictionaryValue> GetHotwordInfo(); 106 std::unique_ptr<base::DictionaryValue> GetHotwordInfo();
104 107
105 // Callback for HotwordService::AudioHistoryHandler::GetAudioHistoryEnabled. 108 // Callback for HotwordService::AudioHistoryHandler::GetAudioHistoryEnabled.
106 void OnGetHotwordAudioHistoryEnabled( 109 void OnGetHotwordAudioHistoryEnabled(
107 std::unique_ptr<base::Value> callback_id, 110 std::unique_ptr<base::Value> callback_id,
108 std::unique_ptr<base::DictionaryValue> status, 111 std::unique_ptr<base::DictionaryValue> status,
109 bool success, 112 bool success,
110 bool logging_enabled); 113 bool logging_enabled);
111 114
(...skipping 13 matching lines...) Expand all
125 std::unique_ptr<EditSearchEngineController> edit_controller_; 128 std::unique_ptr<EditSearchEngineController> edit_controller_;
126 PrefChangeRegistrar pref_change_registrar_; 129 PrefChangeRegistrar pref_change_registrar_;
127 base::WeakPtrFactory<SearchEnginesHandler> weak_ptr_factory_; 130 base::WeakPtrFactory<SearchEnginesHandler> weak_ptr_factory_;
128 131
129 DISALLOW_COPY_AND_ASSIGN(SearchEnginesHandler); 132 DISALLOW_COPY_AND_ASSIGN(SearchEnginesHandler);
130 }; 133 };
131 134
132 } // namespace settings 135 } // namespace settings
133 136
134 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SEARCH_ENGINES_HANDLER_H_ 137 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SEARCH_ENGINES_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698