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

Unified Diff: components/view_manager/public/cpp/scoped_view_ptr.h

Issue 1344573002: Mandoline: Rename components/view_manager to components/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 3 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
Index: components/view_manager/public/cpp/scoped_view_ptr.h
diff --git a/components/view_manager/public/cpp/scoped_view_ptr.h b/components/view_manager/public/cpp/scoped_view_ptr.h
deleted file mode 100644
index b9cba09d603be9111601d990a326d8b2e37475bb..0000000000000000000000000000000000000000
--- a/components/view_manager/public/cpp/scoped_view_ptr.h
+++ /dev/null
@@ -1,38 +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_VIEW_MANAGER_PUBLIC_CPP_SCOPED_VIEW_PTR_H_
-#define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_SCOPED_VIEW_PTR_H_
-
-#include "components/view_manager/public/cpp/view_observer.h"
-
-namespace mojo {
-
-// Wraps a View, taking overship of the View. Also deals with View being
-// destroyed while ScopedViewPtr still exists.
-class ScopedViewPtr : public ViewObserver {
- public:
- explicit ScopedViewPtr(View* view);
- ~ScopedViewPtr() override;
-
- // Destroys |view|. If |view| is the root of the ViewManager than the
- // ViewManager is destroyed (which in turn destroys |view|).
- static void DeleteViewOrViewManager(View* view);
-
- View* view() { return view_; }
- const View* view() const { return view_; }
-
- private:
- void DetachFromView();
-
- void OnViewDestroying(View* view) override;
-
- View* view_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedViewPtr);
-};
-
-} // namespace mojo
-
-#endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_SCOPED_VIEW_PTR_H_
« no previous file with comments | « components/view_manager/public/cpp/lib/view_tree_host_factory.cc ('k') | components/view_manager/public/cpp/tests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698