Home | History | Annotate | Download | only in shell
      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.
      4 
      5 #ifndef ASH_SHELL_TOPLEVEL_WINDOW_H_
      6 #define ASH_SHELL_TOPLEVEL_WINDOW_H_
      7 
      8 #include "ui/views/widget/widget_delegate.h"
      9 
     10 namespace ash {
     11 namespace shell {
     12 
     13 class ToplevelWindow : public views::WidgetDelegateView {
     14  public:
     15   struct CreateParams {
     16     CreateParams();
     17 
     18     bool can_resize;
     19     bool can_maximize;
     20   };
     21   static void CreateToplevelWindow(const CreateParams& params);
     22 
     23  private:
     24   explicit ToplevelWindow(const CreateParams& params);
     25   virtual ~ToplevelWindow();
     26 
     27   // Overridden from views::View:
     28   virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
     29 
     30   // Overridden from views::WidgetDelegate:
     31   virtual base::string16 GetWindowTitle() const OVERRIDE;
     32   virtual View* GetContentsView() OVERRIDE;
     33   virtual bool CanResize() const OVERRIDE;
     34   virtual bool CanMaximize() const OVERRIDE;
     35 
     36   const CreateParams params_;
     37 
     38   DISALLOW_COPY_AND_ASSIGN(ToplevelWindow);
     39 };
     40 
     41 }  // namespace shell
     42 }  // namespace ash
     43 
     44 #endif  // ASH_SHELL_TOPLEVEL_WINDOW_H_
     45