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

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

Issue 2612713002: Move core/editing timer to frame-specific task runners. (Closed)
Patch Set: Created 3 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) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
3 * reserved. 3 * 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 enum class SelectionDirectionalMode { NonDirectional, Directional }; 64 enum class SelectionDirectionalMode { NonDirectional, Directional };
65 65
66 enum class CaretVisibility; 66 enum class CaretVisibility;
67 67
68 class CORE_EXPORT FrameSelection final 68 class CORE_EXPORT FrameSelection final
69 : public GarbageCollectedFinalized<FrameSelection> { 69 : public GarbageCollectedFinalized<FrameSelection> {
70 WTF_MAKE_NONCOPYABLE(FrameSelection); 70 WTF_MAKE_NONCOPYABLE(FrameSelection);
71 71
72 public: 72 public:
73 static FrameSelection* create(LocalFrame* frame) { 73 static FrameSelection* create(LocalFrame& frame) {
74 return new FrameSelection(frame); 74 return new FrameSelection(frame);
75 } 75 }
76 ~FrameSelection(); 76 ~FrameSelection();
77 77
78 enum EAlteration { AlterationMove, AlterationExtend }; 78 enum EAlteration { AlterationMove, AlterationExtend };
79 enum SetSelectionOption { 79 enum SetSelectionOption {
80 // 1 << 0 is reserved for EUserTriggered 80 // 1 << 0 is reserved for EUserTriggered
81 CloseTyping = 1 << 1, 81 CloseTyping = 1 << 1,
82 ClearTypingStyle = 1 << 2, 82 ClearTypingStyle = 1 << 2,
83 DoNotSetFocus = 1 << 3, 83 DoNotSetFocus = 1 << 3,
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 DECLARE_TRACE(); 280 DECLARE_TRACE();
281 281
282 private: 282 private:
283 friend class FrameSelectionTest; 283 friend class FrameSelectionTest;
284 friend class PaintControllerPaintTestForSlimmingPaintV1AndV2; 284 friend class PaintControllerPaintTestForSlimmingPaintV1AndV2;
285 friend class SelectionControllerTest; 285 friend class SelectionControllerTest;
286 FRIEND_TEST_ALL_PREFIXES(PaintControllerPaintTestForSlimmingPaintV1AndV2, 286 FRIEND_TEST_ALL_PREFIXES(PaintControllerPaintTestForSlimmingPaintV1AndV2,
287 FullDocumentPaintingWithCaret); 287 FullDocumentPaintingWithCaret);
288 288
289 explicit FrameSelection(LocalFrame*); 289 explicit FrameSelection(LocalFrame&);
290 290
291 // Note: We have |selectionInFlatTree()| for unit tests, we should 291 // Note: We have |selectionInFlatTree()| for unit tests, we should
292 // use |visibleSelection<EditingInFlatTreeStrategy>()|. 292 // use |visibleSelection<EditingInFlatTreeStrategy>()|.
293 const VisibleSelectionInFlatTree& selectionInFlatTree() const; 293 const VisibleSelectionInFlatTree& selectionInFlatTree() const;
294 294
295 template <typename Strategy> 295 template <typename Strategy>
296 void setSelectionAlgorithm(const VisibleSelectionTemplate<Strategy>&, 296 void setSelectionAlgorithm(const VisibleSelectionTemplate<Strategy>&,
297 SetSelectionOptions, 297 SetSelectionOptions,
298 CursorAlignOnScroll, 298 CursorAlignOnScroll,
299 TextGranularity); 299 TextGranularity);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 } 356 }
357 } // namespace blink 357 } // namespace blink
358 358
359 #ifndef NDEBUG 359 #ifndef NDEBUG
360 // Outside the WebCore namespace for ease of invocation from gdb. 360 // Outside the WebCore namespace for ease of invocation from gdb.
361 void showTree(const blink::FrameSelection&); 361 void showTree(const blink::FrameSelection&);
362 void showTree(const blink::FrameSelection*); 362 void showTree(const blink::FrameSelection*);
363 #endif 363 #endif
364 364
365 #endif // FrameSelection_h 365 #endif // FrameSelection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameCaret.cpp ('k') | third_party/WebKit/Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698