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

Side by Side Diff: third_party/WebKit/Source/web/WebDevToolsFrontendImpl.cpp

Issue 2595543003: Rename toV8(...) function in Blink to ToV8(...). (Closed)
Patch Set: Rebasing... Created 3 years, 11 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
OLDNEW
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 67 v8::Isolate* isolate = v8::Isolate::GetCurrent();
68 ScriptState* scriptState = ScriptState::forMainWorld(m_webFrame->frame()); 68 ScriptState* scriptState = ScriptState::forMainWorld(m_webFrame->frame());
69 DCHECK(scriptState); 69 DCHECK(scriptState);
70 ScriptState::Scope scope(scriptState); 70 ScriptState::Scope scope(scriptState);
71 71
72 if (m_devtoolsHost) 72 if (m_devtoolsHost)
73 m_devtoolsHost->disconnectClient(); 73 m_devtoolsHost->disconnectClient();
74 m_devtoolsHost = DevToolsHost::create(this, m_webFrame->frame()); 74 m_devtoolsHost = DevToolsHost::create(this, m_webFrame->frame());
75 v8::Local<v8::Object> global = scriptState->context()->Global(); 75 v8::Local<v8::Object> global = scriptState->context()->Global();
76 v8::Local<v8::Value> devtoolsHostObj = 76 v8::Local<v8::Value> devtoolsHostObj =
77 toV8(m_devtoolsHost.get(), global, scriptState->isolate()); 77 ToV8(m_devtoolsHost.get(), global, scriptState->isolate());
78 DCHECK(!devtoolsHostObj.IsEmpty()); 78 DCHECK(!devtoolsHostObj.IsEmpty());
79 global->Set(v8AtomicString(isolate, "DevToolsHost"), devtoolsHostObj); 79 global->Set(v8AtomicString(isolate, "DevToolsHost"), devtoolsHostObj);
80 } 80 }
81 81
82 if (m_injectedScriptForOrigin.isEmpty()) 82 if (m_injectedScriptForOrigin.isEmpty())
83 return; 83 return;
84 84
85 String origin = frame->getSecurityOrigin().toString(); 85 String origin = frame->getSecurityOrigin().toString();
86 String script = m_injectedScriptForOrigin.get(origin); 86 String script = m_injectedScriptForOrigin.get(origin);
87 if (script.isEmpty()) 87 if (script.isEmpty())
(...skipping 25 matching lines...) Expand all
113 ->viewImpl() 113 ->viewImpl()
114 ->showContextMenuAtPoint(x, y, menuProvider); 114 ->showContextMenuAtPoint(x, y, menuProvider);
115 } 115 }
116 116
117 void WebDevToolsFrontendImpl::setInjectedScriptForOrigin(const String& origin, 117 void WebDevToolsFrontendImpl::setInjectedScriptForOrigin(const String& origin,
118 const String& source) { 118 const String& source) {
119 m_injectedScriptForOrigin.set(origin, source); 119 m_injectedScriptForOrigin.set(origin, source);
120 } 120 }
121 121
122 } // namespace blink 122 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebDOMFileSystem.cpp ('k') | third_party/WebKit/Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698