Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 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 COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_CLIENT_H_ | |
| 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_CLIENT_H_ | |
| 7 | |
| 8 #include "components/translate/core/browser/language_state.h" | |
| 9 | |
| 10 class TranslateClient { | |
|
blundell
2014/01/17 15:09:39
This needs a class-level comment.
droger
2014/01/17 16:14:21
Done.
| |
| 11 public: | |
| 12 TranslateClient(); | |
| 13 virtual ~TranslateClient(); | |
| 14 | |
| 15 // Gets the language state. | |
| 16 LanguageState& GetLanguageState(); | |
| 17 | |
| 18 protected: | |
| 19 LanguageState language_state_; | |
|
blundell
2014/01/17 15:09:39
This should just be in the subclasses I think.
droger
2014/01/17 16:14:21
Done.
| |
| 20 | |
| 21 private: | |
| 22 // Methods called by LanguageState. | |
|
blundell
2014/01/17 15:09:39
Why would these methods be private?
droger
2014/01/17 16:14:21
As discussed offline, it was that nobody can call
| |
| 23 friend class LanguageState; | |
| 24 virtual bool IsLinkNavigation() = 0; | |
| 25 virtual void OnTranslateEnabledChanged() = 0; | |
| 26 virtual void OnIsPageTranslatedChanged() = 0; | |
| 27 | |
| 28 DISALLOW_COPY_AND_ASSIGN(TranslateClient); | |
| 29 }; | |
| 30 | |
| 31 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_CLIENT_H_ | |
| OLD | NEW |