Bug 913953 - Part u: Remove unused HWND user data functions; r=ehsan
authorMs2ger <ms2ger@gmail.com>
Tue, 10 Sep 2013 09:03:36 +0200
changeset 159149 f3fbd500d4760feba2f5c3d3febaff32e8ebdc7c
parent 159148 3f44070cab660500c2c6f23bd31113ade161b57a
child 159150 3c5cf284cbb2801d157541103bd462fa22a74f99
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs913953
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 913953 - Part u: Remove unused HWND user data functions; r=ehsan
ipc/chromium/src/base/win_util.cc
ipc/chromium/src/base/win_util.h
--- a/ipc/chromium/src/base/win_util.cc
+++ b/ipc/chromium/src/base/win_util.cc
@@ -253,26 +253,16 @@ WNDPROC SetWindowProc(HWND hwnd, WNDPROC
   // the orignal window procedure and not the current one. I don't know if it is
   // a bug or an intended feature.
   WNDPROC oldwindow_proc =
       reinterpret_cast<WNDPROC>(GetWindowLongPtr(hwnd, GWLP_WNDPROC));
   SetWindowLongPtr(hwnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(proc));
   return oldwindow_proc;
 }
 
-void* SetWindowUserData(HWND hwnd, void* user_data) {
-  return
-      reinterpret_cast<void*>(SetWindowLongPtr(hwnd, GWLP_USERDATA,
-          reinterpret_cast<LONG_PTR>(user_data)));
-}
-
-void* GetWindowUserData(HWND hwnd) {
-  return reinterpret_cast<void*>(GetWindowLongPtr(hwnd, GWLP_USERDATA));
-}
-
 // Maps to the WNDPROC for a window that was active before the subclass was
 // installed.
 static const wchar_t* const kHandlerKey = L"__ORIGINAL_MESSAGE_HANDLER__";
 
 bool IsSubclassed(HWND window, WNDPROC subclass_proc) {
   WNDPROC original_handler =
       reinterpret_cast<WNDPROC>(GetWindowLongPtr(window, GWLP_WNDPROC));
   return original_handler == subclass_proc;
--- a/ipc/chromium/src/base/win_util.h
+++ b/ipc/chromium/src/base/win_util.h
@@ -68,21 +68,16 @@ bool Subclass(HWND window, WNDPROC subcl
 // was successfully unsubclassed, false if the window's window procedure is not
 // |subclass_proc|.
 bool Unsubclass(HWND window, WNDPROC subclass_proc);
 
 // Retrieves the original WNDPROC of a window subclassed using
 // SubclassWindow.
 WNDPROC GetSuperclassWNDPROC(HWND window);
 
-// Pointer-friendly wrappers around Get/SetWindowLong(..., GWLP_USERDATA, ...)
-// Returns the previously set value.
-void* SetWindowUserData(HWND hwnd, void* user_data);
-void* GetWindowUserData(HWND hwnd);
-
 // Returns true if the shift key is currently pressed.
 bool IsShiftPressed();
 
 // Returns true if the ctrl key is currently pressed.
 bool IsCtrlPressed();
 
 // Returns true if the alt key is currently pressed.
 bool IsAltPressed();