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

Side by Side Diff: ash/magnifier/magnified_cursor.cc

Issue 10388141: Full-screen Magnifier: Support warping the cursor on the edge (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ash/magnifier/magnified_cursor.h"
6
7 #include "ui/aura/root_window.h"
8 #include "ui/base/resource/resource_bundle.h"
9 #include "third_party/skia/include/core/SkBitmap.h"
10 #include "grit/ui_resources.h"
11
12 namespace ash {
13 namespace internal {
14
15 MagnifiedCursor::MagnifiedCursor(aura::RootWindow* root_window)
16 : root_window_(root_window) {
17 layer_.reset(new ui::Layer(ui::LAYER_TEXTURED));
18 layer_->set_delegate(this);
19 layer_->SetVisible(false);
20 }
21
22 void MagnifiedCursor::SetVisible(bool show) {
23 layer_->SetVisible(show);
24 }
25
26 void MagnifiedCursor::MovePointer(gfx::Point position) {
27 gfx::Rect rect(position.x() - 5, position.y() -5 , 10, 10);
28 layer_->SetBounds(rect);
29 }
30
31 // ui::LayerDelegate implementation:
32 void MagnifiedCursor::OnPaintLayer(gfx::Canvas* canvas) {
33 // TODO(yoshiki): Draw a magnified cursor.
34 }
35
36 }
37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698