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

Unified Diff: views/widget/widget_win.cc

Issue 254003: Refactored event handler method bodies from widget_win.h to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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/widget/widget_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/widget_win.cc
===================================================================
--- views/widget/widget_win.cc (revision 27403)
+++ views/widget/widget_win.cc (working copy)
@@ -423,9 +423,35 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
PaintNow(gfx::Rect(rect));
}
+bool WidgetWin::ReleaseCaptureOnMouseReleased() {
+ return true;
+}
+
RootView* WidgetWin::CreateRootView() {
return new RootView(this);
}
« no previous file with comments | « views/widget/widget_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698