| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "ui/events/gesture_detection/gesture_provider_config_helper.h" | 5 #include "ui/events/gesture_detection/gesture_provider_config_helper.h" |
| 6 | 6 |
| 7 #include "ui/events/gesture_detection/gesture_configuration.h" | 7 #include "ui/events/gesture_detection/gesture_configuration.h" |
| 8 #include "ui/gfx/screen.h" | 8 #include "ui/gfx/screen.h" |
| 9 | 9 |
| 10 namespace ui { | 10 namespace ui { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 config = BuildGestureProviderConfig(*GestureConfiguration::GetInstance()); | 83 config = BuildGestureProviderConfig(*GestureConfiguration::GetInstance()); |
| 84 break; | 84 break; |
| 85 case GestureProviderConfigType::GENERIC_DESKTOP: | 85 case GestureProviderConfigType::GENERIC_DESKTOP: |
| 86 config = BuildGestureProviderConfig(GenericDesktopGestureConfiguration()); | 86 config = BuildGestureProviderConfig(GenericDesktopGestureConfiguration()); |
| 87 break; | 87 break; |
| 88 case GestureProviderConfigType::GENERIC_MOBILE: | 88 case GestureProviderConfigType::GENERIC_MOBILE: |
| 89 // The default GestureProvider::Config embeds a mobile configuration. | 89 // The default GestureProvider::Config embeds a mobile configuration. |
| 90 break; | 90 break; |
| 91 } | 91 } |
| 92 | 92 |
| 93 gfx::Screen* screen = gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE); | 93 gfx::Screen* screen = gfx::Screen::GetScreen(); |
| 94 // |screen| is sometimes NULL during tests. | 94 // |screen| is sometimes NULL during tests. |
| 95 if (screen) | 95 if (screen) |
| 96 config.display = screen->GetPrimaryDisplay(); | 96 config.display = screen->GetPrimaryDisplay(); |
| 97 | 97 |
| 98 return config; | 98 return config; |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace ui | 101 } // namespace ui |
| OLD | NEW |