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

Side by Side Diff: Source/core/editing/SpellCheckRequester.h

Issue 224113002: Oilpan: move Range object to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use STACK_ALLOCATED() + incorporate ager's overview of macros in this area. Created 6 years, 8 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 27 matching lines...) Expand all
38 38
39 namespace WebCore { 39 namespace WebCore {
40 40
41 class LocalFrame; 41 class LocalFrame;
42 class Node; 42 class Node;
43 class SpellCheckRequester; 43 class SpellCheckRequester;
44 class TextCheckerClient; 44 class TextCheckerClient;
45 45
46 class SpellCheckRequest FINAL : public TextCheckingRequest { 46 class SpellCheckRequest FINAL : public TextCheckingRequest {
47 public: 47 public:
48 static PassRefPtr<SpellCheckRequest> create(TextCheckingTypeMask, TextChecki ngProcessType, PassRefPtr<Range> checkingRange, PassRefPtr<Range> paragraphRange , int requestNumber = 0); 48 static PassRefPtr<SpellCheckRequest> create(TextCheckingTypeMask, TextChecki ngProcessType, PassRefPtrWillBeRawPtr<Range> checkingRange, PassRefPtrWillBeRawP tr<Range> paragraphRange, int requestNumber = 0);
49 virtual ~SpellCheckRequest(); 49 virtual ~SpellCheckRequest();
50 50
51 PassRefPtr<Range> checkingRange() const { return m_checkingRange; } 51 PassRefPtrWillBeRawPtr<Range> checkingRange() const { return m_checkingRange ; }
52 PassRefPtr<Range> paragraphRange() const { return m_paragraphRange; } 52 PassRefPtrWillBeRawPtr<Range> paragraphRange() const { return m_paragraphRan ge; }
53 PassRefPtr<Element> rootEditableElement() const { return m_rootEditableEleme nt; } 53 PassRefPtr<Element> rootEditableElement() const { return m_rootEditableEleme nt; }
54 54
55 void setCheckerAndSequence(SpellCheckRequester*, int sequence); 55 void setCheckerAndSequence(SpellCheckRequester*, int sequence);
56 void requesterDestroyed(); 56 void requesterDestroyed();
57 57
58 virtual const TextCheckingRequestData& data() const OVERRIDE; 58 virtual const TextCheckingRequestData& data() const OVERRIDE;
59 virtual void didSucceed(const Vector<TextCheckingResult>&) OVERRIDE; 59 virtual void didSucceed(const Vector<TextCheckingResult>&) OVERRIDE;
60 virtual void didCancel() OVERRIDE; 60 virtual void didCancel() OVERRIDE;
61 61
62 int requestNumber() const { return m_requestNumber; } 62 int requestNumber() const { return m_requestNumber; }
63 63
64 private: 64 private:
65 SpellCheckRequest(PassRefPtr<Range> checkingRange, PassRefPtr<Range> paragra phRange, const String&, TextCheckingTypeMask, TextCheckingProcessType, const Vec tor<uint32_t>& documentMarkersInRange, const Vector<unsigned>& documentMarkerOff sets, int requestNumber); 65 SpellCheckRequest(PassRefPtrWillBeRawPtr<Range> checkingRange, PassRefPtrWil lBeRawPtr<Range> paragraphRange, const String&, TextCheckingTypeMask, TextChecki ngProcessType, const Vector<uint32_t>& documentMarkersInRange, const Vector<unsi gned>& documentMarkerOffsets, int requestNumber);
66 66
67 SpellCheckRequester* m_requester; 67 SpellCheckRequester* m_requester;
68 RefPtr<Range> m_checkingRange; 68 RefPtrWillBePersistent<Range> m_checkingRange;
69 RefPtr<Range> m_paragraphRange; 69 RefPtrWillBePersistent<Range> m_paragraphRange;
70 RefPtr<Element> m_rootEditableElement; 70 RefPtr<Element> m_rootEditableElement;
71 TextCheckingRequestData m_requestData; 71 TextCheckingRequestData m_requestData;
72 int m_requestNumber; 72 int m_requestNumber;
73 }; 73 };
74 74
75 class SpellCheckRequester { 75 class SpellCheckRequester {
76 WTF_MAKE_NONCOPYABLE(SpellCheckRequester); WTF_MAKE_FAST_ALLOCATED; 76 WTF_MAKE_NONCOPYABLE(SpellCheckRequester); WTF_MAKE_FAST_ALLOCATED;
77 public: 77 public:
78 friend class SpellCheckRequest; 78 friend class SpellCheckRequest;
79 79
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 Timer<SpellCheckRequester> m_timerToProcessQueuedRequest; 115 Timer<SpellCheckRequester> m_timerToProcessQueuedRequest;
116 116
117 RefPtr<SpellCheckRequest> m_processingRequest; 117 RefPtr<SpellCheckRequest> m_processingRequest;
118 RequestQueue m_requestQueue; 118 RequestQueue m_requestQueue;
119 }; 119 };
120 120
121 } // namespace WebCore 121 } // namespace WebCore
122 122
123 #endif // SpellCheckRequester_h 123 #endif // SpellCheckRequester_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698