| 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/browser/extensions/tab_helper.h" | 5 #include "chrome/browser/extensions/tab_helper.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/extensions/activity_log/activity_log.h" | 10 #include "chrome/browser/extensions/activity_log/activity_log.h" |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 executing_scripts_map, | 344 executing_scripts_map, |
| 345 on_page_id, | 345 on_page_id, |
| 346 on_url)); | 346 on_url)); |
| 347 } | 347 } |
| 348 | 348 |
| 349 void TabHelper::OnWatchedPageChange( | 349 void TabHelper::OnWatchedPageChange( |
| 350 const std::vector<std::string>& css_selectors) { | 350 const std::vector<std::string>& css_selectors) { |
| 351 #if defined(ENABLE_EXTENSIONS) | 351 #if defined(ENABLE_EXTENSIONS) |
| 352 if (ExtensionSystem::Get(profile_)->extension_service() && | 352 if (ExtensionSystem::Get(profile_)->extension_service() && |
| 353 RulesRegistryService::Get(profile_)) { | 353 RulesRegistryService::Get(profile_)) { |
| 354 RulesRegistryService::Get(profile_)->content_rules_registry()->Apply( | 354 RulesRegistryService::Get(profile_)->content_rules_registry()-> |
| 355 web_contents(), css_selectors); | 355 Apply(web_contents(), css_selectors); |
| 356 } | 356 } |
| 357 #endif // defined(ENABLE_EXTENSIONS) | 357 #endif // defined(ENABLE_EXTENSIONS) |
| 358 } | 358 } |
| 359 | 359 |
| 360 void TabHelper::OnDetailedConsoleMessageAdded( | 360 void TabHelper::OnDetailedConsoleMessageAdded( |
| 361 const base::string16& message, | 361 const base::string16& message, |
| 362 const base::string16& source, | 362 const base::string16& source, |
| 363 const StackTrace& stack_trace, | 363 const StackTrace& stack_trace, |
| 364 int32 severity_level) { | 364 int32 severity_level) { |
| 365 if (IsSourceFromAnExtension(source)) { | 365 if (IsSourceFromAnExtension(source)) { |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 } | 487 } |
| 488 } | 488 } |
| 489 | 489 |
| 490 void TabHelper::SetTabId(RenderViewHost* render_view_host) { | 490 void TabHelper::SetTabId(RenderViewHost* render_view_host) { |
| 491 render_view_host->Send( | 491 render_view_host->Send( |
| 492 new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(), | 492 new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(), |
| 493 SessionID::IdForTab(web_contents()))); | 493 SessionID::IdForTab(web_contents()))); |
| 494 } | 494 } |
| 495 | 495 |
| 496 } // namespace extensions | 496 } // namespace extensions |
| OLD | NEW |