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

Side by Side Diff: chrome/browser/chromeos/ui/accessibility_focus_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 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 "chrome/browser/chromeos/ui/accessibility_focus_ring_layer.h" 5 #include "chrome/browser/chromeos/ui/accessibility_focus_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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 AccessibilityFocusRingLayer::~AccessibilityFocusRingLayer() {} 96 AccessibilityFocusRingLayer::~AccessibilityFocusRingLayer() {}
97 97
98 void AccessibilityFocusRingLayer::Set(const AccessibilityFocusRing& ring) { 98 void AccessibilityFocusRingLayer::Set(const AccessibilityFocusRing& ring) {
99 ring_ = ring; 99 ring_ = ring;
100 100
101 gfx::Rect bounds = ring.GetBounds(); 101 gfx::Rect bounds = ring.GetBounds();
102 int inset = kGradientWidth; 102 int inset = kGradientWidth;
103 bounds.Inset(-inset, -inset, -inset, -inset); 103 bounds.Inset(-inset, -inset, -inset, -inset);
104 104
105 gfx::Display display = gfx::Screen::GetScreen()->GetDisplayMatching(bounds); 105 display::Display display =
106 display::Screen::GetScreen()->GetDisplayMatching(bounds);
106 aura::Window* root_window = ash::Shell::GetInstance() 107 aura::Window* root_window = ash::Shell::GetInstance()
107 ->window_tree_host_manager() 108 ->window_tree_host_manager()
108 ->GetRootWindowForDisplayId(display.id()); 109 ->GetRootWindowForDisplayId(display.id());
109 CreateOrUpdateLayer(root_window, "AccessibilityFocusRing"); 110 CreateOrUpdateLayer(root_window, "AccessibilityFocusRing");
110 111
111 // Update the layer bounds. 112 // Update the layer bounds.
112 layer()->SetBounds(bounds); 113 layer()->SetBounds(bounds);
113 } 114 }
114 115
115 void AccessibilityFocusRingLayer::OnPaintLayer( 116 void AccessibilityFocusRingLayer::OnPaintLayer(
(...skipping 12 matching lines...) Expand all
128 paint.setColor( 129 paint.setColor(
129 SkColorSetARGBMacro( 130 SkColorSetARGBMacro(
130 255 * (w - i) * (w - i) / (w * w), 131 255 * (w - i) * (w - i) / (w * w),
131 kFocusRingColorRed, kFocusRingColorGreen, kFocusRingColorBlue)); 132 kFocusRingColorRed, kFocusRingColorGreen, kFocusRingColorBlue));
132 path = MakePath(ring_, i, offset); 133 path = MakePath(ring_, i, offset);
133 recorder.canvas()->DrawPath(path, paint); 134 recorder.canvas()->DrawPath(path, paint);
134 } 135 }
135 } 136 }
136 137
137 } // namespace chromeos 138 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/ui/accessibility_focus_ring_controller.cc ('k') | chrome/browser/download/drag_download_item_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698