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

Side by Side Diff: ui/events/gesture_detection/gesture_provider_config_helper.cc

Issue 1922783002: Move gfx::Display/Screen to display::Display/Screen in aura/events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
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/display/screen.h"
7 #include "ui/events/gesture_detection/gesture_configuration.h" 8 #include "ui/events/gesture_detection/gesture_configuration.h"
8 #include "ui/gfx/screen.h"
9 9
10 namespace ui { 10 namespace ui {
11 namespace { 11 namespace {
12 12
13 class GenericDesktopGestureConfiguration : public GestureConfiguration { 13 class GenericDesktopGestureConfiguration : public GestureConfiguration {
14 public: 14 public:
15 // The default GestureConfiguration parameters are already tailored for a 15 // The default GestureConfiguration parameters are already tailored for a
16 // desktop environment (Aura). 16 // desktop environment (Aura).
17 GenericDesktopGestureConfiguration() {} 17 GenericDesktopGestureConfiguration() {}
18 ~GenericDesktopGestureConfiguration() override {} 18 ~GenericDesktopGestureConfiguration() override {}
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 config = BuildGestureProviderConfig(*GestureConfiguration::GetInstance()); 82 config = BuildGestureProviderConfig(*GestureConfiguration::GetInstance());
83 break; 83 break;
84 case GestureProviderConfigType::GENERIC_DESKTOP: 84 case GestureProviderConfigType::GENERIC_DESKTOP:
85 config = BuildGestureProviderConfig(GenericDesktopGestureConfiguration()); 85 config = BuildGestureProviderConfig(GenericDesktopGestureConfiguration());
86 break; 86 break;
87 case GestureProviderConfigType::GENERIC_MOBILE: 87 case GestureProviderConfigType::GENERIC_MOBILE:
88 // The default GestureProvider::Config embeds a mobile configuration. 88 // The default GestureProvider::Config embeds a mobile configuration.
89 break; 89 break;
90 } 90 }
91 91
92 gfx::Screen* screen = gfx::Screen::GetScreen(); 92 display::Screen* screen = display::Screen::GetScreen();
93 // |screen| is sometimes NULL during tests. 93 // |screen| is sometimes NULL during tests.
94 if (screen) 94 if (screen)
95 config.display = screen->GetPrimaryDisplay(); 95 config.display = screen->GetPrimaryDisplay();
96 96
97 return config; 97 return config;
98 } 98 }
99 99
100 } // namespace ui 100 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698