mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Expose tracing functionality via new cef_trace.h and cef_trace_event.h headers (issue #711).
- Add about:tracing UI support (issue #711). - Avoid unnecessary string type conversions for values and process messages. - Add support for a 'note' attribute in patch.cfg. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@865 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -153,16 +153,7 @@ void CefFrameHostImpl::LoadString(const CefString& string,
|
||||
void CefFrameHostImpl::ExecuteJavaScript(const CefString& jsCode,
|
||||
const CefString& scriptUrl,
|
||||
int startLine) {
|
||||
if (jsCode.empty())
|
||||
return;
|
||||
if (startLine < 0)
|
||||
startLine = 0;
|
||||
|
||||
base::AutoLock lock_scope(state_lock_);
|
||||
if (browser_) {
|
||||
browser_->SendCode((is_main_frame_ ? kMainFrameId : frame_id_), true,
|
||||
jsCode, scriptUrl, startLine, NULL);
|
||||
}
|
||||
SendJavaScript(jsCode, scriptUrl, startLine);
|
||||
}
|
||||
|
||||
bool CefFrameHostImpl::IsMain() {
|
||||
@@ -234,6 +225,22 @@ void CefFrameHostImpl::VisitDOM(CefRefPtr<CefDOMVisitor> visitor) {
|
||||
NOTREACHED() << "VisitDOM cannot be called from the browser process";
|
||||
}
|
||||
|
||||
void CefFrameHostImpl::SendJavaScript(
|
||||
const std::string& jsCode,
|
||||
const std::string& scriptUrl,
|
||||
int startLine) {
|
||||
if (jsCode.empty())
|
||||
return;
|
||||
if (startLine < 0)
|
||||
startLine = 0;
|
||||
|
||||
base::AutoLock lock_scope(state_lock_);
|
||||
if (browser_) {
|
||||
browser_->SendCode((is_main_frame_ ? kMainFrameId : frame_id_), true,
|
||||
jsCode, scriptUrl, startLine, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void CefFrameHostImpl::Detach() {
|
||||
base::AutoLock lock_scope(state_lock_);
|
||||
browser_ = NULL;
|
||||
|
Reference in New Issue
Block a user