Chromium Code Reviews| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 60 // ToolsAgentNativeDelegate implementation. | 60 // ToolsAgentNativeDelegate implementation. |
| 61 virtual void DidGetResourceContent(int request_id, const String& content) { | 61 virtual void DidGetResourceContent(int request_id, const String& content) { |
| 62 if (!resource_content_requests_.contains(request_id)) { | 62 if (!resource_content_requests_.contains(request_id)) { |
| 63 NOTREACHED(); | 63 NOTREACHED(); |
| 64 return; | 64 return; |
| 65 } | 65 } |
| 66 ResourceContentRequestData request = | 66 ResourceContentRequestData request = |
| 67 resource_content_requests_.take(request_id); | 67 resource_content_requests_.take(request_id); |
| 68 | 68 |
| 69 InspectorController* ic = frame_->frame()->page()->inspectorController(); | 69 InspectorController* ic = frame_->frame()->page()->inspectorController(); |
| 70 | 70 if (request.frame && request.frame->attached()) { |
|
yurys
2009/06/17 11:43:39
it should be if (request.frame.get()...
also put t
| |
| 71 ic->addSourceToFrame(request.mime_type, content, request.frame.get()); | 71 ic->addSourceToFrame(request.mime_type, content, request.frame.get()); |
| 72 } | |
| 72 } | 73 } |
| 73 | 74 |
| 74 bool WaitingForResponse(int resource_id, Node* frame) { | 75 bool WaitingForResponse(int resource_id, Node* frame) { |
| 75 if (resource_content_requests_.contains(resource_id)) { | 76 if (resource_content_requests_.contains(resource_id)) { |
| 76 DCHECK(resource_content_requests_.get(resource_id).frame.get() == frame) | 77 DCHECK(resource_content_requests_.get(resource_id).frame.get() == frame) |
| 77 << "Only one frame is expected to display given resource"; | 78 << "Only one frame is expected to display given resource"; |
| 78 return true; | 79 return true; |
| 79 } | 80 } |
| 80 return false; | 81 return false; |
| 81 } | 82 } |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 313 v8::Handle<v8::Value> WebDevToolsClientImpl::JsGetPlatform( | 314 v8::Handle<v8::Value> WebDevToolsClientImpl::JsGetPlatform( |
| 314 const v8::Arguments& args) { | 315 const v8::Arguments& args) { |
| 315 #if defined OS_MACOSX | 316 #if defined OS_MACOSX |
| 316 return v8String("mac-leopard"); | 317 return v8String("mac-leopard"); |
| 317 #elif defined OS_LINUX | 318 #elif defined OS_LINUX |
| 318 return v8String("linux"); | 319 return v8String("linux"); |
| 319 #else | 320 #else |
| 320 return v8String("windows"); | 321 return v8String("windows"); |
| 321 #endif | 322 #endif |
| 322 } | 323 } |
| OLD | NEW |