| OLD | NEW |
| 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "chrome/browser/infobars/infobar.h" | 11 #include "chrome/browser/infobars/infobar.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 static const int kHorizontalPadding; | 103 static const int kHorizontalPadding; |
| 104 | 104 |
| 105 // InfoBar: | 105 // InfoBar: |
| 106 virtual void PlatformSpecificShow(bool animate) OVERRIDE; | 106 virtual void PlatformSpecificShow(bool animate) OVERRIDE; |
| 107 virtual void PlatformSpecificHide(bool animate) OVERRIDE; | 107 virtual void PlatformSpecificHide(bool animate) OVERRIDE; |
| 108 virtual void PlatformSpecificOnHeightsRecalculated() OVERRIDE; | 108 virtual void PlatformSpecificOnHeightsRecalculated() OVERRIDE; |
| 109 | 109 |
| 110 // views::View: | 110 // views::View: |
| 111 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 111 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 112 virtual gfx::Size GetPreferredSize() OVERRIDE; | 112 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 113 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; | 113 virtual void PaintChildren(gfx::CanvasSkia* canvas) OVERRIDE; |
| 114 | 114 |
| 115 // views::FocusChangeListener: | 115 // views::FocusChangeListener: |
| 116 virtual void OnWillChangeFocus(View* focused_before, | 116 virtual void OnWillChangeFocus(View* focused_before, |
| 117 View* focused_now) OVERRIDE; | 117 View* focused_now) OVERRIDE; |
| 118 virtual void OnDidChangeFocus(View* focused_before, | 118 virtual void OnDidChangeFocus(View* focused_before, |
| 119 View* focused_now) OVERRIDE; | 119 View* focused_now) OVERRIDE; |
| 120 | 120 |
| 121 // The optional icon at the left edge of the InfoBar. | 121 // The optional icon at the left edge of the InfoBar. |
| 122 views::ImageView* icon_; | 122 views::ImageView* icon_; |
| 123 | 123 |
| 124 // The close button at the right edge of the InfoBar. | 124 // The close button at the right edge of the InfoBar. |
| 125 views::ImageButton* close_button_; | 125 views::ImageButton* close_button_; |
| 126 | 126 |
| 127 // Tracks and stores the last focused view which is not the InfoBar or any of | 127 // Tracks and stores the last focused view which is not the InfoBar or any of |
| 128 // its children. Used to restore focus once the InfoBar is closed. | 128 // its children. Used to restore focus once the InfoBar is closed. |
| 129 scoped_ptr<views::ExternalFocusTracker> focus_tracker_; | 129 scoped_ptr<views::ExternalFocusTracker> focus_tracker_; |
| 130 | 130 |
| 131 // The paths for the InfoBarBackground to draw, sized according to the heights | 131 // The paths for the InfoBarBackground to draw, sized according to the heights |
| 132 // above. | 132 // above. |
| 133 SkPath fill_path_; | 133 SkPath fill_path_; |
| 134 SkPath stroke_path_; | 134 SkPath stroke_path_; |
| 135 | 135 |
| 136 // Used to run the menu. | 136 // Used to run the menu. |
| 137 scoped_ptr<views::MenuRunner> menu_runner_; | 137 scoped_ptr<views::MenuRunner> menu_runner_; |
| 138 | 138 |
| 139 DISALLOW_COPY_AND_ASSIGN(InfoBarView); | 139 DISALLOW_COPY_AND_ASSIGN(InfoBarView); |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ | 142 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ |
| OLD | NEW |