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 #include "chrome/browser/ui/gtk/translate/translate_infobar_base_gtk.h" | 5 #include "chrome/browser/ui/gtk/translate/translate_infobar_base_gtk.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/translate/options_menu_model.h" | 8 #include "chrome/browser/translate/options_menu_model.h" |
9 #include "chrome/browser/translate/translate_infobar_delegate.h" | 9 #include "chrome/browser/translate/translate_infobar_delegate.h" |
10 #include "chrome/browser/ui/gtk/gtk_util.h" | 10 #include "chrome/browser/ui/gtk/gtk_util.h" |
11 #include "chrome/browser/ui/gtk/menu_gtk.h" | 11 #include "chrome/browser/ui/gtk/menu_gtk.h" |
12 #include "chrome/browser/ui/gtk/translate/after_translate_infobar_gtk.h" | 12 #include "chrome/browser/ui/gtk/translate/after_translate_infobar_gtk.h" |
13 #include "chrome/browser/ui/gtk/translate/before_translate_infobar_gtk.h" | 13 #include "chrome/browser/ui/gtk/translate/before_translate_infobar_gtk.h" |
14 #include "chrome/browser/ui/gtk/translate/translate_message_infobar_gtk.h" | 14 #include "chrome/browser/ui/gtk/translate/translate_message_infobar_gtk.h" |
15 #include "gfx/canvas.h" | |
16 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
17 #include "ui/base/animation/slide_animation.h" | 16 #include "ui/base/animation/slide_animation.h" |
18 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
| 18 #include "ui/gfx/canvas.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 // To be able to map from language id <-> entry in the combo box, we | 22 // To be able to map from language id <-> entry in the combo box, we |
23 // store the language id in the combo box data model in addition to the | 23 // store the language id in the combo box data model in addition to the |
24 // displayed name. | 24 // displayed name. |
25 enum { | 25 enum { |
26 LANGUAGE_COMBO_COLUMN_ID, | 26 LANGUAGE_COMBO_COLUMN_ID, |
27 LANGUAGE_COMBO_COLUMN_NAME, | 27 LANGUAGE_COMBO_COLUMN_NAME, |
28 LANGUAGE_COMBO_COLUMN_COUNT | 28 LANGUAGE_COMBO_COLUMN_COUNT |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 break; | 232 break; |
233 default: | 233 default: |
234 NOTREACHED(); | 234 NOTREACHED(); |
235 } | 235 } |
236 infobar->Init(); | 236 infobar->Init(); |
237 // Set |infobar_view_| so that the model can notify the infobar when it | 237 // Set |infobar_view_| so that the model can notify the infobar when it |
238 // changes. | 238 // changes. |
239 infobar_view_ = infobar; | 239 infobar_view_ = infobar; |
240 return infobar; | 240 return infobar; |
241 } | 241 } |
OLD | NEW |