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 #if defined(TOOLKIT_VIEWS) // TODO(pkasting): Port non-views to use this. | |
6 | |
7 #ifndef CHROME_BROWSER_TAB_CONTENTS_INFOBAR_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_INFOBAR_H_ |
8 #define CHROME_BROWSER_TAB_CONTENTS_INFOBAR_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_INFOBAR_H_ |
9 #pragma once | 7 #pragma once |
10 | 8 |
11 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
12 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| 11 #include "chrome/browser/tab_contents/infobar_delegate.h" |
| 12 #include "third_party/skia/include/core/SkColor.h" |
13 #include "ui/base/animation/animation_delegate.h" | 13 #include "ui/base/animation/animation_delegate.h" |
14 #include "ui/gfx/size.h" | 14 #include "ui/gfx/size.h" |
15 | 15 |
| 16 // TODO(sail): These functions should be static methods in the InfoBar class |
| 17 // below once all platforms use that class. |
| 18 SkColor GetInfoBarTopColor(InfoBarDelegate::Type infobar_type); |
| 19 SkColor GetInfoBarBottomColor(InfoBarDelegate::Type infobar_type); |
| 20 |
| 21 #if defined(TOOLKIT_VIEWS) // TODO(pkasting): Port non-views to use this. |
| 22 |
16 class InfoBarContainer; | 23 class InfoBarContainer; |
17 class InfoBarDelegate; | |
18 class TabContentsWrapper; | 24 class TabContentsWrapper; |
19 | 25 |
20 namespace ui { | 26 namespace ui { |
21 class SlideAnimation; | 27 class SlideAnimation; |
22 } | 28 } |
23 | 29 |
24 class InfoBar : public ui::AnimationDelegate { | 30 class InfoBar : public ui::AnimationDelegate { |
25 public: | 31 public: |
26 InfoBar(TabContentsWrapper* owner, InfoBarDelegate* delegate); | 32 InfoBar(TabContentsWrapper* owner, InfoBarDelegate* delegate); |
27 virtual ~InfoBar(); | 33 virtual ~InfoBar(); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // arrow as two halves on either side of a center point.) | 115 // arrow as two halves on either side of a center point.) |
110 int arrow_height_; // Includes both fill and top stroke. | 116 int arrow_height_; // Includes both fill and top stroke. |
111 int arrow_target_height_; | 117 int arrow_target_height_; |
112 int arrow_half_width_; // Includes only fill. | 118 int arrow_half_width_; // Includes only fill. |
113 int bar_height_; // Includes both fill and bottom separator. | 119 int bar_height_; // Includes both fill and bottom separator. |
114 int bar_target_height_; | 120 int bar_target_height_; |
115 | 121 |
116 DISALLOW_COPY_AND_ASSIGN(InfoBar); | 122 DISALLOW_COPY_AND_ASSIGN(InfoBar); |
117 }; | 123 }; |
118 | 124 |
119 #endif // CHROME_BROWSER_TAB_CONTENTS_INFOBAR_H_ | |
120 | |
121 #elif defined(TOOLKIT_USES_GTK) | 125 #elif defined(TOOLKIT_USES_GTK) |
122 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" | 126 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" |
123 #elif defined(OS_MACOSX) | 127 #elif defined(OS_MACOSX) |
124 #include "chrome/browser/ui/cocoa/infobars/infobar.h" | 128 #include "chrome/browser/ui/cocoa/infobars/infobar.h" |
125 #endif | 129 #endif |
| 130 |
| 131 #endif // CHROME_BROWSER_TAB_CONTENTS_INFOBAR_H_ |
OLD | NEW |