Allow registration of non-standard schemes (issue #195).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@199 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-03-04 17:56:01 +00:00
parent 131ac33548
commit 1f01d6b2a8
7 changed files with 81 additions and 26 deletions

View File

@@ -120,7 +120,7 @@ CEF_EXPORT int cef_register_plugin(const cef_plugin_info_t* plugin_info)
}
CEF_EXPORT int cef_register_scheme(const cef_string_t* scheme_name,
const cef_string_t* host_name,
const cef_string_t* host_name, int is_standard,
struct _cef_scheme_handler_factory_t* factory)
{
DCHECK(scheme_name);
@@ -129,7 +129,7 @@ CEF_EXPORT int cef_register_scheme(const cef_string_t* scheme_name,
return 0;
return CefRegisterScheme(CefString(scheme_name), CefString(host_name),
CefSchemeHandlerFactoryCToCpp::Wrap(factory));
(is_standard?true:false), CefSchemeHandlerFactoryCToCpp::Wrap(factory));
}
CEF_EXPORT int cef_currently_on(cef_thread_id_t threadId)

View File

@@ -97,10 +97,11 @@ bool CefRegisterPlugin(const CefPluginInfo& plugin_info)
bool CefRegisterScheme(const CefString& scheme_name,
const CefString& host_name,
bool is_standard,
CefRefPtr<CefSchemeHandlerFactory> factory)
{
return cef_register_scheme(scheme_name.GetStruct(), host_name.GetStruct(),
CefSchemeHandlerFactoryCppToC::Wrap(factory))?true:false;
is_standard, CefSchemeHandlerFactoryCppToC::Wrap(factory))?true:false;
}
bool CefCurrentlyOn(CefThreadId threadId)