OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/client/default_activation_client.h" | 5 #include "ui/aura/client/default_activation_client.h" |
6 | 6 |
7 #include "ui/aura/client/activation_change_observer.h" | 7 #include "ui/aura/client/activation_change_observer.h" |
8 #include "ui/aura/client/activation_delegate.h" | 8 #include "ui/aura/client/activation_delegate.h" |
9 #include "ui/aura/root_window.h" | |
10 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
11 | 10 |
12 namespace aura { | 11 namespace aura { |
13 namespace client { | 12 namespace client { |
14 | 13 |
15 //////////////////////////////////////////////////////////////////////////////// | 14 //////////////////////////////////////////////////////////////////////////////// |
16 // DefaultActivationClient, public: | 15 // DefaultActivationClient, public: |
17 | 16 |
18 DefaultActivationClient::DefaultActivationClient(RootWindow* root_window) | 17 DefaultActivationClient::DefaultActivationClient(Window* root_window) |
19 : last_active_(NULL) { | 18 : last_active_(NULL) { |
20 client::SetActivationClient(root_window, this); | 19 client::SetActivationClient(root_window, this); |
21 } | 20 } |
22 | 21 |
23 DefaultActivationClient::~DefaultActivationClient() { | 22 DefaultActivationClient::~DefaultActivationClient() { |
24 for (unsigned int i = 0; i < active_windows_.size(); ++i) { | 23 for (unsigned int i = 0; i < active_windows_.size(); ++i) { |
25 active_windows_[i]->RemoveObserver(this); | 24 active_windows_[i]->RemoveObserver(this); |
26 } | 25 } |
27 } | 26 } |
28 | 27 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 if (active_windows_[i] == window) { | 120 if (active_windows_[i] == window) { |
122 active_windows_.erase(active_windows_.begin() + i); | 121 active_windows_.erase(active_windows_.begin() + i); |
123 window->RemoveObserver(this); | 122 window->RemoveObserver(this); |
124 return; | 123 return; |
125 } | 124 } |
126 } | 125 } |
127 } | 126 } |
128 | 127 |
129 } // namespace client | 128 } // namespace client |
130 } // namespace aura | 129 } // namespace aura |
OLD | NEW |