Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 ASH_FRAME_HEADER_PAINTER_H_ | 5 #ifndef ASH_FRAME_HEADER_PAINTER_H_ |
| 6 #define ASH_FRAME_HEADER_PAINTER_H_ | 6 #define ASH_FRAME_HEADER_PAINTER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" // OVERRIDE | 10 #include "base/compiler_specific.h" // OVERRIDE |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 49 HeaderPainter(); | 49 HeaderPainter(); |
| 50 virtual ~HeaderPainter(); | 50 virtual ~HeaderPainter(); |
| 51 | 51 |
| 52 // None of the parameters are owned. | 52 // None of the parameters are owned. |
| 53 void Init(Style style, | 53 void Init(Style style, |
| 54 views::Widget* frame, | 54 views::Widget* frame, |
| 55 views::View* header_view, | 55 views::View* header_view, |
| 56 views::View* window_icon, | 56 views::View* window_icon, |
| 57 FrameCaptionButtonContainerView* caption_button_container); | 57 FrameCaptionButtonContainerView* caption_button_container); |
| 58 | 58 |
| 59 // Sets the window icon to the header. Passing NULL removes the window icon. | |
| 60 void UpdateWindowIcon(views::View* window_icon, | |
| 61 const gfx::Size& window_icon_size); | |
|
pkotwicz
2014/03/18 04:41:15
Can you please merge with https://codereview.chrom
oshima
2014/03/18 14:57:03
done
| |
| 62 | |
| 59 // Returns the bounds of the client view for a window with |header_height| | 63 // Returns the bounds of the client view for a window with |header_height| |
| 60 // and |window_bounds|. The return value and |window_bounds| are in the | 64 // and |window_bounds|. The return value and |window_bounds| are in the |
| 61 // views::NonClientView's coordinates. | 65 // views::NonClientView's coordinates. |
| 62 static gfx::Rect GetBoundsForClientView(int header_height, | 66 static gfx::Rect GetBoundsForClientView(int header_height, |
| 63 const gfx::Rect& window_bounds); | 67 const gfx::Rect& window_bounds); |
| 64 | 68 |
| 65 // Returns the bounds of the window given |header_height| and |client_bounds|. | 69 // Returns the bounds of the window given |header_height| and |client_bounds|. |
| 66 // The return value and |client_bounds| are in the views::NonClientView's | 70 // The return value and |client_bounds| are in the views::NonClientView's |
| 67 // coordinates. | 71 // coordinates. |
| 68 static gfx::Rect GetWindowBoundsForClientBounds( | 72 static gfx::Rect GetWindowBoundsForClientBounds( |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 153 // Get the bounds for the title. The provided |title_font_list| is used to | 157 // Get the bounds for the title. The provided |title_font_list| is used to |
| 154 // determine the correct dimensions. | 158 // determine the correct dimensions. |
| 155 gfx::Rect GetTitleBounds(const gfx::FontList& title_font_list); | 159 gfx::Rect GetTitleBounds(const gfx::FontList& title_font_list); |
| 156 | 160 |
| 157 Style style_; | 161 Style style_; |
| 158 | 162 |
| 159 // Not owned | 163 // Not owned |
| 160 views::Widget* frame_; | 164 views::Widget* frame_; |
| 161 views::View* header_view_; | 165 views::View* header_view_; |
| 162 views::View* window_icon_; // May be NULL. | 166 views::View* window_icon_; // May be NULL. |
| 167 gfx::Size window_icon_size_; | |
| 163 FrameCaptionButtonContainerView* caption_button_container_; | 168 FrameCaptionButtonContainerView* caption_button_container_; |
| 164 | 169 |
| 165 // The height of the header. | 170 // The height of the header. |
| 166 int header_height_; | 171 int header_height_; |
| 167 | 172 |
| 168 // Image ids and opacity last used for painting header. | 173 // Image ids and opacity last used for painting header. |
| 169 int previous_theme_frame_id_; | 174 int previous_theme_frame_id_; |
| 170 int previous_theme_frame_overlay_id_; | 175 int previous_theme_frame_overlay_id_; |
| 171 | 176 |
| 172 // Image ids and opacity we are crossfading from. | 177 // Image ids and opacity we are crossfading from. |
| 173 int crossfade_theme_frame_id_; | 178 int crossfade_theme_frame_id_; |
| 174 int crossfade_theme_frame_overlay_id_; | 179 int crossfade_theme_frame_overlay_id_; |
| 175 | 180 |
| 176 scoped_ptr<gfx::SlideAnimation> crossfade_animation_; | 181 scoped_ptr<gfx::SlideAnimation> crossfade_animation_; |
| 177 | 182 |
| 178 DISALLOW_COPY_AND_ASSIGN(HeaderPainter); | 183 DISALLOW_COPY_AND_ASSIGN(HeaderPainter); |
| 179 }; | 184 }; |
| 180 | 185 |
| 181 } // namespace ash | 186 } // namespace ash |
| 182 | 187 |
| 183 #endif // ASH_FRAME_HEADER_PAINTER_H_ | 188 #endif // ASH_FRAME_HEADER_PAINTER_H_ |
| OLD | NEW |