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(TabContents* 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 TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() OVERRIDE; | 166 virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() OVERRIDE; |
167 | 167 |
168 // Gets the host of the page being translated, or an empty string if no URL is | 168 // Gets the host of the page being translated, or an empty string if no URL is |
169 // associated with the current page. | 169 // associated with the current page. |
170 std::string GetPageHost(); | 170 std::string GetPageHost(); |
171 | 171 |
172 // The type of fading animation if any that should be used when showing this | 172 // The type of fading animation if any that should be used when showing this |
(...skipping 27 matching lines...) Expand all Loading... |
200 // The current infobar view. | 200 // The current infobar view. |
201 TranslateInfoBarView* infobar_view_; | 201 TranslateInfoBarView* infobar_view_; |
202 | 202 |
203 // The translation related preferences. | 203 // The translation related preferences. |
204 TranslatePrefs prefs_; | 204 TranslatePrefs prefs_; |
205 | 205 |
206 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); | 206 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); |
207 }; | 207 }; |
208 | 208 |
209 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ | 209 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ |
OLD | NEW |