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
3 // found in the LICENSE file.
5 #ifndef ASH_SHELL_TOPLEVEL_WINDOW_H_
6 #define ASH_SHELL_TOPLEVEL_WINDOW_H_
8 #include "ui/views/widget/widget_delegate.h"
13 class ToplevelWindow
: public views::WidgetDelegateView
{
21 static views::Widget
* CreateToplevelWindow(
22 const CreateParams
& params
);
24 // Clears saved show state and bounds used to position
26 static void ClearSavedStateForTest();
29 explicit ToplevelWindow(const CreateParams
& params
);
30 ~ToplevelWindow() override
;
32 // Overridden from views::View:
33 void OnPaint(gfx::Canvas
* canvas
) override
;
35 // Overridden from views::WidgetDelegate:
36 base::string16
GetWindowTitle() const override
;
37 void SaveWindowPlacement(const gfx::Rect
& bounds
,
38 ui::WindowShowState show_state
) override
;
39 bool GetSavedWindowPlacement(const views::Widget
* widget
,
41 ui::WindowShowState
* show_state
) const override
;
42 View
* GetContentsView() override
;
43 bool CanResize() const override
;
44 bool CanMaximize() const override
;
45 bool CanMinimize() const override
;
47 const CreateParams params_
;
49 DISALLOW_COPY_AND_ASSIGN(ToplevelWindow
);
55 #endif // ASH_SHELL_TOPLEVEL_WINDOW_H_