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_painter.h" | 8 #include "ash/wm/frame_painter.h" |
9 #include "grit/ash_resources.h" | 9 #include "grit/ash_resources.h" |
10 #include "third_party/skia/include/core/SkPaint.h" | 10 #include "third_party/skia/include/core/SkPaint.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 PanelFrameView::~PanelFrameView() { | 38 PanelFrameView::~PanelFrameView() { |
39 } | 39 } |
40 | 40 |
41 const char* PanelFrameView::GetClassName() const { | 41 const char* PanelFrameView::GetClassName() const { |
42 return kViewClassName; | 42 return kViewClassName; |
43 } | 43 } |
44 | 44 |
45 void PanelFrameView::InitFramePainter() { | 45 void PanelFrameView::InitFramePainter() { |
46 frame_painter_.reset(new FramePainter); | 46 frame_painter_.reset(new FramePainter); |
47 | 47 |
48 caption_button_container_ = new FrameCaptionButtonContainerView(this, frame_, | 48 caption_button_container_ = new FrameCaptionButtonContainerView(frame_, |
49 FrameCaptionButtonContainerView::MINIMIZE_ALLOWED); | 49 FrameCaptionButtonContainerView::MINIMIZE_ALLOWED); |
50 AddChildView(caption_button_container_); | 50 AddChildView(caption_button_container_); |
51 | 51 |
52 if (frame_->widget_delegate()->ShouldShowWindowIcon()) { | 52 if (frame_->widget_delegate()->ShouldShowWindowIcon()) { |
53 window_icon_ = new views::ImageView(); | 53 window_icon_ = new views::ImageView(); |
54 AddChildView(window_icon_); | 54 AddChildView(window_icon_); |
55 } | 55 } |
56 | 56 |
57 frame_painter_->Init(frame_, window_icon_, caption_button_container_); | 57 frame_painter_->Init(frame_, window_icon_, caption_button_container_); |
58 } | 58 } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 130 |
131 gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds( | 131 gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds( |
132 const gfx::Rect& client_bounds) const { | 132 const gfx::Rect& client_bounds) const { |
133 if (!frame_painter_) | 133 if (!frame_painter_) |
134 return client_bounds; | 134 return client_bounds; |
135 return frame_painter_->GetWindowBoundsForClientBounds( | 135 return frame_painter_->GetWindowBoundsForClientBounds( |
136 caption_button_container_->bounds().bottom(), client_bounds); | 136 caption_button_container_->bounds().bottom(), client_bounds); |
137 } | 137 } |
138 | 138 |
139 } // namespace ash | 139 } // namespace ash |
OLD | NEW |