mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Support DevTools without remote debugging via CefBrowserHost::ShowDevTools and CloseDevTools methods (issue #659).
- Fix loading of DevTools frontend from chrome-devtools scheme (issue #1095). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1510 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -348,6 +348,55 @@ void CEF_CALLBACK browser_host_stop_finding(struct _cef_browser_host_t* self,
|
||||
clearSelection?true:false);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_host_show_dev_tools(struct _cef_browser_host_t* self,
|
||||
const cef_window_info_t* windowInfo, struct _cef_client_t* client,
|
||||
const struct _cef_browser_settings_t* settings) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: windowInfo; type: struct_byref_const
|
||||
DCHECK(windowInfo);
|
||||
if (!windowInfo)
|
||||
return;
|
||||
// Verify param: client; type: refptr_diff
|
||||
DCHECK(client);
|
||||
if (!client)
|
||||
return;
|
||||
// Verify param: settings; type: struct_byref_const
|
||||
DCHECK(settings);
|
||||
if (!settings)
|
||||
return;
|
||||
|
||||
// Translate param: windowInfo; type: struct_byref_const
|
||||
CefWindowInfo windowInfoObj;
|
||||
if (windowInfo)
|
||||
windowInfoObj.Set(*windowInfo, false);
|
||||
// Translate param: settings; type: struct_byref_const
|
||||
CefBrowserSettings settingsObj;
|
||||
if (settings)
|
||||
settingsObj.Set(*settings, false);
|
||||
|
||||
// Execute
|
||||
CefBrowserHostCppToC::Get(self)->ShowDevTools(
|
||||
windowInfoObj,
|
||||
CefClientCToCpp::Wrap(client),
|
||||
settingsObj);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_host_close_dev_tools(
|
||||
struct _cef_browser_host_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBrowserHostCppToC::Get(self)->CloseDevTools();
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_host_set_mouse_cursor_change_disabled(
|
||||
struct _cef_browser_host_t* self, int disabled) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@@ -635,6 +684,8 @@ CefBrowserHostCppToC::CefBrowserHostCppToC(CefBrowserHost* cls)
|
||||
struct_.struct_.print = browser_host_print;
|
||||
struct_.struct_.find = browser_host_find;
|
||||
struct_.struct_.stop_finding = browser_host_stop_finding;
|
||||
struct_.struct_.show_dev_tools = browser_host_show_dev_tools;
|
||||
struct_.struct_.close_dev_tools = browser_host_close_dev_tools;
|
||||
struct_.struct_.set_mouse_cursor_change_disabled =
|
||||
browser_host_set_mouse_cursor_change_disabled;
|
||||
struct_.struct_.is_mouse_cursor_change_disabled =
|
||||
|
@@ -292,6 +292,35 @@ void CefBrowserHostCToCpp::StopFinding(bool clearSelection) {
|
||||
clearSelection);
|
||||
}
|
||||
|
||||
void CefBrowserHostCToCpp::ShowDevTools(const CefWindowInfo& windowInfo,
|
||||
CefRefPtr<CefClient> client, const CefBrowserSettings& settings) {
|
||||
if (CEF_MEMBER_MISSING(struct_, show_dev_tools))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: client; type: refptr_diff
|
||||
DCHECK(client.get());
|
||||
if (!client.get())
|
||||
return;
|
||||
|
||||
// Execute
|
||||
struct_->show_dev_tools(struct_,
|
||||
&windowInfo,
|
||||
CefClientCppToC::Wrap(client),
|
||||
&settings);
|
||||
}
|
||||
|
||||
void CefBrowserHostCToCpp::CloseDevTools() {
|
||||
if (CEF_MEMBER_MISSING(struct_, close_dev_tools))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
struct_->close_dev_tools(struct_);
|
||||
}
|
||||
|
||||
void CefBrowserHostCToCpp::SetMouseCursorChangeDisabled(bool disabled) {
|
||||
if (CEF_MEMBER_MISSING(struct_, set_mouse_cursor_change_disabled))
|
||||
return;
|
||||
|
@@ -57,6 +57,10 @@ class CefBrowserHostCToCpp
|
||||
virtual void Find(int identifier, const CefString& searchText, bool forward,
|
||||
bool matchCase, bool findNext) OVERRIDE;
|
||||
virtual void StopFinding(bool clearSelection) OVERRIDE;
|
||||
virtual void ShowDevTools(const CefWindowInfo& windowInfo,
|
||||
CefRefPtr<CefClient> client,
|
||||
const CefBrowserSettings& settings) OVERRIDE;
|
||||
virtual void CloseDevTools() OVERRIDE;
|
||||
virtual void SetMouseCursorChangeDisabled(bool disabled) OVERRIDE;
|
||||
virtual bool IsMouseCursorChangeDisabled() OVERRIDE;
|
||||
virtual bool IsWindowRenderingDisabled() OVERRIDE;
|
||||
|
Reference in New Issue
Block a user