OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 MASH_WM_NON_CLIENT_FRAME_CONTROLLER_H_ | 5 #ifndef MASH_WM_NON_CLIENT_FRAME_CONTROLLER_H_ |
6 #define MASH_WM_NON_CLIENT_FRAME_CONTROLLER_H_ | 6 #define MASH_WM_NON_CLIENT_FRAME_CONTROLLER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "components/mus/public/cpp/window_observer.h" | 12 #include "components/mus/public/cpp/window_observer.h" |
13 #include "ui/views/widget/widget_delegate.h" | 13 #include "ui/views/widget/widget_delegate.h" |
14 | 14 |
15 namespace gfx { | 15 namespace gfx { |
16 class Insets; | 16 class Insets; |
17 } | 17 } |
18 | 18 |
19 namespace mojo { | 19 namespace mojo { |
20 namespace shell { | |
21 namespace mojom { | |
22 class Shell; | 20 class Shell; |
23 } | 21 } |
24 } | |
25 } | |
26 | 22 |
27 namespace mus { | 23 namespace mus { |
28 class Window; | 24 class Window; |
29 class WindowManagerClient; | 25 class WindowManagerClient; |
30 } | 26 } |
31 | 27 |
32 namespace mash { | 28 namespace mash { |
33 namespace wm { | 29 namespace wm { |
34 | 30 |
35 // Provides the non-client frame for mus Windows. | 31 // Provides the non-client frame for mus Windows. |
36 class NonClientFrameController : public views::WidgetDelegateView, | 32 class NonClientFrameController : public views::WidgetDelegateView, |
37 public mus::WindowObserver { | 33 public mus::WindowObserver { |
38 public: | 34 public: |
39 // NonClientFrameController deletes itself when |window| is destroyed. | 35 // NonClientFrameController deletes itself when |window| is destroyed. |
40 NonClientFrameController(mojo::shell::mojom::Shell* shell, | 36 NonClientFrameController(mojo::Shell* shell, |
41 mus::Window* window, | 37 mus::Window* window, |
42 mus::WindowManagerClient* window_manager_client); | 38 mus::WindowManagerClient* window_manager_client); |
43 | 39 |
44 // Returns the preferred client area insets. | 40 // Returns the preferred client area insets. |
45 static gfx::Insets GetPreferredClientAreaInsets(); | 41 static gfx::Insets GetPreferredClientAreaInsets(); |
46 | 42 |
47 // Returns the width needed to display the standard set of buttons on the | 43 // Returns the width needed to display the standard set of buttons on the |
48 // title bar. | 44 // title bar. |
49 static int GetMaxTitleBarButtonWidth(); | 45 static int GetMaxTitleBarButtonWidth(); |
50 | 46 |
(...skipping 24 matching lines...) Expand all Loading... |
75 // is null. | 71 // is null. |
76 mus::Window* window_; | 72 mus::Window* window_; |
77 | 73 |
78 DISALLOW_COPY_AND_ASSIGN(NonClientFrameController); | 74 DISALLOW_COPY_AND_ASSIGN(NonClientFrameController); |
79 }; | 75 }; |
80 | 76 |
81 } // namespace wm | 77 } // namespace wm |
82 } // namespace mash | 78 } // namespace mash |
83 | 79 |
84 #endif // MASH_WM_NON_CLIENT_FRAME_CONTROLLER_H_ | 80 #endif // MASH_WM_NON_CLIENT_FRAME_CONTROLLER_H_ |
OLD | NEW |