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

Unified Diff: Source/core/editing/InputMethodController.h

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/editing/InputMethodController.h
diff --git a/Source/core/editing/InputMethodController.h b/Source/core/editing/InputMethodController.h
index 43b199da130bad8fb0474bc1921221f051456b14..d2fd38ace2b7ca04ee9a14c6c3e8574af45a229b 100644
--- a/Source/core/editing/InputMethodController.h
+++ b/Source/core/editing/InputMethodController.h
@@ -28,6 +28,7 @@
#include "core/editing/CompositionUnderline.h"
#include "core/editing/PlainTextRange.h"
+#include "platform/heap/Handle.h"
#include "wtf/Vector.h"
namespace blink {
@@ -38,7 +39,7 @@ class LocalFrame;
class Range;
class Text;
-class InputMethodController {
+class InputMethodController FINAL : public NoBaseWillBeGarbageCollectedFinalized<InputMethodController> {
WTF_MAKE_NONCOPYABLE(InputMethodController);
public:
enum ConfirmCompositionBehavior {
@@ -46,8 +47,9 @@ public:
KeepSelection,
};
- static PassOwnPtr<InputMethodController> create(LocalFrame&);
+ static PassOwnPtrWillBeRawPtr<InputMethodController> create(LocalFrame&);
~InputMethodController();
+ void trace(Visitor*);
// international text input composition
bool hasComposition() const;
@@ -94,8 +96,8 @@ private:
};
friend class SelectionOffsetsScope;
- LocalFrame& m_frame;
- RefPtrWillBePersistent<Text> m_compositionNode;
+ RawPtrWillBeMember<LocalFrame> m_frame;
+ RefPtrWillBeMember<Text> m_compositionNode;
// We don't use PlainTextRange which is immutable, for composition range.
unsigned m_compositionStart;
unsigned m_compositionEnd;
@@ -104,7 +106,10 @@ private:
Vector<CompositionUnderline> m_customCompositionUnderlines;
explicit InputMethodController(LocalFrame&);
+
Editor& editor() const;
+ LocalFrame& frame() const { return *m_frame; }
+
bool insertTextForConfirmedComposition(const String& text);
void selectComposition() const;
enum FinishCompositionMode { ConfirmComposition, CancelComposition };

Powered by Google App Engine
This is Rietveld 408576698