| OLD | NEW |
| 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/dom/Position.h" | 8 #include "core/dom/Position.h" |
| 9 #include "core/editing/TextAffinity.h" | 9 #include "core/editing/TextAffinity.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class PositionWithAffinity { | 13 class PositionWithAffinity { |
| 14 DISALLOW_ALLOCATION(); | 14 DISALLOW_ALLOCATION(); |
| 15 public: | 15 public: |
| 16 PositionWithAffinity(const Position&, EAffinity = DOWNSTREAM); | 16 PositionWithAffinity(const Position&, EAffinity = DOWNSTREAM); |
| 17 PositionWithAffinity(); | 17 PositionWithAffinity(); |
| 18 ~PositionWithAffinity(); | 18 ~PositionWithAffinity(); |
| 19 | 19 |
| 20 EAffinity affinity() const { return m_affinity; } | 20 EAffinity affinity() const { return m_affinity; } |
| 21 const Position& position() const { return m_position; } | 21 const Position& position() const { return m_position; } |
| 22 | 22 |
| 23 void trace(Visitor*); | |
| 24 | |
| 25 private: | 23 private: |
| 26 Position m_position; | 24 Position m_position; |
| 27 EAffinity m_affinity; | 25 EAffinity m_affinity; |
| 28 }; | 26 }; |
| 29 | 27 |
| 30 } // namespace blink | 28 } // namespace blink |
| 31 | 29 |
| 32 #endif // PositionWithAffinity_h | 30 #endif // PositionWithAffinity_h |
| OLD | NEW |