summaryrefslogtreecommitdiffstats
path: root/WebKit/qt/Api/qwebsecurityorigin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/qt/Api/qwebsecurityorigin.cpp')
-rw-r--r--WebKit/qt/Api/qwebsecurityorigin.cpp59
1 files changed, 59 insertions, 0 deletions
diff --git a/WebKit/qt/Api/qwebsecurityorigin.cpp b/WebKit/qt/Api/qwebsecurityorigin.cpp
index d2eaf10..7c44e37 100644
--- a/WebKit/qt/Api/qwebsecurityorigin.cpp
+++ b/WebKit/qt/Api/qwebsecurityorigin.cpp
@@ -35,6 +35,8 @@ using namespace WebCore;
\since 4.5
\brief The QWebSecurityOrigin class defines a security boundary for web sites.
+ \inmodule QtWebKit
+
QWebSecurityOrigin provides access to the security domains defined by web sites.
An origin consists of a host name, a scheme, and a port number. Web sites
with the same security origin can access each other's resources for client-side
@@ -198,3 +200,60 @@ QList<QWebDatabase> QWebSecurityOrigin::databases() const
return databases;
}
+/*!
+ \since 4.6
+
+ Adds the given \a scheme to the list of schemes that are considered equivalent
+ to the \c file: scheme. They are not subject to cross domain restrictions.
+*/
+void QWebSecurityOrigin::addLocalScheme(const QString& scheme)
+{
+ SecurityOrigin::registerURLSchemeAsLocal(scheme);
+}
+
+/*!
+ \since 4.6
+
+ Removes the given \a scheme from the list of local schemes.
+
+ \sa addLocalScheme()
+*/
+void QWebSecurityOrigin::removeLocalScheme(const QString& scheme)
+{
+ SecurityOrigin::removeURLSchemeRegisteredAsLocal(scheme);
+}
+
+/*!
+ \since 4.6
+ Returns a list of all the schemes that were set by the application as local schemes,
+ \sa addLocalScheme(), removeLocalScheme()
+*/
+QStringList QWebSecurityOrigin::localSchemes()
+{
+ QStringList list;
+ const URLSchemesMap& map = SecurityOrigin::localURLSchemes();
+ URLSchemesMap::const_iterator end = map.end();
+ for (URLSchemesMap::const_iterator i = map.begin(); i != end; ++i) {
+ const QString scheme = *i;
+ list.append(scheme);
+ }
+ return list;
+}
+
+/*!
+ \since 4.6
+ \internal
+*/
+void QWebSecurityOrigin::whiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains)
+{
+ SecurityOrigin::whiteListAccessFromOrigin(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains);
+}
+
+/*!
+ \since 4.6
+ \internal
+*/
+void QWebSecurityOrigin::resetOriginAccessWhiteLists()
+{
+ SecurityOrigin::resetOriginAccessWhiteLists();
+}