Пример #1
0
int CEF_CALLBACK cef_display_handler_t_on_console_message(
      struct _cef_display_handler_t* self,
      struct _cef_browser_t* browser, const cef_string_t* message,
      const cef_string_t* source, int line) {
    go_OnConsoleMessage(browser, message, source, line);
    return 1;
}
Пример #2
0
///
// Called to display a console message. Return true (1) to stop the message
// from being output to the console.
///
int CEF_CALLBACK _cef_display_handler_t_on_console_message(struct _cef_display_handler_t* self,
    struct _cef_browser_t* browser, const cef_string_t* message,
    const cef_string_t* source, int line) {

  cef_string_utf8_t * out1 = cefStringToUtf8(message);
  cef_string_utf8_t * out2 = cefStringToUtf8(source);
  int ret = go_OnConsoleMessage(self, browser, out1->str, out2->str, line);
  cef_string_userfree_utf8_free(out2);
  cef_string_userfree_utf8_free(out1);
  return ret;

}