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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_WEBUI_PREDICTORS_PREDICTORS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_PREDICTORS_PREDICTORS_HANDLER_H_
8 #include "base/compiler_specific.h"
9 #include "content/public/browser/web_ui_message_handler.h"
15 namespace predictors
{
16 class AutocompleteActionPredictor
;
21 // The handler for Javascript messages for about:predictors.
22 class PredictorsHandler
: public content::WebUIMessageHandler
{
24 explicit PredictorsHandler(Profile
* profile
);
25 virtual ~PredictorsHandler();
27 // WebUIMessageHandler implementation.
28 virtual void RegisterMessages() OVERRIDE
;
31 // Synchronously fetches the database from AutocompleteActionPredictor and
32 // calls into JS with the resulting DictionaryValue.
33 void RequestAutocompleteActionPredictorDb(const base::ListValue
* args
);
35 predictors::AutocompleteActionPredictor
* autocomplete_action_predictor_
;
37 DISALLOW_COPY_AND_ASSIGN(PredictorsHandler
);
40 #endif // CHROME_BROWSER_UI_WEBUI_PREDICTORS_PREDICTORS_HANDLER_H_