| 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/shell/panel_window.h" | 5 #include "ash/shell/panel_window.h" |
| 6 | 6 |
| 7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/wm/panels/panel_frame_view.h" | 9 #include "ash/wm/panels/panel_frame_view.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 } | 59 } |
| 60 | 60 |
| 61 void PanelWindow::OnPaint(gfx::Canvas* canvas) { | 61 void PanelWindow::OnPaint(gfx::Canvas* canvas) { |
| 62 canvas->FillRect(GetLocalBounds(), SK_ColorGREEN); | 62 canvas->FillRect(GetLocalBounds(), SK_ColorGREEN); |
| 63 } | 63 } |
| 64 | 64 |
| 65 base::string16 PanelWindow::GetWindowTitle() const { | 65 base::string16 PanelWindow::GetWindowTitle() const { |
| 66 return base::ASCIIToUTF16(name_); | 66 return base::ASCIIToUTF16(name_); |
| 67 } | 67 } |
| 68 | 68 |
| 69 views::View* PanelWindow::GetContentsView() { | |
| 70 return this; | |
| 71 } | |
| 72 | |
| 73 bool PanelWindow::CanResize() const { | 69 bool PanelWindow::CanResize() const { |
| 74 return true; | 70 return true; |
| 75 } | 71 } |
| 76 | 72 |
| 77 bool PanelWindow::CanMaximize() const { | 73 bool PanelWindow::CanMaximize() const { |
| 78 return false; | 74 return false; |
| 79 } | 75 } |
| 80 | 76 |
| 81 bool PanelWindow::CanMinimize() const { | 77 bool PanelWindow::CanMinimize() const { |
| 82 return false; | 78 return false; |
| 83 } | 79 } |
| 84 | 80 |
| 85 views::NonClientFrameView* PanelWindow::CreateNonClientFrameView( | 81 views::NonClientFrameView* PanelWindow::CreateNonClientFrameView( |
| 86 views::Widget* widget) { | 82 views::Widget* widget) { |
| 87 return new PanelFrameView(widget, PanelFrameView::FRAME_NONE); | 83 return new PanelFrameView(widget, PanelFrameView::FRAME_NONE); |
| 88 } | 84 } |
| 89 | 85 |
| 90 } // namespace ash | 86 } // namespace ash |
| OLD | NEW |