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

Side by Side Diff: views/widget/native_widget_win.cc

Issue 8021009: Consolidate message observer API for win and aura (and touch). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "views/widget/native_widget_win.h" 5 #include "views/widget/native_widget_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 return false; 1114 return false;
1115 } 1115 }
1116 1116
1117 gfx::Rect NativeWidgetWin::GetWorkAreaBoundsInScreen() const { 1117 gfx::Rect NativeWidgetWin::GetWorkAreaBoundsInScreen() const {
1118 return gfx::Screen::GetMonitorWorkAreaNearestWindow(GetNativeView()); 1118 return gfx::Screen::GetMonitorWorkAreaNearestWindow(GetNativeView());
1119 } 1119 }
1120 1120
1121 //////////////////////////////////////////////////////////////////////////////// 1121 ////////////////////////////////////////////////////////////////////////////////
1122 // NativeWidgetWin, MessageLoop::Observer implementation: 1122 // NativeWidgetWin, MessageLoop::Observer implementation:
1123 1123
1124 void NativeWidgetWin::WillProcessMessage(const MSG& msg) { 1124 base::EventStatus NativeWidgetWin::WillProcessEvent(
1125 const base::NativeEvent& event) {
1126 return base::EVENT_CONTINUE;
1125 } 1127 }
1126 1128
1127 void NativeWidgetWin::DidProcessMessage(const MSG& msg) { 1129 void NativeWidgetWin::DidProcessEvent(const base::NativeEvent& event) {
1128 RedrawInvalidRect(); 1130 RedrawInvalidRect();
1129 } 1131 }
1130 1132
1131 //////////////////////////////////////////////////////////////////////////////// 1133 ////////////////////////////////////////////////////////////////////////////////
1132 // NativeWidgetWin, WindowImpl overrides: 1134 // NativeWidgetWin, WindowImpl overrides:
1133 1135
1134 HICON NativeWidgetWin::GetDefaultWindowIcon() const { 1136 HICON NativeWidgetWin::GetDefaultWindowIcon() const {
1135 if (ViewsDelegate::views_delegate) 1137 if (ViewsDelegate::views_delegate)
1136 return ViewsDelegate::views_delegate->GetDefaultWindowIcon(); 1138 return ViewsDelegate::views_delegate->GetDefaultWindowIcon();
1137 return NULL; 1139 return NULL;
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
2605 return (GetKeyState(VK_LBUTTON) & 0x80) || 2607 return (GetKeyState(VK_LBUTTON) & 0x80) ||
2606 (GetKeyState(VK_RBUTTON) & 0x80) || 2608 (GetKeyState(VK_RBUTTON) & 0x80) ||
2607 (GetKeyState(VK_MBUTTON) & 0x80) || 2609 (GetKeyState(VK_MBUTTON) & 0x80) ||
2608 (GetKeyState(VK_XBUTTON1) & 0x80) || 2610 (GetKeyState(VK_XBUTTON1) & 0x80) ||
2609 (GetKeyState(VK_XBUTTON2) & 0x80); 2611 (GetKeyState(VK_XBUTTON2) & 0x80);
2610 } 2612 }
2611 2613
2612 } // namespace internal 2614 } // namespace internal
2613 2615
2614 } // namespace views 2616 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698