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

Side by Side Diff: content/browser/renderer_host/legacy_render_widget_host_win.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: 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 | « no previous file | ui/gfx/win/direct_manipulation.h » ('j') | ui/views/win/hwnd_message_handler.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 "content/browser/renderer_host/legacy_render_widget_host_win.h" 5 #include "content/browser/renderer_host/legacy_render_widget_host_win.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "content/browser/accessibility/browser_accessibility_manager_win.h" 10 #include "content/browser/accessibility/browser_accessibility_manager_win.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 76
77 void LegacyRenderWidgetHostHWND::Show() { 77 void LegacyRenderWidgetHostHWND::Show() {
78 ::ShowWindow(hwnd(), SW_SHOW); 78 ::ShowWindow(hwnd(), SW_SHOW);
79 if (direct_manipulation_helper_) 79 if (direct_manipulation_helper_)
80 direct_manipulation_helper_->Activate(hwnd()); 80 direct_manipulation_helper_->Activate(hwnd());
81 } 81 }
82 82
83 void LegacyRenderWidgetHostHWND::Hide() { 83 void LegacyRenderWidgetHostHWND::Hide() {
84 ::ShowWindow(hwnd(), SW_HIDE); 84 ::ShowWindow(hwnd(), SW_HIDE);
85 if (direct_manipulation_helper_)
86 direct_manipulation_helper_->Deactivate(hwnd());
85 } 87 }
86 88
87 void LegacyRenderWidgetHostHWND::SetBounds(const gfx::Rect& bounds) { 89 void LegacyRenderWidgetHostHWND::SetBounds(const gfx::Rect& bounds) {
88 gfx::Rect bounds_in_pixel = gfx::win::DIPToScreenRect(bounds); 90 gfx::Rect bounds_in_pixel = gfx::win::DIPToScreenRect(bounds);
89 ::SetWindowPos(hwnd(), NULL, bounds_in_pixel.x(), bounds_in_pixel.y(), 91 ::SetWindowPos(hwnd(), NULL, bounds_in_pixel.x(), bounds_in_pixel.y(),
90 bounds_in_pixel.width(), bounds_in_pixel.height(), 92 bounds_in_pixel.width(), bounds_in_pixel.height(),
91 SWP_NOREDRAW); 93 SWP_NOREDRAW);
92 if (direct_manipulation_helper_) 94 if (direct_manipulation_helper_)
93 direct_manipulation_helper_->SetBounds(bounds_in_pixel); 95 direct_manipulation_helper_->SetBounds(bounds_in_pixel);
94 } 96 }
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 // generate the legacy WM_VSCROLL/WM_HSCROLL messages. 393 // generate the legacy WM_VSCROLL/WM_HSCROLL messages.
392 // We add these styles to ensure that trackpad/trackpoint scrolling 394 // We add these styles to ensure that trackpad/trackpoint scrolling
393 // work. 395 // work.
394 long current_style = ::GetWindowLong(hwnd(), GWL_STYLE); 396 long current_style = ::GetWindowLong(hwnd(), GWL_STYLE);
395 ::SetWindowLong(hwnd(), GWL_STYLE, 397 ::SetWindowLong(hwnd(), GWL_STYLE,
396 current_style | WS_VSCROLL | WS_HSCROLL); 398 current_style | WS_VSCROLL | WS_HSCROLL);
397 return 0; 399 return 0;
398 } 400 }
399 401
400 } // namespace content 402 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/win/direct_manipulation.h » ('j') | ui/views/win/hwnd_message_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698