diff options
author | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-28 23:44:41 +0000 |
---|---|---|
committer | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-28 23:44:41 +0000 |
commit | b0c6bcddbc2dacbbcd8c53f20df488aa6ba7dedb (patch) | |
tree | 8fae1db547a35721f86b02906a6e343658878861 /views/widget/widget_win.cc | |
parent | 971c16885e6dca38e4f3d5d5ba5b73214e3526e7 (diff) | |
download | chromium_src-b0c6bcddbc2dacbbcd8c53f20df488aa6ba7dedb.zip chromium_src-b0c6bcddbc2dacbbcd8c53f20df488aa6ba7dedb.tar.gz chromium_src-b0c6bcddbc2dacbbcd8c53f20df488aa6ba7dedb.tar.bz2 |
Refactored event handler method bodies from widget_win.h to
widget_win.cc. This significantly reduces build times when modifying
the code of these event handlers during debugging.
BUG=http://code.google.com/p/chromium/issues/detail?id=23274
TEST=none
Review URL: http://codereview.chromium.org/254003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27435 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/widget_win.cc')
-rw-r--r-- | views/widget/widget_win.cc | 165 |
1 files changed, 165 insertions, 0 deletions
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc index 13df3ad..d975ef9 100644 --- a/views/widget/widget_win.cc +++ b/views/widget/widget_win.cc @@ -423,9 +423,35 @@ void WidgetWin::SetFocusTraversableParentView(View* parent_view) { root_view_->SetFocusTraversableParentView(parent_view); } +bool WidgetWin::AcceleratorPressed(const Accelerator& accelerator) { + return false; +} + +bool WidgetWin::GetAccelerator(int cmd_id, Accelerator* accelerator) { + return false; +} + + /////////////////////////////////////////////////////////////////////////////// // Message handlers +void WidgetWin::OnActivate(UINT action, BOOL minimized, HWND window) { + SetMsgHandled(FALSE); +} + +void WidgetWin::OnActivateApp(BOOL active, DWORD thread_id) { + SetMsgHandled(FALSE); +} + +LRESULT WidgetWin::OnAppCommand(HWND window, short app_command, WORD device, + int keystate) { + SetMsgHandled(FALSE); + return 0; +} + +void WidgetWin::OnCancelMode() { +} + void WidgetWin::OnCaptureChanged(HWND hwnd) { if (has_capture_) { if (is_mouse_down_) @@ -439,6 +465,14 @@ void WidgetWin::OnClose() { Close(); } +void WidgetWin::OnCommand(UINT notification_code, int command_id, HWND window) { + SetMsgHandled(FALSE); +} + +LRESULT WidgetWin::OnCreate(CREATESTRUCT* create_struct) { + return 0; +} + void WidgetWin::OnDestroy() { if (drop_target_.get()) { RevokeDragDrop(hwnd()); @@ -448,11 +482,34 @@ void WidgetWin::OnDestroy() { RemoveProp(hwnd(), kRootViewWindowProperty); } +LRESULT WidgetWin::OnDwmCompositionChanged(UINT msg, + WPARAM w_param, + LPARAM l_param) { + SetMsgHandled(FALSE); + return 0; +} + +void WidgetWin::OnEndSession(BOOL ending, UINT logoff) { + SetMsgHandled(FALSE); +} + +void WidgetWin::OnEnterSizeMove() { + SetMsgHandled(FALSE); +} + LRESULT WidgetWin::OnEraseBkgnd(HDC dc) { // This is needed for magical win32 flicker ju-ju return 1; } +void WidgetWin::OnExitMenuLoop(BOOL is_track_popup_menu) { + SetMsgHandled(FALSE); +} + +void WidgetWin::OnExitSizeMove() { + SetMsgHandled(FALSE); +} + LRESULT WidgetWin::OnGetObject(UINT uMsg, WPARAM w_param, LPARAM l_param) { LRESULT reference_result = static_cast<LRESULT>(0L); @@ -495,6 +552,24 @@ LRESULT WidgetWin::OnGetObject(UINT uMsg, WPARAM w_param, LPARAM l_param) { return reference_result; } +void WidgetWin::OnGetMinMaxInfo(MINMAXINFO* minmax_info) { + SetMsgHandled(FALSE); +} + +void WidgetWin::OnHScroll(int scroll_type, short position, HWND scrollbar) { + SetMsgHandled(FALSE); +} + +void WidgetWin::OnInitMenu(HMENU menu) { + SetMsgHandled(FALSE); +} + +void WidgetWin::OnInitMenuPopup(HMENU menu, + UINT position, + BOOL is_system_menu) { + SetMsgHandled(FALSE); +} + void WidgetWin::OnKeyDown(TCHAR c, UINT rep_cnt, UINT flags) { KeyEvent event(Event::ET_KEY_PRESSED, c, rep_cnt, flags); SetMsgHandled(root_view_->ProcessKeyEvent(event)); @@ -567,12 +642,34 @@ LRESULT WidgetWin::OnMouseWheel(UINT message, WPARAM w_param, LPARAM l_param) { return root_view_->ProcessMouseWheelEvent(e) ? 0 : 1; } +void WidgetWin::OnMove(const CPoint& point) { + SetMsgHandled(FALSE); +} + +void WidgetWin::OnMoving(UINT param, const LPRECT new_bounds) { +} + LRESULT WidgetWin::OnMouseRange(UINT msg, WPARAM w_param, LPARAM l_param) { tooltip_manager_->OnMouse(msg, w_param, l_param); SetMsgHandled(FALSE); return 0; } +LRESULT WidgetWin::OnNCActivate(BOOL active) { + SetMsgHandled(FALSE); + return 0; +} + +LRESULT WidgetWin::OnNCCalcSize(BOOL w_param, LPARAM l_param) { + SetMsgHandled(FALSE); + return 0; +} + +LRESULT WidgetWin::OnNCHitTest(const CPoint& pt) { + SetMsgHandled(FALSE); + return 0; +} + void WidgetWin::OnNCLButtonDblClk(UINT flags, const CPoint& point) { SetMsgHandled(ProcessMousePressed(point, flags | MK_LBUTTON, true, true)); } @@ -614,6 +711,10 @@ LRESULT WidgetWin::OnNCMouseMove(UINT flags, const CPoint& point) { return 0; } +void WidgetWin::OnNCPaint(HRGN rgn) { + SetMsgHandled(FALSE); +} + void WidgetWin::OnNCRButtonDblClk(UINT flags, const CPoint& point) { SetMsgHandled(ProcessMousePressed(point, flags | MK_RBUTTON, true, true)); } @@ -626,6 +727,18 @@ void WidgetWin::OnNCRButtonUp(UINT flags, const CPoint& point) { SetMsgHandled(FALSE); } +LRESULT WidgetWin::OnNCUAHDrawCaption(UINT msg, + WPARAM w_param, + LPARAM l_param) { + SetMsgHandled(FALSE); + return 0; +} + +LRESULT WidgetWin::OnNCUAHDrawFrame(UINT msg, WPARAM w_param, LPARAM l_param) { + SetMsgHandled(FALSE); + return 0; +} + LRESULT WidgetWin::OnNotify(int w_param, NMHDR* l_param) { // We can be sent this message before the tooltip manager is created, if a // subclass overrides OnCreate and creates some kind of Windows control there @@ -644,6 +757,14 @@ void WidgetWin::OnPaint(HDC dc) { root_view_->OnPaint(hwnd()); } +LRESULT WidgetWin::OnPowerBroadcast(DWORD power_event, DWORD data) { + base::SystemMonitor* monitor = base::SystemMonitor::Get(); + if (monitor) + monitor->ProcessWmPowerBroadcastMessage(power_event); + SetMsgHandled(FALSE); + return 0; +} + void WidgetWin::OnRButtonDown(UINT flags, const CPoint& point) { ProcessMousePressed(point, flags | MK_RBUTTON, false, false); } @@ -656,10 +777,38 @@ void WidgetWin::OnRButtonDblClk(UINT flags, const CPoint& point) { ProcessMousePressed(point, flags | MK_RBUTTON, true, false); } +LRESULT WidgetWin::OnReflectedMessage(UINT msg, + WPARAM w_param, + LPARAM l_param) { + SetMsgHandled(FALSE); + return 0; +} + +void WidgetWin::OnSetFocus(HWND focused_window) { + SetMsgHandled(FALSE); +} + +LRESULT WidgetWin::OnSetIcon(UINT size_type, HICON new_icon) { + SetMsgHandled(FALSE); + return 0; +} + +LRESULT WidgetWin::OnSetText(const wchar_t* text) { + SetMsgHandled(FALSE); + return 0; +} + +void WidgetWin::OnSettingChange(UINT flags, const wchar_t* section) { + SetMsgHandled(FALSE); +} + void WidgetWin::OnSize(UINT param, const CSize& size) { ChangeSize(param, size); } +void WidgetWin::OnSysCommand(UINT notification_code, CPoint click) { +} + void WidgetWin::OnThemeChanged() { // Notify NativeTheme. gfx::NativeTheme::instance()->CloseHandles(); @@ -670,6 +819,18 @@ void WidgetWin::OnFinalMessage(HWND window) { delete this; } +void WidgetWin::OnVScroll(int scroll_type, short position, HWND scrollbar) { + SetMsgHandled(FALSE); +} + +void WidgetWin::OnWindowPosChanging(WINDOWPOS* window_pos) { + SetMsgHandled(FALSE); +} + +void WidgetWin::OnWindowPosChanged(WINDOWPOS* window_pos) { + SetMsgHandled(FALSE); +} + /////////////////////////////////////////////////////////////////////////////// // WidgetWin, protected: @@ -803,6 +964,10 @@ void WidgetWin::ChangeSize(UINT size_param, const CSize& size) { PaintNow(gfx::Rect(rect)); } +bool WidgetWin::ReleaseCaptureOnMouseReleased() { + return true; +} + RootView* WidgetWin::CreateRootView() { return new RootView(this); } |