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/frame/caption_buttons/frame_caption_button_container_view.h" | 7 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" |
8 #include "ash/frame/default_header_painter.h" | 8 #include "ash/frame/default_header_painter.h" |
9 #include "ash/frame/frame_border_hit_test_controller.h" | 9 #include "ash/frame/frame_border_hit_test_controller.h" |
10 #include "ui/base/hit_test.h" | 10 #include "ui/base/hit_test.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 frame_border_hit_test_controller_( | 25 frame_border_hit_test_controller_( |
26 new FrameBorderHitTestController(frame_)) { | 26 new FrameBorderHitTestController(frame_)) { |
27 DCHECK(!frame_->widget_delegate()->CanMaximize()); | 27 DCHECK(!frame_->widget_delegate()->CanMaximize()); |
28 if (frame_type != FRAME_NONE) | 28 if (frame_type != FRAME_NONE) |
29 InitHeaderPainter(); | 29 InitHeaderPainter(); |
30 } | 30 } |
31 | 31 |
32 PanelFrameView::~PanelFrameView() { | 32 PanelFrameView::~PanelFrameView() { |
33 } | 33 } |
34 | 34 |
| 35 void PanelFrameView::SetFrameColors(SkColor active_frame_color, |
| 36 SkColor inactive_frame_color) { |
| 37 header_painter_->SetFrameColors(active_frame_color, inactive_frame_color); |
| 38 } |
| 39 |
35 const char* PanelFrameView::GetClassName() const { | 40 const char* PanelFrameView::GetClassName() const { |
36 return kViewClassName; | 41 return kViewClassName; |
37 } | 42 } |
38 | 43 |
39 void PanelFrameView::InitHeaderPainter() { | 44 void PanelFrameView::InitHeaderPainter() { |
40 header_painter_.reset(new DefaultHeaderPainter); | 45 header_painter_.reset(new DefaultHeaderPainter); |
41 | 46 |
42 caption_button_container_ = new FrameCaptionButtonContainerView(frame_); | 47 caption_button_container_ = new FrameCaptionButtonContainerView(frame_); |
43 AddChildView(caption_button_container_); | 48 AddChildView(caption_button_container_); |
44 | 49 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 } | 129 } |
125 | 130 |
126 gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds( | 131 gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds( |
127 const gfx::Rect& client_bounds) const { | 132 const gfx::Rect& client_bounds) const { |
128 gfx::Rect window_bounds = client_bounds; | 133 gfx::Rect window_bounds = client_bounds; |
129 window_bounds.Inset(0, -NonClientTopBorderHeight(), 0, 0); | 134 window_bounds.Inset(0, -NonClientTopBorderHeight(), 0, 0); |
130 return window_bounds; | 135 return window_bounds; |
131 } | 136 } |
132 | 137 |
133 } // namespace ash | 138 } // namespace ash |
OLD | NEW |