- Move frame-related methods from CefBrowser into a new CefFrame class.

- Add CefBrowser::Get*Frame() methods for retrieving the appropriate CefFrame instance.
- Add a CefFrame attribute to CefHandler callback methods where appropriate.
- Add support for V8 JavaScript extensions and values via CefV8Value and CefV8Handler.  Native C++ and user-defined JavaScript object hierarchies may now be created and accessed using the CEF API.
- Remove the CefHandler and CefVariant classes and related CefBrowser methods that have been obsoleted by the addition of CEF V8 support.
- Add the CefRegisterExtension() function for registering system-wide V8 extensions.
- Add the CefHandler::HandleJSBinding() callback method for attaching V8 values to the global frame JavaScript object.  This method replaces the previous technique of calling CefBrowser::AddJSHandler().
- Add new wrapper template methods for simplifying DLL wrapper implementations.
- Move cef_string* files from libcef_dll to libcef so that projects can link libcef statically without errors.
- Fix crashes when CEF exits due to object constructors being executed on non-UI threads if the application is closed while a page is still loading.
- Update the cefclient project to reflect changes and demonstrate the new APIs.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@26 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2009-05-28 00:31:21 +00:00
parent 94dfad49d9
commit c295931b1e
74 changed files with 5168 additions and 4657 deletions

View File

@@ -16,11 +16,12 @@
// Wrap a C browser structure with a C++ browser class.
// This class may be instantiated and accessed wrapper-side only.
class CefBrowserCToCpp : public CefCToCpp<CefBrowser, cef_browser_t>
class CefBrowserCToCpp
: public CefCToCpp<CefBrowserCToCpp, CefBrowser, cef_browser_t>
{
public:
CefBrowserCToCpp(cef_browser_t* str)
: CefCToCpp<CefBrowser, cef_browser_t>(str) {}
: CefCToCpp<CefBrowserCToCpp, CefBrowser, cef_browser_t>(str) {}
virtual ~CefBrowserCToCpp() {}
// CefBrowser methods
@@ -30,37 +31,14 @@ public:
virtual void GoForward();
virtual void Reload();
virtual void StopLoad();
virtual void Undo(TargetFrame targetFrame);
virtual void Redo(TargetFrame targetFrame);
virtual void Cut(TargetFrame targetFrame);
virtual void Copy(TargetFrame targetFrame);
virtual void Paste(TargetFrame targetFrame);
virtual void Delete(TargetFrame targetFrame);
virtual void SelectAll(TargetFrame targetFrame);
virtual void SetFocus(bool enable);
virtual void Print(TargetFrame targetFrame);
virtual void ViewSource(TargetFrame targetFrame);
virtual std::wstring GetSource(TargetFrame targetFrame);
virtual std::wstring GetText(TargetFrame targetFrame);
virtual void LoadRequest(CefRefPtr<CefRequest> request);
virtual void LoadURL(const std::wstring& url, const std::wstring& frame);
virtual void LoadString(const std::wstring& string,
const std::wstring& url);
virtual void LoadStream(CefRefPtr<CefStreamReader> stream,
const std::wstring& url);
virtual void ExecuteJavaScript(const std::wstring& js_code,
const std::wstring& script_url,
int start_line, TargetFrame targetFrame);
virtual bool AddJSHandler(const std::wstring& classname,
CefRefPtr<CefJSHandler> handler);
virtual bool HasJSHandler(const std::wstring& classname);
virtual CefRefPtr<CefJSHandler> GetJSHandler(const std::wstring& classname);
virtual bool RemoveJSHandler(const std::wstring& classname);
virtual void RemoveAllJSHandlers();
virtual CefWindowHandle GetWindowHandle();
virtual bool IsPopup();
virtual CefRefPtr<CefHandler> GetHandler();
virtual std::wstring GetURL();
virtual CefRefPtr<CefFrame> GetMainFrame();
virtual CefRefPtr<CefFrame> GetFocusedFrame();
virtual CefRefPtr<CefFrame> GetFrame(const std::wstring& name);
virtual void GetFrameNames(std::vector<std::wstring>& names);
};