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

Unified Diff: services/ui/public/cpp/scoped_window_ptr.h

Issue 2651593002: mus: Remove the old client lib. (Closed)
Patch Set: restore test Created 3 years, 11 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 | « services/ui/public/cpp/input_event_handler.h ('k') | services/ui/public/cpp/scoped_window_ptr.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/public/cpp/scoped_window_ptr.h
diff --git a/services/ui/public/cpp/scoped_window_ptr.h b/services/ui/public/cpp/scoped_window_ptr.h
deleted file mode 100644
index 2595ad14dfd52c603b4c6cc8a554c9b6dbca3770..0000000000000000000000000000000000000000
--- a/services/ui/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 SERVICES_UI_PUBLIC_CPP_SCOPED_WINDOW_PTR_H_
-#define SERVICES_UI_PUBLIC_CPP_SCOPED_WINDOW_PTR_H_
-
-#include "base/macros.h"
-#include "services/ui/public/cpp/window_observer.h"
-
-namespace ui {
-
-// 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 ui
-
-#endif // SERVICES_UI_PUBLIC_CPP_SCOPED_WINDOW_PTR_H_
« no previous file with comments | « services/ui/public/cpp/input_event_handler.h ('k') | services/ui/public/cpp/scoped_window_ptr.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698