| OLD | NEW |
| 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 scoped_ptr<DirectManipulationHelper> | 13 std::unique_ptr<DirectManipulationHelper> |
| 14 DirectManipulationHelper::CreateInstance() { | 14 DirectManipulationHelper::CreateInstance() { |
| 15 scoped_ptr<DirectManipulationHelper> instance; | 15 std::unique_ptr<DirectManipulationHelper> instance; |
| 16 | 16 |
| 17 if (base::win::GetVersion() >= base::win::VERSION_WIN10) | 17 if (base::win::GetVersion() >= base::win::VERSION_WIN10) |
| 18 instance.reset(new DirectManipulationHelper); | 18 instance.reset(new DirectManipulationHelper); |
| 19 | 19 |
| 20 return instance; | 20 return instance; |
| 21 } | 21 } |
| 22 | 22 |
| 23 DirectManipulationHelper::DirectManipulationHelper() {} | 23 DirectManipulationHelper::DirectManipulationHelper() {} |
| 24 | 24 |
| 25 DirectManipulationHelper::~DirectManipulationHelper() {} | 25 DirectManipulationHelper::~DirectManipulationHelper() {} |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 HRESULT hr = view_port_outer_->SetContact(DIRECTMANIPULATION_MOUSEFOCUS); | 105 HRESULT hr = view_port_outer_->SetContact(DIRECTMANIPULATION_MOUSEFOCUS); |
| 106 if (SUCCEEDED(hr)) { | 106 if (SUCCEEDED(hr)) { |
| 107 BOOL handled = FALSE; | 107 BOOL handled = FALSE; |
| 108 manager_->ProcessInput(&msg, &handled); | 108 manager_->ProcessInput(&msg, &handled); |
| 109 view_port_outer_->ReleaseContact(DIRECTMANIPULATION_MOUSEFOCUS); | 109 view_port_outer_->ReleaseContact(DIRECTMANIPULATION_MOUSEFOCUS); |
| 110 } | 110 } |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace win. | 113 } // namespace win. |
| 114 } // namespace gfx. | 114 } // namespace gfx. |
| OLD | NEW |