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

Side by Side Diff: ui/gfx/win/window_impl.cc

Issue 2574933002: Call EnableNonClientDpiScaling (Closed)
Patch Set: Fix Bad Test Created 4 years 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/events/win/event_utils_win_unittest.cc ('k') | ui/views/win/hwnd_message_handler.h » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 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 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/gfx/win/window_impl.h" 5 #include "ui/gfx/win/window_impl.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/alias.h" 10 #include "base/debug/alias.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 void WindowImpl::ClearUserData() { 276 void WindowImpl::ClearUserData() {
277 if (::IsWindow(hwnd_)) 277 if (::IsWindow(hwnd_))
278 gfx::SetWindowUserData(hwnd_, NULL); 278 gfx::SetWindowUserData(hwnd_, NULL);
279 } 279 }
280 280
281 // static 281 // static
282 LRESULT CALLBACK WindowImpl::WndProc(HWND hwnd, 282 LRESULT CALLBACK WindowImpl::WndProc(HWND hwnd,
283 UINT message, 283 UINT message,
284 WPARAM w_param, 284 WPARAM w_param,
285 LPARAM l_param) { 285 LPARAM l_param) {
286 WindowImpl* window = nullptr;
286 if (message == WM_NCCREATE) { 287 if (message == WM_NCCREATE) {
287 CREATESTRUCT* cs = reinterpret_cast<CREATESTRUCT*>(l_param); 288 CREATESTRUCT* cs = reinterpret_cast<CREATESTRUCT*>(l_param);
288 WindowImpl* window = reinterpret_cast<WindowImpl*>(cs->lpCreateParams); 289 window = reinterpret_cast<WindowImpl*>(cs->lpCreateParams);
289 DCHECK(window); 290 DCHECK(window);
290 gfx::SetWindowUserData(hwnd, window); 291 gfx::SetWindowUserData(hwnd, window);
291 window->hwnd_ = hwnd; 292 window->hwnd_ = hwnd;
292 window->got_create_ = true; 293 window->got_create_ = true;
293 if (hwnd) 294 if (hwnd)
294 window->got_valid_hwnd_ = true; 295 window->got_valid_hwnd_ = true;
295 return TRUE; 296 } else {
297 window = reinterpret_cast<WindowImpl*>(GetWindowUserData(hwnd));
296 } 298 }
297 299
298 WindowImpl* window = reinterpret_cast<WindowImpl*>(GetWindowUserData(hwnd));
299 if (!window) 300 if (!window)
300 return 0; 301 return 0;
301 302
302 return window->OnWndProc(message, w_param, l_param); 303 return window->OnWndProc(message, w_param, l_param);
303 } 304 }
304 305
305 ATOM WindowImpl::GetWindowClassAtom() { 306 ATOM WindowImpl::GetWindowClassAtom() {
306 HICON icon = GetDefaultWindowIcon(); 307 HICON icon = GetDefaultWindowIcon();
307 HICON small_icon = GetSmallWindowIcon(); 308 HICON small_icon = GetSmallWindowIcon();
308 ClassInfo class_info(initial_class_style(), icon, small_icon); 309 ClassInfo class_info(initial_class_style(), icon, small_icon);
309 return ClassRegistrar::GetInstance()->RetrieveClassAtom(class_info); 310 return ClassRegistrar::GetInstance()->RetrieveClassAtom(class_info);
310 } 311 }
311 312
312 } // namespace gfx 313 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/events/win/event_utils_win_unittest.cc ('k') | ui/views/win/hwnd_message_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698