OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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_TRANSLATE_INTERNALS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_TRANSLATE_INTERNALS_HANDLER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "content/public/browser/web_ui_message_handler.h" |
| 11 #include "webkit/plugins/webplugininfo.h" |
| 12 |
| 13 namespace base { |
| 14 class ListValue; |
| 15 class Value; |
| 16 } |
| 17 |
| 18 // The handler class for TranslateInternals page operations. |
| 19 class TranslateInternalsHandler : public content::WebUIMessageHandler { |
| 20 public: |
| 21 TranslateInternalsHandler() {} |
| 22 virtual ~TranslateInternalsHandler() {} |
| 23 |
| 24 // content::WebUIMessageHandler methods: |
| 25 virtual void RegisterMessages() OVERRIDE; |
| 26 |
| 27 private: |
| 28 // Handles the Javascript message 'requestInfo'. This message is sent |
| 29 // when UI needs to show information concerned with the translation. |
| 30 // For now, this returns only prefs to Javascript. |
| 31 void OnRequestInfo(const base::ListValue* args); |
| 32 |
| 33 // Sends a messsage to Javascript. |
| 34 void SendMessageToJs(const std::string& message, const base::Value& value); |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(TranslateInternalsHandler); |
| 37 }; |
| 38 |
| 39 #endif // CHROME_BROWSER_UI_WEBUI_TRANSLATE_INTERNALS_HANDLER_H_ |
OLD | NEW |