extern CefRefPtr<NageruCefApp> cef_app;
CEFCapture::CEFCapture(const string &url, unsigned width, unsigned height)
- : cef_client(new NageruCEFClient(width, height, this)),
+ : cef_client(new NageruCEFClient(this)),
width(width),
height(height),
start_url(url)
class NageruCEFClient : public CefClient, public CefRenderHandler, public CefLoadHandler
{
public:
- NageruCEFClient(int width, int height, CEFCapture *parent)
- : width(width), height(height), parent(parent) {}
+ NageruCEFClient(CEFCapture *parent)
+ : parent(parent) {}
CefRefPtr<CefRenderHandler> GetRenderHandler() override
{
void OnPaint(CefRefPtr<CefBrowser> browser, PaintElementType type, const RectList &dirtyRects, const void *buffer, int width, int height) override;
- bool GetViewRect(CefRefPtr<CefBrowser> browser, CefRect &rect);
+ bool GetViewRect(CefRefPtr<CefBrowser> browser, CefRect &rect) override;
// CefLoadHandler.
void OnLoadEnd(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, int httpStatusCode) override;
private:
- int width, height;
CEFCapture *parent;
IMPLEMENT_REFCOUNTING(NageruCEFClient);
assert(pixel_format == bmusb::PixelFormat_8BitBGRA);
}
- bmusb::PixelFormat get_current_pixel_format() const
+ bmusb::PixelFormat get_current_pixel_format() const override
{
return bmusb::PixelFormat_8BitBGRA;
}
return this;
}
- void OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr<CefCommandLine> command_line);
+ void OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr<CefCommandLine> command_line) override;
private:
void cef_thread_func();