Chromium Code Reviews| 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_TRANSLATE_TRANSLATE_BUBBLE_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_MODEL_H_ | 6 #define CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_MODEL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 // The view state when the detailed settings is shown. This view appears | 30 // The view state when the detailed settings is shown. This view appears |
| 31 // when the user click a link 'Advanced' on other views. | 31 // when the user click a link 'Advanced' on other views. |
| 32 VIEW_STATE_ADVANCED, | 32 VIEW_STATE_ADVANCED, |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 virtual ~TranslateBubbleModel() {} | 35 virtual ~TranslateBubbleModel() {} |
| 36 | 36 |
| 37 // Returns the current view state. | 37 // Returns the current view state. |
| 38 virtual ViewState GetViewState() const = 0; | 38 virtual ViewState GetViewState() const = 0; |
| 39 | 39 |
| 40 // Returns the Always Translate Checked. | |
|
msw
2016/04/29 19:59:59
This comment isn't well formed, consider "Returns
ftang
2016/04/29 22:37:00
Done.
| |
| 41 virtual bool GetAlwaysTranslateChecked() const = 0; | |
|
msw
2016/04/29 19:59:59
Rename this "IsAlwaysTranslateChecked" or "ShouldA
ftang
2016/04/29 22:37:00
Done.
| |
| 42 | |
| 40 // Transitions the view state. | 43 // Transitions the view state. |
| 41 virtual void SetViewState(ViewState view_state) = 0; | 44 virtual void SetViewState(ViewState view_state) = 0; |
| 42 | 45 |
| 43 // Shows an error. | 46 // Shows an error. |
| 44 virtual void ShowError(translate::TranslateErrors::Type error_type) = 0; | 47 virtual void ShowError(translate::TranslateErrors::Type error_type) = 0; |
| 45 | 48 |
| 46 // Goes back from the 'Advanced' view state. | 49 // Goes back from the 'Advanced' view state. |
| 47 virtual void GoBackFromAdvanced() = 0; | 50 virtual void GoBackFromAdvanced() = 0; |
| 48 | 51 |
| 49 // Returns the number of languages supported. | 52 // Returns the number of languages supported. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 // Called when the translate bubble is closed. Allows final cleanup and | 98 // Called when the translate bubble is closed. Allows final cleanup and |
| 96 // notification of delegates. | 99 // notification of delegates. |
| 97 virtual void OnBubbleClosing() = 0; | 100 virtual void OnBubbleClosing() = 0; |
| 98 | 101 |
| 99 // Returns true if the page is translated in the currently selected source | 102 // Returns true if the page is translated in the currently selected source |
| 100 // and target language. | 103 // and target language. |
| 101 virtual bool IsPageTranslatedInCurrentLanguages() const = 0; | 104 virtual bool IsPageTranslatedInCurrentLanguages() const = 0; |
| 102 }; | 105 }; |
| 103 | 106 |
| 104 #endif // CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_MODEL_H_ | 107 #endif // CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_MODEL_H_ |
| OLD | NEW |