Upgrade CEF 3 to branch 1364, r1050

This adds support for accessing native extensions in web workers, though it may
not work quite how we need it to just yet. Figured we'd bank an upgrade anyway.
This commit is contained in:
Kevin Sawicki & Nathan Sobo 2013-01-21 18:03:32 -07:00
parent ba7449411e
commit d09610cbcd
276 changed files with 2610 additions and 792 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,4 @@
# Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
# Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
#
@ -39,6 +39,7 @@
'cef/include/cef_process_message.h',
'cef/include/cef_process_util.h',
'cef/include/cef_proxy_handler.h',
'cef/include/cef_render_handler.h',
'cef/include/cef_render_process_handler.h',
'cef/include/cef_request.h',
'cef/include/cef_request_handler.h',
@ -86,6 +87,7 @@
'cef/include/capi/cef_process_message_capi.h',
'cef/include/capi/cef_process_util_capi.h',
'cef/include/capi/cef_proxy_handler_capi.h',
'cef/include/capi/cef_render_handler_capi.h',
'cef/include/capi/cef_render_process_handler_capi.h',
'cef/include/capi/cef_request_capi.h',
'cef/include/capi/cef_request_handler_capi.h',
@ -194,6 +196,8 @@
'cef/libcef_dll/cpptoc/quota_callback_cpptoc.h',
'cef/libcef_dll/ctocpp/read_handler_ctocpp.cc',
'cef/libcef_dll/ctocpp/read_handler_ctocpp.h',
'cef/libcef_dll/ctocpp/render_handler_ctocpp.cc',
'cef/libcef_dll/ctocpp/render_handler_ctocpp.h',
'cef/libcef_dll/ctocpp/render_process_handler_ctocpp.cc',
'cef/libcef_dll/ctocpp/render_process_handler_ctocpp.h',
'cef/libcef_dll/cpptoc/request_cpptoc.cc',
@ -220,6 +224,8 @@
'cef/libcef_dll/ctocpp/string_visitor_ctocpp.h',
'cef/libcef_dll/ctocpp/task_ctocpp.cc',
'cef/libcef_dll/ctocpp/task_ctocpp.h',
'cef/libcef_dll/cpptoc/task_runner_cpptoc.cc',
'cef/libcef_dll/cpptoc/task_runner_cpptoc.h',
'cef/libcef_dll/ctocpp/trace_client_ctocpp.cc',
'cef/libcef_dll/ctocpp/trace_client_ctocpp.h',
'cef/libcef_dll/cpptoc/urlrequest_cpptoc.cc',
@ -342,6 +348,8 @@
'cef/libcef_dll/ctocpp/quota_callback_ctocpp.h',
'cef/libcef_dll/cpptoc/read_handler_cpptoc.cc',
'cef/libcef_dll/cpptoc/read_handler_cpptoc.h',
'cef/libcef_dll/cpptoc/render_handler_cpptoc.cc',
'cef/libcef_dll/cpptoc/render_handler_cpptoc.h',
'cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc',
'cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h',
'cef/libcef_dll/ctocpp/request_ctocpp.cc',
@ -368,6 +376,8 @@
'cef/libcef_dll/cpptoc/string_visitor_cpptoc.h',
'cef/libcef_dll/cpptoc/task_cpptoc.cc',
'cef/libcef_dll/cpptoc/task_cpptoc.h',
'cef/libcef_dll/ctocpp/task_runner_ctocpp.cc',
'cef/libcef_dll/ctocpp/task_runner_ctocpp.h',
'cef/libcef_dll/cpptoc/trace_client_cpptoc.cc',
'cef/libcef_dll/cpptoc/trace_client_cpptoc.h',
'cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc',

View File

