| 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/common/wm/panels/panel_frame_view.h" | 5 #include "ash/common/wm/panels/panel_frame_view.h" |
| 6 | 6 |
| 7 #include "ash/common/frame/caption_buttons/frame_caption_button_container_view.h
" | 7 #include "ash/common/frame/caption_buttons/frame_caption_button_container_view.h
" |
| 8 #include "ash/common/frame/default_header_painter.h" | 8 #include "ash/common/frame/default_header_painter.h" |
| 9 #include "ash/common/frame/frame_border_hit_test.h" | 9 #include "ash/common/frame/frame_border_hit_test.h" |
| 10 #include "ash/common/wm_lookup.h" | |
| 11 #include "ash/common/wm_shell.h" | 10 #include "ash/common/wm_shell.h" |
| 12 #include "ash/common/wm_window.h" | 11 #include "ash/common/wm_window.h" |
| 13 #include "ash/common/wm_window_property.h" | 12 #include "ash/common/wm_window_property.h" |
| 14 #include "ui/base/hit_test.h" | 13 #include "ui/base/hit_test.h" |
| 15 #include "ui/gfx/canvas.h" | 14 #include "ui/gfx/canvas.h" |
| 16 #include "ui/views/controls/image_view.h" | 15 #include "ui/views/controls/image_view.h" |
| 17 #include "ui/views/widget/widget.h" | 16 #include "ui/views/widget/widget.h" |
| 18 #include "ui/views/widget/widget_delegate.h" | 17 #include "ui/views/widget/widget_delegate.h" |
| 19 | 18 |
| 20 namespace ash { | 19 namespace ash { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 header_painter_->Init(frame_, this, caption_button_container_); | 56 header_painter_->Init(frame_, this, caption_button_container_); |
| 58 | 57 |
| 59 if (frame_->widget_delegate()->ShouldShowWindowIcon()) { | 58 if (frame_->widget_delegate()->ShouldShowWindowIcon()) { |
| 60 window_icon_ = new views::ImageView(); | 59 window_icon_ = new views::ImageView(); |
| 61 AddChildView(window_icon_); | 60 AddChildView(window_icon_); |
| 62 header_painter_->UpdateLeftHeaderView(window_icon_); | 61 header_painter_->UpdateLeftHeaderView(window_icon_); |
| 63 } | 62 } |
| 64 } | 63 } |
| 65 | 64 |
| 66 WmWindow* PanelFrameView::GetWidgetWindow() { | 65 WmWindow* PanelFrameView::GetWidgetWindow() { |
| 67 return WmLookup::Get()->GetWindowForWidget(frame_); | 66 return WmWindow::Get(frame_->GetNativeWindow()); |
| 68 } | 67 } |
| 69 | 68 |
| 70 int PanelFrameView::NonClientTopBorderHeight() const { | 69 int PanelFrameView::NonClientTopBorderHeight() const { |
| 71 if (!header_painter_) | 70 if (!header_painter_) |
| 72 return 0; | 71 return 0; |
| 73 return header_painter_->GetHeaderHeightForPainting(); | 72 return header_painter_->GetHeaderHeightForPainting(); |
| 74 } | 73 } |
| 75 | 74 |
| 76 gfx::Size PanelFrameView::GetMinimumSize() const { | 75 gfx::Size PanelFrameView::GetMinimumSize() const { |
| 77 if (!header_painter_) | 76 if (!header_painter_) |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 150 |
| 152 void PanelFrameView::OnOverviewModeStarting() { | 151 void PanelFrameView::OnOverviewModeStarting() { |
| 153 caption_button_container_->SetVisible(false); | 152 caption_button_container_->SetVisible(false); |
| 154 } | 153 } |
| 155 | 154 |
| 156 void PanelFrameView::OnOverviewModeEnded() { | 155 void PanelFrameView::OnOverviewModeEnded() { |
| 157 caption_button_container_->SetVisible(true); | 156 caption_button_container_->SetVisible(true); |
| 158 } | 157 } |
| 159 | 158 |
| 160 } // namespace ash | 159 } // namespace ash |
| OLD | NEW |