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

Side by Side Diff: chrome/views/window.cc

Issue 40124: Revert r9953 since it caused regressions like: (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 | « chrome/views/widget_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/views/window.h" 5 #include "chrome/views/window.h"
6 6
7 #include <shellapi.h> 7 #include <shellapi.h>
8 8
9 #include "base/win_util.h" 9 #include "base/win_util.h"
10 #include "chrome/app/chrome_dll_resource.h" 10 #include "chrome/app/chrome_dll_resource.h"
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 1120
1121 void Window::ProcessNCMousePress(const CPoint& point, int flags) { 1121 void Window::ProcessNCMousePress(const CPoint& point, int flags) {
1122 CPoint temp = point; 1122 CPoint temp = point;
1123 MapWindowPoints(HWND_DESKTOP, GetHWND(), &temp, 1); 1123 MapWindowPoints(HWND_DESKTOP, GetHWND(), &temp, 1);
1124 UINT message_flags = 0; 1124 UINT message_flags = 0;
1125 if ((GetKeyState(VK_CONTROL) & 0x80) == 0x80) 1125 if ((GetKeyState(VK_CONTROL) & 0x80) == 0x80)
1126 message_flags |= MK_CONTROL; 1126 message_flags |= MK_CONTROL;
1127 if ((GetKeyState(VK_SHIFT) & 0x80) == 0x80) 1127 if ((GetKeyState(VK_SHIFT) & 0x80) == 0x80)
1128 message_flags |= MK_SHIFT; 1128 message_flags |= MK_SHIFT;
1129 message_flags |= flags; 1129 message_flags |= flags;
1130 ProcessMousePressed(temp, message_flags, false, false); 1130 ProcessMousePressed(temp, message_flags, false);
1131 } 1131 }
1132 1132
1133 LRESULT Window::CallDefaultNCActivateHandler(BOOL active) { 1133 LRESULT Window::CallDefaultNCActivateHandler(BOOL active) {
1134 // The DefWindowProc handling for WM_NCACTIVATE renders the classic-look 1134 // The DefWindowProc handling for WM_NCACTIVATE renders the classic-look
1135 // window title bar directly, so we need to use a redraw lock here to prevent 1135 // window title bar directly, so we need to use a redraw lock here to prevent
1136 // it from doing so. 1136 // it from doing so.
1137 ScopedRedrawLock lock(this); 1137 ScopedRedrawLock lock(this);
1138 return DefWindowProc(GetHWND(), WM_NCACTIVATE, active, 0); 1138 return DefWindowProc(GetHWND(), WM_NCACTIVATE, active, 0);
1139 } 1139 }
1140 1140
1141 void Window::InitClass() { 1141 void Window::InitClass() {
1142 static bool initialized = false; 1142 static bool initialized = false;
1143 if (!initialized) { 1143 if (!initialized) {
1144 resize_cursors_[RC_NORMAL] = LoadCursor(NULL, IDC_ARROW); 1144 resize_cursors_[RC_NORMAL] = LoadCursor(NULL, IDC_ARROW);
1145 resize_cursors_[RC_VERTICAL] = LoadCursor(NULL, IDC_SIZENS); 1145 resize_cursors_[RC_VERTICAL] = LoadCursor(NULL, IDC_SIZENS);
1146 resize_cursors_[RC_HORIZONTAL] = LoadCursor(NULL, IDC_SIZEWE); 1146 resize_cursors_[RC_HORIZONTAL] = LoadCursor(NULL, IDC_SIZEWE);
1147 resize_cursors_[RC_NESW] = LoadCursor(NULL, IDC_SIZENESW); 1147 resize_cursors_[RC_NESW] = LoadCursor(NULL, IDC_SIZENESW);
1148 resize_cursors_[RC_NWSE] = LoadCursor(NULL, IDC_SIZENWSE); 1148 resize_cursors_[RC_NWSE] = LoadCursor(NULL, IDC_SIZENWSE);
1149 initialized = true; 1149 initialized = true;
1150 } 1150 }
1151 } 1151 }
1152 1152
1153 } // namespace views 1153 } // namespace views
1154 1154
OLDNEW
« no previous file with comments | « chrome/views/widget_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698