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

Unified Diff: views/controls/button/native_button_win.cc

Issue 114059: Refactors HWNDView, NativeViewHostGtk and NativeViewHost so that they match t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/button/native_button_gtk.cc ('k') | views/controls/hwnd_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/button/native_button_win.cc
===================================================================
--- views/controls/button/native_button_win.cc (revision 17161)
+++ views/controls/button/native_button_win.cc (working copy)
@@ -23,7 +23,7 @@
// Associates the actual HWND with the native_button so the native_button is
// the one considered as having the focus (not the wrapper) when the HWND is
// focused directly (with a click for example).
- SetAssociatedFocusView(native_button);
+ set_focus_view(native_button);
}
NativeButtonWin::~NativeButtonWin() {
@@ -33,11 +33,11 @@
// NativeButtonWin, NativeButtonWrapper implementation:
void NativeButtonWin::UpdateLabel() {
- SetWindowText(GetHWND(), native_button_->label().c_str());
+ SetWindowText(native_view(), native_button_->label().c_str());
}
void NativeButtonWin::UpdateFont() {
- SendMessage(GetHWND(), WM_SETFONT,
+ SendMessage(native_view(), WM_SETFONT,
reinterpret_cast<WPARAM>(native_button_->font().hfont()),
FALSE);
}
@@ -48,7 +48,7 @@
void NativeButtonWin::UpdateDefault() {
if (!IsCheckbox()) {
- SendMessage(GetHWND(), BM_SETSTYLE,
+ SendMessage(native_view(), BM_SETSTYLE,
native_button_->is_default() ? BS_DEFPUSHBUTTON : BS_PUSHBUTTON,
true);
}
@@ -68,7 +68,7 @@
gfx::Size NativeButtonWin::GetPreferredSize() {
SIZE sz = {0};
- SendMessage(GetHWND(), BCM_GETIDEALSIZE, 0, reinterpret_cast<LPARAM>(&sz));
+ SendMessage(native_view(), BCM_GETIDEALSIZE, 0, reinterpret_cast<LPARAM>(&sz));
return gfx::Size(sz.cx, sz.cy);
}
@@ -142,12 +142,12 @@
// NativeCheckboxWin, NativeButtonWrapper implementation:
void NativeCheckboxWin::UpdateChecked() {
- SendMessage(GetHWND(), BM_SETCHECK,
+ SendMessage(native_view(), BM_SETCHECK,
checkbox_->checked() ? BST_CHECKED : BST_UNCHECKED, 0);
}
void NativeCheckboxWin::SetPushed(bool pushed) {
- SendMessage(GetHWND(), BM_SETSTATE, pushed, 0);
+ SendMessage(native_view(), BM_SETSTATE, pushed, 0);
}
bool NativeCheckboxWin::OnKeyDown(int vkey) {
« no previous file with comments | « views/controls/button/native_button_gtk.cc ('k') | views/controls/hwnd_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698