Fixed all overloaded virtual methods on Windows.
[chromium-blink-merge.git] / ui / aura / window_tree_host_win.h
blobe49890d2f67ea7789136ba32711820ead8437e1d
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.
5 #ifndef UI_AURA_WINDOW_TREE_HOST_WIN_H_
6 #define UI_AURA_WINDOW_TREE_HOST_WIN_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/aura/aura_export.h"
11 #include "ui/aura/window_tree_host.h"
12 #include "ui/platform_window/platform_window.h"
13 #include "ui/platform_window/platform_window_delegate.h"
15 namespace aura {
17 class AURA_EXPORT WindowTreeHostWin
18 : public WindowTreeHost,
19 public NON_EXPORTED_BASE(ui::PlatformWindowDelegate) {
20 public:
21 explicit WindowTreeHostWin(const gfx::Rect& bounds);
22 ~WindowTreeHostWin() override;
24 // WindowTreeHost:
25 ui::EventSource* GetEventSource() override;
26 gfx::AcceleratedWidget GetAcceleratedWidget() override;
27 void ShowImpl() override;
28 void HideImpl() override;
29 gfx::Rect GetBounds() const override;
30 void SetBounds(const gfx::Rect& bounds) override;
31 gfx::Point GetLocationOnNativeScreen() const override;
32 void SetCapture() override;
33 void ReleaseCapture() override;
34 void SetCursorNative(gfx::NativeCursor cursor) override;
35 void MoveCursorToNative(const gfx::Point& location) override;
36 void OnCursorVisibilityChangedNative(bool show) override;
38 protected:
39 gfx::AcceleratedWidget hwnd() const { return widget_; }
41 private:
42 // ui::PlatformWindowDelegate:
43 void OnBoundsChanged(const gfx::Rect& new_bounds) override;
44 void OnDamageRect(const gfx::Rect& damaged_region) override;
45 void DispatchEvent(ui::Event* event) override;
46 void OnCloseRequest() override;
47 void OnClosed() override;
48 void OnWindowStateChanged(ui::PlatformWindowState new_state) override;
49 void OnLostCapture() override;
50 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget,
51 float device_pixel_ratio) override;
52 void OnActivationChanged(bool active) override;
54 bool has_capture_;
55 gfx::Rect bounds_;
56 gfx::AcceleratedWidget widget_;
57 scoped_ptr<ui::PlatformWindow> window_;
59 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostWin);
62 } // namespace aura
64 #endif // UI_AURA_WINDOW_TREE_HOST_WIN_H_