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 COMPONENTS_MUS_PUBLIC_CPP_SCOPED_WINDOW_PTR_H_ | 5 #ifndef SERVICES_UI_PUBLIC_CPP_SCOPED_WINDOW_PTR_H_ |
6 #define COMPONENTS_MUS_PUBLIC_CPP_SCOPED_WINDOW_PTR_H_ | 6 #define SERVICES_UI_PUBLIC_CPP_SCOPED_WINDOW_PTR_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "components/mus/public/cpp/window_observer.h" | 9 #include "services/ui/public/cpp/window_observer.h" |
10 | 10 |
11 namespace mus { | 11 namespace mus { |
12 | 12 |
13 // Wraps a Window, taking overship of the Window. Also deals with Window being | 13 // Wraps a Window, taking overship of the Window. Also deals with Window being |
14 // destroyed while ScopedWindowPtr still exists. | 14 // destroyed while ScopedWindowPtr still exists. |
15 class ScopedWindowPtr : public WindowObserver { | 15 class ScopedWindowPtr : public WindowObserver { |
16 public: | 16 public: |
17 explicit ScopedWindowPtr(Window* window); | 17 explicit ScopedWindowPtr(Window* window); |
18 ~ScopedWindowPtr() override; | 18 ~ScopedWindowPtr() override; |
19 | 19 |
(...skipping 12 matching lines...) Expand all Loading... |
32 | 32 |
33 void OnWindowDestroying(Window* window) override; | 33 void OnWindowDestroying(Window* window) override; |
34 | 34 |
35 Window* window_; | 35 Window* window_; |
36 | 36 |
37 DISALLOW_COPY_AND_ASSIGN(ScopedWindowPtr); | 37 DISALLOW_COPY_AND_ASSIGN(ScopedWindowPtr); |
38 }; | 38 }; |
39 | 39 |
40 } // namespace mus | 40 } // namespace mus |
41 | 41 |
42 #endif // COMPONENTS_MUS_PUBLIC_CPP_SCOPED_WINDOW_PTR_H_ | 42 #endif // SERVICES_UI_PUBLIC_CPP_SCOPED_WINDOW_PTR_H_ |
OLD | NEW |