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

Side by Side Diff: ui/gfx/win/direct_manipulation.cc

Issue 2869643003: Don't enable a direct manipulation layer. (Closed)
Patch Set: Remove conditional Created 3 years, 7 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 | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/gfx/win/direct_manipulation.h" 5 #include "ui/gfx/win/direct_manipulation.h"
6 6
7 #include "base/win/windows_version.h" 7 #include "base/win/windows_version.h"
8 8
9 namespace gfx { 9 namespace gfx {
10 namespace win { 10 namespace win {
11 11
12 // static 12 // static
13 std::unique_ptr<DirectManipulationHelper> 13 std::unique_ptr<DirectManipulationHelper>
14 DirectManipulationHelper::CreateInstance() { 14 DirectManipulationHelper::CreateInstance() {
15 std::unique_ptr<DirectManipulationHelper> instance; 15 // TODO(dtapuska): Do not create a DirectManipulationHelper on any windows
16 16 // versions as it only causes issues. High Precision Touchpad events seem to
17 if (base::win::GetVersion() >= base::win::VERSION_WIN10) 17 // always be sent to apps with recent Windows 10 versions. This class should
18 instance.reset(new DirectManipulationHelper); 18 // eventually be removed. See crbug.com/647038.
19 19 return nullptr;
20 return instance;
21 } 20 }
22 21
23 DirectManipulationHelper::DirectManipulationHelper() {} 22 DirectManipulationHelper::DirectManipulationHelper() {}
24 23
25 DirectManipulationHelper::~DirectManipulationHelper() { 24 DirectManipulationHelper::~DirectManipulationHelper() {
26 if (view_port_outer_) 25 if (view_port_outer_)
27 view_port_outer_->Abandon(); 26 view_port_outer_->Abandon();
28 } 27 }
29 28
30 void DirectManipulationHelper::Initialize(HWND window) { 29 void DirectManipulationHelper::Initialize(HWND window) {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 HRESULT hr = view_port_outer_->SetContact(DIRECTMANIPULATION_MOUSEFOCUS); 107 HRESULT hr = view_port_outer_->SetContact(DIRECTMANIPULATION_MOUSEFOCUS);
109 if (SUCCEEDED(hr)) { 108 if (SUCCEEDED(hr)) {
110 BOOL handled = FALSE; 109 BOOL handled = FALSE;
111 manager_->ProcessInput(&msg, &handled); 110 manager_->ProcessInput(&msg, &handled);
112 view_port_outer_->ReleaseContact(DIRECTMANIPULATION_MOUSEFOCUS); 111 view_port_outer_->ReleaseContact(DIRECTMANIPULATION_MOUSEFOCUS);
113 } 112 }
114 } 113 }
115 114
116 } // namespace win. 115 } // namespace win.
117 } // namespace gfx. 116 } // namespace gfx.
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698