Add a FrameHostMsg_BeginNavigation IPC
[chromium-blink-merge.git] / ui / ozone / platform / caca / caca_event_factory.h
blobf732f00865f2f276701c26a71fc0be20b8959db6
1 // Copyright 2014 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.
5 #ifndef UI_OZONE_PLATFORM_CACA_CACA_EVENT_FACTORY_H_
6 #define UI_OZONE_PLATFORM_CACA_CACA_EVENT_FACTORY_H_
8 #include "base/memory/ref_counted.h"
9 #include "base/time/time.h"
10 #include "ui/events/platform/platform_event_source.h"
11 #include "ui/gfx/geometry/point_f.h"
12 #include "ui/ozone/public/event_factory_ozone.h"
14 namespace ui {
16 class CacaConnection;
18 class CacaEventFactory : public EventFactoryOzone,
19 public PlatformEventSource {
20 public:
21 CacaEventFactory(CacaConnection* connection);
22 virtual ~CacaEventFactory();
24 // ui::EventFactoryOzone:
25 virtual void WarpCursorTo(gfx::AcceleratedWidget widget,
26 const gfx::PointF& location) OVERRIDE;
28 private:
29 // PlatformEventSource:
30 virtual void OnDispatcherListChanged() OVERRIDE;
32 void ScheduleEventProcessing();
34 void TryProcessingEvent();
36 CacaConnection* connection_; // Not owned.
38 base::WeakPtrFactory<CacaEventFactory> weak_ptr_factory_;
40 // Delay between event polls.
41 base::TimeDelta delay_;
43 // Keep track of last cursor position to dispatch correct mouse push/release
44 // events.
45 gfx::PointF last_cursor_location_;
47 int modifier_flags_;
49 DISALLOW_COPY_AND_ASSIGN(CacaEventFactory);
52 } // namespace ui
54 #endif // UI_OZONE_PLATFORM_CACA_CACA_EVENT_FACTORY_H_