OLD | NEW |
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 "win8/metro_driver/stdafx.h" | 5 #include "win8/metro_driver/stdafx.h" |
6 #include "win8/metro_driver/chrome_app_view_ash.h" | 6 #include "win8/metro_driver/chrome_app_view_ash.h" |
7 | 7 |
8 #include <corewindow.h> | 8 #include <corewindow.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #include <windows.foundation.h> | 10 #include <windows.foundation.h> |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 | 341 |
342 } // namespace | 342 } // namespace |
343 | 343 |
344 // This class helps decoding the pointer properties of an event. | 344 // This class helps decoding the pointer properties of an event. |
345 class ChromeAppViewAsh::PointerInfoHandler { | 345 class ChromeAppViewAsh::PointerInfoHandler { |
346 public: | 346 public: |
347 PointerInfoHandler(float metro_dpi_scale, float win32_dpi_scale) | 347 PointerInfoHandler(float metro_dpi_scale, float win32_dpi_scale) |
348 : x_(0), | 348 : x_(0), |
349 y_(0), | 349 y_(0), |
350 wheel_delta_(0), | 350 wheel_delta_(0), |
| 351 pointer_id_(0), |
351 update_kind_(winui::Input::PointerUpdateKind_Other), | 352 update_kind_(winui::Input::PointerUpdateKind_Other), |
352 timestamp_(0), | 353 timestamp_(0), |
353 pointer_id_(0), | |
354 mouse_down_flags_(0), | 354 mouse_down_flags_(0), |
355 is_horizontal_wheel_(0), | 355 is_horizontal_wheel_(0), |
356 metro_dpi_scale_(metro_dpi_scale), | 356 metro_dpi_scale_(metro_dpi_scale), |
357 win32_dpi_scale_(win32_dpi_scale) {} | 357 win32_dpi_scale_(win32_dpi_scale) {} |
358 | 358 |
359 HRESULT Init(winui::Core::IPointerEventArgs* args) { | 359 HRESULT Init(winui::Core::IPointerEventArgs* args) { |
360 HRESULT hr = args->get_CurrentPoint(&pointer_point_); | 360 HRESULT hr = args->get_CurrentPoint(&pointer_point_); |
361 if (FAILED(hr)) | 361 if (FAILED(hr)) |
362 return hr; | 362 return hr; |
363 | 363 |
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1460 mswr::ComPtr<winapp::Core::ICoreApplicationExit> app_exit; | 1460 mswr::ComPtr<winapp::Core::ICoreApplicationExit> app_exit; |
1461 CheckHR(core_app.As(&app_exit)); | 1461 CheckHR(core_app.As(&app_exit)); |
1462 globals.app_exit = app_exit.Detach(); | 1462 globals.app_exit = app_exit.Detach(); |
1463 } | 1463 } |
1464 | 1464 |
1465 IFACEMETHODIMP | 1465 IFACEMETHODIMP |
1466 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) { | 1466 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) { |
1467 *view = mswr::Make<ChromeAppViewAsh>().Detach(); | 1467 *view = mswr::Make<ChromeAppViewAsh>().Detach(); |
1468 return (*view) ? S_OK : E_OUTOFMEMORY; | 1468 return (*view) ? S_OK : E_OUTOFMEMORY; |
1469 } | 1469 } |
OLD | NEW |