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

Side by Side Diff: public/platform/WebLayerTreeView.h

Issue 929213004: Plumb selection bounds as a single unit (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix copyright Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 13 matching lines...) Expand all
24 */ 24 */
25 25
26 #ifndef WebLayerTreeView_h 26 #ifndef WebLayerTreeView_h
27 #define WebLayerTreeView_h 27 #define WebLayerTreeView_h
28 28
29 #include "WebColor.h" 29 #include "WebColor.h"
30 #include "WebCommon.h" 30 #include "WebCommon.h"
31 #include "WebFloatPoint.h" 31 #include "WebFloatPoint.h"
32 #include "WebNonCopyable.h" 32 #include "WebNonCopyable.h"
33 #include "WebPrivateOwnPtr.h" 33 #include "WebPrivateOwnPtr.h"
34 #include "WebSelectionBounds.h"
34 #include "WebSize.h" 35 #include "WebSize.h"
35 #include "WebTopControlsState.h" 36 #include "WebTopControlsState.h"
36 37
37 class SkBitmap; 38 class SkBitmap;
38 39
39 namespace blink { 40 namespace blink {
40 41
41 class WebCompositeAndReadbackAsyncCallback; 42 class WebCompositeAndReadbackAsyncCallback;
42 class WebLayer; 43 class WebLayer;
43 struct WebPoint; 44 struct WebPoint;
44 struct WebSelectionBound;
45 class WebWidget; 45 class WebWidget;
46 46
47 class WebLayerTreeView { 47 class WebLayerTreeView {
48 public: 48 public:
49 virtual ~WebLayerTreeView() { } 49 virtual ~WebLayerTreeView() { }
50 50
51 // Initialization and lifecycle -------------------------------------- 51 // Initialization and lifecycle --------------------------------------
52 52
53 // Sets the root of the tree. The root is set by way of the constructor. 53 // Sets the root of the tree. The root is set by way of the constructor.
54 virtual void setRootLayer(const WebLayer&) = 0; 54 virtual void setRootLayer(const WebLayer&) = 0;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 const WebLayer* overscrollElasticityLayer, 126 const WebLayer* overscrollElasticityLayer,
127 const WebLayer* pageScaleLayer, 127 const WebLayer* pageScaleLayer,
128 const WebLayer* innerViewportScrollLayer, 128 const WebLayer* innerViewportScrollLayer,
129 const WebLayer* outerViewportScrollLayer) { } 129 const WebLayer* outerViewportScrollLayer) { }
130 virtual void clearViewportLayers() { } 130 virtual void clearViewportLayers() { }
131 131
132 // Used to update the active selection bounds. 132 // Used to update the active selection bounds.
133 // If the (empty) selection is an insertion point, |start| and |end| will be identical with type |Caret|. 133 // If the (empty) selection is an insertion point, |start| and |end| will be identical with type |Caret|.
134 // If the (non-empty) selection has mixed RTL/LTR text, |start| and |end| ma y share the same type, 134 // If the (non-empty) selection has mixed RTL/LTR text, |start| and |end| ma y share the same type,
135 // |SelectionLeft| or |SelectionRight|. 135 // |SelectionLeft| or |SelectionRight|.
136 // FIXME: Remove this overload when downstream consumers have been updated t o use WebSelectionBounds, crbug.com/466672.
136 virtual void registerSelection(const WebSelectionBound& start, const WebSele ctionBound& end) { } 137 virtual void registerSelection(const WebSelectionBound& start, const WebSele ctionBound& end) { }
138 virtual void registerSelection(const WebSelectionBounds& bounds) { registerS election(bounds.start, bounds.end); }
137 virtual void clearSelection() { } 139 virtual void clearSelection() { }
138 140
139 // Debugging / dangerous --------------------------------------------- 141 // Debugging / dangerous ---------------------------------------------
140 142
141 // Toggles the FPS counter in the HUD layer 143 // Toggles the FPS counter in the HUD layer
142 virtual void setShowFPSCounter(bool) { } 144 virtual void setShowFPSCounter(bool) { }
143 145
144 // Toggles the paint rects in the HUD layer 146 // Toggles the paint rects in the HUD layer
145 virtual void setShowPaintRects(bool) { } 147 virtual void setShowPaintRects(bool) { }
146 148
147 // Toggles the debug borders on layers 149 // Toggles the debug borders on layers
148 virtual void setShowDebugBorders(bool) { } 150 virtual void setShowDebugBorders(bool) { }
149 151
150 // Toggles continuous painting 152 // Toggles continuous painting
151 virtual void setContinuousPaintingEnabled(bool) { } 153 virtual void setContinuousPaintingEnabled(bool) { }
152 154
153 // Toggles scroll bottleneck rects on the HUD layer 155 // Toggles scroll bottleneck rects on the HUD layer
154 virtual void setShowScrollBottleneckRects(bool) { } 156 virtual void setShowScrollBottleneckRects(bool) { }
155 }; 157 };
156 158
157 } // namespace blink 159 } // namespace blink
158 160
159 #endif // WebLayerTreeView_h 161 #endif // WebLayerTreeView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698