OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "ui/aura/window_observer.h" | |
6 | |
7 #include "base/debug/stack_trace.h" | |
flackr
2014/04/28 17:11:42
This doesn't seem to be used.
sky
2014/04/28 17:18:36
Done.
| |
8 #include "base/logging.h" | |
9 #include "ui/aura/window.h" | |
10 | |
11 namespace aura { | |
12 | |
13 WindowObserver::WindowObserver() : observing_(0) { | |
14 } | |
15 | |
16 WindowObserver::~WindowObserver() { | |
17 // TODO(flackr): Remove this check and observing_ counter when the cause of | |
18 // http://crbug.com/365364 is discovered. | |
19 CHECK_EQ(0, observing_); | |
20 } | |
21 | |
22 void WindowObserver::OnObservingWindow(aura::Window* window) { | |
23 if (!window->HasObserver(this)) | |
24 observing_++; | |
25 } | |
26 | |
27 void WindowObserver::OnUnobservingWindow(aura::Window* window) { | |
28 if (window->HasObserver(this)) | |
29 observing_--; | |
30 } | |
31 | |
32 } // namespace aura | |
OLD | NEW |