Reland of Disable smoothness.top_25_smooth on win/mac/linux. (patchset #1 id:1 of...
[chromium-blink-merge.git] / ash / host / ash_window_tree_host_x11.h
blob077eb43dc4de1ca3784aeb483eb704ab1230f92e
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 ASH_HOST_ASH_WINDOW_TREE_HOST_X11_H_
6 #define ASH_HOST_ASH_WINDOW_TREE_HOST_X11_H_
8 #include "ash/ash_export.h"
9 #include "ash/host/ash_window_tree_host.h"
10 #include "ash/host/transformer_helper.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "ui/aura/env_observer.h"
13 #include "ui/aura/window_tree_host_x11.h"
15 namespace ash {
16 class RootWindowTransformer;
17 class MouseCursorEventFilter;
19 class ASH_EXPORT AshWindowTreeHostX11 : public AshWindowTreeHost,
20 public aura::WindowTreeHostX11,
21 public aura::EnvObserver {
22 public:
23 explicit AshWindowTreeHostX11(const gfx::Rect& initial_bounds);
24 ~AshWindowTreeHostX11() override;
26 private:
27 // AshWindowTreeHost:
28 void ToggleFullScreen() override;
29 bool ConfineCursorToRootWindow() override;
30 void UnConfineCursor() override;
31 void SetRootWindowTransformer(
32 scoped_ptr<RootWindowTransformer> transformer) override;
33 gfx::Insets GetHostInsets() const override;
34 aura::WindowTreeHost* AsWindowTreeHost() override;
35 void PrepareForShutdown() override;
37 // aura::WindowTreehost:
38 void SetBounds(const gfx::Rect& bounds) override;
39 gfx::Transform GetRootTransform() const override;
40 void SetRootTransform(const gfx::Transform& transform) override;
41 gfx::Transform GetInverseRootTransform() const override;
42 void UpdateRootWindowSize(const gfx::Size& host_size) override;
43 void OnCursorVisibilityChangedNative(bool show) override;
45 // aura::WindowTreeHostX11:
46 void OnConfigureNotify() override;
47 bool CanDispatchEvent(const ui::PlatformEvent& event) override;
48 void TranslateAndDispatchLocatedEvent(ui::LocatedEvent* event) override;
50 // EnvObserver overrides.
51 void OnWindowInitialized(aura::Window* window) override;
52 void OnHostInitialized(aura::WindowTreeHost* host) override;
54 // ui::internal::InputMethodDelegate:
55 bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override;
57 // ui::EventSource:
58 ui::EventDispatchDetails DeliverEventToProcessor(ui::Event* event) override;
60 #if defined(OS_CHROMEOS)
61 // Set the CrOS touchpad "tap paused" property. It is used to temporarily
62 // turn off the Tap-to-click feature when the mouse pointer is invisible.
63 void SetCrOSTapPaused(bool state);
64 #endif
66 scoped_ptr<XID[]> pointer_barriers_;
68 TransformerHelper transformer_helper_;
70 DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostX11);
73 } // namespace ash
75 #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_X11_H_