| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Google Inc. All rights reserved. | 2 * Copyright (C) 2007 Google Inc. All rights reserved. |
| 3 * Authors: Collin Jackson, Adam Barth | 3 * Authors: Collin Jackson, Adam Barth |
| 4 * | 4 * |
| 5 * This is the V8 version of the KJS InspectorController, which is located in | 5 * This is the V8 version of the KJS InspectorController, which is located in |
| 6 * webkit/pending. | 6 * webkit/pending. |
| 7 * Copyright (C) 2007 Apple Inc. All rights reserved. | 7 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * Redistribution and use in source and binary forms, with or without | 9 * Redistribution and use in source and binary forms, with or without |
| 10 * modification, are permitted provided that the following conditions | 10 * modification, are permitted provided that the following conditions |
| (...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 | 1129 |
| 1130 // inspect() will implicitly call ElementsPanel's focusedNodeChanged() and t
he hover feedback will be stopped there. | 1130 // inspect() will implicitly call ElementsPanel's focusedNodeChanged() and t
he hover feedback will be stopped there. |
| 1131 inspect(node); | 1131 inspect(node); |
| 1132 } | 1132 } |
| 1133 | 1133 |
| 1134 | 1134 |
| 1135 void InspectorController::windowScriptObjectAvailable() | 1135 void InspectorController::windowScriptObjectAvailable() |
| 1136 { | 1136 { |
| 1137 if (!m_page || !enabled()) | 1137 if (!m_page || !enabled()) |
| 1138 return; | 1138 return; |
| 1139 |
| 1140 // Grant the inspector the ability to script the inspected page. |
| 1141 m_page->mainFrame()->document()->securityOrigin()->grantUniversalAccess(); |
| 1139 | 1142 |
| 1140 v8::HandleScope handle_scope; | 1143 v8::HandleScope handle_scope; |
| 1141 v8::Handle<v8::Context> context = V8Proxy::GetContext(m_page->mainFrame()); | 1144 v8::Handle<v8::Context> context = V8Proxy::GetContext(m_page->mainFrame()); |
| 1142 v8::Context::Scope scope(context); | 1145 v8::Context::Scope scope(context); |
| 1143 | 1146 |
| 1144 // InspectorController.idl exposes the methods of InspectorController to Jav
aScript | 1147 // InspectorController.idl exposes the methods of InspectorController to Jav
aScript |
| 1145 v8::Handle<v8::Object> global = context->Global(); | 1148 v8::Handle<v8::Object> global = context->Global(); |
| 1146 v8::Handle<v8::Value> inspectorController = V8Proxy::ToV8Object(V8ClassIndex
::INSPECTORCONTROLLER, this); | 1149 v8::Handle<v8::Value> inspectorController = V8Proxy::ToV8Object(V8ClassIndex
::INSPECTORCONTROLLER, this); |
| 1147 global->Set(v8::String::New("InspectorController"), inspectorController); | 1150 global->Set(v8::String::New("InspectorController"), inspectorController); |
| 1148 } | 1151 } |
| (...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2063 } | 2066 } |
| 2064 | 2067 |
| 2065 bool InspectorController::stopTiming(const String& title, double& elapsed) | 2068 bool InspectorController::stopTiming(const String& title, double& elapsed) |
| 2066 { | 2069 { |
| 2067 elapsed = 0; | 2070 elapsed = 0; |
| 2068 notImplemented(); | 2071 notImplemented(); |
| 2069 return false; | 2072 return false; |
| 2070 } | 2073 } |
| 2071 | 2074 |
| 2072 } // namespace WebCore | 2075 } // namespace WebCore |
| OLD | NEW |