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

Side by Side Diff: Source/core/editing/GranularityStrategy.h

Issue 1306003002: Make classes and structures in core/editing fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GranularityStrategy_h 5 #ifndef GranularityStrategy_h
6 #define GranularityStrategy_h 6 #define GranularityStrategy_h
7 7
8 #include "core/editing/SelectionStrategy.h" 8 #include "core/editing/SelectionStrategy.h"
9 #include "core/editing/VisibleSelection.h" 9 #include "core/editing/VisibleSelection.h"
10 #include "wtf/Allocator.h"
10 11
11 namespace blink { 12 namespace blink {
12 13
13 class GranularityStrategy { 14 class GranularityStrategy {
15 WTF_MAKE_FAST_ALLOCATED(GranularityStrategy);
14 public: 16 public:
15 virtual ~GranularityStrategy(); 17 virtual ~GranularityStrategy();
16 virtual SelectionStrategy GetType() const = 0; 18 virtual SelectionStrategy GetType() const = 0;
17 virtual void Clear() = 0; 19 virtual void Clear() = 0;
18 20
19 // Calculates and returns the new selection based on the updated extent 21 // Calculates and returns the new selection based on the updated extent
20 // location in absolute coordinates. 22 // location in absolute coordinates.
21 virtual VisibleSelection updateExtent(const IntPoint&, LocalFrame*) = 0; 23 virtual VisibleSelection updateExtent(const IntPoint&, LocalFrame*) = 0;
22 24
23 protected: 25 protected:
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 112
111 // This defines location of the offset-adjusted extent point (from the 113 // This defines location of the offset-adjusted extent point (from the
112 // latest updateExtent call) relative to the location of extent's 114 // latest updateExtent call) relative to the location of extent's
113 // VisiblePosition. It is used to detect sub-position extent movement. 115 // VisiblePosition. It is used to detect sub-position extent movement.
114 IntSize m_diffExtentPointFromExtentPosition; 116 IntSize m_diffExtentPointFromExtentPosition;
115 }; 117 };
116 118
117 } // namespace blink 119 } // namespace blink
118 120
119 #endif // GranularityStrategy_h 121 #endif // GranularityStrategy_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698