OLD | NEW |
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_INFOBARS_INFOBAR_H_ | 5 #ifndef COMPONENTS_INFOBARS_CORE_INFOBAR_H_ |
6 #define CHROME_BROWSER_INFOBARS_INFOBAR_H_ | 6 #define COMPONENTS_INFOBARS_CORE_INFOBAR_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "chrome/browser/infobars/infobar_delegate.h" | 11 #include "components/infobars/core/infobar_delegate.h" |
12 #include "third_party/skia/include/core/SkColor.h" | 12 #include "third_party/skia/include/core/SkColor.h" |
13 #include "ui/gfx/animation/animation_delegate.h" | 13 #include "ui/gfx/animation/animation_delegate.h" |
14 #include "ui/gfx/animation/slide_animation.h" | 14 #include "ui/gfx/animation/slide_animation.h" |
15 #include "ui/gfx/size.h" | 15 #include "ui/gfx/size.h" |
16 | 16 |
| 17 namespace infobars { |
| 18 |
17 class InfoBarContainer; | 19 class InfoBarContainer; |
18 class InfoBarManager; | 20 class InfoBarManager; |
19 | 21 |
20 // InfoBar is a cross-platform base class for an infobar "view" (in the MVC | 22 // InfoBar is a cross-platform base class for an infobar "view" (in the MVC |
21 // sense), which owns a corresponding InfoBarDelegate "model". Typically, | 23 // sense), which owns a corresponding InfoBarDelegate "model". Typically, |
22 // a caller will call XYZInfoBarDelegate::Create() and pass in the | 24 // a caller will call XYZInfoBarDelegate::Create() and pass in the |
23 // InfoBarManager for the relevant tab. This will create an XYZInfoBarDelegate, | 25 // InfoBarManager for the relevant tab. This will create an XYZInfoBarDelegate, |
24 // create a platform-specific subclass of InfoBar to own it, and then call | 26 // create a platform-specific subclass of InfoBar to own it, and then call |
25 // InfoBarManager::AddInfoBar() to give it ownership of the infobar. | 27 // InfoBarManager::AddInfoBar() to give it ownership of the infobar. |
26 // During its life, the InfoBar may be shown and hidden as the owning tab is | 28 // During its life, the InfoBar may be shown and hidden as the owning tab is |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // arrow as two halves on either side of a center point.) | 141 // arrow as two halves on either side of a center point.) |
140 int arrow_height_; // Includes both fill and top stroke. | 142 int arrow_height_; // Includes both fill and top stroke. |
141 int arrow_target_height_; | 143 int arrow_target_height_; |
142 int arrow_half_width_; // Includes only fill. | 144 int arrow_half_width_; // Includes only fill. |
143 int bar_height_; // Includes both fill and bottom separator. | 145 int bar_height_; // Includes both fill and bottom separator. |
144 int bar_target_height_; | 146 int bar_target_height_; |
145 | 147 |
146 DISALLOW_COPY_AND_ASSIGN(InfoBar); | 148 DISALLOW_COPY_AND_ASSIGN(InfoBar); |
147 }; | 149 }; |
148 | 150 |
149 #endif // CHROME_BROWSER_INFOBARS_INFOBAR_H_ | 151 } // namespace infobars |
| 152 |
| 153 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_H_ |
OLD | NEW |