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

Unified Diff: ui/aura/window_tracker.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 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 | « ui/aura/window_tracker.h ('k') | ui/aura/window_tree_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_tracker.cc
diff --git a/ui/aura/window_tracker.cc b/ui/aura/window_tracker.cc
deleted file mode 100644
index 9653e5fcf9ea57dc2b147e0e2f34b6d041cdef9b..0000000000000000000000000000000000000000
--- a/ui/aura/window_tracker.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2012 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 "ui/aura/window_tracker.h"
-
-#include "ui/aura/window.h"
-
-namespace aura {
-
-WindowTracker::WindowTracker() {
-}
-
-WindowTracker::~WindowTracker() {
- for (Windows::iterator i = windows_.begin(); i != windows_.end(); ++i)
- (*i)->RemoveObserver(this);
-}
-
-void WindowTracker::Add(Window* window) {
- if (windows_.count(window))
- return;
-
- window->AddObserver(this);
- windows_.insert(window);
-}
-
-void WindowTracker::Remove(Window* window) {
- if (windows_.count(window)) {
- windows_.erase(window);
- window->RemoveObserver(this);
- }
-}
-
-bool WindowTracker::Contains(Window* window) {
- return windows_.count(window) > 0;
-}
-
-void WindowTracker::OnWindowDestroying(Window* window) {
- DCHECK_GT(windows_.count(window), 0u);
- Remove(window);
-}
-
-} // namespace aura
« no previous file with comments | « ui/aura/window_tracker.h ('k') | ui/aura/window_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698