| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 return FrameBorderHitTestController::NonClientHitTest(this, | 110 return FrameBorderHitTestController::NonClientHitTest(this, |
| 111 header_painter_.get(), point); | 111 header_painter_.get(), point); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void PanelFrameView::OnPaint(gfx::Canvas* canvas) { | 114 void PanelFrameView::OnPaint(gfx::Canvas* canvas) { |
| 115 if (!header_painter_) | 115 if (!header_painter_) |
| 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_BROWSER_WINDOW_HEADER_BASE_RESTORED_ACTIVE; |
| 121 else | 121 else |
| 122 theme_frame_id = IDR_AURA_WINDOW_HEADER_BASE_INACTIVE; | 122 theme_frame_id = IDR_AURA_BROWSER_WINDOW_HEADER_BASE_RESTORED_INACTIVE; |
| 123 | 123 |
| 124 header_painter_->PaintHeader( | 124 header_painter_->PaintHeader( |
| 125 canvas, | 125 canvas, |
| 126 theme_frame_id, | 126 theme_frame_id, |
| 127 0); | 127 0); |
| 128 header_painter_->PaintTitleBar(canvas, title_font_list_); | 128 header_painter_->PaintTitleBar(canvas, title_font_list_); |
| 129 header_painter_->PaintHeaderContentSeparator(canvas); | 129 header_painter_->PaintHeaderContentSeparator(canvas); |
| 130 } | 130 } |
| 131 | 131 |
| 132 gfx::Rect PanelFrameView::GetBoundsForClientView() const { | 132 gfx::Rect PanelFrameView::GetBoundsForClientView() const { |
| 133 if (!header_painter_) | 133 if (!header_painter_) |
| 134 return bounds(); | 134 return bounds(); |
| 135 return HeaderPainter::GetBoundsForClientView( | 135 return HeaderPainter::GetBoundsForClientView( |
| 136 NonClientTopBorderHeight(), bounds()); | 136 NonClientTopBorderHeight(), bounds()); |
| 137 } | 137 } |
| 138 | 138 |
| 139 gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds( | 139 gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds( |
| 140 const gfx::Rect& client_bounds) const { | 140 const gfx::Rect& client_bounds) const { |
| 141 if (!header_painter_) | 141 if (!header_painter_) |
| 142 return client_bounds; | 142 return client_bounds; |
| 143 return HeaderPainter::GetWindowBoundsForClientBounds( | 143 return HeaderPainter::GetWindowBoundsForClientBounds( |
| 144 NonClientTopBorderHeight(), client_bounds); | 144 NonClientTopBorderHeight(), client_bounds); |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace ash | 147 } // namespace ash |
| OLD | NEW |