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

Side by Side Diff: ui/base/win/hwnd_subclass.cc

Issue 659883002: Enable hidpi on Linux, refactor a bit on Windows to share Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: constants Created 6 years, 1 month 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
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/base/win/hwnd_subclass.h" 5 #include "ui/base/win/hwnd_subclass.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
11 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
12 #include "ui/gfx/win/dpi.h"
13 #include "ui/gfx/win/hwnd_util.h" 12 #include "ui/gfx/win/hwnd_util.h"
14 13
15 namespace { 14 namespace {
16 const char kHWNDSubclassKey[] = "__UI_BASE_WIN_HWND_SUBCLASS_PROC__"; 15 const char kHWNDSubclassKey[] = "__UI_BASE_WIN_HWND_SUBCLASS_PROC__";
17 16
18 LRESULT CALLBACK WndProc(HWND hwnd, 17 LRESULT CALLBACK WndProc(HWND hwnd,
19 UINT message, 18 UINT message,
20 WPARAM w_param, 19 WPARAM w_param,
21 LPARAM l_param) { 20 LPARAM l_param) {
22 ui::HWNDSubclass* wrapped_wnd_proc = 21 ui::HWNDSubclass* wrapped_wnd_proc =
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // In most cases, |original_wnd_proc_| will take care of calling 160 // In most cases, |original_wnd_proc_| will take care of calling
162 // DefWindowProc. 161 // DefWindowProc.
163 return CallWindowProc(original_wnd_proc_, hwnd, message, w_param, l_param); 162 return CallWindowProc(original_wnd_proc_, hwnd, message, w_param, l_param);
164 } 163 }
165 164
166 HWNDMessageFilter::~HWNDMessageFilter() { 165 HWNDMessageFilter::~HWNDMessageFilter() {
167 HWNDSubclass::RemoveFilterFromAllTargets(this); 166 HWNDSubclass::RemoveFilterFromAllTargets(this);
168 } 167 }
169 168
170 } // namespace ui 169 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/win/dpi_setup.cc ('k') | ui/compositor/test/test_suite.cc » ('j') | ui/gfx/dpi.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698