summaryrefslogtreecommitdiffstats
path: root/views/desktop/desktop_window.h
blob: 7b477d5c8580c5908f01e8ccb76b215daf006e5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef VIEWS_DESKTOP_DESKTOP_WINDOW_H_
#define VIEWS_DESKTOP_DESKTOP_WINDOW_H_

#include "views/view.h"
#include "views/widget/widget_delegate.h"

namespace views {
class NativeWidgetViews;

namespace desktop {

class DesktopWindow : public WidgetDelegateView {
 public:
  static DesktopWindow* desktop_window;

  DesktopWindow();
  virtual ~DesktopWindow();

  static void CreateDesktopWindow();

  // Changes activation to the specified Widget. The currently active Widget
  // is de-activated.
  void ActivateWidget(Widget* widget);

  void CreateTestWindow(const std::wstring& title,
                        SkColor color,
                        gfx::Rect initial_bounds,
                        bool rotate);

 private:
  // Overridden from View:
  virtual void Layout() OVERRIDE;

  // Overridden from WidgetDelegate:
  virtual bool CanResize() const OVERRIDE;
  virtual bool CanMaximize() const OVERRIDE;
  virtual std::wstring GetWindowTitle() const OVERRIDE;
  virtual SkBitmap GetWindowAppIcon() OVERRIDE;
  virtual SkBitmap GetWindowIcon() OVERRIDE;
  virtual bool ShouldShowWindowIcon() const OVERRIDE;
  virtual void WindowClosing() OVERRIDE;
  virtual View* GetContentsView() OVERRIDE;

  NativeWidgetViews* active_widget_;

  DISALLOW_COPY_AND_ASSIGN(DesktopWindow);
};

}  // namespace desktop
}  // namespace views

#endif  // VIEWS_DESKTOP_DESKTOP_WINDOW_H_