- 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:
Marshall Greenblatt
2009-03-08 02:26:16 +00:00
parent 3aa0d4c0fa
commit 08a19d5384
37 changed files with 628 additions and 195 deletions

View File

@ -75,6 +75,9 @@ public:
// itself from memory. The resulting reference count value is returned and
// should be used for diagnostic/testing purposes only.
virtual int Release() =0;
// Return the current number of references.
virtual int GetRefCt() = 0;
};
@ -112,18 +115,18 @@ public:
{
m_dwRef = 0L;
}
~CefThreadSafeBase()
virtual ~CefThreadSafeBase()
{
}
// Atomic reference increment.
int AddRef()
virtual int AddRef()
{
return CefAtomicIncrement(&m_dwRef);
}
// Atomic reference decrement. Delete this object when no references remain.
int Release()
virtual int Release()
{
int retval = CefAtomicDecrement(&m_dwRef);
if(retval == 0)
@ -131,6 +134,9 @@ public:
return retval;
}
// Return the current number of references.
virtual int GetRefCt() { return m_dwRef; }
// Use the Lock() and Unlock() methods to protect a section of code from
// simultaneous access by multiple threads.
void Lock() { m_critsec.Lock(); }
@ -166,6 +172,15 @@ public:
CefRefPtr<CefHandler> handler,
const std::wstring& url);
// Create a new browser window using the window parameters specified
// by |windowInfo|. The |popup| parameter should be true if the new window is
// a popup window. This method call will block and can only be used if
// the |multi_threaded_message_loop| parameter to CefInitialize() is false.
static CefRefPtr<CefBrowser> CreateBrowserSync(CefWindowInfo& windowInfo,
bool popup,
CefRefPtr<CefHandler> handler,
const std::wstring& url);
// Returns true if the browser can navigate backwards.
virtual bool CanGoBack() =0;
// Navigate backwards.
@ -198,6 +213,10 @@ public:
// Execute select all in the target frame.
virtual void SelectAll(TargetFrame targetFrame) =0;
// Set focus for the browser window. If |enable| is true focus will be set
// to the window. Otherwise, focus will be removed.
virtual void SetFocus(bool enable) =0;
// Execute printing in the target frame. The user will be prompted with
// the print dialog appropriate to the operating system.
virtual void Print(TargetFrame targetFrame) =0;
@ -420,6 +439,15 @@ public:
bool& retval,
std::wstring& result) =0;
// Called just before a window is closed. The return value is currently
// ignored.
virtual RetVal HandleBeforeWindowClose(CefRefPtr<CefBrowser> browser) =0;
// Called when the browser component is about to loose focus. For instance,
// if focus was on the last HTML element and the user pressed the TAB key.
// The return value is currently ignored.
virtual RetVal HandleTakeFocus(CefRefPtr<CefBrowser> browser,
bool reverse) =0;
};