| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 { | 64 { |
| 65 if (m_devtoolsHost) | 65 if (m_devtoolsHost) |
| 66 m_devtoolsHost->disconnectClient(); | 66 m_devtoolsHost->disconnectClient(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 void WebDevToolsFrontendImpl::didClearWindowObject(WebLocalFrameImpl* frame) | 69 void WebDevToolsFrontendImpl::didClearWindowObject(WebLocalFrameImpl* frame) |
| 70 { | 70 { |
| 71 if (m_webFrame == frame) { | 71 if (m_webFrame == frame) { |
| 72 v8::Isolate* isolate = v8::Isolate::GetCurrent(); | 72 v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
| 73 ScriptState* scriptState = ScriptState::forMainWorld(m_webFrame->frame()
); | 73 ScriptState* scriptState = ScriptState::forMainWorld(m_webFrame->frame()
); |
| 74 ASSERT(scriptState); | 74 DCHECK(scriptState); |
| 75 ScriptState::Scope scope(scriptState); | 75 ScriptState::Scope scope(scriptState); |
| 76 | 76 |
| 77 if (m_devtoolsHost) | 77 if (m_devtoolsHost) |
| 78 m_devtoolsHost->disconnectClient(); | 78 m_devtoolsHost->disconnectClient(); |
| 79 m_devtoolsHost = DevToolsHost::create(this, m_webFrame->frame()); | 79 m_devtoolsHost = DevToolsHost::create(this, m_webFrame->frame()); |
| 80 v8::Local<v8::Object> global = scriptState->context()->Global(); | 80 v8::Local<v8::Object> global = scriptState->context()->Global(); |
| 81 v8::Local<v8::Value> devtoolsHostObj = toV8(m_devtoolsHost.get(), global
, scriptState->isolate()); | 81 v8::Local<v8::Value> devtoolsHostObj = toV8(m_devtoolsHost.get(), global
, scriptState->isolate()); |
| 82 ASSERT(!devtoolsHostObj.IsEmpty()); | 82 DCHECK(!devtoolsHostObj.IsEmpty()); |
| 83 global->Set(v8AtomicString(isolate, "DevToolsHost"), devtoolsHostObj); | 83 global->Set(v8AtomicString(isolate, "DevToolsHost"), devtoolsHostObj); |
| 84 } | 84 } |
| 85 | 85 |
| 86 if (m_injectedScriptForOrigin.isEmpty()) | 86 if (m_injectedScriptForOrigin.isEmpty()) |
| 87 return; | 87 return; |
| 88 | 88 |
| 89 String origin = frame->getSecurityOrigin().toString(); | 89 String origin = frame->getSecurityOrigin().toString(); |
| 90 String script = m_injectedScriptForOrigin.get(origin); | 90 String script = m_injectedScriptForOrigin.get(origin); |
| 91 if (script.isEmpty()) | 91 if (script.isEmpty()) |
| 92 return; | 92 return; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 114 { | 114 { |
| 115 WebLocalFrameImpl::fromFrame(targetFrame)->viewImpl()->showContextMenuAtPoin
t(x, y, menuProvider); | 115 WebLocalFrameImpl::fromFrame(targetFrame)->viewImpl()->showContextMenuAtPoin
t(x, y, menuProvider); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void WebDevToolsFrontendImpl::setInjectedScriptForOrigin(const String& origin, c
onst String& source) | 118 void WebDevToolsFrontendImpl::setInjectedScriptForOrigin(const String& origin, c
onst String& source) |
| 119 { | 119 { |
| 120 m_injectedScriptForOrigin.set(origin, source); | 120 m_injectedScriptForOrigin.set(origin, source); |
| 121 } | 121 } |
| 122 | 122 |
| 123 } // namespace blink | 123 } // namespace blink |
| OLD | NEW |