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

Unified Diff: ui/views/win/hwnd_message_handler.cc

Issue 136003015: Remove native_control* and some other non-Aura windows code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove message_loop include Created 6 years, 11 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 | « ui/views/win/hwnd_message_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/hwnd_message_handler.cc
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index cba0428545cced7c65e96ccfaa6b59633da594dc..f9a539386386cdf60050b464fda15c13e47ee707 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -35,7 +35,6 @@
#include "ui/native_theme/native_theme_win.h"
#include "ui/views/views_delegate.h"
#include "ui/views/widget/monitor_win.h"
-#include "ui/views/widget/native_widget_win.h"
#include "ui/views/widget/widget_hwnd_utils.h"
#include "ui/views/win/appbar.h"
#include "ui/views/win/fullscreen_handler.h"
@@ -943,14 +942,6 @@ LRESULT HWNDMessageHandler::OnWndProc(UINT message,
if (delegate_ && delegate_->PreHandleMSG(message, w_param, l_param, &result))
return result;
-#if !defined(USE_AURA)
- // First allow messages sent by child controls to be processed directly by
- // their associated views. If such a view is present, it will handle the
- // message *instead of* this NativeWidgetWin.
- if (ProcessChildWindowMessage(message, w_param, l_param, &result))
- return result;
-#endif
-
// Otherwise we handle everything else.
// NOTE: We inline ProcessWindowMessage() as 'this' may be destroyed during
// dispatch and ProcessWindowMessage() doesn't deal with that well.
@@ -972,9 +963,6 @@ LRESULT HWNDMessageHandler::OnWndProc(UINT message,
if (delegate_)
delegate_->PostHandleMSG(message, w_param, l_param);
if (message == WM_NCDESTROY) {
-#if !defined(USE_AURA)
- base::MessageLoopForUI::current()->RemoveObserver(this);
-#endif
if (delegate_)
delegate_->HandleDestroyed();
}
@@ -994,18 +982,6 @@ LRESULT HWNDMessageHandler::OnWndProc(UINT message,
}
////////////////////////////////////////////////////////////////////////////////
-// HWNDMessageHandler, MessageLoopForUI::Observer implementation:
-
-base::EventStatus HWNDMessageHandler::WillProcessEvent(
- const base::NativeEvent& event) {
- return base::EVENT_CONTINUE;
-}
-
-void HWNDMessageHandler::DidProcessEvent(const base::NativeEvent& event) {
- RedrawInvalidRect();
-}
-
-////////////////////////////////////////////////////////////////////////////////
// HWNDMessageHandler, private:
int HWNDMessageHandler::GetAppbarAutohideEdges(HMONITOR monitor) {
@@ -1243,21 +1219,6 @@ void HWNDMessageHandler::UnlockUpdates(bool force) {
}
}
-void HWNDMessageHandler::RedrawInvalidRect() {
-// TODO(cpu): Remove the caller and this class as a message loop observer
-// because we don't need agressive repaints via RDW_UPDATENOW in Aura. The
-// general tracking bug for repaint issues is 177115.
-#if !defined(USE_AURA)
- if (!use_layered_buffer_) {
- RECT r = { 0, 0, 0, 0 };
- if (GetUpdateRect(hwnd(), &r, FALSE) && !IsRectEmpty(&r)) {
- RedrawWindow(hwnd(), &r, NULL,
- RDW_INVALIDATE | RDW_UPDATENOW | RDW_NOCHILDREN);
- }
- }
-#endif
-}
-
void HWNDMessageHandler::RedrawLayeredWindowContents() {
waiting_for_redraw_layered_window_contents_ = false;
if (invalid_rect_.IsEmpty())
@@ -1392,14 +1353,6 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
// creation time.
ClientAreaSizeChanged();
-#if !defined(USE_AURA)
- // We need to add ourselves as a message loop observer so that we can repaint
- // aggressively if the contents of our window become invalid. Unfortunately
- // WM_PAINT messages are starved and we get flickery redrawing when resizing
- // if we do not do this.
- base::MessageLoopForUI::current()->AddObserver(this);
-#endif
-
delegate_->HandleCreate();
WTSRegisterSessionNotification(hwnd(), NOTIFY_FOR_THIS_SESSION);
« no previous file with comments | « ui/views/win/hwnd_message_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698