| 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/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "components/infobars/core/infobar.h" | 10 #include "components/infobars/core/infobar.h" |
| 11 #include "components/infobars/core/infobar_container.h" | 11 #include "components/infobars/core/infobar_container.h" |
| 12 #include "third_party/skia/include/core/SkPath.h" | 12 #include "third_party/skia/include/core/SkPath.h" |
| 13 #include "ui/views/controls/button/button.h" | 13 #include "ui/views/controls/button/button.h" |
| 14 #include "ui/views/controls/menu/menu_item_view.h" | 14 #include "ui/views/controls/menu/menu_types.h" |
| 15 #include "ui/views/focus/external_focus_tracker.h" | 15 #include "ui/views/focus/external_focus_tracker.h" |
| 16 | 16 |
| 17 namespace ui { | 17 namespace ui { |
| 18 class MenuModel; | 18 class MenuModel; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace views { | 21 namespace views { |
| 22 class ImageButton; | 22 class ImageButton; |
| 23 class ImageView; | 23 class ImageView; |
| 24 class Label; | 24 class Label; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 int OffsetY(views::View* view) const; | 101 int OffsetY(views::View* view) const; |
| 102 | 102 |
| 103 // Convenience getter. | 103 // Convenience getter. |
| 104 const infobars::InfoBarContainer::Delegate* container_delegate() const; | 104 const infobars::InfoBarContainer::Delegate* container_delegate() const; |
| 105 | 105 |
| 106 // Shows a menu at the specified position. | 106 // Shows a menu at the specified position. |
| 107 // NOTE: This must not be called if we're unowned. (Subclasses should ignore | 107 // NOTE: This must not be called if we're unowned. (Subclasses should ignore |
| 108 // calls to RunMenu() in this case.) | 108 // calls to RunMenu() in this case.) |
| 109 void RunMenuAt(ui::MenuModel* menu_model, | 109 void RunMenuAt(ui::MenuModel* menu_model, |
| 110 views::MenuButton* button, | 110 views::MenuButton* button, |
| 111 views::MenuItemView::AnchorPosition anchor); | 111 views::MenuAnchorPosition anchor); |
| 112 | 112 |
| 113 private: | 113 private: |
| 114 // Does the actual work for AssignWidths(). Assumes |labels| is sorted by | 114 // Does the actual work for AssignWidths(). Assumes |labels| is sorted by |
| 115 // decreasing preferred width. | 115 // decreasing preferred width. |
| 116 static void AssignWidthsSorted(Labels* labels, int available_width); | 116 static void AssignWidthsSorted(Labels* labels, int available_width); |
| 117 | 117 |
| 118 // InfoBar: | 118 // InfoBar: |
| 119 virtual void PlatformSpecificShow(bool animate) OVERRIDE; | 119 virtual void PlatformSpecificShow(bool animate) OVERRIDE; |
| 120 virtual void PlatformSpecificHide(bool animate) OVERRIDE; | 120 virtual void PlatformSpecificHide(bool animate) OVERRIDE; |
| 121 virtual void PlatformSpecificOnHeightsRecalculated() OVERRIDE; | 121 virtual void PlatformSpecificOnHeightsRecalculated() OVERRIDE; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 140 SkPath fill_path_; | 140 SkPath fill_path_; |
| 141 SkPath stroke_path_; | 141 SkPath stroke_path_; |
| 142 | 142 |
| 143 // Used to run the menu. | 143 // Used to run the menu. |
| 144 scoped_ptr<views::MenuRunner> menu_runner_; | 144 scoped_ptr<views::MenuRunner> menu_runner_; |
| 145 | 145 |
| 146 DISALLOW_COPY_AND_ASSIGN(InfoBarView); | 146 DISALLOW_COPY_AND_ASSIGN(InfoBarView); |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ | 149 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ |
| OLD | NEW |