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

Side by Side Diff: cc/pinch_zoom_scrollbar_painter.cc

Issue 11550035: Implement pinch-zoom scaling for main-frame scrollbars and pinch-zoom overlay scrollbars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revised architecture - complete cl for comments on approach. Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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 "cc/pinch_zoom_scrollbar_painter.h"
6
7 #include "third_party/skia/include/core/SkCanvas.h"
8 #include "ui/gfx/rect.h"
9
10 namespace cc {
11
12 PinchZoomScrollbarPainter::~PinchZoomScrollbarPainter() {}
13
14 void PinchZoomScrollbarPainter::PaintScrollbarBackground(SkCanvas*, const gfx::R ect&) {
15 }
16
17 void PinchZoomScrollbarPainter::PaintTrackBackground(SkCanvas*, const gfx::Rect& ) {
18 }
19
20 void PinchZoomScrollbarPainter::PaintBackTrackPart(SkCanvas*, const gfx::Rect&) {
21 }
22
23 void PinchZoomScrollbarPainter::PaintForwardTrackPart(SkCanvas*, const gfx::Rect &) {
24 }
25
26 void PinchZoomScrollbarPainter::PaintBackButtonStart(SkCanvas*, const gfx::Rect& ) {
27 }
28
29 void PinchZoomScrollbarPainter::PaintBackButtonEnd(SkCanvas*, const gfx::Rect&) {
30 }
31
32 void PinchZoomScrollbarPainter::PaintForwardButtonStart(SkCanvas*, const gfx::Re ct&) {
33 }
34
35 void PinchZoomScrollbarPainter::PaintForwardButtonEnd(SkCanvas*, const gfx::Rect &) {
36 }
37
38 void PinchZoomScrollbarPainter::PaintTickmarks(SkCanvas*, const gfx::Rect&) {
39 }
40
41 void PinchZoomScrollbarPainter::PaintThumb(SkCanvas* canvas,
42 const gfx::Rect& thumb_rect) {
43 canvas->clear(SkColorSetARGB(0, 0, 0, 0));
44 SkPaint paint;
45 // Below 255 refers to blue, not red, but we do this to avoid an
46 // explicit swizzle.
47 paint.setColor(SkColorSetARGB(128, 255, 0, 0));
48 SkScalar border = 2;
49 SkScalar corner_radius = 2;
50 SkRect rect = SkRect::MakeXYWH(border, border,
51 thumb_rect.width() - 2 * border,
52 thumb_rect.height() - 2 * border);
53 canvas->drawRoundRect(rect, corner_radius, corner_radius, paint);
54 }
55
56 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698