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

Unified Diff: chrome/browser/ui/webui/predictors/autocomplete_action_predictor_dom_handler.h

Issue 9610006: Refactoring, moving and renaming the NetworkActionPredictor. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Resolved sync conflicts. Created 8 years, 8 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/predictors/autocomplete_action_predictor_dom_handler.h
diff --git a/chrome/browser/ui/webui/predictors/autocomplete_action_predictor_dom_handler.h b/chrome/browser/ui/webui/predictors/autocomplete_action_predictor_dom_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..f27ca9e63f4aaa7c1d2736eeb27dc0c1c292bce2
--- /dev/null
+++ b/chrome/browser/ui/webui/predictors/autocomplete_action_predictor_dom_handler.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_PREDICTORS_AUTOCOMPLETE_ACTION_PREDICTOR_DOM_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_PREDICTORS_AUTOCOMPLETE_ACTION_PREDICTOR_DOM_HANDLER_H_
+#pragma once
+
+#include "base/compiler_specific.h"
+#include "content/public/browser/web_ui_message_handler.h"
+
+namespace base {
+class ListValue;
+}
+
+class AutocompleteActionPredictor;
+class Profile;
+
+// The handler for Javascript messages for about:predictors.
+class AutocompleteActionPredictorDOMHandler
+ : public content::WebUIMessageHandler {
+ public:
+ explicit AutocompleteActionPredictorDOMHandler(Profile* profile);
+ virtual ~AutocompleteActionPredictorDOMHandler();
+
+ // WebUIMessageHandler implementation.
+ virtual void RegisterMessages() OVERRIDE;
+
+ private:
+ // Synchronously fetches the database from AutocompleteActionPredictor and
+ // calls into JS with the resulting DictionaryValue.
+ void RequestAutocompleteActionPredictorDb(const base::ListValue* args);
+
+ AutocompleteActionPredictor* autocomplete_action_predictor_;
+
+ DISALLOW_COPY_AND_ASSIGN(AutocompleteActionPredictorDOMHandler);
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_PREDICTORS_AUTOCOMPLETE_ACTION_PREDICTOR_DOM_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698