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

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

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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
« no previous file with comments | « ui/aura/window_tree_host_ozone.cc ('k') | ui/aura/window_tree_host_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/events/event_source.h"
13 #include "ui/platform_window/platform_window.h"
14 #include "ui/platform_window/platform_window_delegate.h"
15
16 namespace aura {
17
18 class AURA_EXPORT WindowTreeHostWin
19 : public WindowTreeHost,
20 public ui::EventSource,
21 public NON_EXPORTED_BASE(ui::PlatformWindowDelegate) {
22 public:
23 explicit WindowTreeHostWin(const gfx::Rect& bounds);
24 virtual ~WindowTreeHostWin();
25
26 // WindowTreeHost:
27 virtual ui::EventSource* GetEventSource() override;
28 virtual gfx::AcceleratedWidget GetAcceleratedWidget() override;
29 virtual void Show() override;
30 virtual void Hide() override;
31 virtual gfx::Rect GetBounds() const override;
32 virtual void SetBounds(const gfx::Rect& bounds) override;
33 virtual gfx::Point GetLocationOnNativeScreen() const override;
34 virtual void SetCapture() override;
35 virtual void ReleaseCapture() override;
36 virtual void SetCursorNative(gfx::NativeCursor cursor) override;
37 virtual void MoveCursorToNative(const gfx::Point& location) override;
38 virtual void OnCursorVisibilityChangedNative(bool show) override;
39 virtual void PostNativeEvent(const base::NativeEvent& native_event) override;
40
41 // ui::EventSource:
42 virtual ui::EventProcessor* GetEventProcessor() override;
43
44 protected:
45 gfx::AcceleratedWidget hwnd() const { return widget_; }
46
47 private:
48 // ui::PlatformWindowDelegate:
49 virtual void OnBoundsChanged(const gfx::Rect& new_bounds) override;
50 virtual void OnDamageRect(const gfx::Rect& damaged_region) override;
51 virtual void DispatchEvent(ui::Event* event) override;
52 virtual void OnCloseRequest() override;
53 virtual void OnClosed() override;
54 virtual void OnWindowStateChanged(ui::PlatformWindowState new_state) override;
55 virtual void OnLostCapture() override;
56 virtual void OnAcceleratedWidgetAvailable(
57 gfx::AcceleratedWidget widget) override;
58 virtual void OnActivationChanged(bool active) override;
59
60 bool has_capture_;
61 gfx::Rect bounds_;
62 gfx::AcceleratedWidget widget_;
63 scoped_ptr<ui::PlatformWindow> window_;
64
65 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostWin);
66 };
67
68 } // namespace aura
69
70 #endif // UI_AURA_WINDOW_TREE_HOST_WIN_H_
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host_ozone.cc ('k') | ui/aura/window_tree_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698