OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/aura/window_observer.h" | 5 #include "ui/aura/window_observer.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
9 | 9 |
10 namespace aura { | 10 namespace aura { |
11 | 11 |
12 WindowObserver::WindowObserver() : observing_(0) { | 12 WindowObserver::WindowObserver() : observing_(0) { |
13 } | 13 } |
14 | 14 |
15 WindowObserver::~WindowObserver() { | 15 WindowObserver::~WindowObserver() { |
16 CHECK_EQ(0, observing_); | 16 CHECK_EQ(0, observing_); |
17 } | 17 } |
18 | 18 |
19 void WindowObserver::OnObservingWindow(aura::Window* window) { | 19 void WindowObserver::OnObservingWindow(aura::Window* window) { |
20 if (!window->HasObserver(this)) | 20 if (!window->HasObserver(this)) |
21 observing_++; | 21 observing_++; |
22 } | 22 } |
23 | 23 |
24 void WindowObserver::OnUnobservingWindow(aura::Window* window) { | 24 void WindowObserver::OnUnobservingWindow(aura::Window* window) { |
25 if (window->HasObserver(this)) | 25 if (window->HasObserver(this)) |
26 observing_--; | 26 observing_--; |
27 } | 27 } |
28 | 28 |
| 29 void WindowObserver::OnEmbeddedAppDisconnected(Window* window) {} |
| 30 |
29 } // namespace aura | 31 } // namespace aura |
OLD | NEW |