| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // Does the actual work for AssignWidths(). Assumes |labels| is sorted by | 99 // Does the actual work for AssignWidths(). Assumes |labels| is sorted by |
| 100 // decreasing preferred width. | 100 // decreasing preferred width. |
| 101 static void AssignWidthsSorted(Labels* labels, int available_width); | 101 static void AssignWidthsSorted(Labels* labels, int available_width); |
| 102 | 102 |
| 103 // InfoBar: | 103 // InfoBar: |
| 104 void PlatformSpecificShow(bool animate) override; | 104 void PlatformSpecificShow(bool animate) override; |
| 105 void PlatformSpecificHide(bool animate) override; | 105 void PlatformSpecificHide(bool animate) override; |
| 106 void PlatformSpecificOnHeightsRecalculated() override; | 106 void PlatformSpecificOnHeightsRecalculated() override; |
| 107 | 107 |
| 108 // views::View: | 108 // views::View: |
| 109 void GetAccessibleState(ui::AXViewState* state) override; | 109 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| 110 gfx::Size GetPreferredSize() const override; | 110 gfx::Size GetPreferredSize() const override; |
| 111 | 111 |
| 112 // views::ExternalFocusTracker: | 112 // views::ExternalFocusTracker: |
| 113 void OnWillChangeFocus(View* focused_before, View* focused_now) override; | 113 void OnWillChangeFocus(View* focused_before, View* focused_now) override; |
| 114 | 114 |
| 115 // views::ViewTargeterDelegate: | 115 // views::ViewTargeterDelegate: |
| 116 bool DoesIntersectRect(const View* target, | 116 bool DoesIntersectRect(const View* target, |
| 117 const gfx::Rect& rect) const override; | 117 const gfx::Rect& rect) const override; |
| 118 | 118 |
| 119 // This container holds the children and clips their painting during | 119 // This container holds the children and clips their painting during |
| 120 // animation. | 120 // animation. |
| 121 views::View* child_container_; | 121 views::View* child_container_; |
| 122 | 122 |
| 123 // The optional icon at the left edge of the InfoBar. | 123 // The optional icon at the left edge of the InfoBar. |
| 124 views::ImageView* icon_; | 124 views::ImageView* icon_; |
| 125 | 125 |
| 126 // The close button at the right edge of the InfoBar. | 126 // The close button at the right edge of the InfoBar. |
| 127 views::VectorIconButton* close_button_; | 127 views::VectorIconButton* close_button_; |
| 128 | 128 |
| 129 // Used to run the menu. | 129 // Used to run the menu. |
| 130 std::unique_ptr<views::MenuRunner> menu_runner_; | 130 std::unique_ptr<views::MenuRunner> menu_runner_; |
| 131 | 131 |
| 132 DISALLOW_COPY_AND_ASSIGN(InfoBarView); | 132 DISALLOW_COPY_AND_ASSIGN(InfoBarView); |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ | 135 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ |
| OLD | NEW |