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 <string> | 7 #include <string> |
8 | 8 |
9 #include "Document.h" | 9 #include "Document.h" |
10 #include "DOMWindow.h" | 10 #include "DOMWindow.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 } | 190 } |
191 String source_string = WebCore::toWebCoreStringWithNullCheck(args[1]); | 191 String source_string = WebCore::toWebCoreStringWithNullCheck(args[1]); |
192 if (source_string.isEmpty() || exception_catcher.HasCaught()) { | 192 if (source_string.isEmpty() || exception_catcher.HasCaught()) { |
193 return v8::Undefined(); | 193 return v8::Undefined(); |
194 } | 194 } |
195 Node* node = V8Proxy::DOMWrapperToNode<Node>(args[2]); | 195 Node* node = V8Proxy::DOMWrapperToNode<Node>(args[2]); |
196 if (!node || !node->attached()) { | 196 if (!node || !node->attached()) { |
197 return v8::Undefined(); | 197 return v8::Undefined(); |
198 } | 198 } |
199 | 199 |
200 Page* page = V8Proxy::retrieveActiveFrame()->page(); | 200 Page* page = V8Proxy::retrieveFrameForEnteredContext()->page(); |
201 InspectorController* inspectorController = page->inspectorController(); | 201 InspectorController* inspectorController = page->inspectorController(); |
202 return WebCore::v8Boolean(inspectorController-> | 202 return WebCore::v8Boolean(inspectorController-> |
203 addSourceToFrame(mime_type, source_string, node)); | 203 addSourceToFrame(mime_type, source_string, node)); |
204 } | 204 } |
205 | 205 |
206 // static | 206 // static |
207 v8::Handle<v8::Value> WebDevToolsClientImpl::JsLoaded( | 207 v8::Handle<v8::Value> WebDevToolsClientImpl::JsLoaded( |
208 const v8::Arguments& args) { | 208 const v8::Arguments& args) { |
209 WebDevToolsClientImpl* client = static_cast<WebDevToolsClientImpl*>( | 209 WebDevToolsClientImpl* client = static_cast<WebDevToolsClientImpl*>( |
210 v8::External::Cast(*args.Data())->Value()); | 210 v8::External::Cast(*args.Data())->Value()); |
(...skipping 15 matching lines...) Expand all Loading... |
226 } | 226 } |
227 | 227 |
228 // static | 228 // static |
229 v8::Handle<v8::Value> WebDevToolsClientImpl::JsActivateWindow( | 229 v8::Handle<v8::Value> WebDevToolsClientImpl::JsActivateWindow( |
230 const v8::Arguments& args) { | 230 const v8::Arguments& args) { |
231 WebDevToolsClientImpl* client = static_cast<WebDevToolsClientImpl*>( | 231 WebDevToolsClientImpl* client = static_cast<WebDevToolsClientImpl*>( |
232 v8::External::Cast(*args.Data())->Value()); | 232 v8::External::Cast(*args.Data())->Value()); |
233 client->delegate_->ActivateWindow(); | 233 client->delegate_->ActivateWindow(); |
234 return v8::Undefined(); | 234 return v8::Undefined(); |
235 } | 235 } |
OLD | NEW |