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

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

Issue 102163002: Revert 238283 "Infobar system refactor." (Closed) Base URL: svn://svn.chromium.org/chrome/
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) 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 explicit TranslateInfoBarBase(scoped_ptr<TranslateInfoBarDelegate> delegate); 27 TranslateInfoBarBase(InfoBarService* owner,
28 TranslateInfoBarDelegate* delegate);
28 virtual ~TranslateInfoBarBase(); 29 virtual ~TranslateInfoBarBase();
29 30
30 // InfoBarView: 31 // InfoBarView:
31 virtual void ViewHierarchyChanged( 32 virtual void ViewHierarchyChanged(
32 const ViewHierarchyChangedDetails& details) OVERRIDE; 33 const ViewHierarchyChangedDetails& details) OVERRIDE;
33 34
34 // Convenience to retrieve the TranslateInfoBarDelegate for this infobar. 35 // Convenience to retrieve the TranslateInfoBarDelegate for this infobar.
35 TranslateInfoBarDelegate* GetDelegate(); 36 TranslateInfoBarDelegate* GetDelegate();
36 37
37 static const int kButtonInLabelSpacing; 38 static const int kButtonInLabelSpacing;
(...skipping 12 matching lines...) Expand all
50 double animation_value, 51 double animation_value,
51 const views::Background& background); 52 const views::Background& background);
52 53
53 InfoBarBackground error_background_; 54 InfoBarBackground error_background_;
54 scoped_ptr<gfx::SlideAnimation> background_color_animation_; 55 scoped_ptr<gfx::SlideAnimation> background_color_animation_;
55 56
56 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarBase); 57 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarBase);
57 }; 58 };
58 59
59 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_INFOBAR_BASE_H_ 60 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_INFOBAR_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698