Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: chrome/browser/extensions/tab_helper.cc

Issue 28273006: <webview>: Implement declarativeWebRequest API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed browser_tests build Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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);
Jeffrey Yasskin 2013/11/09 02:47:22 Try not to change files you don't have to.
Fady Samuel 2013/11/10 03:39:56 Done.
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698