Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: components/mus/public/cpp/scoped_window_ptr.h

Issue 2119963002: Move mus to //services/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/public/cpp/property_type_converters.h ('k') | components/mus/public/cpp/tests/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/public/cpp/scoped_window_ptr.h
diff --git a/components/mus/public/cpp/scoped_window_ptr.h b/components/mus/public/cpp/scoped_window_ptr.h
deleted file mode 100644
index b94e0f945f3cfdf950e383f5b42d1b35d7bf2cf3..0000000000000000000000000000000000000000
--- a/components/mus/public/cpp/scoped_window_ptr.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2015 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 COMPONENTS_MUS_PUBLIC_CPP_SCOPED_WINDOW_PTR_H_
-#define COMPONENTS_MUS_PUBLIC_CPP_SCOPED_WINDOW_PTR_H_
-
-#include "base/macros.h"
-#include "components/mus/public/cpp/window_observer.h"
-
-namespace mus {
-
-// Wraps a Window, taking overship of the Window. Also deals with Window being
-// destroyed while ScopedWindowPtr still exists.
-class ScopedWindowPtr : public WindowObserver {
- public:
- explicit ScopedWindowPtr(Window* window);
- ~ScopedWindowPtr() override;
-
- // Destroys |window|. If |window| is a root of the WindowManager than the
- // WindowManager is destroyed (which in turn destroys |window|).
- //
- // NOTE: this function (and class) are only useful for clients that only
- // ever have a single root.
- static void DeleteWindowOrWindowManager(Window* window);
-
- Window* window() { return window_; }
- const Window* window() const { return window_; }
-
- private:
- void DetachFromWindow();
-
- void OnWindowDestroying(Window* window) override;
-
- Window* window_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedWindowPtr);
-};
-
-} // namespace mus
-
-#endif // COMPONENTS_MUS_PUBLIC_CPP_SCOPED_WINDOW_PTR_H_
« no previous file with comments | « components/mus/public/cpp/property_type_converters.h ('k') | components/mus/public/cpp/tests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698