| 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/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/win/windows_version.h" | 8 #include "base/win/windows_version.h" |
| 9 | 9 |
| 10 namespace gfx { | 10 namespace gfx { |
| 11 namespace win { | 11 namespace win { |
| 12 | 12 |
| 13 // static | 13 // static |
| 14 scoped_ptr<DirectManipulationHelper> | 14 scoped_ptr<DirectManipulationHelper> |
| 15 DirectManipulationHelper::CreateInstance() { | 15 DirectManipulationHelper::CreateInstance() { |
| 16 scoped_ptr<DirectManipulationHelper> instance; | 16 scoped_ptr<DirectManipulationHelper> instance; |
| 17 | 17 |
| 18 if (base::win::GetVersion() >= base::win::VERSION_WIN10) | 18 if (base::win::GetVersion() >= base::win::VERSION_WIN10) |
| 19 instance.reset(new DirectManipulationHelper); | 19 instance.reset(new DirectManipulationHelper); |
| 20 | 20 |
| 21 return std::move(instance); | 21 return instance; |
| 22 } | 22 } |
| 23 | 23 |
| 24 DirectManipulationHelper::DirectManipulationHelper() {} | 24 DirectManipulationHelper::DirectManipulationHelper() {} |
| 25 | 25 |
| 26 DirectManipulationHelper::~DirectManipulationHelper() {} | 26 DirectManipulationHelper::~DirectManipulationHelper() {} |
| 27 | 27 |
| 28 void DirectManipulationHelper::Initialize(HWND window) { | 28 void DirectManipulationHelper::Initialize(HWND window) { |
| 29 DCHECK(::IsWindow(window)); | 29 DCHECK(::IsWindow(window)); |
| 30 | 30 |
| 31 // TODO(ananta) | 31 // TODO(ananta) |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 HRESULT hr = view_port_outer_->SetContact(DIRECTMANIPULATION_MOUSEFOCUS); | 106 HRESULT hr = view_port_outer_->SetContact(DIRECTMANIPULATION_MOUSEFOCUS); |
| 107 if (SUCCEEDED(hr)) { | 107 if (SUCCEEDED(hr)) { |
| 108 BOOL handled = FALSE; | 108 BOOL handled = FALSE; |
| 109 manager_->ProcessInput(&msg, &handled); | 109 manager_->ProcessInput(&msg, &handled); |
| 110 view_port_outer_->ReleaseContact(DIRECTMANIPULATION_MOUSEFOCUS); | 110 view_port_outer_->ReleaseContact(DIRECTMANIPULATION_MOUSEFOCUS); |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 | 113 |
| 114 } // namespace win. | 114 } // namespace win. |
| 115 } // namespace gfx. | 115 } // namespace gfx. |
| OLD | NEW |