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 |