mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
libcef:
- Add the CefBrowser::CreateBrowserSync() method for synchronously creating a browser instance. (Issue #13, Suggested implementation by: vridosh) - Add CefBrowser::SetFocus() and CefHandler::HandleTakeFocus() methods to deal with keyboard focus changes. (Issue #13, Suggested implementation by: vridosh) - Add CefHandler::HandleBeforeWindowClose() to perform actions immediately before the browser window is destroyed. (Issue #13, Suggested implementation by: vridosh) - Replace windows-specific address resolution code with GURL() in CefBrowserImpl::UIT_LoadURLForRequest(), CefBrowserImpl::UIT_LoadHTML() and CefBrowserImpl::UIT_LoadHTMLForStreamRef(), and move the methods from browser_impl_win.cc to browser_impl.cc. (Issue #13, Suggested implementation by: vridosh) - Fix reference counting bugs, class definition problems and CefContext::Shutdown() bug resulting in Cef object leaks. (Issue #15) - Add WebKit dependancy to libcef project. - Add basic object count debugging for CefCToCpp and CefCppToC classes. cefclient: - Initialize the strPtr parameter to avoid URLs suffixed with garbage. (Issue #13, Fix by: vridosh) git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@19 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -10,6 +10,7 @@
|
||||
#include "ctocpp/jshandler_ctocpp.h"
|
||||
#include "base/logging.h"
|
||||
|
||||
|
||||
int CEF_CALLBACK browser_can_go_back(cef_browser_t* browser)
|
||||
{
|
||||
DCHECK(browser);
|
||||
@ -160,6 +161,17 @@ void CEF_CALLBACK browser_select_all(cef_browser_t* browser,
|
||||
impl->class_->GetClass()->SelectAll(targetFrame);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_set_focus(struct _cef_browser_t* browser, int enable)
|
||||
{
|
||||
DCHECK(browser);
|
||||
if(!browser)
|
||||
return;
|
||||
|
||||
CefBrowserCppToC::Struct* impl =
|
||||
reinterpret_cast<CefBrowserCppToC::Struct*>(browser);
|
||||
impl->class_->GetClass()->SetFocus(enable ? true : false);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_print(cef_browser_t* browser,
|
||||
enum cef_targetframe_t targetFrame)
|
||||
{
|
||||
@ -460,7 +472,7 @@ cef_string_t CEF_CALLBACK browser_get_url(cef_browser_t* browser)
|
||||
return cef_string_alloc(urlStr.c_str());
|
||||
}
|
||||
|
||||
CefBrowserCppToC::CefBrowserCppToC(CefRefPtr<CefBrowser> cls)
|
||||
CefBrowserCppToC::CefBrowserCppToC(CefBrowser* cls)
|
||||
: CefCppToC<CefBrowser, cef_browser_t>(cls)
|
||||
{
|
||||
struct_.struct_.can_go_back = browser_can_go_back;
|
||||
@ -476,6 +488,7 @@ CefBrowserCppToC::CefBrowserCppToC(CefRefPtr<CefBrowser> cls)
|
||||
struct_.struct_.paste = browser_paste;
|
||||
struct_.struct_.del = browser_delete;
|
||||
struct_.struct_.select_all = browser_select_all;
|
||||
struct_.struct_.set_focus = browser_set_focus;
|
||||
struct_.struct_.print = browser_print;
|
||||
struct_.struct_.view_source = browser_view_source;
|
||||
struct_.struct_.get_source = browser_get_source;
|
||||
@ -495,3 +508,7 @@ CefBrowserCppToC::CefBrowserCppToC(CefRefPtr<CefBrowser> cls)
|
||||
struct_.struct_.get_handler = browser_get_handler;
|
||||
struct_.struct_.get_url = browser_get_url;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
long CefCppToC<CefBrowser, cef_browser_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user