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

Unified Diff: webkit/tools/test_shell/test_webview_delegate_gtk.cc

Issue 164225: Switch to WebFrame from the WebKit API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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/tools/test_shell/test_webview_delegate_gtk.cc
===================================================================
--- webkit/tools/test_shell/test_webview_delegate_gtk.cc (revision 22886)
+++ webkit/tools/test_shell/test_webview_delegate_gtk.cc (working copy)
@@ -15,11 +15,13 @@
#include "base/string_util.h"
#include "net/base/net_errors.h"
#include "chrome/common/page_transition_types.h"
+#include "webkit/api/public/WebCString.h"
#include "webkit/api/public/WebCursorInfo.h"
+#include "webkit/api/public/WebFrame.h"
#include "webkit/api/public/WebRect.h"
+#include "webkit/api/public/WebString.h"
#include "webkit/glue/webcursor.h"
#include "webkit/glue/webdropdata.h"
-#include "webkit/glue/webframe.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/webplugin.h"
#include "webkit/glue/webkit_glue.h"
@@ -32,6 +34,7 @@
#include "webkit/tools/test_shell/test_shell.h"
using WebKit::WebCursorInfo;
+using WebKit::WebFrame;
using WebKit::WebNavigationPolicy;
using WebKit::WebRect;
@@ -59,8 +62,13 @@
frame = webview->GetMainFrame();
DCHECK(frame);
- std::string selection = frame->GetSelection(TEXT_HTML == info);
+ std::string selection;
if (TEXT_HTML == info) {
+ selection = frame->selectionAsMarkup().utf8();
+ } else {
+ selection = frame->selectionAsText().utf8();
+ }
+ if (TEXT_HTML == info) {
gtk_selection_data_set(selection_data,
GetTextHtmlAtom(),
8 /* bits per data unit, ie, char */,
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.cc ('k') | webkit/tools/test_shell/test_webview_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698