Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(658)

Side by Side Diff: ash/shell/panel_window.cc

Issue 2390953004: WidgetDelegateView is its own contents view. (Closed)
Patch Set: another minor fix Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698