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

Side by Side Diff: chrome/browser/chromeos/ui/accessibility_cursor_ring_layer.cc

Issue 1920263003: Rename gfx::Display/Screen to display::Display/Screen in chrome (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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/chromeos/ui/accessibility_cursor_ring_layer.h" 5 #include "chrome/browser/chromeos/ui/accessibility_cursor_ring_layer.h"
6 6
7 #include "ash/display/window_tree_host_manager.h" 7 #include "ash/display/window_tree_host_manager.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "third_party/skia/include/core/SkPaint.h" 10 #include "third_party/skia/include/core/SkPaint.h"
(...skipping 27 matching lines...) Expand all
38 38
39 AccessibilityCursorRingLayer::~AccessibilityCursorRingLayer() {} 39 AccessibilityCursorRingLayer::~AccessibilityCursorRingLayer() {}
40 40
41 void AccessibilityCursorRingLayer::Set(const gfx::Point& location) { 41 void AccessibilityCursorRingLayer::Set(const gfx::Point& location) {
42 location_ = location; 42 location_ = location;
43 43
44 gfx::Rect bounds = gfx::Rect(location.x(), location.y(), 0, 0); 44 gfx::Rect bounds = gfx::Rect(location.x(), location.y(), 0, 0);
45 int inset = kGradientWidth + kCursorRingRadius + kLayerMargin; 45 int inset = kGradientWidth + kCursorRingRadius + kLayerMargin;
46 bounds.Inset(-inset, -inset, -inset, -inset); 46 bounds.Inset(-inset, -inset, -inset, -inset);
47 47
48 gfx::Display display = gfx::Screen::GetScreen()->GetDisplayMatching(bounds); 48 display::Display display =
49 display::Screen::GetScreen()->GetDisplayMatching(bounds);
49 aura::Window* root_window = ash::Shell::GetInstance() 50 aura::Window* root_window = ash::Shell::GetInstance()
50 ->window_tree_host_manager() 51 ->window_tree_host_manager()
51 ->GetRootWindowForDisplayId(display.id()); 52 ->GetRootWindowForDisplayId(display.id());
52 CreateOrUpdateLayer(root_window, "AccessibilityCursorRing"); 53 CreateOrUpdateLayer(root_window, "AccessibilityCursorRing");
53 54
54 // Update the layer bounds. 55 // Update the layer bounds.
55 layer()->SetBounds(bounds); 56 layer()->SetBounds(bounds);
56 } 57 }
57 58
58 void AccessibilityCursorRingLayer::SetOpacity(float opacity) { 59 void AccessibilityCursorRingLayer::SetOpacity(float opacity) {
(...skipping 17 matching lines...) Expand all
76 paint.setColor( 77 paint.setColor(
77 SkColorSetARGBMacro(255 * (i) * (i) / (w * w), red_, green_, blue_)); 78 SkColorSetARGBMacro(255 * (i) * (i) / (w * w), red_, green_, blue_));
78 SkPath path; 79 SkPath path;
79 path.addOval(SkRect::MakeXYWH(r.x(), r.y(), r.width(), r.height())); 80 path.addOval(SkRect::MakeXYWH(r.x(), r.y(), r.width(), r.height()));
80 r.Inset(1, 1, 1, 1); 81 r.Inset(1, 1, 1, 1);
81 recorder.canvas()->DrawPath(path, paint); 82 recorder.canvas()->DrawPath(path, paint);
82 } 83 }
83 } 84 }
84 85
85 } // namespace chromeos 86 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698