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

Side by Side Diff: webkit/glue/webdevtoolsfrontend_impl.cc

Issue 467043: Revert 34040 - DevTools: make possible profiling of scripts doing heavy calcu... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years 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 | « webkit/glue/webdevtoolsfrontend_impl.h ('k') | webkit/webkit.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "Document.h" 9 #include "Document.h"
10 #include "DOMWindow.h" 10 #include "DOMWindow.h"
(...skipping 15 matching lines...) Expand all
26 #undef LOG 26 #undef LOG
27 27
28 #include "third_party/WebKit/WebKit/chromium/public/WebDevToolsFrontendClient.h" 28 #include "third_party/WebKit/WebKit/chromium/public/WebDevToolsFrontendClient.h"
29 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" 29 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
30 #include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h" 30 #include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h"
31 #include "third_party/WebKit/WebKit/chromium/src/WebFrameImpl.h" 31 #include "third_party/WebKit/WebKit/chromium/src/WebFrameImpl.h"
32 #include "third_party/WebKit/WebKit/chromium/src/WebViewImpl.h" 32 #include "third_party/WebKit/WebKit/chromium/src/WebViewImpl.h"
33 #include "webkit/glue/devtools/bound_object.h" 33 #include "webkit/glue/devtools/bound_object.h"
34 #include "webkit/glue/devtools/debugger_agent.h" 34 #include "webkit/glue/devtools/debugger_agent.h"
35 #include "webkit/glue/devtools/devtools_rpc_js.h" 35 #include "webkit/glue/devtools/devtools_rpc_js.h"
36 #include "webkit/glue/devtools/profiler_agent.h"
37 #include "webkit/glue/devtools/tools_agent.h" 36 #include "webkit/glue/devtools/tools_agent.h"
38 #include "webkit/glue/glue_util.h" 37 #include "webkit/glue/glue_util.h"
39 #include "webkit/glue/webdevtoolsfrontend_impl.h" 38 #include "webkit/glue/webdevtoolsfrontend_impl.h"
40 39
41 using namespace WebCore; 40 using namespace WebCore;
42 using WebKit::WebDevToolsFrontend; 41 using WebKit::WebDevToolsFrontend;
43 using WebKit::WebDevToolsFrontendClient; 42 using WebKit::WebDevToolsFrontendClient;
44 using WebKit::WebFrame; 43 using WebKit::WebFrame;
45 using WebKit::WebFrameImpl; 44 using WebKit::WebFrameImpl;
46 using WebKit::WebScriptSource; 45 using WebKit::WebScriptSource;
47 using WebKit::WebString; 46 using WebKit::WebString;
48 using WebKit::WebView; 47 using WebKit::WebView;
49 using WebKit::WebViewImpl; 48 using WebKit::WebViewImpl;
50 49
51 static v8::Local<v8::String> ToV8String(const String& s) { 50 static v8::Local<v8::String> ToV8String(const String& s) {
52 if (s.isNull()) 51 if (s.isNull())
53 return v8::Local<v8::String>(); 52 return v8::Local<v8::String>();
54 53
55 return v8::String::New(reinterpret_cast<const uint16_t*>(s.characters()), 54 return v8::String::New(reinterpret_cast<const uint16_t*>(s.characters()),
56 s.length()); 55 s.length());
57 } 56 }
58 57
59 DEFINE_RPC_JS_BOUND_OBJ(DebuggerAgent, DEBUGGER_AGENT_STRUCT, 58 DEFINE_RPC_JS_BOUND_OBJ(DebuggerAgent, DEBUGGER_AGENT_STRUCT,
60 DebuggerAgentDelegate, DEBUGGER_AGENT_DELEGATE_STRUCT) 59 DebuggerAgentDelegate, DEBUGGER_AGENT_DELEGATE_STRUCT)
61 DEFINE_RPC_JS_BOUND_OBJ(ProfilerAgent, PROFILER_AGENT_STRUCT,
62 ProfilerAgentDelegate, PROFILER_AGENT_DELEGATE_STRUCT)
63 DEFINE_RPC_JS_BOUND_OBJ(ToolsAgent, TOOLS_AGENT_STRUCT, 60 DEFINE_RPC_JS_BOUND_OBJ(ToolsAgent, TOOLS_AGENT_STRUCT,
64 ToolsAgentDelegate, TOOLS_AGENT_DELEGATE_STRUCT) 61 ToolsAgentDelegate, TOOLS_AGENT_DELEGATE_STRUCT)
65 62
66 class ToolsAgentNativeDelegateImpl : public ToolsAgentNativeDelegate { 63 class ToolsAgentNativeDelegateImpl : public ToolsAgentNativeDelegate {
67 public: 64 public:
68 struct ResourceContentRequestData { 65 struct ResourceContentRequestData {
69 String mime_type; 66 String mime_type;
70 RefPtr<Node> frame; 67 RefPtr<Node> frame;
71 }; 68 };
72 69
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 : web_view_impl_(web_view_impl), 127 : web_view_impl_(web_view_impl),
131 client_(client), 128 client_(client),
132 application_locale_(application_locale), 129 application_locale_(application_locale),
133 loaded_(false) { 130 loaded_(false) {
134 WebFrameImpl* frame = web_view_impl_->mainFrameImpl(); 131 WebFrameImpl* frame = web_view_impl_->mainFrameImpl();
135 v8::HandleScope scope; 132 v8::HandleScope scope;
136 v8::Handle<v8::Context> frame_context = V8Proxy::context(frame->frame()); 133 v8::Handle<v8::Context> frame_context = V8Proxy::context(frame->frame());
137 134
138 debugger_agent_obj_.set(new JsDebuggerAgentBoundObj( 135 debugger_agent_obj_.set(new JsDebuggerAgentBoundObj(
139 this, frame_context, "RemoteDebuggerAgent")); 136 this, frame_context, "RemoteDebuggerAgent"));
140 profiler_agent_obj_.set(new JsProfilerAgentBoundObj(
141 this, frame_context, "RemoteProfilerAgent"));
142 tools_agent_obj_.set( 137 tools_agent_obj_.set(
143 new JsToolsAgentBoundObj(this, frame_context, "RemoteToolsAgent")); 138 new JsToolsAgentBoundObj(this, frame_context, "RemoteToolsAgent"));
144 139
145 // Debugger commands should be sent using special method. 140 // Debugger commands should be sent using special method.
146 debugger_command_executor_obj_.set( 141 debugger_command_executor_obj_.set(
147 new BoundObject(frame_context, this, "RemoteDebuggerCommandExecutor")); 142 new BoundObject(frame_context, this, "RemoteDebuggerCommandExecutor"));
148 debugger_command_executor_obj_->AddProtoFunction( 143 debugger_command_executor_obj_->AddProtoFunction(
149 "DebuggerCommand", 144 "DebuggerCommand",
150 WebDevToolsFrontendImpl::JsDebuggerCommand); 145 WebDevToolsFrontendImpl::JsDebuggerCommand);
151 debugger_command_executor_obj_->AddProtoFunction( 146 debugger_command_executor_obj_->AddProtoFunction(
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 frontend->client_->sendDebuggerPauseScript(); 454 frontend->client_->sendDebuggerPauseScript();
460 return v8::Undefined(); 455 return v8::Undefined();
461 } 456 }
462 457
463 // static 458 // static
464 v8::Handle<v8::Value> WebDevToolsFrontendImpl::JsWindowUnloading( 459 v8::Handle<v8::Value> WebDevToolsFrontendImpl::JsWindowUnloading(
465 const v8::Arguments& args) { 460 const v8::Arguments& args) {
466 //TODO(pfeldman): Implement this. 461 //TODO(pfeldman): Implement this.
467 return v8::Undefined(); 462 return v8::Undefined();
468 } 463 }
OLDNEW
« no previous file with comments | « webkit/glue/webdevtoolsfrontend_impl.h ('k') | webkit/webkit.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698