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

Side by Side Diff: ui/aura/desktop_host_win.cc

Issue 7977012: Adds a NonClientFrameView for generic toplevel windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/desktop_host_win.h" 5 #include "ui/aura/desktop_host_win.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "ui/aura/desktop.h" 8 #include "ui/aura/desktop.h"
9 #include "ui/aura/event.h" 9 #include "ui/aura/event.h"
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 SetWindowPos( 51 SetWindowPos(
52 hwnd(), 52 hwnd(),
53 NULL, 53 NULL,
54 0, 54 0,
55 0, 55 0,
56 size.width(), 56 size.width(),
57 size.height(), 57 size.height(),
58 SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOREDRAW | SWP_NOREPOSITION); 58 SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOREDRAW | SWP_NOREPOSITION);
59 } 59 }
60 60
61 void DesktopHostWin::SetCursor(CursorType cursor_type) {
62 switch (cursor_type) {
63 case CURSOR_POINTER:
64 ::SetCursor(LoadCursor(NULL, IDC_ARROW));
65 break;
66 case CURSOR_LINK:
67 ::SetCursor(LoadCursor(NULL, IDC_HAND));
68 break;
69 case CURSOR_WAIT:
70 ::SetCursor(LoadCursor(NULL, IDC_WAIT));
71 break;
72 case CURSOR_SIZE_HORIZONTAL:
73 ::SetCursor(LoadCursor(NULL, IDC_SIZEWE));
74 break;
75 case CURSOR_SIZE_VERTICAL:
76 ::SetCursor(LoadCursor(NULL, IDC_SIZENS));
77 break;
78 default:
79 break;
80 }
81 }
82
61 void DesktopHostWin::OnClose() { 83 void DesktopHostWin::OnClose() {
62 // TODO: this obviously shouldn't be here. 84 // TODO: this obviously shouldn't be here.
63 MessageLoopForUI::current()->Quit(); 85 MessageLoopForUI::current()->Quit();
64 } 86 }
65 87
66 LRESULT DesktopHostWin::OnKeyEvent(UINT message, 88 LRESULT DesktopHostWin::OnKeyEvent(UINT message,
67 WPARAM w_param, 89 WPARAM w_param,
68 LPARAM l_param) { 90 LPARAM l_param) {
69 MSG msg = { hwnd(), message, w_param, l_param }; 91 MSG msg = { hwnd(), message, w_param, l_param };
70 SetMsgHandled(desktop_->OnKeyEvent(KeyEvent(msg))); 92 SetMsgHandled(desktop_->OnKeyEvent(KeyEvent(msg)));
(...skipping 16 matching lines...) Expand all
87 void DesktopHostWin::OnPaint(HDC dc) { 109 void DesktopHostWin::OnPaint(HDC dc) {
88 desktop_->Draw(); 110 desktop_->Draw();
89 ValidateRect(hwnd(), NULL); 111 ValidateRect(hwnd(), NULL);
90 } 112 }
91 113
92 void DesktopHostWin::OnSize(UINT param, const CSize& size) { 114 void DesktopHostWin::OnSize(UINT param, const CSize& size) {
93 desktop_->OnHostResized(gfx::Size(size.cx, size.cy)); 115 desktop_->OnHostResized(gfx::Size(size.cx, size.cy));
94 } 116 }
95 117
96 } // namespace aura 118 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698