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

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

Issue 33523002: Have Frame::script() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 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, 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 String origin = frame->document()->securityOrigin()->toRawString(); 79 String origin = frame->document()->securityOrigin()->toRawString();
80 String script = m_injectedScriptForOrigin.get(origin); 80 String script = m_injectedScriptForOrigin.get(origin);
81 if (script.isEmpty()) 81 if (script.isEmpty())
82 return; 82 return;
83 int injectedScriptId = m_injectedScriptManager->injectedScriptIdFor(mainWorl dScriptState(frame)); 83 int injectedScriptId = m_injectedScriptManager->injectedScriptIdFor(mainWorl dScriptState(frame));
84 StringBuilder scriptSource; 84 StringBuilder scriptSource;
85 scriptSource.append(script); 85 scriptSource.append(script);
86 scriptSource.append("("); 86 scriptSource.append("(");
87 scriptSource.appendNumber(injectedScriptId); 87 scriptSource.appendNumber(injectedScriptId);
88 scriptSource.append(")"); 88 scriptSource.append(")");
89 frame->script()->executeScriptInMainWorld(scriptSource.toString()); 89 frame->script().executeScriptInMainWorld(scriptSource.toString());
90 } 90 }
91 91
92 void InspectorAgent::setFrontend(InspectorFrontend* inspectorFrontend) 92 void InspectorAgent::setFrontend(InspectorFrontend* inspectorFrontend)
93 { 93 {
94 m_frontend = inspectorFrontend; 94 m_frontend = inspectorFrontend;
95 } 95 }
96 96
97 void InspectorAgent::clearFrontend() 97 void InspectorAgent::clearFrontend()
98 { 98 {
99 m_pendingEvaluateTestCommands.clear(); 99 m_pendingEvaluateTestCommands.clear();
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 KURL InspectorAgent::inspectedURLWithoutFragment() const 179 KURL InspectorAgent::inspectedURLWithoutFragment() const
180 { 180 {
181 KURL url = inspectedURL(); 181 KURL url = inspectedURL();
182 url.removeFragmentIdentifier(); 182 url.removeFragmentIdentifier();
183 return url; 183 return url;
184 } 184 }
185 185
186 } // namespace WebCore 186 } // namespace WebCore
187 187
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLParserOptions.cpp ('k') | Source/core/inspector/InspectorClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698