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

Unified Diff: cc/scrollbar_layer.h

Issue 12603013: Part 10 of cc/ directory shuffles: layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/scrollbar_geometry_stub.cc ('k') | cc/scrollbar_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scrollbar_layer.h
diff --git a/cc/scrollbar_layer.h b/cc/scrollbar_layer.h
deleted file mode 100644
index e12873c60900568b924c0204a5560cb6a24cf79a..0000000000000000000000000000000000000000
--- a/cc/scrollbar_layer.h
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2012 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_SCROLLBAR_LAYER_H_
-#define CC_SCROLLBAR_LAYER_H_
-
-#include "cc/base/cc_export.h"
-#include "cc/contents_scaling_layer.h"
-#include "cc/resources/layer_updater.h"
-#include "cc/scrollbar_theme_painter.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbar.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbarThemeGeometry.h"
-
-namespace cc {
-class CachingBitmapContentLayerUpdater;
-class ResourceUpdateQueue;
-class Scrollbar;
-class ScrollbarThemeComposite;
-
-class CC_EXPORT ScrollbarLayer : public ContentsScalingLayer {
- public:
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- OVERRIDE;
-
- static scoped_refptr<ScrollbarLayer> Create(
- scoped_ptr<WebKit::WebScrollbar>,
- scoped_ptr<ScrollbarThemePainter>,
- scoped_ptr<WebKit::WebScrollbarThemeGeometry>,
- int scrollLayerId);
-
- int scroll_layer_id() const { return scroll_layer_id_; }
- void SetScrollLayerId(int id);
-
- virtual bool OpacityCanAnimateOnImplThread() const OVERRIDE;
-
- WebKit::WebScrollbar::Orientation Orientation() const;
-
- // Layer interface
- virtual void SetTexturePriorities(const PriorityCalculator& priority_calc)
- OVERRIDE;
- virtual void Update(ResourceUpdateQueue* queue,
- const OcclusionTracker* occlusion,
- RenderingStats* stats) OVERRIDE;
- virtual void SetLayerTreeHost(LayerTreeHost* host) OVERRIDE;
- virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
- virtual void CalculateContentsScale(float ideal_contents_scale,
- bool animating_transform_to_screen,
- float* contents_scale_x,
- float* contents_scale_y,
- gfx::Size* contentBounds) OVERRIDE;
-
- virtual ScrollbarLayer* ToScrollbarLayer() OVERRIDE;
-
- protected:
- ScrollbarLayer(
- scoped_ptr<WebKit::WebScrollbar>,
- scoped_ptr<ScrollbarThemePainter>,
- scoped_ptr<WebKit::WebScrollbarThemeGeometry>,
- int scrollLayerId);
- virtual ~ScrollbarLayer();
-
- private:
- void UpdatePart(CachingBitmapContentLayerUpdater* painter,
- LayerUpdater::Resource* resource,
- gfx::Rect rect,
- ResourceUpdateQueue* queue,
- RenderingStats* stats);
- void CreateUpdaterIfNeeded();
- gfx::Rect ScrollbarLayerRectToContentRect(gfx::Rect layer_rect) const;
-
- bool is_dirty() const { return !dirty_rect_.IsEmpty(); }
-
- int MaxTextureSize();
- float ClampScaleToMaxTextureSize(float scale);
-
- scoped_ptr<WebKit::WebScrollbar> scrollbar_;
- scoped_ptr<ScrollbarThemePainter> painter_;
- scoped_ptr<WebKit::WebScrollbarThemeGeometry> geometry_;
- gfx::Size thumb_size_;
- int scroll_layer_id_;
-
- unsigned texture_format_;
-
- gfx::RectF dirty_rect_;
-
- scoped_refptr<CachingBitmapContentLayerUpdater> back_track_updater_;
- scoped_refptr<CachingBitmapContentLayerUpdater> fore_track_updater_;
- scoped_refptr<CachingBitmapContentLayerUpdater> thumb_updater_;
-
- // All the parts of the scrollbar except the thumb
- scoped_ptr<LayerUpdater::Resource> back_track_;
- scoped_ptr<LayerUpdater::Resource> fore_track_;
- scoped_ptr<LayerUpdater::Resource> thumb_;
-};
-
-} // namespace cc
-
-#endif // CC_SCROLLBAR_LAYER_H_
« no previous file with comments | « cc/scrollbar_geometry_stub.cc ('k') | cc/scrollbar_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698