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

Side by Side Diff: ui/events/ozone/chromeos/cursor_controller.h

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 #ifndef UI_EVENTS_OZONE_CHROMEOS_CURSOR_CONTROLLER_H_ 5 #ifndef UI_EVENTS_OZONE_CHROMEOS_CURSOR_CONTROLLER_H_
6 #define UI_EVENTS_OZONE_CHROMEOS_CURSOR_CONTROLLER_H_ 6 #define UI_EVENTS_OZONE_CHROMEOS_CURSOR_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/event_types.h" 10 #include "base/event_types.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // then we set (dx, dy) = (-6, 4) 54 // then we set (dx, dy) = (-6, 4)
55 // 55 //
56 // Since scale generally includes DSF, you can think of the input 56 // Since scale generally includes DSF, you can think of the input
57 // vector unit as DIP and the output vector unit as pixels. 57 // vector unit as DIP and the output vector unit as pixels.
58 void ApplyCursorConfigForWindow(gfx::AcceleratedWidget widget, 58 void ApplyCursorConfigForWindow(gfx::AcceleratedWidget widget,
59 gfx::Vector2dF* delta) const; 59 gfx::Vector2dF* delta) const;
60 60
61 private: 61 private:
62 CursorController(); 62 CursorController();
63 ~CursorController(); 63 ~CursorController();
64 friend struct DefaultSingletonTraits<CursorController>; 64 friend struct base::DefaultSingletonTraits<CursorController>;
65 65
66 struct PerWindowCursorConfiguration { 66 struct PerWindowCursorConfiguration {
67 gfx::Display::Rotation rotation; 67 gfx::Display::Rotation rotation;
68 float scale; 68 float scale;
69 }; 69 };
70 70
71 typedef std::map<gfx::AcceleratedWidget, PerWindowCursorConfiguration> 71 typedef std::map<gfx::AcceleratedWidget, PerWindowCursorConfiguration>
72 WindowToCursorConfigurationMap; 72 WindowToCursorConfigurationMap;
73 73
74 WindowToCursorConfigurationMap window_to_cursor_configuration_map_; 74 WindowToCursorConfigurationMap window_to_cursor_configuration_map_;
75 mutable base::Lock window_to_cursor_configuration_map_lock_; 75 mutable base::Lock window_to_cursor_configuration_map_lock_;
76 76
77 DISALLOW_COPY_AND_ASSIGN(CursorController); 77 DISALLOW_COPY_AND_ASSIGN(CursorController);
78 }; 78 };
79 79
80 } // namespace ui 80 } // namespace ui
81 81
82 #endif // UI_EVENTS_OZONE_CHROMEOS_CURSOR_CONTROLLER_H_ 82 #endif // UI_EVENTS_OZONE_CHROMEOS_CURSOR_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/gesture_configuration_default.cc ('k') | ui/events/ozone/chromeos/cursor_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698