summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webframe.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 18:08:40 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 18:08:40 +0000
commit4f999134a2e270792abc8b5ac6ad70aa500dcef4 (patch)
treee90d972ee2f29d10d6e22220d54cd142925bb2bb /webkit/glue/webframe.h
parentb5cd43eb964e452d7a0245b9e14bd9a9d1e89b4a (diff)
downloadchromium_src-4f999134a2e270792abc8b5ac6ad70aa500dcef4.zip
chromium_src-4f999134a2e270792abc8b5ac6ad70aa500dcef4.tar.gz
chromium_src-4f999134a2e270792abc8b5ac6ad70aa500dcef4.tar.bz2
Use WebScriptSource and WebFindInPageRequest from the WebKit API.
This change introduces some helper functions in glue_util.cc for efficient conversion between WebString and WebCore::String when inside the implementation of webkit/glue. This is a temporary change since eventually all code in glue that uses WebCore will be moved into the WebKit API implementation. Instead of making the Chrome automation use WebFindInPageRequest, I decided to introduce AutomationMsg_Find_Params as a copy of the old FindInPageRequest structure. That preserves the IPC protocol and avoids making the automation library depend on WebKit. R=dglazkov Review URL: http://codereview.chromium.org/57060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12881 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webframe.h')
-rw-r--r--webkit/glue/webframe.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/webkit/glue/webframe.h b/webkit/glue/webframe.h
index 8f38362..ddd1b21 100644
--- a/webkit/glue/webframe.h
+++ b/webkit/glue/webframe.h
@@ -11,8 +11,6 @@
#include "skia/ext/platform_canvas.h"
#include "webkit/glue/console_message_level.h"
#include "webkit/glue/feed.h"
-#include "webkit/glue/find_in_page_request.h"
-#include "webkit/glue/webscriptsource.h"
class WebDataSource;
class WebError;
@@ -26,6 +24,11 @@ class Rect;
class Size;
}
+namespace WebKit {
+struct WebFindInPageRequest;
+struct WebScriptSource;
+}
+
// Every frame in a web page is represented by one WebFrame, including the
// outermost frame.
class WebFrame {
@@ -91,14 +94,14 @@ class WebFrame {
const GURL& fake_url) = 0;
// Executes JavaScript in the web frame.
- virtual void ExecuteScript(const webkit_glue::WebScriptSource& source) = 0;
+ virtual void ExecuteScript(const WebKit::WebScriptSource& source) = 0;
// Executes JavaScript in a new context associated with the web frame. The
// script gets its own global scope and its own prototypes for intrinsic
// JavaScript objects (String, Array, and so-on). It shares the wrappers for
// all DOM nodes and DOM constructors.
virtual void ExecuteScriptInNewContext(
- const webkit_glue::WebScriptSource* sources, int num_sources) = 0;
+ const WebKit::WebScriptSource* sources, int num_sources) = 0;
// Inserts the given CSS styles at the beginning of the document.
virtual bool InsertCSSStyles(const std::string& css) = 0;
@@ -212,7 +215,7 @@ class WebFrame {
// If no match is found, this function clears all tickmarks and highlighting.
//
// Returns true if the search string was found, false otherwise.
- virtual bool Find(const FindInPageRequest& request,
+ virtual bool Find(const WebKit::WebFindInPageRequest& request,
bool wrap_within_frame,
gfx::Rect* selection_rect) = 0;
@@ -235,7 +238,7 @@ class WebFrame {
// cancel at any time (see CancelPendingScopingEffort). The parameter Request
// specifies what to look for and Reset signals whether this is a brand new
// request or a continuation of the last scoping effort.
- virtual void ScopeStringMatches(FindInPageRequest request,
+ virtual void ScopeStringMatches(const WebKit::WebFindInPageRequest& request,
bool reset) = 0;
// Cancels any outstanding requests for scoping string matches on a frame.