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

Side by Side Diff: ui/platform_window/win/win_window.h

Issue 405813002: win32: Add a PlatformWindow implementation for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix-move-resize Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « ui/platform_window/win/DEPS ('k') | ui/platform_window/win/win_window.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 2014 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_PLATFORM_WINDOW_WIN_WIN_WINDOW_H_
6 #define UI_PLATFORM_WINDOW_WIN_WIN_WINDOW_H_
7
8 #include "base/compiler_specific.h"
9 #include "ui/gfx/win/window_impl.h"
10 #include "ui/platform_window/platform_window.h"
11 #include "ui/platform_window/win/win_window_export.h"
12
13 namespace ui {
14
15 class WIN_WINDOW_EXPORT WinWindow : public NON_EXPORTED_BASE(PlatformWindow),
16 public gfx::WindowImpl {
17 public:
18 WinWindow(PlatformWindowDelegate* delegate, const gfx::Rect& bounds);
19 virtual ~WinWindow();
20
21 private:
22 void Destroy();
23
24 // PlatformWindow:
25 virtual void Show() OVERRIDE;
26 virtual void Hide() OVERRIDE;
27 virtual void Close() OVERRIDE;
28 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
29 virtual gfx::Rect GetBounds() OVERRIDE;
30 virtual void SetCapture() OVERRIDE;
31 virtual void ReleaseCapture() OVERRIDE;
32 virtual void ToggleFullscreen() OVERRIDE;
33 virtual void Maximize() OVERRIDE;
34 virtual void Minimize() OVERRIDE;
35 virtual void Restore() OVERRIDE;
36
37 CR_BEGIN_MSG_MAP_EX(WinWindow)
38 CR_MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange)
39 CR_MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE,
40 WM_NCXBUTTONDBLCLK,
41 OnMouseRange)
42 CR_MESSAGE_HANDLER_EX(WM_CAPTURECHANGED, OnCaptureChanged)
43
44 CR_MESSAGE_HANDLER_EX(WM_KEYDOWN, OnKeyEvent)
45 CR_MESSAGE_HANDLER_EX(WM_KEYUP, OnKeyEvent)
46 CR_MESSAGE_HANDLER_EX(WM_SYSKEYDOWN, OnKeyEvent)
47 CR_MESSAGE_HANDLER_EX(WM_SYSKEYUP, OnKeyEvent)
48 CR_MESSAGE_HANDLER_EX(WM_CHAR, OnKeyEvent)
49 CR_MESSAGE_HANDLER_EX(WM_SYSCHAR, OnKeyEvent)
50 CR_MESSAGE_HANDLER_EX(WM_IME_CHAR, OnKeyEvent)
51 CR_MESSAGE_HANDLER_EX(WM_NCACTIVATE, OnNCActivate)
52
53 CR_MSG_WM_CLOSE(OnClose)
54 CR_MSG_WM_CREATE(OnCreate)
55 CR_MSG_WM_DESTROY(OnDestroy)
56 CR_MSG_WM_PAINT(OnPaint)
57 CR_MSG_WM_WINDOWPOSCHANGED(OnWindowPosChanged)
58 CR_END_MSG_MAP()
59
60 LRESULT OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param);
61 LRESULT OnCaptureChanged(UINT message, WPARAM w_param, LPARAM l_param);
62 LRESULT OnKeyEvent(UINT message, WPARAM w_param, LPARAM l_param);
63 LRESULT OnNCActivate(UINT message, WPARAM w_param, LPARAM l_param);
64 void OnClose();
65 LRESULT OnCreate(CREATESTRUCT* create_struct);
66 void OnDestroy();
67 void OnPaint(HDC);
68 void OnWindowPosChanged(WINDOWPOS* window_pos);
69
70 PlatformWindowDelegate* delegate_;
71
72 DISALLOW_COPY_AND_ASSIGN(WinWindow);
73 };
74
75 } // namespace ui
76
77 #endif // UI_PLATFORM_WINDOW_WIN_WIN_WINDOW_H_
OLDNEW
« no previous file with comments | « ui/platform_window/win/DEPS ('k') | ui/platform_window/win/win_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698