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

Side by Side Diff: ui/views/win/hwnd_message_handler.cc

Issue 1295683003: Remove the CHECK from the DirectManipulationHelper::Activate function as it is firing in Canary on … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add SetMsgHandled to the windowpos changed handler Created 5 years, 4 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
« no previous file with comments | « ui/gfx/win/direct_manipulation.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/win/hwnd_message_handler.h" 5 #include "ui/views/win/hwnd_message_handler.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <oleacc.h> 8 #include <oleacc.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 10
(...skipping 2502 matching lines...) Expand 10 before | Expand all | Expand 10 after
2513 "440919 HWNDMessageHandler::OnWindowPosChanged")); 2513 "440919 HWNDMessageHandler::OnWindowPosChanged"));
2514 2514
2515 if (DidClientAreaSizeChange(window_pos)) 2515 if (DidClientAreaSizeChange(window_pos))
2516 ClientAreaSizeChanged(); 2516 ClientAreaSizeChanged();
2517 if (remove_standard_frame_ && window_pos->flags & SWP_FRAMECHANGED && 2517 if (remove_standard_frame_ && window_pos->flags & SWP_FRAMECHANGED &&
2518 ui::win::IsAeroGlassEnabled() && 2518 ui::win::IsAeroGlassEnabled() &&
2519 (window_ex_style() & WS_EX_COMPOSITED) == 0) { 2519 (window_ex_style() & WS_EX_COMPOSITED) == 0) {
2520 MARGINS m = {10, 10, 10, 10}; 2520 MARGINS m = {10, 10, 10, 10};
2521 DwmExtendFrameIntoClientArea(hwnd(), &m); 2521 DwmExtendFrameIntoClientArea(hwnd(), &m);
2522 } 2522 }
2523 if (window_pos->flags & SWP_SHOWWINDOW) 2523 if (window_pos->flags & SWP_SHOWWINDOW) {
2524 delegate_->HandleVisibilityChanged(true); 2524 delegate_->HandleVisibilityChanged(true);
2525 else if (window_pos->flags & SWP_HIDEWINDOW) 2525 if (direct_manipulation_helper_)
2526 direct_manipulation_helper_->Activate(hwnd());
2527 } else if (window_pos->flags & SWP_HIDEWINDOW) {
2526 delegate_->HandleVisibilityChanged(false); 2528 delegate_->HandleVisibilityChanged(false);
2529 if (direct_manipulation_helper_)
2530 direct_manipulation_helper_->Deactivate(hwnd());
2531 }
2527 SetMsgHandled(FALSE); 2532 SetMsgHandled(FALSE);
2528 } 2533 }
2529 2534
2530 void HWNDMessageHandler::OnSessionChange(WPARAM status_code) { 2535 void HWNDMessageHandler::OnSessionChange(WPARAM status_code) {
2531 // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed. 2536 // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed.
2532 tracked_objects::ScopedTracker tracking_profile( 2537 tracked_objects::ScopedTracker tracking_profile(
2533 FROM_HERE_WITH_EXPLICIT_FUNCTION( 2538 FROM_HERE_WITH_EXPLICIT_FUNCTION(
2534 "440919 HWNDMessageHandler::OnSessionChange")); 2539 "440919 HWNDMessageHandler::OnSessionChange"));
2535 2540
2536 // Direct3D presents are ignored while the screen is locked, so force the 2541 // Direct3D presents are ignored while the screen is locked, so force the
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
2779 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW); 2784 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW);
2780 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW); 2785 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW);
2781 } 2786 }
2782 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want 2787 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want
2783 // to notify our children too, since we can have MDI child windows who need to 2788 // to notify our children too, since we can have MDI child windows who need to
2784 // update their appearance. 2789 // update their appearance.
2785 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL); 2790 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL);
2786 } 2791 }
2787 2792
2788 } // namespace views 2793 } // namespace views
OLDNEW
« no previous file with comments | « ui/gfx/win/direct_manipulation.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698