Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: Source/core/inspector/InjectedScriptManager.cpp

Issue 334283004: Rename DOMWindow to LocalDOMWindow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } 106 }
107 return InjectedScript(); 107 return InjectedScript();
108 } 108 }
109 109
110 void InjectedScriptManager::discardInjectedScripts() 110 void InjectedScriptManager::discardInjectedScripts()
111 { 111 {
112 m_idToInjectedScript.clear(); 112 m_idToInjectedScript.clear();
113 m_scriptStateToId.clear(); 113 m_scriptStateToId.clear();
114 } 114 }
115 115
116 void InjectedScriptManager::discardInjectedScriptsFor(DOMWindow* window) 116 void InjectedScriptManager::discardInjectedScriptsFor(LocalDOMWindow* window)
117 { 117 {
118 if (m_scriptStateToId.isEmpty()) 118 if (m_scriptStateToId.isEmpty())
119 return; 119 return;
120 120
121 Vector<long> idsToRemove; 121 Vector<long> idsToRemove;
122 IdToInjectedScriptMap::iterator end = m_idToInjectedScript.end(); 122 IdToInjectedScriptMap::iterator end = m_idToInjectedScript.end();
123 for (IdToInjectedScriptMap::iterator it = m_idToInjectedScript.begin(); it ! = end; ++it) { 123 for (IdToInjectedScriptMap::iterator it = m_idToInjectedScript.begin(); it ! = end; ++it) {
124 ScriptState* scriptState = it->value.scriptState(); 124 ScriptState* scriptState = it->value.scriptState();
125 if (window != scriptState->domWindow()) 125 if (window != scriptState->domWindow())
126 continue; 126 continue;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 int id = injectedScriptIdFor(inspectedScriptState); 175 int id = injectedScriptIdFor(inspectedScriptState);
176 ScriptValue injectedScriptValue = createInjectedScript(injectedScriptSource( ), inspectedScriptState, id); 176 ScriptValue injectedScriptValue = createInjectedScript(injectedScriptSource( ), inspectedScriptState, id);
177 InjectedScript result(injectedScriptValue, m_inspectedStateAccessCheck); 177 InjectedScript result(injectedScriptValue, m_inspectedStateAccessCheck);
178 m_idToInjectedScript.set(id, result); 178 m_idToInjectedScript.set(id, result);
179 return result; 179 return result;
180 } 180 }
181 181
182 } // namespace WebCore 182 } // namespace WebCore
183 183
OLDNEW
« no previous file with comments | « Source/core/inspector/InjectedScriptManager.h ('k') | Source/core/inspector/InspectorCanvasAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698