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

Unified Diff: ui/aura/test/test_activation_client.cc

Issue 11275296: Move shadow code to views\corewm (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/test/test_activation_client.h ('k') | ui/views/corewm/image_grid.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/test_activation_client.cc
===================================================================
--- ui/aura/test/test_activation_client.cc (revision 167688)
+++ ui/aura/test/test_activation_client.cc (working copy)
@@ -4,6 +4,7 @@
#include "ui/aura/test/test_activation_client.h"
+#include "ui/aura/client/activation_change_observer.h"
#include "ui/aura/client/activation_delegate.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
@@ -29,20 +30,27 @@
void TestActivationClient::AddObserver(
client::ActivationChangeObserver* observer) {
+ observers_.AddObserver(observer);
}
void TestActivationClient::RemoveObserver(
client::ActivationChangeObserver* observer) {
+ observers_.RemoveObserver(observer);
}
void TestActivationClient::ActivateWindow(Window* window) {
- Window *last_active = GetActiveWindow();
+ Window* last_active = GetActiveWindow();
if (last_active == window)
return;
RemoveActiveWindow(window);
active_windows_.push_back(window);
window->AddObserver(this);
+
+ FOR_EACH_OBSERVER(client::ActivationChangeObserver,
+ observers_,
+ OnWindowActivated(window, last_active));
+
if (aura::client::GetActivationDelegate(window))
aura::client::GetActivationDelegate(window)->OnActivated();
« no previous file with comments | « ui/aura/test/test_activation_client.h ('k') | ui/views/corewm/image_grid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698