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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/pinch_zoom_scrollbar_painter.h ('k') | cc/scrollbar_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/pinch_zoom_scrollbar_painter.cc
diff --git a/cc/pinch_zoom_scrollbar_painter.cc b/cc/pinch_zoom_scrollbar_painter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..fdab03824320a63c3dd20f78c3835826c4f0ac9d
--- /dev/null
+++ b/cc/pinch_zoom_scrollbar_painter.cc
@@ -0,0 +1,76 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/pinch_zoom_scrollbar_painter.h"
+
+#include "third_party/skia/include/core/SkCanvas.h"
+#include "ui/gfx/rect.h"
+
+namespace cc {
+
+PinchZoomScrollbarPainter::~PinchZoomScrollbarPainter() {}
+
+void PinchZoomScrollbarPainter::PaintScrollbarBackground(
+ SkCanvas*,
+ const gfx::Rect&) {
+}
+
+void PinchZoomScrollbarPainter::PaintTrackBackground(
+ SkCanvas*,
+ const gfx::Rect&) {
+}
+
+void PinchZoomScrollbarPainter::PaintBackTrackPart(
+ SkCanvas*,
+ const gfx::Rect&) {
+}
+
+void PinchZoomScrollbarPainter::PaintForwardTrackPart(
+ SkCanvas*,
+ const gfx::Rect&) {
+}
+
+void PinchZoomScrollbarPainter::PaintBackButtonStart(
+ SkCanvas*,
+ const gfx::Rect&) {
+}
+
+void PinchZoomScrollbarPainter::PaintBackButtonEnd(
+ SkCanvas*,
+ const gfx::Rect&) {
+}
+
+void PinchZoomScrollbarPainter::PaintForwardButtonStart(
+ SkCanvas*,
+ const gfx::Rect&) {
+}
+
+void PinchZoomScrollbarPainter::PaintForwardButtonEnd(
+ SkCanvas*,
+ const gfx::Rect&) {
+}
+
+void PinchZoomScrollbarPainter::PaintTickmarks(
+ SkCanvas*,
+ const gfx::Rect&) {
+}
+
+void PinchZoomScrollbarPainter::PaintThumb(
+ SkCanvas* canvas,
+ const gfx::Rect& thumb_rect) {
+ canvas->clear(SkColorSetARGB(0, 0, 0, 0));
+ SkPaint paint;
+
+ // TODO(wjmaclean): currently the pinch-zoom overlay scrollbars are
+ // drawn as grey, but need to check this with UX design.
+ paint.setColor(SkColorSetARGB(128, 32, 32, 32));
+ SkScalar border = 2;
+ SkScalar corner_radius = 2;
+ SkRect rect = SkRect::MakeXYWH(border, border,
+ thumb_rect.width() - 2 * border,
+ thumb_rect.height() - 2 * border);
+ canvas->drawRoundRect(rect, corner_radius, corner_radius, paint);
+}
+
+} // namespace cc
« 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