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 #include "ash/wm/panels/panel_frame_view.h" | 5 #include "ash/wm/panels/panel_frame_view.h" |
6 | 6 |
7 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h" | 7 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h" |
8 #include "ash/wm/frame_border_hit_test_controller.h" | 8 #include "ash/wm/frame_border_hit_test_controller.h" |
9 #include "ash/wm/header_painter.h" | 9 #include "ash/wm/header_painter.h" |
10 #include "grit/ash_resources.h" | 10 #include "grit/ash_resources.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 return; | 116 return; |
117 bool paint_as_active = ShouldPaintAsActive(); | 117 bool paint_as_active = ShouldPaintAsActive(); |
118 int theme_frame_id = 0; | 118 int theme_frame_id = 0; |
119 if (paint_as_active) | 119 if (paint_as_active) |
120 theme_frame_id = IDR_AURA_WINDOW_HEADER_BASE_ACTIVE; | 120 theme_frame_id = IDR_AURA_WINDOW_HEADER_BASE_ACTIVE; |
121 else | 121 else |
122 theme_frame_id = IDR_AURA_WINDOW_HEADER_BASE_INACTIVE; | 122 theme_frame_id = IDR_AURA_WINDOW_HEADER_BASE_INACTIVE; |
123 | 123 |
124 header_painter_->PaintHeader( | 124 header_painter_->PaintHeader( |
125 canvas, | 125 canvas, |
126 paint_as_active ? HeaderPainter::ACTIVE : HeaderPainter::INACTIVE, | |
127 theme_frame_id, | 126 theme_frame_id, |
128 0); | 127 0); |
129 header_painter_->PaintTitleBar(canvas, title_font_); | 128 header_painter_->PaintTitleBar(canvas, title_font_); |
130 header_painter_->PaintHeaderContentSeparator(canvas); | 129 header_painter_->PaintHeaderContentSeparator(canvas); |
131 } | 130 } |
132 | 131 |
133 gfx::Rect PanelFrameView::GetBoundsForClientView() const { | 132 gfx::Rect PanelFrameView::GetBoundsForClientView() const { |
134 if (!header_painter_) | 133 if (!header_painter_) |
135 return bounds(); | 134 return bounds(); |
136 return HeaderPainter::GetBoundsForClientView( | 135 return HeaderPainter::GetBoundsForClientView( |
137 NonClientTopBorderHeight(), bounds()); | 136 NonClientTopBorderHeight(), bounds()); |
138 } | 137 } |
139 | 138 |
140 gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds( | 139 gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds( |
141 const gfx::Rect& client_bounds) const { | 140 const gfx::Rect& client_bounds) const { |
142 if (!header_painter_) | 141 if (!header_painter_) |
143 return client_bounds; | 142 return client_bounds; |
144 return HeaderPainter::GetWindowBoundsForClientBounds( | 143 return HeaderPainter::GetWindowBoundsForClientBounds( |
145 NonClientTopBorderHeight(), client_bounds); | 144 NonClientTopBorderHeight(), client_bounds); |
146 } | 145 } |
147 | 146 |
148 } // namespace ash | 147 } // namespace ash |
OLD | NEW |