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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 const std::string& field_value); | 72 const std::string& field_value); |
73 | 73 |
74 // Called when an edit is cancelled. | 74 // Called when an edit is cancelled. |
75 // Called from WebUI. | 75 // Called from WebUI. |
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. | |
83 void HandleDisableExtension(const base::ListValue* args); | |
84 | |
85 // Returns a dictionary to pass to WebUI representing the given search engine. | 82 // Returns a dictionary to pass to WebUI representing the given search engine. |
86 std::unique_ptr<base::DictionaryValue> CreateDictionaryForEngine( | 83 std::unique_ptr<base::DictionaryValue> CreateDictionaryForEngine( |
87 int index, | 84 int index, |
88 bool is_default); | 85 bool is_default); |
89 | 86 |
90 // Returns a dictionary to pass to WebUI representing the extension. | 87 // Returns a dictionary to pass to WebUI representing the extension. |
91 base::DictionaryValue* CreateDictionaryForExtension( | 88 base::DictionaryValue* CreateDictionaryForExtension( |
92 const extensions::Extension& extension); | 89 const extensions::Extension& extension); |
93 | 90 |
94 Profile* const profile_; | 91 Profile* const profile_; |
95 | 92 |
96 KeywordEditorController list_controller_; | 93 KeywordEditorController list_controller_; |
97 std::unique_ptr<EditSearchEngineController> edit_controller_; | 94 std::unique_ptr<EditSearchEngineController> edit_controller_; |
98 | 95 |
99 DISALLOW_COPY_AND_ASSIGN(SearchEnginesHandler); | 96 DISALLOW_COPY_AND_ASSIGN(SearchEnginesHandler); |
100 }; | 97 }; |
101 | 98 |
102 } // namespace settings | 99 } // namespace settings |
103 | 100 |
104 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SEARCH_ENGINES_HANDLER_H_ | 101 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SEARCH_ENGINES_HANDLER_H_ |
OLD | NEW |