OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef VIEWS_DESKTOP_DESKTOP_WINDOW_H_ | 5 #ifndef VIEWS_DESKTOP_DESKTOP_WINDOW_H_ |
6 #define VIEWS_DESKTOP_DESKTOP_WINDOW_H_ | 6 #define VIEWS_DESKTOP_DESKTOP_WINDOW_H_ |
7 | 7 |
8 #include "views/view.h" | 8 #include "views/view.h" |
9 #include "views/widget/widget_delegate.h" | 9 #include "views/widget/widget_delegate.h" |
10 | 10 |
11 namespace views { | 11 namespace views { |
12 class NativeWidgetViews; | 12 class NativeWidgetViews; |
13 | 13 |
14 namespace desktop { | 14 namespace desktop { |
15 | 15 |
16 class DesktopWindow : public WidgetDelegateView { | 16 class DesktopWindow : public WidgetDelegateView { |
17 public: | 17 public: |
18 static DesktopWindow* desktop_window; | 18 static DesktopWindow* desktop_window; |
19 | 19 |
20 DesktopWindow(); | 20 DesktopWindow(); |
21 virtual ~DesktopWindow(); | 21 virtual ~DesktopWindow(); |
22 | 22 |
23 static void CreateDesktopWindow(); | 23 static void CreateDesktopWindow(); |
24 | 24 |
25 // Changes activation to the specified Widget. The currently active Widget | 25 // Changes activation to the specified Widget. The currently active Widget |
26 // is de-activated. | 26 // is de-activated. |
27 void ActivateWidget(Widget* widget); | 27 void ActivateWidget(Widget* widget); |
| 28 |
| 29 void CreateTestWindow(const std::wstring& title, |
| 30 SkColor color, |
| 31 gfx::Rect initial_bounds, |
| 32 bool rotate); |
28 | 33 |
29 private: | 34 private: |
30 // Overridden from View: | 35 // Overridden from View: |
31 virtual void Layout() OVERRIDE; | 36 virtual void Layout() OVERRIDE; |
32 | 37 |
33 // Overridden from WidgetDelegate: | 38 // Overridden from WidgetDelegate: |
34 virtual bool CanResize() const OVERRIDE; | 39 virtual bool CanResize() const OVERRIDE; |
35 virtual bool CanMaximize() const OVERRIDE; | 40 virtual bool CanMaximize() const OVERRIDE; |
36 virtual std::wstring GetWindowTitle() const OVERRIDE; | 41 virtual std::wstring GetWindowTitle() const OVERRIDE; |
37 virtual SkBitmap GetWindowAppIcon() OVERRIDE; | 42 virtual SkBitmap GetWindowAppIcon() OVERRIDE; |
38 virtual SkBitmap GetWindowIcon() OVERRIDE; | 43 virtual SkBitmap GetWindowIcon() OVERRIDE; |
39 virtual bool ShouldShowWindowIcon() const OVERRIDE; | 44 virtual bool ShouldShowWindowIcon() const OVERRIDE; |
40 virtual void WindowClosing() OVERRIDE; | 45 virtual void WindowClosing() OVERRIDE; |
41 virtual View* GetContentsView() OVERRIDE; | 46 virtual View* GetContentsView() OVERRIDE; |
42 | 47 |
43 void CreateTestWindow(const std::wstring& title, | |
44 SkColor color, | |
45 gfx::Rect initial_bounds, | |
46 bool rotate); | |
47 | |
48 NativeWidgetViews* active_widget_; | 48 NativeWidgetViews* active_widget_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(DesktopWindow); | 50 DISALLOW_COPY_AND_ASSIGN(DesktopWindow); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace desktop | 53 } // namespace desktop |
54 } // namespace views | 54 } // namespace views |
55 | 55 |
56 #endif // VIEWS_DESKTOP_DESKTOP_WINDOW_H_ | 56 #endif // VIEWS_DESKTOP_DESKTOP_WINDOW_H_ |
OLD | NEW |