本文整理汇总了C++中WebSecurityOrigin类的典型用法代码示例。如果您正苦于以下问题:C++ WebSecurityOrigin类的具体用法?C++ WebSecurityOrigin怎么用?C++ WebSecurityOrigin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WebSecurityOrigin类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: dispatchExtendableMessageEvent
void ServiceWorkerGlobalScopeProxy::dispatchExtendableMessageEvent(
int eventID,
const WebString& message,
const WebSecurityOrigin& sourceOrigin,
const WebMessagePortChannelArray& webChannels,
const WebServiceWorkerClientInfo& client) {
WebSerializedScriptValue value =
WebSerializedScriptValue::fromString(message);
MessagePortArray* ports =
MessagePort::toMessagePortArray(m_workerGlobalScope, webChannels);
String origin;
if (!sourceOrigin.isUnique())
origin = sourceOrigin.toString();
ServiceWorkerClient* source = nullptr;
if (client.clientType == WebServiceWorkerClientTypeWindow)
source = ServiceWorkerWindowClient::create(client);
else
source = ServiceWorkerClient::create(client);
WaitUntilObserver* observer = WaitUntilObserver::create(
workerGlobalScope(), WaitUntilObserver::Message, eventID);
Event* event =
ExtendableMessageEvent::create(value, origin, ports, source, observer);
workerGlobalScope()->dispatchExtendableEvent(event, observer);
}
开发者ID:,项目名称:,代码行数:25,代码来源:
示例2: ENABLE
void WebChromeClient::exceededDatabaseQuota(Frame* frame, const String& databaseIdentifier)
{
#if ENABLE(DATABASE)
WebSecurityOrigin *origin = WebSecurityOrigin::createInstance(frame->document()->securityOrigin());
const unsigned long long defaultQuota = 5 * 1024 * 1024; // 5 megabytes should hopefully be enough to test storage support.
origin->setQuota(defaultQuota);
delete origin;
#endif
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:9,代码来源:WebChromeClient.cpp
示例3: deleteDatabase
void WebDatabaseManager::deleteDatabase(WebCore::String databaseName, WebSecurityOrigin* origin)
{
if (this != s_sharedWebDatabaseManager)
return;
WebSecurityOrigin* webSecurityOrigin = WebSecurityOrigin::createInstance(origin->securityOrigin());
if (!webSecurityOrigin)
return;
DatabaseTracker::tracker().deleteDatabase(webSecurityOrigin->securityOrigin(), databaseName);
delete webSecurityOrigin;
}
开发者ID:lentinic,项目名称:EAWebKit,代码行数:13,代码来源:WebDatabaseManager.cpp
示例4: deleteOrigin
void WebDatabaseManager::deleteOrigin(WebSecurityOrigin* origin)
{
if (this != s_sharedWebDatabaseManager)
return;
WebSecurityOrigin* webSecurityOrigin = WebSecurityOrigin::createInstance(origin->securityOrigin());
if (!webSecurityOrigin)
return;
DatabaseTracker::tracker().deleteOrigin(webSecurityOrigin->securityOrigin());
delete webSecurityOrigin;
}
开发者ID:lentinic,项目名称:EAWebKit,代码行数:13,代码来源:WebDatabaseManager.cpp
示例5: ENABLE
void WebChromeClient::exceededDatabaseQuota(Frame* frame, const String& databaseIdentifier)
{
#if ENABLE(DATABASE)
WebSecurityOrigin *origin = WebSecurityOrigin::createInstance(frame->document()->securityOrigin());
SharedPtr<JSActionDelegate> jsActionDelegate = m_webView->jsActionDelegate();
if (jsActionDelegate)
jsActionDelegate->exceededDatabaseQuota(m_webView->mainFrame(), origin, databaseIdentifier.utf8().data());
else {
const unsigned long long defaultQuota = 5 * 1024 * 1024; // 5 megabytes should hopefully be enough to test storage support.
origin->setQuota(defaultQuota);
}
delete origin;
#endif
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:14,代码来源:WebChromeClient.cpp
示例6: requestPermission
void NotificationPresenter::requestPermission(
const WebSecurityOrigin& origin,
WebNotificationPermissionCallback* callback)
{
m_delegate->printMessage("DESKTOP NOTIFICATION PERMISSION REQUESTED: " + string(origin.toString().utf8()) + "\n");
callback->permissionRequestComplete();
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_external_chromium_org_third_party_WebKit,代码行数:7,代码来源:NotificationPresenter.cpp
示例7:
Vector<String> WebDatabaseManager::databasesWithOrigin(WebSecurityOrigin* origin)
{
Vector<String> databaseNames;
if (this != s_sharedWebDatabaseManager)
return databaseNames;
WebSecurityOrigin *webSecurityOrigin = WebSecurityOrigin::createInstance(origin->securityOrigin());
if (!webSecurityOrigin)
return databaseNames;
DatabaseTracker::tracker().databaseNamesForOrigin(webSecurityOrigin->securityOrigin(), databaseNames);
delete webSecurityOrigin;
return databaseNames;
}
开发者ID:lentinic,项目名称:EAWebKit,代码行数:16,代码来源:WebDatabaseManager.cpp
示例8: requestPermission
void NotificationPresenter::requestPermission(
const WebSecurityOrigin& origin,
WebNotificationPermissionCallback* callback)
{
printf("DESKTOP NOTIFICATION PERMISSION REQUESTED: %s\n",
origin.toString().utf8().data());
callback->permissionRequestComplete();
}
开发者ID:0x4d52,项目名称:JavaScriptCore-X,代码行数:8,代码来源:NotificationPresenter.cpp
示例9: checkPermission
WebNotificationPresenter::Permission NotificationPresenter::checkPermission(const WebSecurityOrigin& origin)
{
// Check with the layout test controller
WebString originString = origin.toString();
bool allowed = m_allowedOrigins.find(string(originString.utf8())) != m_allowedOrigins.end();
return allowed ? WebNotificationPresenter::PermissionAllowed
: WebNotificationPresenter::PermissionDenied;
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_external_chromium_org_third_party_WebKit,代码行数:8,代码来源:NotificationPresenter.cpp
示例10: DatabaseDetails
DatabaseDetails WebDatabaseManager::detailsForDatabase(WebCore::String databaseName, WebSecurityOrigin* origin)
{
if (this != s_sharedWebDatabaseManager)
return DatabaseDetails();
WebSecurityOrigin* webSecurityOrigin = WebSecurityOrigin::createInstance(origin->securityOrigin());
if (!webSecurityOrigin)
return DatabaseDetails();
DatabaseDetails details = DatabaseTracker::tracker().detailsForNameAndOrigin(databaseName, webSecurityOrigin->securityOrigin());
delete webSecurityOrigin;
return details;
}
开发者ID:lentinic,项目名称:EAWebKit,代码行数:15,代码来源:WebDatabaseManager.cpp
示例11: WebSecurityOrigin
// WebSecurityOrigin ---------------------------------------------------------------
WebSecurityOrigin* WebSecurityOrigin::createInstance(SecurityOrigin* securityOrigin)
{
WebSecurityOrigin* origin = new WebSecurityOrigin(securityOrigin);
origin->AddRef();
return origin;
}
开发者ID:ollie314,项目名称:webkit,代码行数:7,代码来源:WebSecurityOrigin.cpp
示例12: closeDatabaseImmediately
void WebDatabase::closeDatabaseImmediately(const WebSecurityOrigin& origin, const WebString& databaseName)
{
DatabaseTracker::tracker().closeDatabasesImmediately(origin.get(), databaseName);
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:4,代码来源:WebDatabase.cpp
示例13: resetSpaceAvailable
void WebDatabase::resetSpaceAvailable(const WebSecurityOrigin& origin)
{
QuotaTracker::instance().resetSpaceAvailableToOrigin(origin.get());
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:4,代码来源:WebDatabase.cpp
示例14: updateSpaceAvailable
void WebDatabase::updateSpaceAvailable(const WebSecurityOrigin& origin, long long spaceAvailable)
{
QuotaTracker::instance().updateSpaceAvailableToOrigin(origin.get(), spaceAvailable);
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:4,代码来源:WebDatabase.cpp
示例15: updateDatabaseSize
void WebDatabase::updateDatabaseSize(const WebSecurityOrigin& origin, const WebString& name, long long size)
{
QuotaTracker::instance().updateDatabaseSize(origin.get(), name, size);
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:4,代码来源:WebDatabase.cpp
注:本文中的WebSecurityOrigin类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论