本文整理汇总了C++中wtf::PassRefPtr::focusPluginElement方法的典型用法代码示例。如果您正苦于以下问题:C++ PassRefPtr::focusPluginElement方法的具体用法?C++ PassRefPtr::focusPluginElement怎么用?C++ PassRefPtr::focusPluginElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wtf::PassRefPtr
的用法示例。
在下文中一共展示了PassRefPtr::focusPluginElement方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: swapPlugin
//SanJose++
void swapPlugin(RenderWidget* renderer, bool isFocused) {
//SanJose--
typedef FrameLoaderClientAndroid FLCA;
FLCA* client = static_cast<FLCA*>(m_parent->loader()->client());
client->enableOnDemandPlugins();
WTF::PassRefPtr<PluginView> prpWidget =
PluginView::create(m_parent.get(),
m_size,
m_element,
m_url,
m_paramNames,
m_paramValues,
m_mimeType,
m_loadManually);
RefPtr<Widget> myProtector(this);
//SanJose++
//When on demand is on and flash is loaded by clicking the PluginToggleWidget, sroll deost work
//on flash objects.
//ex: aftonbladet.se. This happens because when the flash is selected for download, ALL flash
//objects are set to be focused through the following API. None of flash objects is set to be
//focused (due to no selection) when "always on" is enabled, in which case scroll has no problem.
//FIX: Only set focus for the flash object user explicitly selected when flash is downloaded manually.
if (isFocused) {
prpWidget->focusPluginElement();
}
//SanJose--
renderer->setWidget(prpWidget);
}