OLD | NEW |
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 void HandleSearchEngineEditCancelled(const base::ListValue* args); | 76 void HandleSearchEngineEditCancelled(const base::ListValue* args); |
77 | 77 |
78 // Called when an edit is finished and should be saved. | 78 // Called when an edit is finished and should be saved. |
79 // Called from WebUI. | 79 // Called from WebUI. |
80 void HandleSearchEngineEditCompleted(const base::ListValue* args); | 80 void HandleSearchEngineEditCompleted(const base::ListValue* args); |
81 | 81 |
82 // Disables a Chrome (omnibox) extension. | 82 // Disables a Chrome (omnibox) extension. |
83 void HandleDisableExtension(const base::ListValue* args); | 83 void HandleDisableExtension(const base::ListValue* args); |
84 | 84 |
85 // Returns a dictionary to pass to WebUI representing the given search engine. | 85 // Returns a dictionary to pass to WebUI representing the given search engine. |
86 base::DictionaryValue* CreateDictionaryForEngine(int index, bool is_default); | 86 std::unique_ptr<base::DictionaryValue> CreateDictionaryForEngine( |
| 87 int index, |
| 88 bool is_default); |
87 | 89 |
88 // Returns a dictionary to pass to WebUI representing the extension. | 90 // Returns a dictionary to pass to WebUI representing the extension. |
89 base::DictionaryValue* CreateDictionaryForExtension( | 91 base::DictionaryValue* CreateDictionaryForExtension( |
90 const extensions::Extension& extension); | 92 const extensions::Extension& extension); |
91 | 93 |
92 Profile* const profile_; | 94 Profile* const profile_; |
93 | 95 |
94 KeywordEditorController list_controller_; | 96 KeywordEditorController list_controller_; |
95 std::unique_ptr<EditSearchEngineController> edit_controller_; | 97 std::unique_ptr<EditSearchEngineController> edit_controller_; |
96 | 98 |
97 DISALLOW_COPY_AND_ASSIGN(SearchEnginesHandler); | 99 DISALLOW_COPY_AND_ASSIGN(SearchEnginesHandler); |
98 }; | 100 }; |
99 | 101 |
100 } // namespace settings | 102 } // namespace settings |
101 | 103 |
102 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SEARCH_ENGINES_HANDLER_H_ | 104 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SEARCH_ENGINES_HANDLER_H_ |
OLD | NEW |