void HostsUsingFeatures::Value::recordETLDPlus1ToRappor(const KURL& url) { if (get(Feature::GetUserMediaInsecureHost)) Platform::current()->recordRapporURL("PowerfulFeatureUse.ETLDPlus1.GetUserMedia.Insecure", WebURL(url)); if (get(Feature::GetUserMediaSecureHost)) Platform::current()->recordRapporURL("PowerfulFeatureUse.ETLDPlus1.GetUserMedia.Secure", WebURL(url)); if (get(Feature::RTCPeerConnectionAudio)) Platform::current()->recordRapporURL("RTCPeerConnection.Audio", WebURL(url)); if (get(Feature::RTCPeerConnectionVideo)) Platform::current()->recordRapporURL("RTCPeerConnection.Video", WebURL(url)); if (get(Feature::RTCPeerConnectionDataChannel)) Platform::current()->recordRapporURL("RTCPeerConnection.DataChannel", WebURL(url)); }
bool StatHub::releasePreloaded(const KURL& url) { WebStatHub* stat_hub = Platform::current()->statHub(); if (stat_hub) { return stat_hub->releasePreloaded(WebURL(url)); } return false; }
unsigned int StatHub::isPreloaded(const KURL& url) { WebStatHub* stat_hub = Platform::current()->statHub(); if (stat_hub) { return stat_hub->isPreloaded(WebURL(url)); } return 0; }
unsigned long StatHub::hash(const KURL& url) { WebStatHub* stat_hub = Platform::current()->statHub(); if (stat_hub) { return stat_hub->hash(WebURL(url)); } return 0; }
WebURL WebDocument::manifestURL() const { const Document* document = constUnwrap<Document>(); HTMLLinkElement* linkElement = document->linkManifest(); if (!linkElement) return WebURL(); return linkElement->href(); }
WebURL WebDOMFileSystem::createFileSystemURL(v8::Local<v8::Value> value) { const Entry* const entry = V8Entry::toImplWithTypeCheck(v8::Isolate::GetCurrent(), value); if (entry) return entry->filesystem()->createFileSystemURL(entry); return WebURL(); }
void TestRunner::reset() { if (m_webView) { m_webView->setZoomLevel(false, 0); m_webView->setTabKeyCyclesThroughElements(true); #if !OS(DARWIN) && !OS(WINDOWS) // Actually, TOOLKIT_GTK // (Constants copied because we can't depend on the header that defined // them from this file.) m_webView->setSelectionColors(0xff1e90ff, 0xff000000, 0xffc8c8c8, 0xff323232); #endif m_webView->removeAllUserContent(); m_webView->disableAutoResizeMode(); } WebSecurityPolicy::resetOriginAccessWhitelists(); #if OS(LINUX) || OS(ANDROID) WebFontRendering::setSubpixelPositioning(false); #endif m_dumpEditingCallbacks = false; m_globalFlag.set(false); m_platformName.set("chromium"); m_userStyleSheetLocation = WebURL(); }
void DeviceMotionController::didAddEventListener( LocalDOMWindow* window, const AtomicString& eventType) { if (eventType != eventTypeName()) return; if (document().frame()) { String errorMessage; if (document().isSecureContext(errorMessage)) { UseCounter::count(document().frame(), UseCounter::DeviceMotionSecureOrigin); } else { Deprecation::countDeprecation(document().frame(), UseCounter::DeviceMotionInsecureOrigin); HostsUsingFeatures::countAnyWorld( document(), HostsUsingFeatures::Feature::DeviceMotionInsecureHost); if (document().frame()->settings()->strictPowerfulFeatureRestrictions()) return; } } if (!m_hasEventListener) Platform::current()->recordRapporURL("DeviceSensors.DeviceMotion", WebURL(document().url())); DeviceSingleWindowEventController::didAddEventListener(window, eventType); }
String PlatformSupport::signedPublicKeyAndChallengeString( unsigned keySizeIndex, const String& challenge, const KURL& url) { return webKitPlatformSupport()->signedPublicKeyAndChallengeString(keySizeIndex, WebString(challenge), WebURL(url)); }
String ChromiumBridge::signedPublicKeyAndChallengeString( unsigned keySizeIndex, const String& challenge, const KURL& url) { return webKitClient()->signedPublicKeyAndChallengeString(keySizeIndex, WebString(challenge), WebURL(url)); }
bool FrameLoaderClientImpl::allowRunningInsecureContent(bool enabledPerSettings, SecurityOrigin* context, const KURL& url) { if (m_webFrame->contentSettingsClient()) return m_webFrame->contentSettingsClient()->allowRunningInsecureContent( enabledPerSettings, WebSecurityOrigin(context), WebURL(url)); return enabledPerSettings; }
void ChromeClientImpl::mouseDidMoveOverElement( const HitTestResult& result, unsigned modifierFlags) { if (!m_webView->client()) return; // Find out if the mouse is over a link, and if so, let our UI know... if (result.isLiveLink() && !result.absoluteLinkURL().string().isEmpty()) m_webView->client()->setMouseOverURL(result.absoluteLinkURL()); else m_webView->client()->setMouseOverURL(WebURL()); }
// Figure out the URL of a page or subframe. Returns |page_type| as the type, // which indicates page or subframe, or ContextNodeType::NONE if the URL could not // be determined for some reason. static WebURL urlFromFrame(Frame* frame) { if (frame) { DocumentLoader* dl = frame->loader()->documentLoader(); if (dl) { WebDataSource* ds = WebDataSourceImpl::fromDocumentLoader(dl); if (ds) return ds->hasUnreachableURL() ? ds->unreachableURL() : ds->request().url(); } } return WebURL(); }
bool StatHub::getPreloaded(const KURL& url, unsigned int get_from, ResourceResponse& response, RefPtr<SharedBuffer>& data) { bool ret = false; WebStatHub* stat_hub = Platform::current()->statHub(); if (stat_hub) { WebURLResponse web_response; WebData web_data; ret = stat_hub->getPreloaded(WebURL(url), get_from, web_response, web_data); if (ret) { response = web_response.toResourceResponse(); data = SharedBuffer::create(web_data.data(), web_data.size()); } } return ret; }
//-------------------------------------------------------------- void testApp::setup(){ ofSetWindowShape(WIDTH, HEIGHT); WebConfig config; config.log_path = WSLit(ofToDataPath("Logs").c_str()); config.log_level = kLogLevel_Verbose; //kLogLevel_Normal; web_core = WebCore::Initialize(config); WebPreferences prefs; prefs.enable_plugins = true; prefs.enable_smooth_scrolling = true; my_session = web_core->CreateWebSession(WSLit(ofToDataPath("SessionData").c_str()), prefs); web_view = web_core->CreateWebView(WIDTH, HEIGHT, my_session); web_view->LoadURL(WebURL(WSLit("http://youtube.com"))); web_view->Focus(); //web_view->ExecuteJavascriptWithResult(WSLit("reset()"), WSLit("")); texture.allocate(WIDTH, HEIGHT, GL_RGBA); }
void WebPreferences::reset() { #ifdef __APPLE__ cursiveFontFamily = WebString::fromUTF8("Apple Chancery"); fantasyFontFamily = WebString::fromUTF8("Papyrus"); WebString serif = WebString::fromUTF8("Times"); #else // These two fonts are picked from the intersection of // Win XP font list and Vista font list : // http://www.microsoft.com/typography/fonts/winxp.htm // http://blogs.msdn.com/michkap/archive/2006/04/04/567881.aspx // Some of them are installed only with CJK and complex script // support enabled on Windows XP and are out of consideration here. // (although we enabled both on our buildbots.) // They (especially Impact for fantasy) are not typical cursive // and fantasy fonts, but it should not matter for layout tests // as long as they're available. cursiveFontFamily = WebString::fromUTF8("Comic Sans MS"); fantasyFontFamily = WebString::fromUTF8("Impact"); // NOTE: case matters here, this must be 'times new roman', else // some layout tests fail. WebString serif = WebString::fromUTF8("times new roman"); #endif serifFontFamily = serif; standardFontFamily = serif; fixedFontFamily = WebString::fromUTF8("Courier"); sansSerifFontFamily = WebString::fromUTF8("Helvetica"); defaultFontSize = 16; defaultFixedFontSize = 13; minimumFontSize = 0; minimumLogicalFontSize = 9; // Do not disable acceleration for 2d canvas based on size. // This makes having test expectations consistent. minimumAccelerated2dCanvasSize = 0; DOMPasteAllowed = true; XSSAuditorEnabled = false; allowDisplayOfInsecureContent = true; allowFileAccessFromFileURLs = true; allowRunningOfInsecureContent = true; authorAndUserStylesEnabled = true; defaultTextEncodingName = WebString::fromUTF8("ISO-8859-1"); developerExtrasEnabled = true; experimentalWebGLEnabled = false; experimentalCSSRegionsEnabled = true; experimentalCSSGridLayoutEnabled = false; javaEnabled = false; javaScriptCanAccessClipboard = true; javaScriptCanOpenWindowsAutomatically = true; supportsMultipleWindows = true; javaScriptEnabled = true; loadsImagesAutomatically = true; localStorageEnabled = true; offlineWebApplicationCacheEnabled = true; pluginsEnabled = true; shrinksStandaloneImagesToFit = false; textAreasAreResizable = true; userStyleSheetLocation = WebURL(); usesPageCache = false; pageCacheSupportsPlugins = false; webSecurityEnabled = true; caretBrowsingEnabled = false; // Allow those layout tests running as local files, i.e. under // LayoutTests/http/tests/local, to access http server. allowUniversalAccessFromFileURLs = true; #ifdef __APPLE__ editingBehavior = WebSettings::EditingBehaviorMac; #else editingBehavior = WebSettings::EditingBehaviorWin; #endif tabsToLinks = false; hyperlinkAuditingEnabled = false; acceleratedCompositingForVideoEnabled = false; acceleratedCompositingForFixedPositionEnabled = false; acceleratedCompositingForOverflowScrollEnabled = false; acceleratedCompositingEnabled = false; accelerated2dCanvasEnabled = false; forceCompositingMode = false; threadedHTMLParser = true; perTilePaintingEnabled = false; deferredImageDecodingEnabled = false; mediaPlaybackRequiresUserGesture = false; mockScrollbarsEnabled = false; cssCustomFilterEnabled = false; shouldRespectImageOrientation = false; asynchronousSpellCheckingEnabled = false; }
WebURL WebPrerender::url() const { return WebURL(m_private->url()); }
void WorkerFileWriterCallbacksBridge::writeOnMainThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, long long position, const KURL& data) { bridge->m_writer->write(position, WebURL(data)); }
void AsyncFileWriterChromium::write(long long position, Blob* data) { ASSERT(m_writer); m_writer->write(position, WebURL(data->url())); }
void TestRunner::setUserStyleSheetEnabled(const CppArgumentList& arguments, CppVariant* result) { if (arguments.size() > 0 && arguments[0].isBool()) { m_delegate->preferences()->userStyleSheetLocation = arguments[0].value.boolValue ? m_userStyleSheetLocation : WebURL(); m_delegate->applyPreferences(); } result->setNull(); }
static bool webVectorContains(const WebVector<WebURL>& vector, const char* url) { return vector.contains(WebURL(toKURL(std::string(url)))); }
WebURL getURL() { if (Document* document = currentDOMWindow(v8::Isolate::GetCurrent())->document()) return WebURL(document->url()); return WebURL(); }
const WebURL PresentationAvailability::url() const { return WebURL(m_url); }
virtual void ProcessEvent( EFlowEvent evt, SActivationInfo* pActInfo ) { this->awesomium = PluginManager::safeGetPluginConcreteInterface<IPluginAwesomium*>( PLUGIN_NAME ); if ( awesomium == NULL ) { return; } this->sys = this->awesomium->GetSystem(); switch ( evt ) { case eFE_Activate: if ( IsPortActive( pActInfo, EIP_START ) ) { ActivateOutput<bool>( pActInfo, EOP_STARTED, StartView( GetPortInt( pActInfo, EIP_WIDTH ), GetPortInt( pActInfo, EIP_HEIGHT ), GetPortString( pActInfo, EIP_MATNAME ), GetPortString( pActInfo, EIP_OBJNAME ) ) ); std::string url = GetPortString( pActInfo, EIP_TOURL ); if ( view && url.length() != 0 ) { view->GetView()->LoadURL( WebURL( WSLit( url.c_str() ) ) ); } } if ( viewCreated ) { if ( IsPortActive( pActInfo, EIP_RELEASE ) ) { sys->DeleteView( view ); view = NULL; viewCreated = false; } if ( IsPortActive( pActInfo, EIP_TOURL ) ) { std::string url = GetPortString( pActInfo, EIP_TOURL ); if ( view && url.length() != 0 ) { view->GetView()->LoadURL( WebURL( WSLit( url.c_str() ) ) ); } } if ( IsPortActive( pActInfo, EIP_COPY ) ) { view->GetView()->Copy(); } if ( IsPortActive( pActInfo, EIP_GETLOADING ) ) { ActivateOutput<bool>( pActInfo, EOP_LOADING, view->GetView()->IsLoading() ); } /* if ( IsPortActive( pActInfo, EIP_GETTITLE ) ) { ActivateOutput<string>( pActInfo, EOP_TITLE, view->GetView()->title().data ); } if ( IsPortActive( pActInfo, EIP_GETURL ) ) { ActivateOutput<string>( pActInfo, EOP_TITLE, view->GetView()->url().path ); } */ if ( IsPortActive( pActInfo, EIP_GOBACK ) ) { view->GetView()->GoBack(); } if ( IsPortActive( pActInfo, EIP_GOFORWARD ) ) { view->GetView()->GoForward(); } if ( IsPortActive( pActInfo, EIP_PASTE ) ) { view->GetView()->Paste(); } if ( IsPortActive( pActInfo, EIP_REDO ) ) { view->GetView()->Redo(); } if ( IsPortActive( pActInfo, EIP_REFRESH ) ) { view->GetView()->Reload( true ); } if ( IsPortActive( pActInfo, EIP_RESIZE ) ) { view->GetView()->Resize( GetPortInt( pActInfo, EIP_WIDTH ), GetPortInt( pActInfo, EIP_HEIGHT ) ); } if ( IsPortActive( pActInfo, EIP_SELECTALL ) ) { view->GetView()->SelectAll(); } if ( IsPortActive( pActInfo, EIP_STOP ) ) { view->GetView()->Stop(); } if ( IsPortActive( pActInfo, EIP_UNDO ) ) { view->GetView()->Undo(); } } break; } }
void WebMediaPlayerClientImpl::setPoster(const KURL& poster) { if (m_webMediaPlayer) m_webMediaPlayer->setPoster(WebURL(poster)); }
KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); }
void FrameLoaderClientImpl::passiveInsecureContentFound(const KURL& url) { if (m_webFrame->contentSettingsClient()) return m_webFrame->contentSettingsClient()->passiveInsecureContentFound( WebURL(url)); }
bool FrameLoaderClientImpl::allowDisplayingInsecureContent(bool enabledPerSettings, const KURL& url) { if (m_webFrame->contentSettingsClient()) return m_webFrame->contentSettingsClient()->allowDisplayingInsecureContent(enabledPerSettings, WebURL(url)); return enabledPerSettings; }
WebURL WebNotification::url() const { return WebURL(); }