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

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

Issue 113085: Split V8Proxy::retrieveActiveFrame() into two methods. (Closed)
Patch Set: Darin feedback Created 11 years, 7 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
« no previous file with comments | « webkit/glue/devtools/debugger_agent_manager.cc ('k') | webkit/glue/webframe.h » ('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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « webkit/glue/devtools/debugger_agent_manager.cc ('k') | webkit/glue/webframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698