Upstream missing changes from HttpUrlRequest interface and HttpUrlConnectionUrlReques...
[chromium-blink-merge.git] / ash / shell / toplevel_window.h
blob8a31d26969639e85ba247da107863c7d536436b4
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"
10 namespace ash {
11 namespace shell {
13 class ToplevelWindow : public views::WidgetDelegateView {
14 public:
15 struct CreateParams {
16 CreateParams();
18 bool can_resize;
19 bool can_maximize;
21 static views::Widget* CreateToplevelWindow(
22 const CreateParams& params);
24 // Clears saved show state and bounds used to position
25 // a new window.
26 static void ClearSavedStateForTest();
28 private:
29 explicit ToplevelWindow(const CreateParams& params);
30 virtual ~ToplevelWindow();
32 // Overridden from views::View:
33 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
35 // Overridden from views::WidgetDelegate:
36 virtual base::string16 GetWindowTitle() const OVERRIDE;
37 virtual void SaveWindowPlacement(
38 const gfx::Rect& bounds,
39 ui::WindowShowState show_state) OVERRIDE;
40 virtual bool GetSavedWindowPlacement(
41 const views::Widget* widget,
42 gfx::Rect* bounds,
43 ui::WindowShowState* show_state) const OVERRIDE;
44 virtual View* GetContentsView() OVERRIDE;
45 virtual bool CanResize() const OVERRIDE;
46 virtual bool CanMaximize() const OVERRIDE;
48 const CreateParams params_;
50 DISALLOW_COPY_AND_ASSIGN(ToplevelWindow);
53 } // namespace shell
54 } // namespace ash
56 #endif // ASH_SHELL_TOPLEVEL_WINDOW_H_