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

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

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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_configuration.h" 5 #include "ui/events/gesture_detection/gesture_configuration.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "ui/gfx/screen.h" 8 #include "ui/gfx/screen.h"
9 9
10 namespace ui { 10 namespace ui {
11 namespace { 11 namespace {
12 class GestureConfigurationDefault : public GestureConfiguration { 12 class GestureConfigurationDefault : public GestureConfiguration {
13 public: 13 public:
14 ~GestureConfigurationDefault() override { 14 ~GestureConfigurationDefault() override {
15 } 15 }
16 16
17 static GestureConfigurationDefault* GetInstance() { 17 static GestureConfigurationDefault* GetInstance() {
18 return Singleton<GestureConfigurationDefault>::get(); 18 return base::Singleton<GestureConfigurationDefault>::get();
19 } 19 }
20 20
21 private: 21 private:
22 GestureConfigurationDefault() {} 22 GestureConfigurationDefault() {}
23 23
24 friend struct DefaultSingletonTraits<GestureConfigurationDefault>; 24 friend struct base::DefaultSingletonTraits<GestureConfigurationDefault>;
25 DISALLOW_COPY_AND_ASSIGN(GestureConfigurationDefault); 25 DISALLOW_COPY_AND_ASSIGN(GestureConfigurationDefault);
26 }; 26 };
27 27
28 } // namespace 28 } // namespace
29 29
30 // Create a GestureConfiguration singleton instance when using Mac. 30 // Create a GestureConfiguration singleton instance when using Mac.
31 GestureConfiguration* GestureConfiguration::GetPlatformSpecificInstance() { 31 GestureConfiguration* GestureConfiguration::GetPlatformSpecificInstance() {
32 return GestureConfigurationDefault::GetInstance(); 32 return GestureConfigurationDefault::GetInstance();
33 } 33 }
34 34
35 } // namespace ui 35 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/gesture_configuration_aura.cc ('k') | ui/events/ozone/chromeos/cursor_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698