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

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

Issue 8926004: Revert 114095 - Move the concept of Activation to the Shell. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/test/test_window_delegate.h ('k') | ui/aura/window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/test_window_delegate.cc
===================================================================
--- ui/aura/test/test_window_delegate.cc (revision 114098)
+++ ui/aura/test/test_window_delegate.cc (working copy)
@@ -60,6 +60,16 @@
return true;
}
+bool TestWindowDelegate::ShouldActivate(Event* event) {
+ return true;
+}
+
+void TestWindowDelegate::OnActivated() {
+}
+
+void TestWindowDelegate::OnLostActive() {
+}
+
void TestWindowDelegate::OnCaptureLost() {
}
@@ -97,5 +107,33 @@
canvas->GetSkCanvas()->drawColor(color_, SkXfermode::kSrc_Mode);
}
+////////////////////////////////////////////////////////////////////////////////
+// ActivateWindowDelegate
+
+ActivateWindowDelegate::ActivateWindowDelegate()
+ : activate_(true),
+ activated_count_(0),
+ lost_active_count_(0),
+ should_activate_count_(0) {
+}
+
+ActivateWindowDelegate::ActivateWindowDelegate(bool activate)
+ : activate_(activate),
+ activated_count_(0),
+ lost_active_count_(0),
+ should_activate_count_(0) {
+}
+
+bool ActivateWindowDelegate::ShouldActivate(Event* event) {
+ should_activate_count_++;
+ return activate_;
+}
+void ActivateWindowDelegate::OnActivated() {
+ activated_count_++;
+}
+void ActivateWindowDelegate::OnLostActive() {
+ lost_active_count_++;
+}
+
} // namespace test
} // namespace aura
« no previous file with comments | « ui/aura/test/test_window_delegate.h ('k') | ui/aura/window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698