Record MTU discovery packets in net-internals log.
[chromium-blink-merge.git] / ui / aura / window_tree_host_ozone.h
blobb356a3019978becb1a0c2f440461fef26756a930
1 // Copyright 2013 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 UI_AURA_WINDOW_TREE_HOST_OZONE_H_
6 #define UI_AURA_WINDOW_TREE_HOST_OZONE_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "ui/aura/window_tree_host.h"
10 #include "ui/gfx/geometry/rect.h"
11 #include "ui/platform_window/platform_window_delegate.h"
13 namespace ui {
14 class PlatformWindow;
17 namespace aura {
19 class AURA_EXPORT WindowTreeHostOzone : public WindowTreeHost,
20 public ui::PlatformWindowDelegate {
21 public:
22 explicit WindowTreeHostOzone(const gfx::Rect& bounds);
23 ~WindowTreeHostOzone() override;
25 protected:
26 // WindowTreeHost:
27 ui::EventSource* GetEventSource() override;
28 gfx::AcceleratedWidget GetAcceleratedWidget() override;
29 void ShowImpl() override;
30 void HideImpl() override;
31 gfx::Rect GetBounds() const override;
32 void SetBounds(const gfx::Rect& bounds) override;
33 gfx::Point GetLocationOnNativeScreen() const override;
34 void SetCapture() override;
35 void ReleaseCapture() override;
36 void SetCursorNative(gfx::NativeCursor cursor_type) override;
37 void MoveCursorToNative(const gfx::Point& location) override;
38 void OnCursorVisibilityChangedNative(bool show) override;
40 ui::PlatformWindow* platform_window() { return platform_window_.get(); }
42 private:
43 // ui::PlatformWindowDelegate:
44 void OnBoundsChanged(const gfx::Rect&) override;
45 void OnDamageRect(const gfx::Rect& damaged_region) override;
46 void DispatchEvent(ui::Event* event) override;
47 void OnCloseRequest() override;
48 void OnClosed() override;
49 void OnWindowStateChanged(ui::PlatformWindowState new_state) override;
50 void OnLostCapture() override;
51 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget,
52 float device_pixel_ratio) override;
53 void OnActivationChanged(bool active) override;
55 // Platform-specific part of this WindowTreeHost.
56 scoped_ptr<ui::PlatformWindow> platform_window_;
58 // The identifier used to create a compositing surface.
59 gfx::AcceleratedWidget widget_;
61 // Current Aura cursor.
62 gfx::NativeCursor current_cursor_;
64 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostOzone);
67 } // namespace aura
69 #endif // UI_AURA_WINDOW_TREE_HOST_OZONE_H_