| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_TRANSLATE_INTERNALS_TRANSLATE_INTERNALS_HANDLER_
H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_TRANSLATE_INTERNALS_TRANSLATE_INTERNALS_HANDLER_
H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_TRANSLATE_INTERNALS_TRANSLATE_INTERNALS_HANDLER_
H_ | 6 #define CHROME_BROWSER_UI_WEBUI_TRANSLATE_INTERNALS_TRANSLATE_INTERNALS_HANDLER_
H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_list.h" | 10 #include "base/callback_list.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 } | 34 } |
| 35 | 35 |
| 36 // The handler class for TranslateInternals page operations. | 36 // The handler class for TranslateInternals page operations. |
| 37 class TranslateInternalsHandler : public content::WebUIMessageHandler, | 37 class TranslateInternalsHandler : public content::WebUIMessageHandler, |
| 38 public content::NotificationObserver { | 38 public content::NotificationObserver { |
| 39 public: | 39 public: |
| 40 TranslateInternalsHandler(); | 40 TranslateInternalsHandler(); |
| 41 virtual ~TranslateInternalsHandler(); | 41 virtual ~TranslateInternalsHandler(); |
| 42 | 42 |
| 43 // content::WebUIMessageHandler methods: | 43 // content::WebUIMessageHandler methods: |
| 44 virtual void RegisterMessages() OVERRIDE; | 44 virtual void RegisterMessages() override; |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 // content::NotificationObserver implementation: | 47 // content::NotificationObserver implementation: |
| 48 virtual void Observe(int type, | 48 virtual void Observe(int type, |
| 49 const content::NotificationSource& source, | 49 const content::NotificationSource& source, |
| 50 const content::NotificationDetails& details) OVERRIDE; | 50 const content::NotificationDetails& details) override; |
| 51 | 51 |
| 52 // Callback for translate errors. | 52 // Callback for translate errors. |
| 53 void OnTranslateError(const translate::TranslateErrorDetails& details); | 53 void OnTranslateError(const translate::TranslateErrorDetails& details); |
| 54 | 54 |
| 55 // Callback for translate events. | 55 // Callback for translate events. |
| 56 virtual void OnTranslateEvent( | 56 virtual void OnTranslateEvent( |
| 57 const translate::TranslateEventDetails& details); | 57 const translate::TranslateEventDetails& details); |
| 58 | 58 |
| 59 // Handles the Javascript message 'removePrefItem'. This message is sent | 59 // Handles the Javascript message 'removePrefItem'. This message is sent |
| 60 // when UI requests to remove an item in the preference. | 60 // when UI requests to remove an item in the preference. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 83 scoped_ptr< | 83 scoped_ptr< |
| 84 translate::TranslateManager::TranslateErrorCallbackList::Subscription> | 84 translate::TranslateManager::TranslateErrorCallbackList::Subscription> |
| 85 error_subscription_; | 85 error_subscription_; |
| 86 | 86 |
| 87 content::NotificationRegistrar notification_registrar_; | 87 content::NotificationRegistrar notification_registrar_; |
| 88 | 88 |
| 89 DISALLOW_COPY_AND_ASSIGN(TranslateInternalsHandler); | 89 DISALLOW_COPY_AND_ASSIGN(TranslateInternalsHandler); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 #endif // CHROME_BROWSER_UI_WEBUI_TRANSLATE_INTERNALS_TRANSLATE_INTERNALS_HANDL
ER_H_ | 92 #endif // CHROME_BROWSER_UI_WEBUI_TRANSLATE_INTERNALS_TRANSLATE_INTERNALS_HANDL
ER_H_ |
| OLD | NEW |