FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
bool FB::PluginCore::isWindowless ( )
virtual

Called by the browser to query if this plugin should be windowless.

The default implementation supports a "windowless" param and checks m_params["windowless"] to determine if the plugin should be windowless or not. To force always windowless, override and return true. To force never windowless, override and return false.

Returns
true if windowless, false if not.

Definition at line 133 of file PluginCore.cpp.

References m_params.

134 {
135  if (boost::indeterminate(m_windowLessParam)) {
136  // initialise m_windowLessParam (defaulting to not windowless)
137  m_windowLessParam = false;
138  FB::VariantMap::iterator itr = m_params.find("windowless");
139  if (itr != m_params.end()) {
140  try {
141  m_windowLessParam = itr->second.convert_cast<bool>();
142  } catch (const FB::bad_variant_cast& ex) {
143  FB_UNUSED_VARIABLE(ex);
144  }
145  }
146  }
147  return m_windowLessParam;
148 }
FB::VariantMap m_params
Definition: PluginCore.h:361
Thrown when variant::cast<type> or variant::convert_cast<type> fails because the type of the value st...
Definition: variant.h:133