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

Side by Side Diff: base/message_loop/message_pump_win.cc

Issue 1410333006: Enough hacks to make wstring printfs unneeded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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 "base/message_loop/message_pump_win.h" 5 #include "base/message_loop/message_pump_win.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <math.h> 8 #include <math.h>
9 9
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 if (more_work_is_plausible) 194 if (more_work_is_plausible)
195 continue; 195 continue;
196 196
197 WaitForWork(); // Wait (sleep) until we have work to do again. 197 WaitForWork(); // Wait (sleep) until we have work to do again.
198 } 198 }
199 } 199 }
200 200
201 void MessagePumpForUI::InitMessageWnd() { 201 void MessagePumpForUI::InitMessageWnd() {
202 // Generate a unique window class name. 202 // Generate a unique window class name.
203 string16 class_name = StringPrintf(kWndClassFormat, this); 203 string16 class_name = L"";// StringPrintf(kWndClassFormat, this);
204 204
205 HINSTANCE instance = GetModuleFromAddress(&WndProcThunk); 205 HINSTANCE instance = GetModuleFromAddress(&WndProcThunk);
206 WNDCLASSEX wc = {0}; 206 WNDCLASSEX wc = {0};
207 wc.cbSize = sizeof(wc); 207 wc.cbSize = sizeof(wc);
208 wc.lpfnWndProc = base::win::WrappedWindowProc<WndProcThunk>; 208 wc.lpfnWndProc = base::win::WrappedWindowProc<WndProcThunk>;
209 wc.hInstance = instance; 209 wc.hInstance = instance;
210 wc.lpszClassName = class_name.c_str(); 210 wc.lpszClassName = class_name.c_str();
211 atom_ = RegisterClassEx(&wc); 211 atom_ = RegisterClassEx(&wc);
212 DCHECK(atom_); 212 DCHECK(atom_);
213 213
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 644
645 // static 645 // static
646 MessagePumpForIO::IOHandler* MessagePumpForIO::KeyToHandler( 646 MessagePumpForIO::IOHandler* MessagePumpForIO::KeyToHandler(
647 ULONG_PTR key, 647 ULONG_PTR key,
648 bool* has_valid_io_context) { 648 bool* has_valid_io_context) {
649 *has_valid_io_context = ((key & 1) == 0); 649 *has_valid_io_context = ((key & 1) == 0);
650 return reinterpret_cast<IOHandler*>(key & ~static_cast<ULONG_PTR>(1)); 650 return reinterpret_cast<IOHandler*>(key & ~static_cast<ULONG_PTR>(1));
651 } 651 }
652 652
653 } // namespace base 653 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698