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

Side by Side Diff: headless/lib/browser/headless_window_tree_host.h

Issue 1991953002: Implement a runtime headless mode for Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years 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
OLDNEW
(Empty)
1 // Copyright 2016 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 HEADLESS_LIB_BROWSER_HEADLESS_WINDOW_TREE_HOST_H_
6 #define HEADLESS_LIB_BROWSER_HEADLESS_WINDOW_TREE_HOST_H_
7
8 #include <stdint.h>
9
10 #include <memory>
11
12 #include "base/macros.h"
13 #include "ui/aura/aura_export.h"
14 #include "ui/aura/window_tree_host.h"
15 #include "ui/events/platform/platform_event_dispatcher.h"
16 #include "ui/gfx/geometry/insets.h"
17 #include "ui/gfx/geometry/rect.h"
18
19 namespace headless {
20
21 class HeadlessWindowTreeHost : public aura::WindowTreeHost,
22 public ui::PlatformEventDispatcher {
23 public:
24 explicit HeadlessWindowTreeHost(const gfx::Rect& bounds);
25 ~HeadlessWindowTreeHost() override;
26
27 // ui::PlatformEventDispatcher:
28 bool CanDispatchEvent(const ui::PlatformEvent& event) override;
29 uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
30
31 // WindowTreeHost:
32 ui::EventSource* GetEventSource() override;
33 gfx::AcceleratedWidget GetAcceleratedWidget() override;
34 void ShowImpl() override;
35 void HideImpl() override;
36 gfx::Rect GetBounds() const override;
37 void SetBounds(const gfx::Rect& bounds) override;
38 gfx::Point GetLocationOnNativeScreen() const override;
39 void SetCapture() override;
40 void ReleaseCapture() override;
41 void SetCursorNative(gfx::NativeCursor cursor_type) override;
42 void MoveCursorToNative(const gfx::Point& location) override;
43 void OnCursorVisibilityChangedNative(bool show) override;
44 gfx::ICCProfile GetICCProfileForCurrentDisplay() override;
45
46 private:
47 gfx::Rect bounds_;
48
49 DISALLOW_COPY_AND_ASSIGN(HeadlessWindowTreeHost);
50 };
51
52 } // namespace headless
53
54 #endif // HEADLESS_LIB_BROWSER_HEADLESS_WINDOW_TREE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698