| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/renderer/extensions/user_script_scheduler.h" | 5 #include "chrome/renderer/extensions/user_script_scheduler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "chrome/common/extensions/extension_manifest_constants.h" | 10 #include "chrome/common/extensions/extension_manifest_constants.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 continue; | 193 continue; |
| 194 } else { | 194 } else { |
| 195 error = ErrorUtils::FormatErrorMessage( | 195 error = ErrorUtils::FormatErrorMessage( |
| 196 extension_manifest_errors::kCannotAccessPage, | 196 extension_manifest_errors::kCannotAccessPage, |
| 197 child_frame->document().url().spec()); | 197 child_frame->document().url().spec()); |
| 198 break; | 198 break; |
| 199 } | 199 } |
| 200 } | 200 } |
| 201 | 201 |
| 202 WebScriptSource source(WebString::fromUTF8(params.code)); | 202 WebScriptSource source(WebString::fromUTF8(params.code)); |
| 203 v8::HandleScope scope; | 203 v8::HandleScope scope(v8::Isolate::GetCurrent()); |
| 204 | 204 |
| 205 scoped_ptr<content::V8ValueConverter> v8_converter( | 205 scoped_ptr<content::V8ValueConverter> v8_converter( |
| 206 content::V8ValueConverter::create()); | 206 content::V8ValueConverter::create()); |
| 207 v8::Local<v8::Value> script_value; | 207 v8::Local<v8::Value> script_value; |
| 208 | 208 |
| 209 if (params.in_main_world) { | 209 if (params.in_main_world) { |
| 210 DOMActivityLogger::AttachToWorld( | 210 DOMActivityLogger::AttachToWorld( |
| 211 DOMActivityLogger::kMainWorldId, | 211 DOMActivityLogger::kMainWorldId, |
| 212 extension->id(), | 212 extension->id(), |
| 213 UserScriptSlave::GetDataSourceURLForFrame(child_frame), | 213 UserScriptSlave::GetDataSourceURLForFrame(child_frame), |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 269 |
| 270 for (WebFrame* child_frame = parent_frame->firstChild(); child_frame; | 270 for (WebFrame* child_frame = parent_frame->firstChild(); child_frame; |
| 271 child_frame = child_frame->nextSibling()) { | 271 child_frame = child_frame->nextSibling()) { |
| 272 frames_vector->push_back(child_frame); | 272 frames_vector->push_back(child_frame); |
| 273 GetAllChildFrames(child_frame, frames_vector); | 273 GetAllChildFrames(child_frame, frames_vector); |
| 274 } | 274 } |
| 275 return true; | 275 return true; |
| 276 } | 276 } |
| 277 | 277 |
| 278 } // namespace extensions | 278 } // namespace extensions |
| OLD | NEW |