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

Unified Diff: public/web/WebRange.h

Issue 294073005: Extend WebSurroundingText to accept a WebRange. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use websurroundingtext Created 6 years, 6 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: public/web/WebRange.h
diff --git a/public/web/WebRange.h b/public/web/WebRange.h
index cd318a1cf1f110eaae6731975d20ec4be621dead..a8f1043f9d4db736c67197f78a05643c5d5a5fdd 100644
--- a/public/web/WebRange.h
+++ b/public/web/WebRange.h
@@ -81,6 +81,18 @@ public:
operator PassRefPtrWillBeRawPtr<WebCore::Range>() const;
#endif
+#if BLINK_IMPLEMENTATION
+ template<typename T> T* unwrap()
tkent 2014/06/13 01:15:37 You don't need it. We already have |operator PassR
mlamouri (slow - plz ping) 2014/06/13 10:34:03 Done.
+ {
+ return static_cast<T*>(m_private.get());
+ }
+
+ template<typename T> const T* constUnwrap() const
+ {
+ return static_cast<const T*>(m_private.get());
+ }
+#endif
+
private:
WebPrivatePtr<WebCore::Range> m_private;
};

Powered by Google App Engine
This is Rietveld 408576698