Move mojo gypfiles to toplevel mojo
[chromium-blink-merge.git] / ui / aura / window_observer.cc
blobbf5ffac2a4ee29c9283aa64dc0b04df155b2080e
1 // Copyright 2014 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.
5 #include "ui/aura/window_observer.h"
7 #include "base/logging.h"
8 #include "ui/aura/window.h"
10 namespace aura {
12 WindowObserver::WindowObserver() : observing_(0) {
15 WindowObserver::~WindowObserver() {
16 CHECK_EQ(0, observing_);
19 void WindowObserver::OnObservingWindow(aura::Window* window) {
20 if (!window->HasObserver(this))
21 observing_++;
24 void WindowObserver::OnUnobservingWindow(aura::Window* window) {
25 if (window->HasObserver(this))
26 observing_--;
29 } // namespace aura