Chromium Code Reviews| 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 translate { | |
| 22 class TranslateClient; | 23 class TranslateClient; |
|
droger
2014/07/09 07:52:43
Nit: move these declarations around line 33.
nshaik
2014/07/09 08:56:51
Done.
| |
| 23 class TranslateDriver; | 24 class TranslateDriver; |
| 24 class TranslateManager; | 25 class TranslateManager; |
| 26 } | |
| 25 | 27 |
| 26 namespace infobars { | 28 namespace infobars { |
| 27 class InfoBarManager; | 29 class InfoBarManager; |
| 28 } | 30 } |
| 29 | 31 |
| 32 namespace translate { | |
| 33 | |
| 30 class TranslateInfoBarDelegate : public infobars::InfoBarDelegate { | 34 class TranslateInfoBarDelegate : public infobars::InfoBarDelegate { |
| 31 public: | 35 public: |
| 32 // The types of background color animations. | 36 // The types of background color animations. |
| 33 enum BackgroundAnimationType { | 37 enum BackgroundAnimationType { |
| 34 NONE, | 38 NONE, |
| 35 NORMAL_TO_ERROR, | 39 NORMAL_TO_ERROR, |
| 36 ERROR_TO_NORMAL | 40 ERROR_TO_NORMAL |
| 37 }; | 41 }; |
| 38 | 42 |
| 39 static const size_t kNoIndex; | 43 static const size_t kNoIndex; |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 211 | 215 |
| 212 // The translation related preferences. | 216 // The translation related preferences. |
| 213 scoped_ptr<TranslatePrefs> prefs_; | 217 scoped_ptr<TranslatePrefs> prefs_; |
| 214 | 218 |
| 215 // Whether the translation was triggered via a menu click vs automatically | 219 // Whether the translation was triggered via a menu click vs automatically |
| 216 // (due to language detection, preferences...) | 220 // (due to language detection, preferences...) |
| 217 bool triggered_from_menu_; | 221 bool triggered_from_menu_; |
| 218 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); | 222 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); |
| 219 }; | 223 }; |
| 220 | 224 |
| 225 } // namespace translate | |
| 226 | |
| 221 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ | 227 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ |
| OLD | NEW |