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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 NonClientTopBorderHeight() + min_client_view_size.height()); | 73 NonClientTopBorderHeight() + min_client_view_size.height()); |
74 } | 74 } |
75 | 75 |
76 void PanelFrameView::Layout() { | 76 void PanelFrameView::Layout() { |
77 if (!header_painter_) | 77 if (!header_painter_) |
78 return; | 78 return; |
79 header_painter_->LayoutHeader(true); | 79 header_painter_->LayoutHeader(true); |
80 header_painter_->set_header_height(NonClientTopBorderHeight()); | 80 header_painter_->set_header_height(NonClientTopBorderHeight()); |
81 } | 81 } |
82 | 82 |
| 83 void PanelFrameView::GetWindowMask(const gfx::Size&, gfx::Path*) { |
| 84 // Nothing. |
| 85 } |
| 86 |
83 void PanelFrameView::ResetWindowControls() { | 87 void PanelFrameView::ResetWindowControls() { |
84 NOTIMPLEMENTED(); | 88 NOTIMPLEMENTED(); |
85 } | 89 } |
86 | 90 |
87 void PanelFrameView::UpdateWindowIcon() { | 91 void PanelFrameView::UpdateWindowIcon() { |
88 if (!window_icon_) | 92 if (!window_icon_) |
89 return; | 93 return; |
90 views::WidgetDelegate* delegate = frame_->widget_delegate(); | 94 views::WidgetDelegate* delegate = frame_->widget_delegate(); |
91 if (delegate) | 95 if (delegate) |
92 window_icon_->SetImage(delegate->GetWindowIcon()); | 96 window_icon_->SetImage(delegate->GetWindowIcon()); |
93 window_icon_->SchedulePaint(); | 97 window_icon_->SchedulePaint(); |
94 } | 98 } |
95 | 99 |
96 void PanelFrameView::UpdateWindowTitle() { | 100 void PanelFrameView::UpdateWindowTitle() { |
97 if (!header_painter_) | 101 if (!header_painter_) |
98 return; | 102 return; |
99 header_painter_->SchedulePaintForTitle(title_font_); | 103 header_painter_->SchedulePaintForTitle(title_font_); |
100 } | 104 } |
101 | 105 |
102 void PanelFrameView::GetWindowMask(const gfx::Size&, gfx::Path*) { | |
103 // Nothing. | |
104 } | |
105 | |
106 int PanelFrameView::NonClientHitTest(const gfx::Point& point) { | 106 int PanelFrameView::NonClientHitTest(const gfx::Point& point) { |
107 if (!header_painter_) | 107 if (!header_painter_) |
108 return HTNOWHERE; | 108 return HTNOWHERE; |
109 return FrameBorderHitTestController::NonClientHitTest(this, | 109 return FrameBorderHitTestController::NonClientHitTest(this, |
110 header_painter_.get(), point); | 110 header_painter_.get(), point); |
111 } | 111 } |
112 | 112 |
113 void PanelFrameView::OnPaint(gfx::Canvas* canvas) { | 113 void PanelFrameView::OnPaint(gfx::Canvas* canvas) { |
114 if (!header_painter_) | 114 if (!header_painter_) |
115 return; | 115 return; |
(...skipping 24 matching lines...) Expand all Loading... |
140 | 140 |
141 gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds( | 141 gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds( |
142 const gfx::Rect& client_bounds) const { | 142 const gfx::Rect& client_bounds) const { |
143 if (!header_painter_) | 143 if (!header_painter_) |
144 return client_bounds; | 144 return client_bounds; |
145 return HeaderPainter::GetWindowBoundsForClientBounds( | 145 return HeaderPainter::GetWindowBoundsForClientBounds( |
146 NonClientTopBorderHeight(), client_bounds); | 146 NonClientTopBorderHeight(), client_bounds); |
147 } | 147 } |
148 | 148 |
149 } // namespace ash | 149 } // namespace ash |
OLD | NEW |