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

Unified Diff: views/controls/native_control_win.cc

Issue 5144005: Converts usage of SetProp/GetProp to a map. Even after making sure we (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Fix build Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/native_control_win.h ('k') | views/focus/focus_util_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/native_control_win.cc
diff --git a/views/controls/native_control_win.cc b/views/controls/native_control_win.cc
index c4f811cc9a5de4caca6c8230bc66c0cccbc622a3..a2239935d717de7858667b1a62d45f065e8f0877 100644
--- a/views/controls/native_control_win.cc
+++ b/views/controls/native_control_win.cc
@@ -7,14 +7,16 @@
#include <windowsx.h>
#include "app/l10n_util_win.h"
-#include "app/win/scoped_prop.h"
+#include "app/view_prop.h"
#include "base/logging.h"
#include "base/win_util.h"
#include "views/focus/focus_manager.h"
+using app::ViewProp;
+
namespace views {
-static const wchar_t* kNativeControlWinKey = L"__NATIVE_CONTROL_WIN__";
+static const char* const kNativeControlWinKey = "__NATIVE_CONTROL_WIN__";
////////////////////////////////////////////////////////////////////////////////
// NativeControlWin, public:
@@ -130,8 +132,7 @@ void NativeControlWin::ShowContextMenu(const gfx::Point& location) {
void NativeControlWin::NativeControlCreated(HWND native_control) {
// Associate this object with the control's HWND so that WidgetWin can find
// this object when it receives messages from it.
- props_.push_back(
- new app::win::ScopedProp(native_control, kNativeControlWinKey, this));
+ props_.push_back(new ViewProp(native_control, kNativeControlWinKey, this));
props_.push_back(ChildWindowMessageProcessor::Register(native_control, this));
// Subclass so we get WM_KEYDOWN and WM_SETFOCUS messages.
@@ -196,8 +197,8 @@ LRESULT NativeControlWin::NativeControlWndProc(HWND window,
UINT message,
WPARAM w_param,
LPARAM l_param) {
- NativeControlWin* native_control =
- static_cast<NativeControlWin*>(GetProp(window, kNativeControlWinKey));
+ NativeControlWin* native_control = reinterpret_cast<NativeControlWin*>(
+ ViewProp::GetValue(window, kNativeControlWinKey));
DCHECK(native_control);
if (message == WM_KEYDOWN &&
« no previous file with comments | « views/controls/native_control_win.h ('k') | views/focus/focus_util_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698