Ho to implement minimal CefResourceBundleHandler

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Ho to implement minimal CefResourceBundleHandler

Postby rado » Wed Nov 18, 2015 12:34 pm

I'm using Cef as background worker so user does not see it. So I guess the .pak files are not needed in the installation. I cannot find any example on this so I've tried to do this:

settings.pack_loading_disabled = true and implemented CefResourceBundleHandler like this:
Code: Select all
   
...
virtual bool GetLocalizedString(int string_id, CefString& string) OVERRIDE
   {
      string = L"";
      return true;
   }
   virtual bool GetDataResource(int resource_id,
      void*& data,
      size_t& data_size) OVERRIDE
   {
      data_size = 0;
      return true;
   }
   virtual bool GetDataResourceForScale(int resource_id,
      ScaleFactor scale_factor,
      void*& data,
      size_t& data_size) OVERRIDE
   {
      data_size = 0;
      return true;
   }


but it does not work - it asserts in initialization. In callstack I've found "[1118/182658:FATAL:browser_pref_store.cc(37)] Check failed: !resource_string.empty()." for path=spellcheck.dictionary mesage_id=28025.
Is there some set of resources I have to provide?
Thank you.
rado
Expert
 
Posts: 145
Joined: Wed Oct 05, 2011 3:32 am

Re: Ho to implement minimal CefResourceBundleHandler

Postby magreenblatt » Wed Nov 18, 2015 1:13 pm

You must provide most/all of the resources requested, otherwise things may break in hard-to-predict ways.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 62 guests