mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Significant API changes for issue #218:
- Replace CefHandler with a new CefClient interface and separate handler interfaces. - Add support for virtual inheritance to allow multiple CefBase parented interfaces to be implemented in the same class. - Replace CefThreadSafeBase with IMPLEMENT_* macros to support virtual inheritance and to only provide locking implementations when needed. - Move the CefBrowserSettings parameter from CefInitialize to CreateBrowser. - Add a new cef_build.h header that provides platform-specific and OS_* defines. - Introduce the use of OVERRIDE to generate compiler errors on Windows if a child virtual method declaration doesn't match the parent declaration. - Use NDEBUG instead of _DEBUG because _DEBUG is not defined on Mac. (issue #240). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@235 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -83,22 +83,18 @@ void TrackDestructor(v8::Persistent<v8::Value> object, void* parameter)
|
||||
// Return the browser associated with the specified WebFrame.
|
||||
CefRefPtr<CefBrowserImpl> FindBrowserForFrame(WebKit::WebFrame *frame)
|
||||
{
|
||||
CefRefPtr<CefBrowserImpl> browser;
|
||||
|
||||
CefContext::BrowserList *list;
|
||||
CefContext::AutoLock lock_scope(_Context);
|
||||
|
||||
CefContext::BrowserList *list = _Context->GetBrowserList();
|
||||
CefContext::BrowserList::const_iterator i;
|
||||
_Context->Lock();
|
||||
list = _Context->GetBrowserList();
|
||||
i = list->begin();
|
||||
for (; i != list->end(); ++i) {
|
||||
WebKit::WebFrame* thisframe = i->get()->UIT_GetMainWebFrame();
|
||||
if (thisframe == frame) {
|
||||
browser = i->get();
|
||||
break;
|
||||
}
|
||||
if (thisframe == frame)
|
||||
return i->get();
|
||||
}
|
||||
_Context->Unlock();
|
||||
return browser;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Convert a wide string to a V8 string.
|
||||
@@ -293,7 +289,7 @@ CefRefPtr<CefV8Context> CefV8Context::GetEnteredContext()
|
||||
// CefV8ContextImpl
|
||||
|
||||
CefV8ContextImpl::CefV8ContextImpl(v8::Handle<v8::Context> context)
|
||||
#ifdef _DEBUG
|
||||
#ifndef NDEBUG
|
||||
: enter_count_(0)
|
||||
#endif
|
||||
{
|
||||
@@ -346,7 +342,7 @@ bool CefV8ContextImpl::Enter()
|
||||
{
|
||||
CEF_REQUIRE_UI_THREAD(false);
|
||||
v8_context_->GetHandle()->Enter();
|
||||
#ifdef _DEBUG
|
||||
#ifndef NDEBUG
|
||||
++enter_count_;
|
||||
#endif
|
||||
return true;
|
||||
@@ -357,7 +353,7 @@ bool CefV8ContextImpl::Exit()
|
||||
CEF_REQUIRE_UI_THREAD(false);
|
||||
DLOG_ASSERT(enter_count_ > 0);
|
||||
v8_context_->GetHandle()->Exit();
|
||||
#ifdef _DEBUG
|
||||
#ifndef NDEBUG
|
||||
--enter_count_;
|
||||
#endif
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user