Home | History | Annotate | Download | only in test
      1 // Copyright 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef UI_AURA_TEST_TEST_CURSOR_CLIENT_H_
      6 #define UI_AURA_TEST_TEST_CURSOR_CLIENT_H_
      7 
      8 #include "base/compiler_specific.h"
      9 #include "base/observer_list.h"
     10 #include "ui/aura/client/cursor_client.h"
     11 
     12 namespace aura {
     13 namespace test {
     14 
     15 class TestCursorClient : public aura::client::CursorClient {
     16  public:
     17   explicit TestCursorClient(aura::Window* root_window);
     18   virtual ~TestCursorClient();
     19 
     20   // Overridden from aura::client::CursorClient:
     21   virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE;
     22   virtual void ShowCursor() OVERRIDE;
     23   virtual void HideCursor() OVERRIDE;
     24   virtual void SetScale(float scale) OVERRIDE;
     25   virtual bool IsCursorVisible() const OVERRIDE;
     26   virtual void EnableMouseEvents() OVERRIDE;
     27   virtual void DisableMouseEvents() OVERRIDE;
     28   virtual bool IsMouseEventsEnabled() const OVERRIDE;
     29   virtual void SetDisplay(const gfx::Display& display) OVERRIDE;
     30   virtual void LockCursor() OVERRIDE;
     31   virtual void UnlockCursor() OVERRIDE;
     32   virtual void AddObserver(
     33       aura::client::CursorClientObserver* observer) OVERRIDE;
     34   virtual void RemoveObserver(
     35       aura::client::CursorClientObserver* observer) OVERRIDE;
     36 
     37  private:
     38   bool visible_;
     39   bool mouse_events_enabled_;
     40   ObserverList<aura::client::CursorClientObserver> observers_;
     41   aura::Window* root_window_;
     42 
     43   DISALLOW_COPY_AND_ASSIGN(TestCursorClient);
     44 };
     45 
     46 }  // namespace test
     47 }  // namespace aura
     48 
     49 #endif // UI_AURA_TEST_TEST_CURSOR_CLIENT_H_
     50