| 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 "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 InvokeForContentRulesRegistries([this](ContentRulesRegistry* registry) { | 178 InvokeForContentRulesRegistries([this](ContentRulesRegistry* registry) { |
| 179 registry->MonitorWebContentsForRuleEvaluation(this->web_contents()); | 179 registry->MonitorWebContentsForRuleEvaluation(this->web_contents()); |
| 180 }); | 180 }); |
| 181 | 181 |
| 182 // We need an ExtensionWebContentsObserver, so make sure one exists (this is | 182 // We need an ExtensionWebContentsObserver, so make sure one exists (this is |
| 183 // a no-op if one already does). | 183 // a no-op if one already does). |
| 184 ChromeExtensionWebContentsObserver::CreateForWebContents(web_contents); | 184 ChromeExtensionWebContentsObserver::CreateForWebContents(web_contents); |
| 185 ExtensionWebContentsObserver::GetForWebContents(web_contents)->dispatcher()-> | 185 ExtensionWebContentsObserver::GetForWebContents(web_contents)->dispatcher()-> |
| 186 set_delegate(this); | 186 set_delegate(this); |
| 187 | 187 |
| 188 BookmarkManagerPrivateDragEventRouter::MaybeCreateForWebContents( | 188 BookmarkManagerPrivateDragEventRouter::CreateForWebContents(web_contents); |
| 189 web_contents); | |
| 190 | 189 |
| 191 registrar_.Add(this, | 190 registrar_.Add(this, |
| 192 content::NOTIFICATION_LOAD_STOP, | 191 content::NOTIFICATION_LOAD_STOP, |
| 193 content::Source<NavigationController>( | 192 content::Source<NavigationController>( |
| 194 &web_contents->GetController())); | 193 &web_contents->GetController())); |
| 195 } | 194 } |
| 196 | 195 |
| 197 TabHelper::~TabHelper() { | 196 TabHelper::~TabHelper() { |
| 198 RemoveScriptExecutionObserver(ActivityLog::GetInstance(profile_)); | 197 RemoveScriptExecutionObserver(ActivityLog::GetInstance(profile_)); |
| 199 } | 198 } |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 } | 678 } |
| 680 } | 679 } |
| 681 | 680 |
| 682 void TabHelper::SetTabId(content::RenderFrameHost* render_frame_host) { | 681 void TabHelper::SetTabId(content::RenderFrameHost* render_frame_host) { |
| 683 render_frame_host->Send( | 682 render_frame_host->Send( |
| 684 new ExtensionMsg_SetTabId(render_frame_host->GetRoutingID(), | 683 new ExtensionMsg_SetTabId(render_frame_host->GetRoutingID(), |
| 685 SessionTabHelper::IdForTab(web_contents()))); | 684 SessionTabHelper::IdForTab(web_contents()))); |
| 686 } | 685 } |
| 687 | 686 |
| 688 } // namespace extensions | 687 } // namespace extensions |
| OLD | NEW |