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

Unified Diff: components/view_manager/public/cpp/view_tracker.cc

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/view_tracker.cc
diff --git a/components/view_manager/public/cpp/view_tracker.cc b/components/view_manager/public/cpp/view_tracker.cc
deleted file mode 100644
index 84550ba5e7fc5fd8c90f1cb01df8ab00efa845d2..0000000000000000000000000000000000000000
--- a/components/view_manager/public/cpp/view_tracker.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2014 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.
-
-#include "components/view_manager/public/cpp/view_tracker.h"
-
-namespace mojo {
-
-ViewTracker::ViewTracker() {
-}
-
-ViewTracker::~ViewTracker() {
- for (Views::iterator i = views_.begin(); i != views_.end(); ++i)
- (*i)->RemoveObserver(this);
-}
-
-void ViewTracker::Add(View* view) {
- if (views_.count(view))
- return;
-
- view->AddObserver(this);
- views_.insert(view);
-}
-
-void ViewTracker::Remove(View* view) {
- if (views_.count(view)) {
- views_.erase(view);
- view->RemoveObserver(this);
- }
-}
-
-bool ViewTracker::Contains(View* view) {
- return views_.count(view) > 0;
-}
-
-void ViewTracker::OnViewDestroying(View* view) {
- DCHECK_GT(views_.count(view), 0u);
- Remove(view);
-}
-
-} // namespace mojo
« no previous file with comments | « components/view_manager/public/cpp/view_tracker.h ('k') | components/view_manager/public/cpp/view_tree_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698