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

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

Issue 1528153004: Look Up on Force Touch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months 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 /* 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void updateSelectionForMouseDrag(const HitTestResult&, Node*, const LayoutPo int&, const IntPoint&); 59 void updateSelectionForMouseDrag(const HitTestResult&, Node*, const LayoutPo int&, const IntPoint&);
60 void sendContextMenuEvent(const MouseEventWithHitTestResults&, const LayoutP oint&); 60 void sendContextMenuEvent(const MouseEventWithHitTestResults&, const LayoutP oint&);
61 void passMousePressEventToSubframe(const MouseEventWithHitTestResults&); 61 void passMousePressEventToSubframe(const MouseEventWithHitTestResults&);
62 62
63 void initializeSelectionState(); 63 void initializeSelectionState();
64 void setMouseDownMayStartSelect(bool); 64 void setMouseDownMayStartSelect(bool);
65 bool mouseDownMayStartSelect() const; 65 bool mouseDownMayStartSelect() const;
66 bool mouseDownWasSingleClickInSelection() const; 66 bool mouseDownWasSingleClickInSelection() const;
67 void notifySelectionChanged(); 67 void notifySelectionChanged();
68 68
69 // Selects a word if there's one in the given HitTestResult. Returns true
70 // if a word was selected.
71 bool selectWordAtPositionIfAny(const HitTestResult&);
72
69 private: 73 private:
70 explicit SelectionController(LocalFrame&); 74 explicit SelectionController(LocalFrame&);
71 75
72 template <typename Strategy> 76 template <typename Strategy>
73 bool handleMousePressEventSingleClickAlgorithm(const MouseEventWithHitTestRe sults&); 77 bool handleMousePressEventSingleClickAlgorithm(const MouseEventWithHitTestRe sults&);
74 78
75 template <typename Strategy> 79 template <typename Strategy>
76 void updateSelectionForMouseDragAlgorithm(const HitTestResult&, Node*, const LayoutPoint&, const IntPoint&); 80 void updateSelectionForMouseDragAlgorithm(const HitTestResult&, Node*, const LayoutPoint&, const IntPoint&);
77 81
78 enum class AppendTrailingWhitespace { ShouldAppend, DontAppend }; 82 enum class AppendTrailingWhitespace { ShouldAppend, DontAppend };
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 bool m_mouseDownMayStartSelect; 114 bool m_mouseDownMayStartSelect;
111 bool m_mouseDownWasSingleClickInSelection; 115 bool m_mouseDownWasSingleClickInSelection;
112 bool m_mouseDownAllowsMultiClick; 116 bool m_mouseDownAllowsMultiClick;
113 enum class SelectionState { HaveNotStartedSelection, PlacedCaret, ExtendedSe lection }; 117 enum class SelectionState { HaveNotStartedSelection, PlacedCaret, ExtendedSe lection };
114 SelectionState m_selectionState; 118 SelectionState m_selectionState;
115 }; 119 };
116 120
117 } // namespace blink 121 } // namespace blink
118 122
119 #endif // SelectionController_h 123 #endif // SelectionController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698