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