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

Unified Diff: cc/input/viewport_scrollbar.h

Issue 16679011: Add viewport scrollbar class to support overlay scrollbars for pinch zoom virtual viewport. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
Index: cc/input/viewport_scrollbar.h
diff --git a/cc/test/fake_scrollbar.h b/cc/input/viewport_scrollbar.h
similarity index 51%
copy from cc/test/fake_scrollbar.h
copy to cc/input/viewport_scrollbar.h
index b9ac40931a33b2b07db6adfa257a4ba1de5f218f..4781fbe9bd41ce8abde1906cfdac73cfeb21fa6f 100644
--- a/cc/test/fake_scrollbar.h
+++ b/cc/input/viewport_scrollbar.h
@@ -1,23 +1,27 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
+// 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.
-#ifndef CC_TEST_FAKE_SCROLLBAR_H_
-#define CC_TEST_FAKE_SCROLLBAR_H_
+#ifndef CC_INPUT_VIEWPORT_SCROLLBAR_H_
+#define CC_INPUT_VIEWPORT_SCROLLBAR_H_
-#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
+#include "cc/base/cc_export.h"
#include "cc/input/scrollbar.h"
-#include "third_party/skia/include/core/SkColor.h"
+#include "ui/gfx/point.h"
+#include "ui/gfx/rect.h"
namespace cc {
-class FakeScrollbar : public Scrollbar {
+class Layer;
+
+class CC_EXPORT ViewportScrollbar : public Scrollbar {
public:
- FakeScrollbar();
- FakeScrollbar(bool paint, bool has_thumb, bool is_overlay);
- virtual ~FakeScrollbar();
+ ViewportScrollbar(scoped_refptr<Layer> scroll_layer,
+ ScrollbarOrientation orientation,
+ size_t thickness);
+ virtual ~ViewportScrollbar();
- // Scrollbar implementation.
virtual ScrollbarOrientation Orientation() const OVERRIDE;
virtual gfx::Point Location() const OVERRIDE;
virtual bool IsOverlay() const OVERRIDE;
@@ -29,18 +33,12 @@ class FakeScrollbar : public Scrollbar {
ScrollbarPart part,
gfx::Rect content_rect) OVERRIDE;
- void set_location(gfx::Point location) { location_ = location; }
-
private:
- bool paint_;
- bool has_thumb_;
- bool is_overlay_;
- gfx::Point location_;
- SkColor fill_color_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeScrollbar);
+ scoped_refptr<Layer> scroll_layer_;
+ ScrollbarOrientation orientation_;
+ const size_t thickness_;
};
} // namespace cc
-#endif // CC_TEST_FAKE_SCROLLBAR_H_
+#endif // CC_INPUT_VIEWPORT_SCROLLBAR_H_
« no previous file with comments | « cc/cc.gyp ('k') | cc/input/viewport_scrollbar.cc » ('j') | cc/input/viewport_scrollbar.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698