summaryrefslogtreecommitdiffstats
path: root/chrome/views
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 21:30:44 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 21:30:44 +0000
commit2455e073eb458b2ab5a7edbb337781152868b8c0 (patch)
tree44bad3a506dbce9bd83d31d5fcba0d17b33b8680 /chrome/views
parentf62f093d245ab8bdbc2a7f915ed9bdab16e1757b (diff)
downloadchromium_src-2455e073eb458b2ab5a7edbb337781152868b8c0.zip
chromium_src-2455e073eb458b2ab5a7edbb337781152868b8c0.tar.gz
chromium_src-2455e073eb458b2ab5a7edbb337781152868b8c0.tar.bz2
Nonfunctional cleanup change:
* Fix two violations of 80-column lines * Use MSG_WM_SETTINGCHANGE instead of MESSAGE_RANGE_HANDLER_EX in order to simplify a function declaration/code. Review URL: http://codereview.chromium.org/27358 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10823 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views')
-rw-r--r--chrome/views/widget_win.cc10
-rw-r--r--chrome/views/widget_win.h13
2 files changed, 10 insertions, 13 deletions
diff --git a/chrome/views/widget_win.cc b/chrome/views/widget_win.cc
index 0d7edf4..d89bcd2 100644
--- a/chrome/views/widget_win.cc
+++ b/chrome/views/widget_win.cc
@@ -670,17 +670,11 @@ void WidgetWin::OnRButtonDblClk(UINT flags, const CPoint& point) {
ProcessMousePressed(point, flags | MK_RBUTTON, true, false);
}
-LRESULT WidgetWin::OnSettingChange(UINT msg, WPARAM w_param, LPARAM l_param) {
- if (toplevel_) {
- SetMsgHandled(FALSE);
- if (w_param != SPI_SETWORKAREA)
- return 0; // Return value is effectively ignored in atlwin.h.
-
+void WidgetWin::OnSettingChange(UINT flags, const wchar_t* section) {
+ if (toplevel_ && (flags == SPI_SETWORKAREA)) {
AdjustWindowToFitScreenSize();
SetMsgHandled(TRUE);
}
- // Don't care, overridden by interested subclasses
- return 0;
}
void WidgetWin::OnSize(UINT param, const CSize& size) {
diff --git a/chrome/views/widget_win.h b/chrome/views/widget_win.h
index 546e9f7..1e6e7c5 100644
--- a/chrome/views/widget_win.h
+++ b/chrome/views/widget_win.h
@@ -167,7 +167,6 @@ class WidgetWin : public Widget,
// Range handlers must go first!
MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange)
MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, WM_NCMOUSEMOVE, OnMouseRange)
- MESSAGE_RANGE_HANDLER_EX(WM_SETTINGCHANGE, WM_SETTINGCHANGE, OnSettingChange)
// Reflected message handler
MESSAGE_HANDLER_EX(kReflectedMessage, OnReflectedMessage)
@@ -240,6 +239,7 @@ class WidgetWin : public Widget,
MSG_WM_SETFOCUS(OnSetFocus)
MSG_WM_SETICON(OnSetIcon)
MSG_WM_SETTEXT(OnSetText)
+ MSG_WM_SETTINGCHANGE(OnSettingChange)
MSG_WM_SIZE(OnSize)
MSG_WM_SYSCOMMAND(OnSysCommand)
MSG_WM_THEMECHANGED(OnThemeChanged)
@@ -365,8 +365,9 @@ class WidgetWin : public Widget,
virtual void OnCancelMode() {}
virtual void OnCaptureChanged(HWND hwnd);
virtual void OnClose();
- virtual void OnCommand(
- UINT notification_code, int command_id, HWND window) { SetMsgHandled(FALSE); }
+ virtual void OnCommand(UINT notification_code, int command_id, HWND window) {
+ SetMsgHandled(FALSE);
+ }
virtual LRESULT OnCreate(LPCREATESTRUCT create_struct) { return 0; }
// WARNING: If you override this be sure and invoke super, otherwise we'll
// leak a few things.
@@ -379,7 +380,9 @@ class WidgetWin : public Widget,
}
virtual void OnEndSession(BOOL ending, UINT logoff) { SetMsgHandled(FALSE); }
virtual void OnEnterSizeMove() { SetMsgHandled(FALSE); }
- virtual void OnExitMenuLoop(BOOL is_track_popup_menu) { SetMsgHandled(FALSE); }
+ virtual void OnExitMenuLoop(BOOL is_track_popup_menu) {
+ SetMsgHandled(FALSE);
+ }
virtual LRESULT OnEraseBkgnd(HDC dc);
virtual LRESULT OnGetObject(UINT uMsg, WPARAM w_param, LPARAM l_param);
virtual void OnHScroll(int scroll_type, short position, HWND scrollbar) {
@@ -460,7 +463,7 @@ class WidgetWin : public Widget,
SetMsgHandled(FALSE);
return 0;
}
- virtual LRESULT OnSettingChange(UINT msg, WPARAM w_param, LPARAM l_param);
+ virtual void OnSettingChange(UINT flags, const wchar_t* section);
virtual void OnSize(UINT param, const CSize& size);
virtual void OnSysCommand(UINT notification_code, CPoint click) { }
virtual void OnThemeChanged();