| 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_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "components/infobars/core/infobar.h" | 10 #include "components/infobars/core/infobar.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 public views::ExternalFocusTracker, | 31 public views::ExternalFocusTracker, |
| 32 public views::ViewTargeterDelegate { | 32 public views::ViewTargeterDelegate { |
| 33 public: | 33 public: |
| 34 explicit InfoBarView(std::unique_ptr<infobars::InfoBarDelegate> delegate); | 34 explicit InfoBarView(std::unique_ptr<infobars::InfoBarDelegate> delegate); |
| 35 | 35 |
| 36 const infobars::InfoBarContainer::Delegate* container_delegate() const; | 36 const infobars::InfoBarContainer::Delegate* container_delegate() const; |
| 37 | 37 |
| 38 protected: | 38 protected: |
| 39 typedef std::vector<views::Label*> Labels; | 39 typedef std::vector<views::Label*> Labels; |
| 40 | 40 |
| 41 static const int kButtonButtonSpacing; | |
| 42 static const int kEndOfLabelSpacing; | |
| 43 static const SkColor kTextColor; | |
| 44 | |
| 45 ~InfoBarView() override; | 41 ~InfoBarView() override; |
| 46 | 42 |
| 47 // Creates a label with the appropriate font and color for an infobar. | 43 // Creates a label with the appropriate font and color for an infobar. |
| 48 views::Label* CreateLabel(const base::string16& text) const; | 44 views::Label* CreateLabel(const base::string16& text) const; |
| 49 | 45 |
| 50 // Creates a link with the appropriate font and color for an infobar. | 46 // Creates a link with the appropriate font and color for an infobar. |
| 51 // NOTE: Subclasses must ignore link clicks if we're unowned. | 47 // NOTE: Subclasses must ignore link clicks if we're unowned. |
| 52 views::Link* CreateLink(const base::string16& text, | 48 views::Link* CreateLink(const base::string16& text, |
| 53 views::LinkListener* listener) const; | 49 views::LinkListener* listener) const; |
| 54 | 50 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // The close button at the right edge of the InfoBar. | 116 // The close button at the right edge of the InfoBar. |
| 121 views::VectorIconButton* close_button_; | 117 views::VectorIconButton* close_button_; |
| 122 | 118 |
| 123 // Used to run the menu. | 119 // Used to run the menu. |
| 124 std::unique_ptr<views::MenuRunner> menu_runner_; | 120 std::unique_ptr<views::MenuRunner> menu_runner_; |
| 125 | 121 |
| 126 DISALLOW_COPY_AND_ASSIGN(InfoBarView); | 122 DISALLOW_COPY_AND_ASSIGN(InfoBarView); |
| 127 }; | 123 }; |
| 128 | 124 |
| 129 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ | 125 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ |
| OLD | NEW |