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

Unified Diff: chrome/browser/ui/webui/settings/search_engines_handler.h

Issue 1988463002: MD Settings: Convert C++ handlers to be JavaScript-lifecycle aware. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/settings/search_engines_handler.h
diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.h b/chrome/browser/ui/webui/settings/search_engines_handler.h
index d5a11c8093d87cd8d2bdb3649c234fd2e0d3f542..650ac84d4b74e80040c4f29845a9788d8e54c91a 100644
--- a/chrome/browser/ui/webui/settings/search_engines_handler.h
+++ b/chrome/browser/ui/webui/settings/search_engines_handler.h
@@ -9,10 +9,10 @@
#include "base/macros.h"
#include "chrome/browser/ui/search_engines/edit_search_engine_controller.h"
+#include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
#include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
#include "ui/base/models/table_model_observer.h"
-class KeywordEditorController;
class Profile;
namespace extensions {
@@ -40,12 +40,12 @@ class SearchEnginesHandler : public SettingsPageUIHandler,
const base::string16& keyword,
const std::string& url) override;
+ // SettingsPageUIHandler implementation.
void RegisterMessages() override;
+ void OnJavascriptAllowed() override;
+ void OnJavascriptDisallowed() override;
private:
- std::unique_ptr<KeywordEditorController> list_controller_;
- std::unique_ptr<EditSearchEngineController> edit_controller_;
-
// Retrieves all search engines and returns the to WebUI.
void HandleGetSearchEnginesList(const base::ListValue* args);
@@ -91,6 +91,9 @@ class SearchEnginesHandler : public SettingsPageUIHandler,
Profile* const profile_;
+ KeywordEditorController list_controller_;
+ std::unique_ptr<EditSearchEngineController> edit_controller_;
+
DISALLOW_COPY_AND_ASSIGN(SearchEnginesHandler);
};
« no previous file with comments | « chrome/browser/ui/webui/settings/reset_settings_handler.cc ('k') | chrome/browser/ui/webui/settings/search_engines_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698