- Add a CefBrowser::ClearHistory() method for clearing back/forward browsing history (issue #352).

- Move RegisterDevToolsSchemeHandler() call to CefContext::Initialize() to fix assertion when using multi-threaded message loop on Windows.
- Add new NavigationTest.History test.
- Remove unused RequestTest.HistoryNav test.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@301 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-10-04 11:49:36 +00:00
parent fb67a371fe
commit 50b909a417
13 changed files with 266 additions and 144 deletions

View File

@@ -307,12 +307,20 @@ void CEF_CALLBACK browser_set_zoom_level(struct _cef_browser_t* self,
return CefBrowserCppToC::Get(self)->SetZoomLevel(zoomLevel);
}
void CEF_CALLBACK browser_show_dev_tools(struct _cef_browser_t* self)
void CEF_CALLBACK browser_clear_history(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return;
CefBrowserCppToC::Get(self)->ClearHistory();
}
void CEF_CALLBACK browser_show_dev_tools(struct _cef_browser_t* self)
{
DCHECK(self);
if(!self)
return;
CefBrowserCppToC::Get(self)->ShowDevTools();
}
@@ -491,6 +499,7 @@ CefBrowserCppToC::CefBrowserCppToC(CefBrowser* cls)
struct_.struct_.stop_finding = browser_stop_finding;
struct_.struct_.get_zoom_level = browser_get_zoom_level;
struct_.struct_.set_zoom_level = browser_set_zoom_level;
struct_.struct_.clear_history = browser_clear_history;
struct_.struct_.show_dev_tools = browser_show_dev_tools;
struct_.struct_.close_dev_tools = browser_close_dev_tools;
struct_.struct_.is_window_rendering_disabled =

View File

@@ -246,6 +246,14 @@ void CefBrowserCToCpp::SetZoomLevel(double zoomLevel)
return struct_->set_zoom_level(struct_, zoomLevel);
}
void CefBrowserCToCpp::ClearHistory()
{
if (CEF_MEMBER_MISSING(struct_, clear_history))
return;
struct_->clear_history(struct_);
}
void CefBrowserCToCpp::ShowDevTools()
{
if (CEF_MEMBER_MISSING(struct_, show_dev_tools))

View File

@@ -55,6 +55,7 @@ public:
virtual void StopFinding(bool clearSelection) OVERRIDE;
virtual double GetZoomLevel() OVERRIDE;
virtual void SetZoomLevel(double zoomLevel) OVERRIDE;
virtual void ClearHistory() OVERRIDE;
virtual void ShowDevTools() OVERRIDE;
virtual void CloseDevTools() OVERRIDE;
virtual bool IsWindowRenderingDisabled() OVERRIDE;