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_UI_GTK_INFOBARS_TRANSLATE_INFOBAR_BASE_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_INFOBARS_TRANSLATE_INFOBAR_BASE_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_INFOBARS_TRANSLATE_INFOBAR_BASE_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_INFOBARS_TRANSLATE_INFOBAR_BASE_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" | 10 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 size_t exclude_language); | 48 size_t exclude_language); |
49 | 49 |
50 // Given an above-constructed combobox, returns the currently selected | 50 // Given an above-constructed combobox, returns the currently selected |
51 // language id. | 51 // language id. |
52 static size_t GetLanguageComboboxActiveId(GtkComboBox* combo); | 52 static size_t GetLanguageComboboxActiveId(GtkComboBox* combo); |
53 | 53 |
54 // Convenience to retrieve the TranslateInfoBarDelegate for this infobar. | 54 // Convenience to retrieve the TranslateInfoBarDelegate for this infobar. |
55 TranslateInfoBarDelegate* GetDelegate(); | 55 TranslateInfoBarDelegate* GetDelegate(); |
56 | 56 |
57 private: | 57 private: |
58 // Builds a button with an arrow in it to emulate the menu-button style from | |
59 // the windows version. | |
60 static GtkWidget* BuildOptionsMenuButton(); | |
61 | |
62 CHROMEGTK_CALLBACK_0(TranslateInfoBarBase, void, OnOptionsClicked); | 58 CHROMEGTK_CALLBACK_0(TranslateInfoBarBase, void, OnOptionsClicked); |
63 | 59 |
64 // A percentage to average the normal page action background with the error | 60 // A percentage to average the normal page action background with the error |
65 // background. When 0, the infobar background should be pure PAGE_ACTION_TYPE. | 61 // background. When 0, the infobar background should be pure PAGE_ACTION_TYPE. |
66 // When 1, the infobar background should be pure WARNING_TYPE. | 62 // When 1, the infobar background should be pure WARNING_TYPE. |
67 double background_error_percent_; | 63 double background_error_percent_; |
68 | 64 |
69 // Changes the color of the background from normal to error color and back. | 65 // Changes the color of the background from normal to error color and back. |
70 scoped_ptr<ui::SlideAnimation> background_color_animation_; | 66 scoped_ptr<ui::SlideAnimation> background_color_animation_; |
71 | 67 |
72 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarBase); | 68 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarBase); |
73 }; | 69 }; |
74 | 70 |
75 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_TRANSLATE_INFOBAR_BASE_GTK_H_ | 71 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_TRANSLATE_INFOBAR_BASE_GTK_H_ |
OLD | NEW |