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

Side by Side Diff: ui/events/ozone/chromeos/cursor_controller.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
« no previous file with comments | « ui/events/ozone/chromeos/cursor_controller.h ('k') | ui/events/x/events_x.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/ozone/chromeos/cursor_controller.h" 5 #include "ui/events/ozone/chromeos/cursor_controller.h"
6 6
7 namespace ui { 7 namespace ui {
8 8
9 namespace { 9 namespace {
10 10
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 35
36 delta->set_x(dx * scale); 36 delta->set_x(dx * scale);
37 delta->set_y(dy * scale); 37 delta->set_y(dy * scale);
38 } 38 }
39 39
40 } // namespace 40 } // namespace
41 41
42 // static 42 // static
43 CursorController* CursorController::GetInstance() { 43 CursorController* CursorController::GetInstance() {
44 return Singleton<CursorController>::get(); 44 return base::Singleton<CursorController>::get();
45 } 45 }
46 46
47 void CursorController::SetCursorConfigForWindow(gfx::AcceleratedWidget widget, 47 void CursorController::SetCursorConfigForWindow(gfx::AcceleratedWidget widget,
48 gfx::Display::Rotation rotation, 48 gfx::Display::Rotation rotation,
49 float scale) { 49 float scale) {
50 base::AutoLock lock(window_to_cursor_configuration_map_lock_); 50 base::AutoLock lock(window_to_cursor_configuration_map_lock_);
51 PerWindowCursorConfiguration config = {rotation, scale}; 51 PerWindowCursorConfiguration config = {rotation, scale};
52 window_to_cursor_configuration_map_[widget] = config; 52 window_to_cursor_configuration_map_[widget] = config;
53 } 53 }
54 54
(...skipping 10 matching lines...) Expand all
65 TransformCursorMove(it->second.rotation, it->second.scale, delta); 65 TransformCursorMove(it->second.rotation, it->second.scale, delta);
66 } 66 }
67 67
68 CursorController::CursorController() { 68 CursorController::CursorController() {
69 } 69 }
70 70
71 CursorController::~CursorController() { 71 CursorController::~CursorController() {
72 } 72 }
73 73
74 } // namespace ui 74 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/chromeos/cursor_controller.h ('k') | ui/events/x/events_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698