| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 TranslateErrors::Type error, | 152 TranslateErrors::Type error, |
| 153 TabContents* tab_contents, | 153 TabContents* tab_contents, |
| 154 const std::string& original_language, | 154 const std::string& original_language, |
| 155 const std::string& target_language); | 155 const std::string& target_language); |
| 156 Type type_; | 156 Type type_; |
| 157 | 157 |
| 158 private: | 158 private: |
| 159 typedef std::pair<std::string, string16> LanguageNamePair; | 159 typedef std::pair<std::string, string16> LanguageNamePair; |
| 160 | 160 |
| 161 // InfoBarDelegate: | 161 // InfoBarDelegate: |
| 162 virtual InfoBar* CreateInfoBar() OVERRIDE; | 162 virtual InfoBar* CreateInfoBar(TabContentsWrapper* owner) OVERRIDE; |
| 163 virtual void InfoBarDismissed() OVERRIDE; | 163 virtual void InfoBarDismissed() OVERRIDE; |
| 164 virtual gfx::Image* GetIcon() const OVERRIDE; | 164 virtual gfx::Image* GetIcon() const OVERRIDE; |
| 165 virtual InfoBarDelegate::Type GetInfoBarType() const OVERRIDE; | 165 virtual InfoBarDelegate::Type GetInfoBarType() const OVERRIDE; |
| 166 virtual bool ShouldExpire( | 166 virtual bool ShouldExpire( |
| 167 const NavigationController::LoadCommittedDetails& details) const; | 167 const NavigationController::LoadCommittedDetails& details) const; |
| 168 virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() OVERRIDE; | 168 virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() OVERRIDE; |
| 169 | 169 |
| 170 // Gets the host of the page being translated, or an empty string if no URL is | 170 // Gets the host of the page being translated, or an empty string if no URL is |
| 171 // associated with the current page. | 171 // associated with the current page. |
| 172 std::string GetPageHost(); | 172 std::string GetPageHost(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 202 // The current infobar view. | 202 // The current infobar view. |
| 203 TranslateInfoBarView* infobar_view_; | 203 TranslateInfoBarView* infobar_view_; |
| 204 | 204 |
| 205 // The translation related preferences. | 205 // The translation related preferences. |
| 206 TranslatePrefs prefs_; | 206 TranslatePrefs prefs_; |
| 207 | 207 |
| 208 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); | 208 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); |
| 209 }; | 209 }; |
| 210 | 210 |
| 211 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ | 211 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ |
| OLD | NEW |