@ -98,11 +98,16 @@
'tests/cefclient/dialog_test.h',
'tests/cefclient/dom_test.cpp',
'tests/cefclient/dom_test.h',
'tests/cefclient/performance_test.cpp',
'tests/cefclient/performance_test.h',
'tests/cefclient/performance_test_setup.h',
'tests/cefclient/performance_test_tests.cpp',
'tests/cefclient/res/binding.html',
'tests/cefclient/res/dialogs.html',
'tests/cefclient/res/domaccess.html',
'tests/cefclient/res/localstorage.html',
'tests/cefclient/res/logo.png',
'tests/cefclient/res/performance.html',
'tests/cefclient/res/xmlhttprequest.html',
'tests/cefclient/resource_util.h',
'tests/cefclient/scheme_test.cpp',
@ -113,12 +118,17 @@
],
'cefclient_sources_win': [
'tests/cefclient/cefclient.rc',
'tests/cefclient/cefclient_osr_widget_win.h',
'tests/cefclient/cefclient_osr_widget_win.cpp',
'tests/cefclient/cefclient_win.cpp',
'tests/cefclient/client_handler_win.cpp',
'tests/cefclient/osrenderer.h',
'tests/cefclient/osrenderer.cpp',
'tests/cefclient/resource.h',
'tests/cefclient/res/cefclient.ico',
'tests/cefclient/res/logoball.png',
'tests/cefclient/res/small.ico',
'tests/cefclient/res/transparency.html',
'tests/cefclient/resource_util_win.cpp',
],
'cefclient_sources_mac': [
@ -143,6 +153,10 @@
'tests/cefclient/dialog_test.h',
'tests/cefclient/dom_test.cpp',
'tests/cefclient/dom_test.h',
'tests/cefclient/performance_test.cpp',
'tests/cefclient/performance_test.h',
'tests/cefclient/performance_test_setup.h',
'tests/cefclient/performance_test_tests.cpp',
'tests/cefclient/process_helper_mac.cpp',
'tests/cefclient/resource_util.h',
'tests/cefclient/resource_util_mac.mm',
@ -162,6 +176,7 @@
'tests/cefclient/res/domaccess.html',
'tests/cefclient/res/localstorage.html',
'tests/cefclient/res/logo.png',
'tests/cefclient/res/performance.html',
'tests/cefclient/res/xmlhttprequest.html',
],
'cefclient_sources_linux': [
@ -175,6 +190,7 @@
'tests/cefclient/res/domaccess.html',
'tests/cefclient/res/localstorage.html',
'tests/cefclient/res/logo.png',
'tests/cefclient/res/performance.html',
'tests/cefclient/res/xmlhttprequest.html',
],
},

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@ -109,6 +109,13 @@ typedef struct _cef_browser_t {
///
int (CEF_CALLBACK *get_identifier)(struct _cef_browser_t* self);
///
// Returns true (1) if this object is pointing to the same handle as |that|
// object.
///
int (CEF_CALLBACK *is_same)(struct _cef_browser_t* self,
struct _cef_browser_t* that);
///
// Returns true (1) if the window is a popup window.
///
@ -290,6 +297,71 @@ typedef struct _cef_browser_host_t {
enum cef_file_dialog_mode_t mode, const cef_string_t* title,
const cef_string_t* default_file_name, cef_string_list_t accept_types,
struct _cef_run_file_dialog_callback_t* callback);
///
// Returns true (1) if window rendering is disabled.
///
int (CEF_CALLBACK *is_window_rendering_disabled)(
struct _cef_browser_host_t* self);
///
// Notify the browser that the widget has been resized. The browser will first
// call cef_render_handler_t::GetViewRect to get the new size and then call
// cef_render_handler_t::OnPaint asynchronously with the updated regions. This
// function is only used when window rendering is disabled.
///
void (CEF_CALLBACK *was_resized)(struct _cef_browser_host_t* self);
///
// Invalidate the |dirtyRect| region of the view. The browser will call
// cef_render_handler_t::OnPaint asynchronously with the updated regions. This
// function is only used when window rendering is disabled.
///
void (CEF_CALLBACK *invalidate)(struct _cef_browser_host_t* self,
const cef_rect_t* dirtyRect, enum cef_paint_element_type_t type);
///
// Send a key event to the browser.
///
void (CEF_CALLBACK *send_key_event)(struct _cef_browser_host_t* self,
const struct _cef_key_event_t* event);
///
// Send a mouse click event to the browser. The |x| and |y| coordinates are
// relative to the upper-left corner of the view.
///
void (CEF_CALLBACK *send_mouse_click_event)(struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event,
enum cef_mouse_button_type_t type, int mouseUp, int clickCount);
///
// Send a mouse move event to the browser. The |x| and |y| coordinates are
// relative to the upper-left corner of the view.
///
void (CEF_CALLBACK *send_mouse_move_event)(struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event, int mouseLeave);
///
// Send a mouse wheel event to the browser. The |x| and |y| coordinates are
// relative to the upper-left corner of the view. The |deltaX| and |deltaY|
// values represent the movement delta in the X and Y directions respectively.
// In order to scroll inside select popups with window rendering disabled
// cef_render_handler_t::GetScreenPoint should be implemented properly.
///
void (CEF_CALLBACK *send_mouse_wheel_event)(struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event, int deltaX, int deltaY);
///
// Send a focus event to the browser.
///
void (CEF_CALLBACK *send_focus_event)(struct _cef_browser_host_t* self,
int setFocus);
///
// Send a capture lost event to the browser.
///
void (CEF_CALLBACK *send_capture_lost_event)(
struct _cef_browser_host_t* self);
} cef_browser_host_t;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@ -72,12 +72,26 @@ typedef struct _cef_browser_process_handler_t {
struct _cef_browser_process_handler_t* self);
///
// Called on the browser process IO thread before a child process is launched.
// Provides an opportunity to modify the child process command line.
// Called before a child process is launched. Will be called on the browser
// process UI thread when launching a render process and on the browser
// process IO thread when launching a GPU or plugin process. Provides an
// opportunity to modify the child process command line. Do not keep a
// reference to |command_line| outside of this function.
///
void (CEF_CALLBACK *on_before_child_process_launch)(
struct _cef_browser_process_handler_t* self,
struct _cef_command_line_t* command_line);
///
// Called on the browser process IO thread after the main thread has been
// created for a new render process. Provides an opportunity to specify extra
// information that will be passed to
// cef_render_process_handler_t::on_render_thread_created() in the render
// process. Do not keep a reference to |extra_info| outside of this function.
///
void (CEF_CALLBACK *on_render_process_thread_created)(
struct _cef_browser_process_handler_t* self,
struct _cef_list_value_t* extra_info);
} cef_browser_process_handler_t;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@ -119,6 +119,12 @@ typedef struct _cef_client_t {
struct _cef_load_handler_t* (CEF_CALLBACK *get_load_handler)(
struct _cef_client_t* self);
///
// Return the handler for off-screen rendering events.
///
struct _cef_render_handler_t* (CEF_CALLBACK *get_render_handler)(
struct _cef_client_t* self);
///
// Return the handler for browser request events.
///

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@ -80,7 +80,8 @@ typedef struct _cef_display_handler_t {
// text that will be displayed in the tooltip. To handle the display of the
// tooltip yourself return true (1). Otherwise, you can optionally modify
// |text| and then return false (0) to allow the browser to display the
// tooltip.
// tooltip. When window rendering is disabled the application is responsible
// for drawing tooltips and the return value is ignored.
///
int (CEF_CALLBACK *on_tooltip)(struct _cef_display_handler_t* self,
struct _cef_browser_t* browser, cef_string_t* text);

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@ -145,13 +145,6 @@ typedef struct _cef_download_item_t {
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_mime_type)(
struct _cef_download_item_t* self);
///
// Returns the referrer character set.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_referrer_charset)(
struct _cef_download_item_t* self);
} cef_download_item_t;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -0,0 +1,118 @@
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the name Chromium Embedded
// Framework nor the names of its contributors may be used to endorse
// or promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool and should not edited
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
#ifndef CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include "include/capi/cef_base_capi.h"
///
// Implement this structure to handle events when window rendering is disabled.
// The functions of this structure will be called on the UI thread.
///
typedef struct _cef_render_handler_t {
///
// Base structure.
///
cef_base_t base;
///
// Called to retrieve the root window rectangle in screen coordinates. Return
// true (1) if the rectangle was provided.
///
int (CEF_CALLBACK *get_root_screen_rect)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, cef_rect_t* rect);
///
// Called to retrieve the view rectangle which is relative to screen
// coordinates. Return true (1) if the rectangle was provided.
///
int (CEF_CALLBACK *get_view_rect)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, cef_rect_t* rect);
///
// Called to retrieve the translation from view coordinates to actual screen
// coordinates. Return true (1) if the screen coordinates were provided.
///
int (CEF_CALLBACK *get_screen_point)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, int viewX, int viewY, int* screenX,
int* screenY);
///
// Called when the browser wants to show or hide the popup widget. The popup
// should be shown if |show| is true (1) and hidden if |show| is false (0).
///
void (CEF_CALLBACK *on_popup_show)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, int show);
///
// Called when the browser wants to move or resize the popup widget. |rect|
// contains the new location and size.
///
void (CEF_CALLBACK *on_popup_size)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, const cef_rect_t* rect);
///
// Called when an element should be painted. |type| indicates whether the
// element is the view or the popup widget. |buffer| contains the pixel data
// for the whole image. |dirtyRects| contains the set of rectangles that need
// to be repainted. On Windows |buffer| will be |width|*|height|*4 bytes in
// size and represents a BGRA image with an upper-left origin.
///
void (CEF_CALLBACK *on_paint)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, enum cef_paint_element_type_t type,
size_t dirtyRectsCount, cef_rect_t const* dirtyRects, const void* buffer,
int width, int height);
///
// Called when the browser window's cursor has changed.
///
void (CEF_CALLBACK *on_cursor_change)(struct _cef_render_handler_t* self,
struct _cef_browser_t* browser, cef_cursor_handle_t cursor);
} cef_render_handler_t;
#ifdef __cplusplus
}
#endif
#endif // CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@ -47,7 +47,8 @@ extern "C" {
///
// Structure used to implement render process callbacks. The functions of this
// structure will always be called on the render process main thread.
// structure will be called on the render process main thread (TID_RENDERER)
// unless otherwise indicated.
///
typedef struct _cef_render_process_handler_t {
///
@ -56,10 +57,14 @@ typedef struct _cef_render_process_handler_t {
cef_base_t base;
///
// Called after the render process main thread has been created.
// Called after the render process main thread has been created. |extra_info|
// is a read-only value originating from
// cef_browser_process_handler_t::on_render_process_thread_created(). Do not
// keep a reference to |extra_info| outside of this function.
///
void (CEF_CALLBACK *on_render_thread_created)(
struct _cef_render_process_handler_t* self);
struct _cef_render_process_handler_t* self,
struct _cef_list_value_t* extra_info);
///
// Called after WebKit has been initialized.
@ -68,7 +73,9 @@ typedef struct _cef_render_process_handler_t {
struct _cef_render_process_handler_t* self);
///
// Called after a browser has been created.
// Called after a browser has been created. When browsing cross-origin a new
// browser will be created before the old browser with the same identifier is
// destroyed.
///
void (CEF_CALLBACK *on_browser_created)(
struct _cef_render_process_handler_t* self,
@ -81,10 +88,24 @@ typedef struct _cef_render_process_handler_t {
struct _cef_render_process_handler_t* self,
struct _cef_browser_t* browser);
///
// Called before browser navigation. Return true (1) to cancel the navigation
// or false (0) to allow the navigation to proceed. The |request| object
// cannot be modified in this callback.
///
int (CEF_CALLBACK *on_before_navigation)(
struct _cef_render_process_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
struct _cef_request_t* request,
enum cef_navigation_type_t navigation_type, int is_redirect);
///
// Called immediately after the V8 context for a frame has been created. To
// retrieve the JavaScript 'window' object use the
// cef_v8context_t::get_global() function.
// cef_v8context_t::get_global() function. V8 handles can only be accessed
// from the thread on which they are created. A task runner for posting tasks
// on the associated thread can be retrieved via the
// cef_v8context_t::get_task_runner() function.
///
void (CEF_CALLBACK *on_context_created)(
struct _cef_render_process_handler_t* self,
@ -100,6 +121,50 @@ typedef struct _cef_render_process_handler_t {
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
struct _cef_v8context_t* context);
///
// Called for global uncaught exceptions in a frame. Execution of this
// callback is disabled by default. To enable set
// CefSettings.uncaught_exception_stack_size > 0.
///
void (CEF_CALLBACK *on_uncaught_exception)(
struct _cef_render_process_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
struct _cef_v8context_t* context, struct _cef_v8exception_t* exception,
struct _cef_v8stack_trace_t* stackTrace);
///
// Called on the WebWorker thread immediately after the V8 context for a new
// WebWorker has been created. To retrieve the JavaScript 'self' object use
// the cef_v8context_t::get_global() function. V8 handles can only be accessed
// from the thread on which they are created. A task runner for posting tasks
// on the associated thread can be retrieved via the
// cef_v8context_t::get_task_runner() function.
///
void (CEF_CALLBACK *on_worker_context_created)(
struct _cef_render_process_handler_t* self, int worker_id,
const cef_string_t* url, struct _cef_v8context_t* context);
///
// Called on the WebWorker thread immediately before the V8 context for a
// WebWorker is released. No references to the context should be kept after
// this function is called. Any tasks posted or pending on the WebWorker
// thread after this function is called may not be executed.
///
void (CEF_CALLBACK *on_worker_context_released)(
struct _cef_render_process_handler_t* self, int worker_id,
const cef_string_t* url, struct _cef_v8context_t* context);
///
// Called on the WebWorker thread for global uncaught exceptions in a
// WebWorker. Execution of this callback is disabled by default. To enable set
// CefSettings.uncaught_exception_stack_size > 0.
///
void (CEF_CALLBACK *on_worker_uncaught_exception)(
struct _cef_render_process_handler_t* self, int worker_id,
const cef_string_t* url, struct _cef_v8context_t* context,
struct _cef_v8exception_t* exception,
struct _cef_v8stack_trace_t* stackTrace);
///
// Called when a new node in the the browser gets focus. The |node| value may
// be NULL if no specific node has gained focus. The node object passed to

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@ -132,9 +132,8 @@ typedef struct _cef_request_handler_t {
// Called on the IO thread when the browser needs credentials from the user.
// |isProxy| indicates whether the host is a proxy server. |host| contains the
// hostname and |port| contains the port number. Return true (1) to continue
// the request and call cef_auth_callback_t::Complete() when the
// authentication information is available. Return false (0) to cancel the
// request.
// the request and call cef_auth_callback_t::cont() when the authentication
// information is available. Return false (0) to cancel the request.
///
int (CEF_CALLBACK *get_auth_credentials)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame, int isProxy,
@ -145,9 +144,9 @@ typedef struct _cef_request_handler_t {
// Called on the IO thread when JavaScript requests a specific storage quota
// size via the webkitStorageInfo.requestQuota function. |origin_url| is the
// origin of the page making the request. |new_size| is the requested quota
// size in bytes. Return true (1) and call cef_quota_callback_t::Complete()
// either in this function or at a later time to grant or deny the request.
// Return false (0) to cancel the request.
// size in bytes. Return true (1) and call cef_quota_callback_t::cont() either
// in this function or at a later time to grant or deny the request. Return
// false (0) to cancel the request.
///
int (CEF_CALLBACK *on_quota_request)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* origin_url,

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@ -46,33 +46,33 @@ extern "C" {
///
// CEF maintains multiple internal threads that are used for handling different
// types of tasks in different processes. See the cef_thread_id_t definitions in
// cef_types.h for more information. This function will return true (1) if
// called on the specified thread. It is an error to request a thread from the
// wrong process.
// Returns true (1) if called on the specified thread. Equivalent to using
// cef_task_runner_t::GetForThread(threadId)->belongs_to_current_thread().
///
CEF_EXPORT int cef_currently_on(cef_thread_id_t threadId);
///
// Post a task for execution on the specified thread. This function may be
// called on any thread. It is an error to request a thread from the wrong
// process.
// Post a task for execution on the specified thread. Equivalent to using
// cef_task_runner_t::GetForThread(threadId)->PostTask(task).
///
CEF_EXPORT int cef_post_task(cef_thread_id_t threadId,
struct _cef_task_t* task);
///
// Post a task for delayed execution on the specified thread. This function may
// be called on any thread. It is an error to request a thread from the wrong
// process.
// Post a task for delayed execution on the specified thread. Equivalent to
// using cef_task_runner_t::GetForThread(threadId)->PostDelayedTask(task,
// delay_ms).
///
CEF_EXPORT int cef_post_delayed_task(cef_thread_id_t threadId,
struct _cef_task_t* task, int64 delay_ms);
///
// Implement this structure for task execution. The functions of this structure
// may be called on any thread.
// Implement this structure for asynchronous task execution. If the task is
// posted successfully and if the associated message loop is still running then
// the execute() function will be called on the target thread. If the task fails
// to post then the task object may be destroyed on the source thread instead of
// the target thread. For this reason be cautious when performing work in the
// task object destructor.
///
typedef struct _cef_task_t {
///
@ -81,13 +81,78 @@ typedef struct _cef_task_t {
cef_base_t base;
///
// Method that will be executed. |threadId| is the thread executing the call.
// Method that will be executed on the target thread.
///
void (CEF_CALLBACK *execute)(struct _cef_task_t* self,
cef_thread_id_t threadId);
void (CEF_CALLBACK *execute)(struct _cef_task_t* self);
} cef_task_t;
///
// Structure that asynchronously executes tasks on the associated thread. It is
// safe to call the functions of this structure on any thread.
//
// CEF maintains multiple internal threads that are used for handling different
// types of tasks in different processes. The cef_thread_id_t definitions in
// cef_types.h list the common CEF threads. Task runners are also available for
// other CEF threads as appropriate (for example, V8 WebWorker threads).
///
typedef struct _cef_task_runner_t {
///
// Base structure.
///
cef_base_t base;
///
// Returns true (1) if this object is pointing to the same task runner as
// |that| object.
///
int (CEF_CALLBACK *is_same)(struct _cef_task_runner_t* self,
struct _cef_task_runner_t* that);
///
// Returns true (1) if this task runner belongs to the current thread.
///
int (CEF_CALLBACK *belongs_to_current_thread)(
struct _cef_task_runner_t* self);
///
// Returns true (1) if this task runner is for the specified CEF thread.
///
int (CEF_CALLBACK *belongs_to_thread)(struct _cef_task_runner_t* self,
cef_thread_id_t threadId);
///
// Post a task for execution on the thread associated with this task runner.
// Execution will occur asynchronously.
///
int (CEF_CALLBACK *post_task)(struct _cef_task_runner_t* self,
struct _cef_task_t* task);
///
// Post a task for delayed execution on the thread associated with this task
// runner. Execution will occur asynchronously. Delayed tasks are not
// supported on V8 WebWorker threads and will be executed without the
// specified delay.
///
int (CEF_CALLBACK *post_delayed_task)(struct _cef_task_runner_t* self,
struct _cef_task_t* task, int64 delay_ms);
} cef_task_runner_t;
///
// Returns the task runner for the current thread. Only CEF threads will have
// task runners. An NULL reference will be returned if this function is called
// on an invalid thread.
///
CEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_current_thread();
///
// Returns the task runner for the specified CEF thread.
///
CEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_thread(
cef_thread_id_t threadId);
#ifdef __cplusplus
}
#endif

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View File

@ -1,4 +1,4 @@
// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

Some files were not shown because too many files have changed in this diff Show More