OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 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) 2012 Google Inc. All rights reserved. | 4 * Copyright (C) 2012 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 m_customObjectFormatterEnabled = enabled; | 155 m_customObjectFormatterEnabled = enabled; |
156 IdToInjectedScriptMap::iterator end = m_idToInjectedScript.end(); | 156 IdToInjectedScriptMap::iterator end = m_idToInjectedScript.end(); |
157 for (IdToInjectedScriptMap::iterator it = m_idToInjectedScript.begin(); it !
= end; ++it) { | 157 for (IdToInjectedScriptMap::iterator it = m_idToInjectedScript.begin(); it !
= end; ++it) { |
158 if (!it->value.isEmpty()) | 158 if (!it->value.isEmpty()) |
159 it->value.setCustomObjectFormatterEnabled(enabled); | 159 it->value.setCustomObjectFormatterEnabled(enabled); |
160 } | 160 } |
161 } | 161 } |
162 | 162 |
163 String InjectedScriptManager::injectedScriptSource() | 163 String InjectedScriptManager::injectedScriptSource() |
164 { | 164 { |
165 const blink::WebData& injectedScriptSourceResource = blink::Platform::curren
t()->loadResource("InjectedScriptSource.js"); | 165 const WebData& injectedScriptSourceResource = Platform::current()->loadResou
rce("InjectedScriptSource.js"); |
166 return String(injectedScriptSourceResource.data(), injectedScriptSourceResou
rce.size()); | 166 return String(injectedScriptSourceResource.data(), injectedScriptSourceResou
rce.size()); |
167 } | 167 } |
168 | 168 |
169 InjectedScript InjectedScriptManager::injectedScriptFor(ScriptState* inspectedSc
riptState) | 169 InjectedScript InjectedScriptManager::injectedScriptFor(ScriptState* inspectedSc
riptState) |
170 { | 170 { |
171 ScriptStateToId::iterator it = m_scriptStateToId.find(inspectedScriptState); | 171 ScriptStateToId::iterator it = m_scriptStateToId.find(inspectedScriptState); |
172 if (it != m_scriptStateToId.end()) { | 172 if (it != m_scriptStateToId.end()) { |
173 IdToInjectedScriptMap::iterator it1 = m_idToInjectedScript.find(it->valu
e); | 173 IdToInjectedScriptMap::iterator it1 = m_idToInjectedScript.find(it->valu
e); |
174 if (it1 != m_idToInjectedScript.end()) | 174 if (it1 != m_idToInjectedScript.end()) |
175 return it1->value; | 175 return it1->value; |
(...skipping 28 matching lines...) Expand all Loading... |
204 handle.clear(); | 204 handle.clear(); |
205 } | 205 } |
206 | 206 |
207 DEFINE_TRACE(InjectedScriptManager::CallbackData) | 207 DEFINE_TRACE(InjectedScriptManager::CallbackData) |
208 { | 208 { |
209 visitor->trace(host); | 209 visitor->trace(host); |
210 visitor->trace(injectedScriptManager); | 210 visitor->trace(injectedScriptManager); |
211 } | 211 } |
212 | 212 |
213 } // namespace blink | 213 } // namespace blink |
OLD | NEW |