Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ui / events / gesture_detection / gesture_configuration_default.cc
blobb279ace49c9ebeaa64736a1efdcde73c2add29b8
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
3 // found in the LICENSE file.
5 #include "ui/events/gesture_detection/gesture_configuration.h"
7 #include "base/memory/singleton.h"
8 #include "ui/gfx/screen.h"
10 namespace ui {
11 namespace {
12 class GestureConfigurationDefault : public GestureConfiguration {
13 public:
14 ~GestureConfigurationDefault() override {
17 static GestureConfigurationDefault* GetInstance() {
18 return base::Singleton<GestureConfigurationDefault>::get();
21 private:
22 GestureConfigurationDefault() {}
24 friend struct base::DefaultSingletonTraits<GestureConfigurationDefault>;
25 DISALLOW_COPY_AND_ASSIGN(GestureConfigurationDefault);
28 } // namespace
30 // Create a GestureConfiguration singleton instance when using Mac.
31 GestureConfiguration* GestureConfiguration::GetPlatformSpecificInstance() {
32 return GestureConfigurationDefault::GetInstance();
35 } // namespace ui