diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-31 18:08:40 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-31 18:08:40 +0000 |
commit | 4f999134a2e270792abc8b5ac6ad70aa500dcef4 (patch) | |
tree | e90d972ee2f29d10d6e22220d54cd142925bb2bb /webkit/glue/webframe_impl.h | |
parent | b5cd43eb964e452d7a0245b9e14bd9a9d1e89b4a (diff) | |
download | chromium_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_impl.h')
-rw-r--r-- | webkit/glue/webframe_impl.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h index 004c5ad..ec622c4 100644 --- a/webkit/glue/webframe_impl.h +++ b/webkit/glue/webframe_impl.h @@ -91,9 +91,9 @@ class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> { const GURL& error_page_url, bool replace, const GURL& fake_url); - virtual void ExecuteScript(const webkit_glue::WebScriptSource& source); + virtual void ExecuteScript(const WebKit::WebScriptSource& source); virtual void ExecuteScriptInNewContext( - const webkit_glue::WebScriptSource* sources, int num_sources); + const WebKit::WebScriptSource* sources, int num_sources); virtual bool InsertCSSStyles(const std::string& css); virtual bool GetPreviousHistoryState(std::string* history_state) const; virtual bool GetCurrentHistoryState(std::string* history_state) const; @@ -124,11 +124,12 @@ class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> { virtual NPObject* GetWindowNPObject(); virtual void GetContentAsPlainText(int max_chars, std::wstring* text) const; - virtual bool Find(const FindInPageRequest& request, - bool wrap_within_frame, - gfx::Rect* selection_rect); + virtual bool Find( + const WebKit::WebFindInPageRequest& request, bool wrap_within_frame, + gfx::Rect* selection_rect); virtual void StopFinding(bool clear_selection); - virtual void ScopeStringMatches(FindInPageRequest request, bool reset); + virtual void ScopeStringMatches( + const WebKit::WebFindInPageRequest& request, bool reset); virtual void CancelPendingScopingEffort(); virtual void ResetMatchCount(); virtual bool Visible(); @@ -386,7 +387,7 @@ class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> { // It is not necessary if the frame is invisible, for example, or if this // is a repeat search that already returned nothing last time the same prefix // was searched. - bool ShouldScopeMatches(FindInPageRequest request); + bool ShouldScopeMatches(const WebKit::WebFindInPageRequest& request); // Only for test_shell int PendingFrameUnloadEventCount() const; |