| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_OPTIONS_SEARCH_ENGINE_MANAGER_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_SEARCH_ENGINE_MANAGER_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_SEARCH_ENGINE_MANAGER_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_SEARCH_ENGINE_MANAGER_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/ui/search_engines/edit_search_engine_controller.h" | 9 #include "chrome/browser/ui/search_engines/edit_search_engine_controller.h" |
| 10 #include "chrome/browser/ui/webui/options/options_ui.h" | 10 #include "chrome/browser/ui/webui/options/options_ui.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 // EditSearchEngineControllerDelegate implementation. | 39 // EditSearchEngineControllerDelegate implementation. |
| 40 void OnEditedKeyword(TemplateURL* template_url, | 40 void OnEditedKeyword(TemplateURL* template_url, |
| 41 const base::string16& title, | 41 const base::string16& title, |
| 42 const base::string16& keyword, | 42 const base::string16& keyword, |
| 43 const std::string& url) override; | 43 const std::string& url) override; |
| 44 | 44 |
| 45 void RegisterMessages() override; | 45 void RegisterMessages() override; |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 scoped_ptr<KeywordEditorController> list_controller_; | 48 std::unique_ptr<KeywordEditorController> list_controller_; |
| 49 scoped_ptr<EditSearchEngineController> edit_controller_; | 49 std::unique_ptr<EditSearchEngineController> edit_controller_; |
| 50 | 50 |
| 51 // Removes the search engine at the given index. Called from WebUI. | 51 // Removes the search engine at the given index. Called from WebUI. |
| 52 void RemoveSearchEngine(const base::ListValue* args); | 52 void RemoveSearchEngine(const base::ListValue* args); |
| 53 | 53 |
| 54 // Sets the search engine at the given index to be default. Called from WebUI. | 54 // Sets the search engine at the given index to be default. Called from WebUI. |
| 55 void SetDefaultSearchEngine(const base::ListValue* args); | 55 void SetDefaultSearchEngine(const base::ListValue* args); |
| 56 | 56 |
| 57 // Starts an edit session for the search engine at the given index. If the | 57 // Starts an edit session for the search engine at the given index. If the |
| 58 // index is -1, starts editing a new search engine instead of an existing one. | 58 // index is -1, starts editing a new search engine instead of an existing one. |
| 59 // Called from WebUI. | 59 // Called from WebUI. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 77 // Returns a dictionary to pass to WebUI representing the extension. | 77 // Returns a dictionary to pass to WebUI representing the extension. |
| 78 base::DictionaryValue* CreateDictionaryForExtension( | 78 base::DictionaryValue* CreateDictionaryForExtension( |
| 79 const extensions::Extension& extension); | 79 const extensions::Extension& extension); |
| 80 | 80 |
| 81 DISALLOW_COPY_AND_ASSIGN(SearchEngineManagerHandler); | 81 DISALLOW_COPY_AND_ASSIGN(SearchEngineManagerHandler); |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 } // namespace options | 84 } // namespace options |
| 85 | 85 |
| 86 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SEARCH_ENGINE_MANAGER_HANDLER_H_ | 86 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SEARCH_ENGINE_MANAGER_HANDLER_H_ |
| OLD | NEW |