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

Side by Side Diff: ash/host/ash_window_tree_host_x11.h

Issue 201573015: Introdcue AshWindowTreeHost and move ash/chrome specific code in WTH to ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 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.
4
5 #ifndef ASH_HOST_ASH_WINDOW_TREE_HOST_X11_H_
6 #define ASH_HOST_ASH_WINDOW_TREE_HOST_X11_H_
7
8 #include "ash/ash_export.h"
9 #include "ash/host/ash_window_tree_host.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "ui/aura/env_observer.h"
12 #include "ui/aura/window_tree_host_x11.h"
13 #include "ui/gfx/insets.h"
14 #include "ui/gfx/rect.h"
15
16 namespace ash {
17
18 namespace internal {
19 class TouchEventCalibrate;
20 }
21 class RootWindowTransformer;
22
23 class ASH_EXPORT AshWindowTreeHostX11 : public AshWindowTreeHost,
24 public aura::WindowTreeHostX11,
25 public aura::EnvObserver {
26 public:
27 explicit AshWindowTreeHostX11(const gfx::Rect& bounds);
28 virtual ~AshWindowTreeHostX11();
29
30 // AshWindowTreeHost:
31 virtual void ToggleFullScreen() OVERRIDE;
32 virtual gfx::Insets GetInsets() const OVERRIDE;
33 virtual void SetInsets(const gfx::Insets& insets) OVERRIDE;
34 virtual bool ConfineCursorToRootWindow() OVERRIDE;
35 virtual void UnConfineCursor() OVERRIDE;
36 virtual void SetRootWindowTransformer(
37 scoped_ptr<RootWindowTransformer> transformer) OVERRIDE;
38 virtual aura::WindowTreeHost* AsWindowTreeHost() OVERRIDE;
39
40 // aura::WindowTreehost:
41 virtual void SetTransform(const gfx::Transform& transform) OVERRIDE;
42 virtual gfx::Transform GetRootTransform() const OVERRIDE;
43 virtual gfx::Transform GetInverseRootTransform() const OVERRIDE;
44 virtual void UpdateRootWindowSize(const gfx::Size& host_size) OVERRIDE;
45 virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE;
46
47 // aura::WindowTreeHostX11:
48 virtual void TranslateAndDispatchLocatedEvent(ui::LocatedEvent* event) OVERRID E;
49
50 // EnvObserver overrides.
51 virtual void OnWindowInitialized(aura::Window* window) OVERRIDE;
52 virtual void OnHostInitialized(aura::WindowTreeHost* host) OVERRIDE;
53
54 protected:
55
56 private:
57 void SetCrOSTapPaused(bool state);
58 void UpdateIsInternalDisplay();
59
60 // The insets that specifies the effective area within the |window_|.
61 gfx::Insets insets_;
62
63 // True if the root host resides on the internal display
64 bool is_internal_display_;
65
66 scoped_ptr<XID[]> pointer_barriers_;
67
68 scoped_ptr<internal::TouchEventCalibrate> touch_calibrate_;
69
70 scoped_ptr<RootWindowTransformer> transformer_;
71
72 DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostX11);
73 };
74
75 } // namespace ash
76
77 #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_X11_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698