OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 ASH_SHELL_TOPLEVEL_WINDOW_H_ | 5 #ifndef ASH_SHELL_TOPLEVEL_WINDOW_H_ |
6 #define ASH_SHELL_TOPLEVEL_WINDOW_H_ | 6 #define ASH_SHELL_TOPLEVEL_WINDOW_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/views/widget/widget_delegate.h" | 9 #include "ui/views/widget/widget_delegate.h" |
10 | 10 |
11 namespace ash { | 11 namespace ash { |
12 namespace shell { | 12 namespace shell { |
13 | 13 |
14 class ToplevelWindow : public views::WidgetDelegateView { | 14 class ToplevelWindow : public views::WidgetDelegateView { |
15 public: | 15 public: |
16 struct CreateParams { | 16 struct CreateParams { |
17 CreateParams(); | 17 CreateParams(); |
18 | 18 |
19 bool can_resize; | 19 bool can_resize; |
20 bool can_maximize; | 20 bool can_maximize; |
21 bool use_saved_placement; | 21 bool use_saved_placement; |
22 }; | 22 }; |
23 static views::Widget* CreateToplevelWindow( | 23 static views::Widget* CreateToplevelWindow(const CreateParams& params); |
24 const CreateParams& params); | |
25 | 24 |
26 // Clears saved show state and bounds used to position | 25 // Clears saved show state and bounds used to position |
27 // a new window. | 26 // a new window. |
28 static void ClearSavedStateForTest(); | 27 static void ClearSavedStateForTest(); |
29 | 28 |
30 private: | 29 private: |
31 explicit ToplevelWindow(const CreateParams& params); | 30 explicit ToplevelWindow(const CreateParams& params); |
32 ~ToplevelWindow() override; | 31 ~ToplevelWindow() override; |
33 | 32 |
34 // Overridden from views::View: | 33 // Overridden from views::View: |
(...skipping 13 matching lines...) Expand all Loading... |
48 | 47 |
49 const CreateParams params_; | 48 const CreateParams params_; |
50 | 49 |
51 DISALLOW_COPY_AND_ASSIGN(ToplevelWindow); | 50 DISALLOW_COPY_AND_ASSIGN(ToplevelWindow); |
52 }; | 51 }; |
53 | 52 |
54 } // namespace shell | 53 } // namespace shell |
55 } // namespace ash | 54 } // namespace ash |
56 | 55 |
57 #endif // ASH_SHELL_TOPLEVEL_WINDOW_H_ | 56 #endif // ASH_SHELL_TOPLEVEL_WINDOW_H_ |
OLD | NEW |