| 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.h" | 9 #include "base/message_loop.h" |
| 10 #include "chrome/common/extensions/extension_manifest_constants.h" | 10 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 11 #include "chrome/common/extensions/extension_messages.h" | 11 #include "chrome/common/extensions/extension_messages.h" |
| 12 #include "chrome/common/extensions/permissions/permissions_data.h" | 12 #include "chrome/common/extensions/permissions/permissions_data.h" |
| 13 #include "chrome/renderer/chrome_render_process_observer.h" | 13 #include "chrome/renderer/chrome_render_process_observer.h" |
| 14 #include "chrome/renderer/extensions/dispatcher.h" | 14 #include "chrome/renderer/extensions/dispatcher.h" |
| 15 #include "chrome/renderer/extensions/dom_activity_logger.h" | 15 #include "chrome/renderer/extensions/dom_activity_logger.h" |
| 16 #include "chrome/renderer/extensions/extension_groups.h" | 16 #include "chrome/renderer/extensions/extension_groups.h" |
| 17 #include "chrome/renderer/extensions/extension_helper.h" | 17 #include "chrome/renderer/extensions/extension_helper.h" |
| 18 #include "chrome/renderer/extensions/user_script_slave.h" | 18 #include "chrome/renderer/extensions/user_script_slave.h" |
| 19 #include "content/public/renderer/render_view.h" | 19 #include "content/public/renderer/render_view.h" |
| 20 #include "content/public/renderer/v8_value_converter.h" | 20 #include "content/public/renderer/v8_value_converter.h" |
| 21 #include "extensions/common/error_utils.h" | 21 #include "extensions/common/error_utils.h" |
| 22 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" | 22 #include "third_party/WebKit/public/platform/WebString.h" |
| 23 #include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h" | 23 #include "third_party/WebKit/public/platform/WebVector.h" |
| 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 27 #include "v8/include/v8.h" | 27 #include "v8/include/v8.h" |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| 30 // The length of time to wait after the DOM is complete to try and run user | 30 // The length of time to wait after the DOM is complete to try and run user |
| 31 // scripts. | 31 // scripts. |
| 32 const int kUserScriptIdleTimeoutMs = 200; | 32 const int kUserScriptIdleTimeoutMs = 200; |
| 33 } | 33 } |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 for (WebFrame* child_frame = parent_frame->firstChild(); child_frame; | 267 for (WebFrame* child_frame = parent_frame->firstChild(); child_frame; |
| 268 child_frame = child_frame->nextSibling()) { | 268 child_frame = child_frame->nextSibling()) { |
| 269 frames_vector->push_back(child_frame); | 269 frames_vector->push_back(child_frame); |
| 270 GetAllChildFrames(child_frame, frames_vector); | 270 GetAllChildFrames(child_frame, frames_vector); |
| 271 } | 271 } |
| 272 return true; | 272 return true; |
| 273 } | 273 } |
| 274 | 274 |
| 275 } // namespace extensions | 275 } // namespace extensions |
| OLD | NEW |