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_INFOBARS_INFOBAR_H_ | 5 #ifndef CHROME_BROWSER_INFOBARS_INFOBAR_H_ |
6 #define CHROME_BROWSER_INFOBARS_INFOBAR_H_ | 6 #define CHROME_BROWSER_INFOBARS_INFOBAR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 typedef std::pair<InfoBarDelegate*, InfoBarDelegate*> InfoBarReplacedDetails; | 28 typedef std::pair<InfoBarDelegate*, InfoBarDelegate*> InfoBarReplacedDetails; |
29 | 29 |
30 // TODO(pkasting): Port Mac to use this. | 30 // TODO(pkasting): Port Mac to use this. |
31 #if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK) | 31 #if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK) |
32 | 32 |
33 class InfoBarContainer; | 33 class InfoBarContainer; |
34 class InfoBarTabHelper; | 34 class InfoBarTabHelper; |
35 | 35 |
36 class InfoBar : public ui::AnimationDelegate { | 36 class InfoBar : public ui::AnimationDelegate { |
37 public: | 37 public: |
| 38 // |InfoBar| takes the ownership of |delegate|. |
38 InfoBar(InfoBarTabHelper* owner, InfoBarDelegate* delegate); | 39 InfoBar(InfoBarTabHelper* owner, InfoBarDelegate* delegate); |
39 virtual ~InfoBar(); | 40 virtual ~InfoBar(); |
40 | 41 |
41 // Platforms must define these. | 42 // Platforms must define these. |
42 static const int kDefaultBarTargetHeight; | 43 static const int kDefaultBarTargetHeight; |
43 static const int kSeparatorLineHeight; | 44 static const int kSeparatorLineHeight; |
44 static const int kDefaultArrowTargetHeight; | 45 static const int kDefaultArrowTargetHeight; |
45 static const int kMaximumArrowTargetHeight; | 46 static const int kMaximumArrowTargetHeight; |
46 // The half-width (see comments on |arrow_half_width_| below) scales to its | 47 // The half-width (see comments on |arrow_half_width_| below) scales to its |
47 // default and maximum values proportionally to how the height scales to its. | 48 // default and maximum values proportionally to how the height scales to its. |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 int bar_target_height_; | 135 int bar_target_height_; |
135 | 136 |
136 DISALLOW_COPY_AND_ASSIGN(InfoBar); | 137 DISALLOW_COPY_AND_ASSIGN(InfoBar); |
137 }; | 138 }; |
138 | 139 |
139 #elif defined(OS_MACOSX) | 140 #elif defined(OS_MACOSX) |
140 #include "chrome/browser/ui/cocoa/infobars/infobar.h" | 141 #include "chrome/browser/ui/cocoa/infobars/infobar.h" |
141 #endif | 142 #endif |
142 | 143 |
143 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_H_ | 144 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_H_ |
OLD | NEW |