| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_NETWORK_ACTION_PREDICTOR_NETWORK_ACTION_PREDICTO
R_DOM_HANDLER_H_ | |
| 6 #define CHROME_BROWSER_UI_WEBUI_NETWORK_ACTION_PREDICTOR_NETWORK_ACTION_PREDICTO
R_DOM_HANDLER_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/compiler_specific.h" | |
| 10 #include "content/public/browser/web_ui_message_handler.h" | |
| 11 | |
| 12 namespace base { | |
| 13 class ListValue; | |
| 14 } | |
| 15 | |
| 16 class NetworkActionPredictor; | |
| 17 class Profile; | |
| 18 | |
| 19 // The handler for Javascript messages for about:network-action-predictor. | |
| 20 class NetworkActionPredictorDOMHandler : public content::WebUIMessageHandler { | |
| 21 public: | |
| 22 explicit NetworkActionPredictorDOMHandler(Profile* profile); | |
| 23 virtual ~NetworkActionPredictorDOMHandler(); | |
| 24 | |
| 25 // WebUIMessageHandler implementation. | |
| 26 virtual void RegisterMessages() OVERRIDE; | |
| 27 | |
| 28 private: | |
| 29 // Synchronously fetches the database from NetworkActionPredictor and calls | |
| 30 // into JS with the resulting DictionaryValue. | |
| 31 void RequestNetworkActionPredictorDb(const base::ListValue* args); | |
| 32 | |
| 33 NetworkActionPredictor* network_action_predictor_; | |
| 34 | |
| 35 DISALLOW_COPY_AND_ASSIGN(NetworkActionPredictorDOMHandler); | |
| 36 }; | |
| 37 | |
| 38 #endif // CHROME_BROWSER_UI_WEBUI_NETWORK_ACTION_PREDICTOR_NETWORK_ACTION_PREDI
CTOR_DOM_HANDLER_H_ | |
| OLD | NEW |