| Index: ui/aura/test/test_window_delegate.h
|
| ===================================================================
|
| --- ui/aura/test/test_window_delegate.h (revision 114098)
|
| +++ ui/aura/test/test_window_delegate.h (working copy)
|
| @@ -31,6 +31,9 @@
|
| virtual bool OnMouseEvent(MouseEvent* event) OVERRIDE;
|
| virtual ui::TouchStatus OnTouchEvent(TouchEvent* event) OVERRIDE;
|
| virtual bool CanFocus() OVERRIDE;
|
| + virtual bool ShouldActivate(Event* event) OVERRIDE;
|
| + virtual void OnActivated() OVERRIDE;
|
| + virtual void OnLostActive() OVERRIDE;
|
| virtual void OnCaptureLost() OVERRIDE;
|
| virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
|
| virtual void OnWindowDestroying() OVERRIDE;
|
| @@ -62,6 +65,33 @@
|
| DISALLOW_COPY_AND_ASSIGN(ColorTestWindowDelegate);
|
| };
|
|
|
| +class ActivateWindowDelegate : public TestWindowDelegate {
|
| + public:
|
| + ActivateWindowDelegate();
|
| + explicit ActivateWindowDelegate(bool activate);
|
| +
|
| + void set_activate(bool v) { activate_ = v; }
|
| + int activated_count() const { return activated_count_; }
|
| + int lost_active_count() const { return lost_active_count_; }
|
| + int should_activate_count() const { return should_activate_count_; }
|
| + void Clear() {
|
| + activated_count_ = lost_active_count_ = should_activate_count_ = 0;
|
| + }
|
| +
|
| + // Overridden from TestWindowDelegate:
|
| + virtual bool ShouldActivate(Event* event) OVERRIDE;
|
| + virtual void OnActivated() OVERRIDE;
|
| + virtual void OnLostActive() OVERRIDE;
|
| +
|
| + private:
|
| + bool activate_;
|
| + int activated_count_;
|
| + int lost_active_count_;
|
| + int should_activate_count_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ActivateWindowDelegate);
|
| +};
|
| +
|
| } // namespace test
|
| } // namespace aura
|
|
|
|
|