1 // Copyright 2013 Intel Corporation. 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 OZONE_UI_PUBLIC_OZONE_CHANNEL_HOST_H_
6 #define OZONE_UI_PUBLIC_OZONE_CHANNEL_HOST_H_
10 #include "base/memory/shared_memory.h"
11 #include "ui/events/event_constants.h"
12 #include "ui/ozone/public/gpu_platform_support_host.h"
15 class RemoteStateChangeHandler;
16 class EventConverterInProcess;
18 class OzoneChannelHost : public GpuPlatformSupportHost {
21 virtual ~OzoneChannelHost();
23 void DeleteRemoteStateChangeHandler();
25 // GpuPlatformSupportHost:
26 virtual void OnChannelEstablished(int host_id, IPC::Sender* sender) OVERRIDE;
27 virtual void OnChannelDestroyed(int host_id) OVERRIDE;
28 virtual bool OnMessageReceived(const IPC::Message&) OVERRIDE;
30 void OnMotionNotify(float x, float y);
31 void OnButtonNotify(unsigned handle,
36 void OnTouchNotify(ui::EventType type,
41 void OnAxisNotify(float x, float y, int xoffset, int yoffset);
42 void OnPointerEnter(unsigned handle, float x, float y);
43 void OnPointerLeave(unsigned handle, float x, float y);
44 void OnKeyNotify(ui::EventType type, unsigned code);
45 void OnVirtualKeyNotify(ui::EventType type,
48 void OnKeyModifiers(uint32_t mods_depressed,
49 uint32_t mods_latched,
52 void OnOutputSizeChanged(unsigned width, unsigned height);
53 void OnCloseWidget(unsigned handle);
54 void OnWindowResized(unsigned handle,
57 void OnWindowUnminimized(unsigned handle);
58 void OnCommit(unsigned handle, std::string text);
59 void OnPreeditChanged(unsigned handle, std::string text, std::string commit);
61 void OnPreeditStart();
62 void OnInitializeXKB(base::SharedMemoryHandle fd, uint32_t size);
65 RemoteStateChangeHandler* state_handler_;
66 EventConverterInProcess* event_converter_;
67 DISALLOW_COPY_AND_ASSIGN(OzoneChannelHost);
72 #endif // OZONE_UI_PUBLIC_OZONE_CHANNEL_HOST_H_