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