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