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

Side by Side Diff: ui/aura/window_tree_host_win.h

Issue 1390883003: aura: Unify WindowTreeHost for some platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win build Created 5 years, 2 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
OLDNEW
(Empty)
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.
4
5 #ifndef UI_AURA_WINDOW_TREE_HOST_WIN_H_
6 #define UI_AURA_WINDOW_TREE_HOST_WIN_H_
7
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"
14
15 namespace aura {
16
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;
23
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;
37
38 protected:
39 gfx::AcceleratedWidget hwnd() const { return widget_; }
40
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;
53
54 bool has_capture_;
55 gfx::Rect bounds_;
56 gfx::AcceleratedWidget widget_;
57 scoped_ptr<ui::PlatformWindow> window_;
58
59 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostWin);
60 };
61
62 } // namespace aura
63
64 #endif // UI_AURA_WINDOW_TREE_HOST_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698