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

Side by Side Diff: third_party/WebKit/Source/core/editing/PositionWithAffinity.h

Issue 1406923009: Rename DISALLOW_ALLOCATION and ALLOW_ONLY_INLINE_ALLOCATION (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 PositionWithAffinity_h 5 #ifndef PositionWithAffinity_h
6 #define PositionWithAffinity_h 6 #define PositionWithAffinity_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/editing/Position.h" 9 #include "core/editing/Position.h"
10 #include "core/editing/TextAffinity.h" 10 #include "core/editing/TextAffinity.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 template <typename Strategy> 14 template <typename Strategy>
15 class CORE_TEMPLATE_CLASS_EXPORT PositionWithAffinityTemplate { 15 class CORE_TEMPLATE_CLASS_EXPORT PositionWithAffinityTemplate {
16 DISALLOW_ALLOCATION(); 16 DISALLOW_NEW();
17 public: 17 public:
18 // TODO(yosin) We should have single parameter constructor not to use 18 // TODO(yosin) We should have single parameter constructor not to use
19 // default parameter for avoiding include "TextAffinity.h" 19 // default parameter for avoiding include "TextAffinity.h"
20 PositionWithAffinityTemplate(const PositionTemplate<Strategy>&, TextAffinity = TextAffinity::Downstream); 20 PositionWithAffinityTemplate(const PositionTemplate<Strategy>&, TextAffinity = TextAffinity::Downstream);
21 PositionWithAffinityTemplate(); 21 PositionWithAffinityTemplate();
22 ~PositionWithAffinityTemplate(); 22 ~PositionWithAffinityTemplate();
23 23
24 TextAffinity affinity() const { return m_affinity; } 24 TextAffinity affinity() const { return m_affinity; }
25 const PositionTemplate<Strategy>& position() const { return m_position; } 25 const PositionTemplate<Strategy>& position() const { return m_position; }
26 26
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 template <> 60 template <>
61 inline PositionInComposedTreeWithAffinity fromPositionInDOMTree<EditingInCompose dTreeStrategy>(const PositionWithAffinity& positionWithAffinity) 61 inline PositionInComposedTreeWithAffinity fromPositionInDOMTree<EditingInCompose dTreeStrategy>(const PositionWithAffinity& positionWithAffinity)
62 { 62 {
63 return PositionInComposedTreeWithAffinity(toPositionInComposedTree(positionW ithAffinity.position()), positionWithAffinity.affinity()); 63 return PositionInComposedTreeWithAffinity(toPositionInComposedTree(positionW ithAffinity.position()), positionWithAffinity.affinity());
64 } 64 }
65 65
66 } // namespace blink 66 } // namespace blink
67 67
68 #endif // PositionWithAffinity_h 68 #endif // PositionWithAffinity_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/Position.h ('k') | third_party/WebKit/Source/core/editing/VisiblePosition.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698