OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ | 5 #ifndef COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ |
6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ | 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "components/infobars/core/infobar_delegate.h" | 15 #include "components/infobars/core/infobar_delegate.h" |
16 #include "components/translate/core/browser/translate_prefs.h" | 16 #include "components/translate/core/browser/translate_prefs.h" |
17 #include "components/translate/core/browser/translate_step.h" | 17 #include "components/translate/core/browser/translate_step.h" |
18 #include "components/translate/core/browser/translate_ui_delegate.h" | 18 #include "components/translate/core/browser/translate_ui_delegate.h" |
19 #include "components/translate/core/common/translate_constants.h" | 19 #include "components/translate/core/common/translate_constants.h" |
20 #include "components/translate/core/common/translate_errors.h" | 20 #include "components/translate/core/common/translate_errors.h" |
21 | 21 |
| 22 namespace infobars { |
| 23 class InfoBarManager; |
| 24 } |
| 25 |
| 26 namespace translate { |
| 27 |
22 class TranslateClient; | 28 class TranslateClient; |
23 class TranslateDriver; | 29 class TranslateDriver; |
24 class TranslateManager; | 30 class TranslateManager; |
25 | 31 |
26 namespace infobars { | |
27 class InfoBarManager; | |
28 } | |
29 | |
30 class TranslateInfoBarDelegate : public infobars::InfoBarDelegate { | 32 class TranslateInfoBarDelegate : public infobars::InfoBarDelegate { |
31 public: | 33 public: |
32 // The types of background color animations. | 34 // The types of background color animations. |
33 enum BackgroundAnimationType { | 35 enum BackgroundAnimationType { |
34 NONE, | 36 NONE, |
35 NORMAL_TO_ERROR, | 37 NORMAL_TO_ERROR, |
36 ERROR_TO_NORMAL | 38 ERROR_TO_NORMAL |
37 }; | 39 }; |
38 | 40 |
39 static const size_t kNoIndex; | 41 static const size_t kNoIndex; |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 213 |
212 // The translation related preferences. | 214 // The translation related preferences. |
213 scoped_ptr<TranslatePrefs> prefs_; | 215 scoped_ptr<TranslatePrefs> prefs_; |
214 | 216 |
215 // Whether the translation was triggered via a menu click vs automatically | 217 // Whether the translation was triggered via a menu click vs automatically |
216 // (due to language detection, preferences...) | 218 // (due to language detection, preferences...) |
217 bool triggered_from_menu_; | 219 bool triggered_from_menu_; |
218 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); | 220 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); |
219 }; | 221 }; |
220 | 222 |
| 223 } // namespace translate |
| 224 |
221 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ | 225 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ |
OLD | NEW |