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

Side by Side Diff: ui/aura/test/test_activation_client.cc

Issue 8956004: Move ActivationClient/Delegate to client namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/test/test_activation_client.h ('k') | ui/aura_shell/activation_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/test/test_activation_client.h" 5 #include "ui/aura/test/test_activation_client.h"
6 6
7 #include "ui/aura/window.h" 7 #include "ui/aura/window.h"
8 8
9 namespace aura { 9 namespace aura {
10 namespace test { 10 namespace test {
11 11
12 //////////////////////////////////////////////////////////////////////////////// 12 ////////////////////////////////////////////////////////////////////////////////
13 // TestActivationClient, public: 13 // TestActivationClient, public:
14 14
15 TestActivationClient::TestActivationClient() : active_window_(NULL) { 15 TestActivationClient::TestActivationClient() : active_window_(NULL) {
16 ActivationClient::SetActivationClient(this); 16 client::SetActivationClient(this);
17 } 17 }
18 18
19 TestActivationClient::~TestActivationClient() { 19 TestActivationClient::~TestActivationClient() {
20 } 20 }
21 21
22 //////////////////////////////////////////////////////////////////////////////// 22 ////////////////////////////////////////////////////////////////////////////////
23 // TestActivationClient, ActivationClient implementation: 23 // TestActivationClient, client::ActivationClient implementation:
24 24
25 void TestActivationClient::ActivateWindow(Window* window) { 25 void TestActivationClient::ActivateWindow(Window* window) {
26 if (active_window_) 26 if (active_window_)
27 active_window_->RemoveObserver(this); 27 active_window_->RemoveObserver(this);
28 active_window_ = window; 28 active_window_ = window;
29 active_window_->AddObserver(this); 29 active_window_->AddObserver(this);
30 } 30 }
31 31
32 void TestActivationClient::DeactivateWindow(Window* window) { 32 void TestActivationClient::DeactivateWindow(Window* window) {
33 if (window == active_window_) { 33 if (window == active_window_) {
(...skipping 16 matching lines...) Expand all
50 50
51 void TestActivationClient::OnWindowDestroyed(Window* window) { 51 void TestActivationClient::OnWindowDestroyed(Window* window) {
52 if (window == active_window_) { 52 if (window == active_window_) {
53 window->RemoveObserver(this); 53 window->RemoveObserver(this);
54 active_window_ = NULL; 54 active_window_ = NULL;
55 } 55 }
56 } 56 }
57 57
58 } // namespace test 58 } // namespace test
59 } // namespace aura 59 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/test/test_activation_client.h ('k') | ui/aura_shell/activation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698