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

Unified Diff: webkit/glue/webframe_impl.cc

Issue 119043: Add functions to glue to get the full html of the page and also to check if t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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: webkit/glue/webframe_impl.cc
===================================================================
--- webkit/glue/webframe_impl.cc (revision 17400)
+++ webkit/glue/webframe_impl.cc (working copy)
@@ -1416,6 +1416,12 @@
frame()->selection()->clear();
}
+bool WebFrameImpl::HasSelection() {
+ // frame()->selection()->isNone() never returns true.
+ return (frame()->selection()->start() !=
M-A Ruel 2009/06/02 16:15:09 Why the test here is different that the one in Get
Sverrir 2009/06/02 17:19:58 Even when there is no selection the range is non-n
M-A Ruel 2009/06/02 18:27:40 I guess it's fine. GetSelection() wants to return
+ frame()->selection()->end());
+}
+
std::string WebFrameImpl::GetSelection(bool as_html) {
RefPtr<Range> range = frame()->selection()->toNormalizedRange();
if (!range.get())
@@ -1429,6 +1435,10 @@
}
}
+std::string WebFrameImpl::GetFullPageHtml() {
+ return webkit_glue::StringToStdString(createFullMarkup(frame_->document()));
+}
+
void WebFrameImpl::CreateFrameView() {
ASSERT(frame_); // If frame_ doesn't exist, we probably didn't init properly.

Powered by Google App Engine
This is Rietveld 408576698