OLD | NEW |
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 <wtf/HashSet.h> | 7 #include <wtf/HashSet.h> |
8 #include <wtf/RefPtr.h> | 8 #include <wtf/RefPtr.h> |
9 #include <wtf/Vector.h> | 9 #include <wtf/Vector.h> |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 void DebuggerAgentImpl::DebugBreak() { | 55 void DebuggerAgentImpl::DebugBreak() { |
56 DebuggerAgentManager::DebugBreak(this); | 56 DebuggerAgentManager::DebugBreak(this); |
57 } | 57 } |
58 | 58 |
59 void DebuggerAgentImpl::DebuggerOutput(const std::string& command) { | 59 void DebuggerAgentImpl::DebuggerOutput(const std::string& command) { |
60 delegate_->DebuggerOutput(command); | 60 delegate_->DebuggerOutput(command); |
61 webdevtools_agent_->ForceRepaint(); | 61 webdevtools_agent_->ForceRepaint(); |
62 } | 62 } |
63 | 63 |
64 void DebuggerAgentImpl::CreateUtilityContext( | 64 void DebuggerAgentImpl::ResetUtilityContext( |
65 Document* document, | 65 Document* document, |
66 v8::Persistent<v8::Context>* context) { | 66 v8::Persistent<v8::Context>* context) { |
67 if (!context->IsEmpty()) { | 67 if (!context->IsEmpty()) { |
68 context->Dispose(); | 68 context->Dispose(); |
69 } | 69 } |
| 70 if (!document) { |
| 71 return; |
| 72 } |
70 v8::HandleScope scope; | 73 v8::HandleScope scope; |
71 | 74 |
72 // TODO(pfeldman): Validate against Soeren. | 75 // TODO(pfeldman): Validate against Soeren. |
73 // Set up the DOM window as the prototype of the new global object. | 76 // Set up the DOM window as the prototype of the new global object. |
74 v8::Handle<v8::Context> window_context = | 77 v8::Handle<v8::Context> window_context = |
75 V8Proxy::GetContext(document->frame()); | 78 V8Proxy::GetContext(document->frame()); |
76 v8::Handle<v8::Object> window_global = window_context->Global(); | 79 v8::Handle<v8::Object> window_global = window_context->Global(); |
77 v8::Handle<v8::Value> window_wrapper = | 80 v8::Handle<v8::Value> window_wrapper = |
78 V8Proxy::LookupDOMWrapper(V8ClassIndex::DOMWINDOW, window_global); | 81 V8Proxy::LookupDOMWrapper(V8ClassIndex::DOMWINDOW, window_global); |
79 | 82 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 for (HashSet<DebuggerAgentImpl*>::const_iterator ag_it = agents.begin(); | 175 for (HashSet<DebuggerAgentImpl*>::const_iterator ag_it = agents.begin(); |
173 ag_it != agents.end(); ++ag_it) { | 176 ag_it != agents.end(); ++ag_it) { |
174 (*ag_it)->web_view()->SetIgnoreInputEvents(false); | 177 (*ag_it)->web_view()->SetIgnoreInputEvents(false); |
175 } | 178 } |
176 deleteAllValues(deferrers); | 179 deleteAllValues(deferrers); |
177 } | 180 } |
178 | 181 |
179 WebCore::Page* DebuggerAgentImpl::GetPage() { | 182 WebCore::Page* DebuggerAgentImpl::GetPage() { |
180 return web_view_impl_->page(); | 183 return web_view_impl_->page(); |
181 } | 184 } |
OLD | NEW |