Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: ui/aura/root_window_host_linux.h

Issue 13886018: Add a factory and defines for native Linux surfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Get {base,ui,aura}_unittests working with native linux surface Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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_ROOT_WINDOW_HOST_LINUX_H_
6 #define UI_AURA_ROOT_WINDOW_HOST_LINUX_H_
7
8 #include <vector>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "base/message_loop.h"
12 #include "ui/aura/root_window_host.h"
13 #include "ui/base/linux/event_factory_evdev.h"
14 #include "ui/gfx/rect.h"
15
16 namespace aura {
17
18 class RootWindowHostLinux : public RootWindowHost,
19 public MessageLoop::Dispatcher {
20 public:
21 explicit RootWindowHostLinux(const gfx::Rect& bounds);
22 virtual ~RootWindowHostLinux();
23
24 // Overridden from Dispatcher overrides:
25 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
26
27 // RootWindowHost Overrides.
28 virtual void SetDelegate(RootWindowHostDelegate* delegate) OVERRIDE;
29 virtual RootWindow* GetRootWindow() OVERRIDE;
30 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE;
31 virtual void Show() OVERRIDE;
32 virtual void Hide() OVERRIDE;
33 virtual void ToggleFullScreen() OVERRIDE;
34 virtual gfx::Rect GetBounds() const OVERRIDE;
35 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
36 virtual gfx::Insets GetInsets() const OVERRIDE;
37 virtual void SetInsets(const gfx::Insets& bounds) OVERRIDE;
38 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE;
39 virtual void SetCapture() OVERRIDE;
40 virtual void ReleaseCapture() OVERRIDE;
41 virtual void SetCursor(gfx::NativeCursor cursor_type) OVERRIDE;
42 virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE;
43 virtual bool ConfineCursorToRootWindow() OVERRIDE;
44 virtual void UnConfineCursor() OVERRIDE;
45 virtual void OnCursorVisibilityChanged(bool show) OVERRIDE;
46 virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
47 virtual void SetFocusWhenShown(bool focus_when_shown) OVERRIDE;
48 virtual bool CopyAreaToSkCanvas(const gfx::Rect& source_bounds,
49 const gfx::Point& dest_offset,
50 SkCanvas* canvas) OVERRIDE;
51 virtual bool GrabSnapshot(
52 const gfx::Rect& snapshot_bounds,
53 std::vector<unsigned char>* png_representation) OVERRIDE;
54 virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE;
55 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
56 virtual void PrepareForShutdown() OVERRIDE;
57
58 private:
59 RootWindowHostDelegate* delegate_;
60 gfx::Rect bounds_;
61
62 // EventFactoryEvdev reads from /dev/input/* file descriptors and creates
63 // ui::Events from them.
64 scoped_ptr<ui::EventFactoryEvdev> factory_;
65
66 DISALLOW_COPY_AND_ASSIGN(RootWindowHostLinux);
67 };
68
69 } // namespace aura
70
71 #endif // UI_AURA_ROOT_WINDOW_HOST_LINUX_H_
OLDNEW
« build/common.gypi ('K') | « ui/aura/aura.gyp ('k') | ui/aura/root_window_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698