| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
| 4 * Copyright (C) 2011 Google Inc. All rights reserved. | 4 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 if (m_injectedScriptForOrigin.isEmpty()) | 80 if (m_injectedScriptForOrigin.isEmpty()) |
| 81 return; | 81 return; |
| 82 | 82 |
| 83 String origin = frame->document()->securityOrigin()->toRawString(); | 83 String origin = frame->document()->securityOrigin()->toRawString(); |
| 84 String script = m_injectedScriptForOrigin.get(origin); | 84 String script = m_injectedScriptForOrigin.get(origin); |
| 85 if (script.isEmpty()) | 85 if (script.isEmpty()) |
| 86 return; | 86 return; |
| 87 int injectedScriptId = m_injectedScriptManager->injectedScriptIdFor(ScriptSt
ate::forMainWorld(frame)); | 87 int injectedScriptId = m_injectedScriptManager->injectedScriptIdFor(ScriptSt
ate::forMainWorld(frame)); |
| 88 StringBuilder scriptSource; | 88 StringBuilder scriptSource; |
| 89 scriptSource.append(script); | 89 scriptSource.append(script); |
| 90 scriptSource.append("("); | 90 scriptSource.append('('); |
| 91 scriptSource.appendNumber(injectedScriptId); | 91 scriptSource.appendNumber(injectedScriptId); |
| 92 scriptSource.append(")"); | 92 scriptSource.append(')'); |
| 93 frame->script().executeScriptInMainWorld(scriptSource.toString()); | 93 frame->script().executeScriptInMainWorld(scriptSource.toString()); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void InspectorInspectorAgent::init() | 96 void InspectorInspectorAgent::init() |
| 97 { | 97 { |
| 98 m_instrumentingAgents->setInspectorInspectorAgent(this); | 98 m_instrumentingAgents->setInspectorInspectorAgent(this); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void InspectorInspectorAgent::setFrontend(InspectorFrontend* inspectorFrontend) | 101 void InspectorInspectorAgent::setFrontend(InspectorFrontend* inspectorFrontend) |
| 102 { | 102 { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 m_frontend->inspect(objectToInspect, hints); | 163 m_frontend->inspect(objectToInspect, hints); |
| 164 m_pendingInspectData.first = nullptr; | 164 m_pendingInspectData.first = nullptr; |
| 165 m_pendingInspectData.second = nullptr; | 165 m_pendingInspectData.second = nullptr; |
| 166 return; | 166 return; |
| 167 } | 167 } |
| 168 m_pendingInspectData.first = objectToInspect; | 168 m_pendingInspectData.first = objectToInspect; |
| 169 m_pendingInspectData.second = hints; | 169 m_pendingInspectData.second = hints; |
| 170 } | 170 } |
| 171 | 171 |
| 172 } // namespace blink | 172 } // namespace blink |
| OLD | NEW |