Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 // types, |original_language| and |target_language| must be ASCII language | 51 // types, |original_language| and |target_language| must be ASCII language |
| 52 // codes (e.g. "en", "fr", etc.) for languages the TranslateManager supports | 52 // codes (e.g. "en", "fr", etc.) for languages the TranslateManager supports |
| 53 // translating. The lone exception is when the user initiates translation | 53 // translating. The lone exception is when the user initiates translation |
| 54 // from the context menu, in which case it's legal to call this with | 54 // from the context menu, in which case it's legal to call this with |
| 55 // |infobar_type| == TRANSLATING and | 55 // |infobar_type| == TRANSLATING and |
| 56 // |original_language| == kUnknownLanguageCode. | 56 // |original_language| == kUnknownLanguageCode. |
| 57 // | 57 // |
| 58 // If |replace_existing_infobar| is true, the infobar is created and added to | 58 // If |replace_existing_infobar| is true, the infobar is created and added to |
| 59 // |infobar_service|, replacing any other translate infobar already present | 59 // |infobar_service|, replacing any other translate infobar already present |
| 60 // there. Otherwise, the infobar will only be added if there is no other | 60 // there. Otherwise, the infobar will only be added if there is no other |
| 61 // translate infobar already present. | 61 // translate infobar already present and if the infobar needs to be displayed. |
|
Peter Kasting
2013/07/17 18:06:19
Nit: Don't make this change; it's somewhat inaccur
| |
| 62 static void Create(InfoBarService* infobar_service, | 62 static void Create(InfoBarService* infobar_service, |
| 63 bool replace_existing_infobar, | 63 bool replace_existing_infobar, |
| 64 Type infobar_type, | 64 Type infobar_type, |
| 65 TranslateErrors::Type error_type, | 65 TranslateErrors::Type error_type, |
| 66 PrefService* prefs, | 66 PrefService* prefs, |
| 67 const ShortcutConfiguration& shortcut_config, | 67 const ShortcutConfiguration& shortcut_config, |
| 68 const std::string& original_language, | 68 const std::string& original_language, |
| 69 const std::string& target_language); | 69 const std::string& target_language); |
| 70 | 70 |
| 71 // Returns the number of languages supported. | 71 // Returns the number of languages supported. |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 237 | 237 |
| 238 // The translation related preferences. | 238 // The translation related preferences. |
| 239 TranslatePrefs prefs_; | 239 TranslatePrefs prefs_; |
| 240 | 240 |
| 241 // Translation shortcut configuration | 241 // Translation shortcut configuration |
| 242 ShortcutConfiguration shortcut_config_; | 242 ShortcutConfiguration shortcut_config_; |
| 243 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); | 243 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); |
| 244 }; | 244 }; |
| 245 | 245 |
| 246 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ | 246 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ |
| OLD | NEW |