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

Side by Side Diff: chrome/browser/ui/views/infobars/translate_infobar_base.h

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 2 months 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) 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_VIEWS_INFOBARS_TRANSLATE_INFOBAR_BASE_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_INFOBAR_BASE_H_
6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_INFOBAR_BASE_H_ 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_INFOBAR_BASE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/browser/ui/views/infobars/infobar_background.h" 9 #include "chrome/browser/ui/views/infobars/infobar_background.h"
10 #include "chrome/browser/ui/views/infobars/infobar_view.h" 10 #include "chrome/browser/ui/views/infobars/infobar_view.h"
11 11
12 class TranslateInfoBarDelegate; 12 class TranslateInfoBarDelegate;
13 13
14 namespace views { 14 namespace views {
15 class MenuButton; 15 class MenuButton;
16 } 16 }
17 17
18 // This class contains some of the base functionality that translate infobars 18 // This class contains some of the base functionality that translate infobars
19 // use. 19 // use.
20 class TranslateInfoBarBase : public InfoBarView { 20 class TranslateInfoBarBase : public InfoBarView {
21 public: 21 public:
22 // Sets the text of the provided language menu button. 22 // Sets the text of the provided language menu button.
23 void UpdateLanguageButtonText(views::MenuButton* button, 23 void UpdateLanguageButtonText(views::MenuButton* button,
24 const string16& text); 24 const string16& text);
25 25
26 protected: 26 protected:
27 TranslateInfoBarBase(InfoBarService* owner, 27 explicit TranslateInfoBarBase(scoped_ptr<TranslateInfoBarDelegate> delegate);
28 TranslateInfoBarDelegate* delegate);
29 virtual ~TranslateInfoBarBase(); 28 virtual ~TranslateInfoBarBase();
30 29
31 // InfoBarView: 30 // InfoBarView:
32 virtual void ViewHierarchyChanged( 31 virtual void ViewHierarchyChanged(
33 const ViewHierarchyChangedDetails& details) OVERRIDE; 32 const ViewHierarchyChangedDetails& details) OVERRIDE;
34 33
35 // Convenience to retrieve the TranslateInfoBarDelegate for this infobar. 34 // Convenience to retrieve the TranslateInfoBarDelegate for this infobar.
36 TranslateInfoBarDelegate* GetDelegate(); 35 TranslateInfoBarDelegate* GetDelegate();
37 36
38 static const int kButtonInLabelSpacing; 37 static const int kButtonInLabelSpacing;
(...skipping 12 matching lines...) Expand all
51 double animation_value, 50 double animation_value,
52 const views::Background& background); 51 const views::Background& background);
53 52
54 InfoBarBackground error_background_; 53 InfoBarBackground error_background_;
55 scoped_ptr<gfx::SlideAnimation> background_color_animation_; 54 scoped_ptr<gfx::SlideAnimation> background_color_animation_;
56 55
57 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarBase); 56 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarBase);
58 }; 57 };
59 58
60 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_INFOBAR_BASE_H_ 59 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_INFOBAR_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698