static Type copy(const WebKit::WebVector<WebKit::WebFileSystemEntry>& entries)
 {
     WebKit::WebVector<WebKit::WebFileSystemEntry> newEntries(entries.size());
     for (size_t i = 0; i < entries.size(); ++i) {
         String name = entries[i].name;
         newEntries[i].isDirectory = entries[i].isDirectory;
         newEntries[i].name = name.isolatedCopy();
     }
     return newEntries;
 }
예제 #2
0
void WebSpeechSynthesizerClientImpl::setVoiceList(const WebKit::WebVector<WebKit::WebSpeechSynthesisVoice>& voices)
{
#if ENABLE(SPEECH_SYNTHESIS)
    Vector<RefPtr<PlatformSpeechSynthesisVoice> > outVoices;
    for (size_t i = 0; i < voices.size(); i++)
        outVoices.append(PassRefPtr<PlatformSpeechSynthesisVoice>(voices[i]));
    m_synthesizer->setVoiceList(outVoices);
    m_client->voicesDidChange();
#endif
}
void ApplicationCacheHost::fillResourceList(ResourceInfoList* resources)
{
    if (!m_internal)
        return;

    WebKit::WebVector<WebKit::WebApplicationCacheHost::ResourceInfo> webResources;
    m_internal->m_outerHost->getResourceList(&webResources);
    for (size_t i = 0; i < webResources.size(); ++i) {
        resources->append(ResourceInfo(
            webResources[i].url, webResources[i].isMaster, webResources[i].isManifest, webResources[i].isFallback,
            webResources[i].isForeign, webResources[i].isExplicit, webResources[i].size));
    }
}
예제 #4
0
void screenColorProfile(ColorProfile& toProfile)
{
    WebKit::WebVector<char> profile;
    WebKit::Platform::current()->screenColorProfile(&profile);
    toProfile.append(profile.data(), profile.size());
}