blob: 2fd7391e82a29f32ac856c94a7becb401ef845fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_PANELS_TEST_PANEL_MOUSE_WATCHER_H_
#define CHROME_BROWSER_UI_PANELS_TEST_PANEL_MOUSE_WATCHER_H_
#include "base/basictypes.h"
#include "chrome/browser/ui/panels/panel_mouse_watcher.h"
#include "ui/gfx/point.h"
// Test mouse watcher for simulating mouse movements in tests.
class TestPanelMouseWatcher : public PanelMouseWatcher {
public:
TestPanelMouseWatcher();
virtual ~TestPanelMouseWatcher();
private:
virtual void Start() override;
virtual void Stop() override;
virtual bool IsActive() const override;
virtual void NotifyMouseMovement(const gfx::Point& mouse_position) override;
virtual gfx::Point GetMousePosition() const override;
bool started_;
gfx::Point mouse_position_;
DISALLOW_COPY_AND_ASSIGN(TestPanelMouseWatcher);
};
#endif // CHROME_BROWSER_UI_PANELS_TEST_PANEL_MOUSE_WATCHER_H_
|