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

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

Issue 241303002: Rename WebFrameImpl to WebLocalFrameImpl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix Mac too Created 6 years, 8 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
« no previous file with comments | « Source/web/WebDevToolsAgentPrivate.h ('k') | Source/web/WebDocument.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "WebDevToolsFrontendImpl.h" 32 #include "WebDevToolsFrontendImpl.h"
33 33
34 #include "InspectorFrontendClientImpl.h" 34 #include "InspectorFrontendClientImpl.h"
35 #include "V8InspectorFrontendHost.h" 35 #include "V8InspectorFrontendHost.h"
36 #include "V8MouseEvent.h" 36 #include "V8MouseEvent.h"
37 #include "V8Node.h" 37 #include "V8Node.h"
38 #include "WebDevToolsFrontendClient.h" 38 #include "WebDevToolsFrontendClient.h"
39 #include "WebFrameImpl.h" 39 #include "WebLocalFrameImpl.h"
40 #include "WebScriptSource.h" 40 #include "WebScriptSource.h"
41 #include "WebViewImpl.h" 41 #include "WebViewImpl.h"
42 #include "bindings/v8/ScriptController.h" 42 #include "bindings/v8/ScriptController.h"
43 #include "bindings/v8/V8Binding.h" 43 #include "bindings/v8/V8Binding.h"
44 #include "bindings/v8/V8DOMWrapper.h" 44 #include "bindings/v8/V8DOMWrapper.h"
45 #include "core/clipboard/Pasteboard.h" 45 #include "core/clipboard/Pasteboard.h"
46 #include "core/dom/Document.h" 46 #include "core/dom/Document.h"
47 #include "core/dom/Node.h" 47 #include "core/dom/Node.h"
48 #include "core/events/Event.h" 48 #include "core/events/Event.h"
49 #include "core/inspector/InspectorController.h" 49 #include "core/inspector/InspectorController.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 m_inspectorFrontendResumeObserver = adoptPtr(new InspectorFrontendRe sumeObserver(this, document)); 126 m_inspectorFrontendResumeObserver = adoptPtr(new InspectorFrontendRe sumeObserver(this, document));
127 return; 127 return;
128 } 128 }
129 m_inspectorFrontendResumeObserver.clear(); 129 m_inspectorFrontendResumeObserver.clear();
130 doDispatchOnInspectorFrontend(m_messages.takeFirst()); 130 doDispatchOnInspectorFrontend(m_messages.takeFirst());
131 } 131 }
132 } 132 }
133 133
134 void WebDevToolsFrontendImpl::doDispatchOnInspectorFrontend(const WebString& mes sage) 134 void WebDevToolsFrontendImpl::doDispatchOnInspectorFrontend(const WebString& mes sage)
135 { 135 {
136 WebFrameImpl* frame = m_webViewImpl->mainFrameImpl(); 136 WebLocalFrameImpl* frame = m_webViewImpl->mainFrameImpl();
137 if (!frame->frame()) 137 if (!frame->frame())
138 return; 138 return;
139 v8::Isolate* isolate = toIsolate(frame->frame()); 139 v8::Isolate* isolate = toIsolate(frame->frame());
140 v8::HandleScope scope(isolate); 140 v8::HandleScope scope(isolate);
141 v8::Handle<v8::Context> frameContext = toV8Context(isolate, frame->frame(), DOMWrapperWorld::mainWorld()); 141 v8::Handle<v8::Context> frameContext = toV8Context(isolate, frame->frame(), DOMWrapperWorld::mainWorld());
142 if (frameContext.IsEmpty()) 142 if (frameContext.IsEmpty())
143 return; 143 return;
144 v8::Context::Scope contextScope(frameContext); 144 v8::Context::Scope contextScope(frameContext);
145 v8::Handle<v8::Value> inspectorFrontendApiValue = frameContext->Global()->Ge t(v8::String::NewFromUtf8(isolate, "InspectorFrontendAPI")); 145 v8::Handle<v8::Value> inspectorFrontendApiValue = frameContext->Global()->Ge t(v8::String::NewFromUtf8(isolate, "InspectorFrontendAPI"));
146 if (!inspectorFrontendApiValue->IsObject()) 146 if (!inspectorFrontendApiValue->IsObject())
(...skipping 14 matching lines...) Expand all
161 } 161 }
162 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(dispatchF unction); 162 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(dispatchF unction);
163 Vector< v8::Handle<v8::Value> > args; 163 Vector< v8::Handle<v8::Value> > args;
164 args.append(v8String(isolate, message)); 164 args.append(v8String(isolate, message));
165 v8::TryCatch tryCatch; 165 v8::TryCatch tryCatch;
166 tryCatch.SetVerbose(true); 166 tryCatch.SetVerbose(true);
167 ScriptController::callFunction(frame->frame()->document(), function, dispatc herObject, args.size(), args.data(), isolate); 167 ScriptController::callFunction(frame->frame()->document(), function, dispatc herObject, args.size(), args.data(), isolate);
168 } 168 }
169 169
170 } // namespace blink 170 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebDevToolsAgentPrivate.h ('k') | Source/web/WebDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698