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

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: Rebase to fix collision with solid colour scrollbars patch. Created 7 years, 9 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
« no previous file with comments | « cc/pinch_zoom_scrollbar_painter.h ('k') | cc/scrollbar_layer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
15 SkCanvas*,
16 const gfx::Rect&) {
17 }
18
19 void PinchZoomScrollbarPainter::PaintTrackBackground(
20 SkCanvas*,
21 const gfx::Rect&) {
22 }
23
24 void PinchZoomScrollbarPainter::PaintBackTrackPart(
25 SkCanvas*,
26 const gfx::Rect&) {
27 }
28
29 void PinchZoomScrollbarPainter::PaintForwardTrackPart(
30 SkCanvas*,
31 const gfx::Rect&) {
32 }
33
34 void PinchZoomScrollbarPainter::PaintBackButtonStart(
35 SkCanvas*,
36 const gfx::Rect&) {
37 }
38
39 void PinchZoomScrollbarPainter::PaintBackButtonEnd(
40 SkCanvas*,
41 const gfx::Rect&) {
42 }
43
44 void PinchZoomScrollbarPainter::PaintForwardButtonStart(
45 SkCanvas*,
46 const gfx::Rect&) {
47 }
48
49 void PinchZoomScrollbarPainter::PaintForwardButtonEnd(
50 SkCanvas*,
51 const gfx::Rect&) {
52 }
53
54 void PinchZoomScrollbarPainter::PaintTickmarks(
55 SkCanvas*,
56 const gfx::Rect&) {
57 }
58
59 void PinchZoomScrollbarPainter::PaintThumb(
60 SkCanvas* canvas,
61 const gfx::Rect& thumb_rect) {
62 canvas->clear(SkColorSetARGB(0, 0, 0, 0));
63 SkPaint paint;
64
65 // TODO(wjmaclean): currently the pinch-zoom overlay scrollbars are
66 // drawn as grey, but need to check this with UX design.
67 paint.setColor(SkColorSetARGB(128, 32, 32, 32));
68 SkScalar border = 2;
69 SkScalar corner_radius = 2;
70 SkRect rect = SkRect::MakeXYWH(border, border,
71 thumb_rect.width() - 2 * border,
72 thumb_rect.height() - 2 * border);
73 canvas->drawRoundRect(rect, corner_radius, corner_radius, paint);
74 }
75
76 } // namespace cc
OLDNEW
« no previous file with comments | « cc/pinch_zoom_scrollbar_painter.h ('k') | cc/scrollbar_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698