summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/public/WebView.h
diff options
context:
space:
mode:
authorLeon Clarke <leonclarke@google.com>2010-07-15 12:03:35 +0100
committerLeon Clarke <leonclarke@google.com>2010-07-20 16:57:23 +0100
commite458d70a0d18538346f41b503114c9ebe6b2ce12 (patch)
tree86f1637deca2c524432a822e5fcedd4bef221091 /WebKit/chromium/public/WebView.h
parentf43eabc081f7ce6af24b9df4953498a3cd6ca24d (diff)
downloadexternal_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.zip
external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.tar.gz
external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.tar.bz2
Merge WebKit at r63173 : Initial merge by git.
Change-Id: Ife5af0c7c6261fbbc8ae6bc08c390efa9ef10b44
Diffstat (limited to 'WebKit/chromium/public/WebView.h')
-rw-r--r--WebKit/chromium/public/WebView.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
index 1efd752..a8f5387 100644
--- a/WebKit/chromium/public/WebView.h
+++ b/WebKit/chromium/public/WebView.h
@@ -54,6 +54,18 @@ struct WebPoint;
class WebView : public WebWidget {
public:
+ // Controls the time that user scripts injected into the document run.
+ enum UserScriptInjectAt {
+ UserScriptInjectAtDocumentStart,
+ UserScriptInjectAtDocumentEnd
+ };
+
+ // Controls which frames user content is injected into.
+ enum UserContentInjectIn {
+ UserContentInjectInAllFrames,
+ UserContentInjectInTopFrameOnly
+ };
+
// Initialization ------------------------------------------------------
// Creates a WebView that is NOT yet initialized. You will need to
@@ -286,18 +298,22 @@ public:
// FIXME: These two methods are DEPRECATED. Remove once Chromium has been rolled.
virtual void addUserScript(const WebString& sourceCode, bool runAtStart)
{
- addUserScript(sourceCode, WebVector<WebString>(), runAtStart);
+ addUserScript(sourceCode, WebVector<WebString>(),
+ runAtStart ? UserScriptInjectAtDocumentStart : UserScriptInjectAtDocumentEnd,
+ UserContentInjectInAllFrames);
}
virtual void addUserStyleSheet(const WebString& sourceCode)
{
- addUserStyleSheet(sourceCode, WebVector<WebString>());
+ addUserStyleSheet(sourceCode, WebVector<WebString>(), UserContentInjectInAllFrames);
}
WEBKIT_API static void addUserScript(const WebString& sourceCode,
const WebVector<WebString>& patterns,
- bool runAtStart);
+ UserScriptInjectAt injectAt,
+ UserContentInjectIn injectIn);
WEBKIT_API static void addUserStyleSheet(const WebString& sourceCode,
- const WebVector<WebString>& patterns);
+ const WebVector<WebString>& patterns,
+ UserContentInjectIn injectIn);
WEBKIT_API static void removeAllUserContent();
// Modal dialog support ------------------------------------------------