| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2015 Google Inc. All rights reserved. | 3 * Copyright (C) 2015 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #ifndef SelectionController_h | 27 #ifndef SelectionController_h |
| 28 #define SelectionController_h | 28 #define SelectionController_h |
| 29 | 29 |
| 30 #include "core/CoreExport.h" | 30 #include "core/CoreExport.h" |
| 31 #include "core/editing/TextGranularity.h" | 31 #include "core/editing/TextGranularity.h" |
| 32 #include "core/editing/VisibleSelection.h" |
| 32 #include "core/page/EventWithHitTestResults.h" | 33 #include "core/page/EventWithHitTestResults.h" |
| 33 #include "platform/heap/Handle.h" | 34 #include "platform/heap/Handle.h" |
| 34 | 35 |
| 35 namespace blink { | 36 namespace blink { |
| 36 | 37 |
| 37 class FrameSelection; | 38 class FrameSelection; |
| 38 class HitTestResult; | 39 class HitTestResult; |
| 39 class LocalFrame; | 40 class LocalFrame; |
| 40 class VisibleSelection; | |
| 41 | 41 |
| 42 class SelectionController final : public NoBaseWillBeGarbageCollected<SelectionC
ontroller> { | 42 class SelectionController final : public NoBaseWillBeGarbageCollected<SelectionC
ontroller> { |
| 43 WTF_MAKE_NONCOPYABLE(SelectionController); | 43 WTF_MAKE_NONCOPYABLE(SelectionController); |
| 44 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(SelectionController); | 44 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(SelectionController); |
| 45 public: | 45 public: |
| 46 static PassOwnPtrWillBeRawPtr<SelectionController> create(LocalFrame&); | 46 static PassOwnPtrWillBeRawPtr<SelectionController> create(LocalFrame&); |
| 47 DECLARE_TRACE(); | 47 DECLARE_TRACE(); |
| 48 | 48 |
| 49 bool updateSelectionForMouseDownDispatchingSelectStart(Node*, const VisibleS
election&, TextGranularity); | 49 bool updateSelectionForMouseDownDispatchingSelectStart(Node*, const VisibleS
election&, TextGranularity); |
| 50 void handleMousePressEvent(const MouseEventWithHitTestResults&); | 50 void handleMousePressEvent(const MouseEventWithHitTestResults&); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 RawPtrWillBeMember<LocalFrame> const m_frame; | 88 RawPtrWillBeMember<LocalFrame> const m_frame; |
| 89 bool m_mouseDownMayStartSelect; | 89 bool m_mouseDownMayStartSelect; |
| 90 bool m_mouseDownWasSingleClickInSelection; | 90 bool m_mouseDownWasSingleClickInSelection; |
| 91 enum class SelectionState { HaveNotStartedSelection, PlacedCaret, ExtendedSe
lection }; | 91 enum class SelectionState { HaveNotStartedSelection, PlacedCaret, ExtendedSe
lection }; |
| 92 SelectionState m_selectionState; | 92 SelectionState m_selectionState; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace blink | 95 } // namespace blink |
| 96 #endif // SelectionController_h | 96 #endif // SelectionController_h |
| OLD | NEW |