Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: chrome/browser/ui/gtk/infobars/translate_infobar_base_gtk.h

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" 9 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h"
10 #include "ui/gfx/animation/animation_delegate.h" 10 #include "ui/gfx/animation/animation_delegate.h"
11 11
12 class TranslateInfoBarDelegate; 12 class TranslateInfoBarDelegate;
13 13
14 // This class contains some of the base functionality that translate infobars 14 // This class contains some of the base functionality that translate infobars
15 // use. 15 // use.
16 class TranslateInfoBarBase : public InfoBarGtk { 16 class TranslateInfoBarBase : public InfoBarGtk {
17 protected: 17 protected:
18 TranslateInfoBarBase(InfoBarService* owner, 18 explicit TranslateInfoBarBase(scoped_ptr<TranslateInfoBarDelegate> delegate);
19 TranslateInfoBarDelegate* delegate);
20 virtual ~TranslateInfoBarBase(); 19 virtual ~TranslateInfoBarBase();
21 20
22 // InfoBarGtk: 21 // InfoBarGtk:
23 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; 22 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE;
23 virtual void PlatformSpecificSetOwner() OVERRIDE;
24 virtual void GetTopColor(InfoBarDelegate::Type type, 24 virtual void GetTopColor(InfoBarDelegate::Type type,
25 double* r, double* g, double* b) OVERRIDE; 25 double* r, double* g, double* b) OVERRIDE;
26 virtual void GetBottomColor(InfoBarDelegate::Type type, 26 virtual void GetBottomColor(InfoBarDelegate::Type type,
27 double* r, double* g, double* b) OVERRIDE; 27 double* r, double* g, double* b) OVERRIDE;
28 virtual void InitWidgets() OVERRIDE;
29 28
30 // Sub-classes that want to have the options menu button showing should 29 // Sub-classes that want to have the options menu button showing should
31 // override and return true. 30 // override and return true.
32 virtual bool ShowOptionsMenuButton() const; 31 virtual bool ShowOptionsMenuButton() const;
33 32
34 // Creates a combobox that displays the languages currently available. 33 // Creates a combobox that displays the languages currently available.
35 // |selected_language| is the language index (as used in the 34 // |selected_language| is the language index (as used in the
36 // TranslateInfoBarDelegate) that should be selected initially. 35 // TranslateInfoBarDelegate) that should be selected initially.
37 // |exclude_language| is the language index of the language that should not be 36 // |exclude_language| is the language index of the language that should not be
38 // included in the list (TranslateInfoBarDelegate::kNoIndex means no language 37 // included in the list (TranslateInfoBarDelegate::kNoIndex means no language
(...skipping 28 matching lines...) Expand all
67 // Changes the color of the background from normal to error color and back. 66 // Changes the color of the background from normal to error color and back.
68 scoped_ptr<gfx::SlideAnimation> background_color_animation_; 67 scoped_ptr<gfx::SlideAnimation> background_color_animation_;
69 68
70 // The model for the current menu displayed. 69 // The model for the current menu displayed.
71 scoped_ptr<ui::MenuModel> menu_model_; 70 scoped_ptr<ui::MenuModel> menu_model_;
72 71
73 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarBase); 72 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarBase);
74 }; 73 };
75 74
76 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_TRANSLATE_INFOBAR_BASE_GTK_H_ 75 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_TRANSLATE_INFOBAR_BASE_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/infobars/infobar_gtk.cc ('k') | chrome/browser/ui/gtk/infobars/translate_infobar_base_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698