| 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 "chrome/browser/extensions/activity_log/activity_log.h" | 7 #include "chrome/browser/extensions/activity_log/activity_log.h" |
| 8 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h" | 8 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h" |
| 9 #include "chrome/browser/extensions/api/declarative_content/content_rules_regist
ry.h" | 9 #include "chrome/browser/extensions/api/declarative_content/content_rules_regist
ry.h" |
| 10 #include "chrome/browser/extensions/crx_installer.h" | 10 #include "chrome/browser/extensions/crx_installer.h" |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 Profile::FromBrowserContext(web_contents()->GetBrowserContext()); | 205 Profile::FromBrowserContext(web_contents()->GetBrowserContext()); |
| 206 ExtensionService* service = profile->GetExtensionService(); | 206 ExtensionService* service = profile->GetExtensionService(); |
| 207 if (!service) | 207 if (!service) |
| 208 return; | 208 return; |
| 209 | 209 |
| 210 ExtensionActionManager* extension_action_manager = | 210 ExtensionActionManager* extension_action_manager = |
| 211 ExtensionActionManager::Get(profile); | 211 ExtensionActionManager::Get(profile); |
| 212 for (ExtensionSet::const_iterator it = service->extensions()->begin(); | 212 for (ExtensionSet::const_iterator it = service->extensions()->begin(); |
| 213 it != service->extensions()->end(); ++it) { | 213 it != service->extensions()->end(); ++it) { |
| 214 ExtensionAction* browser_action = | 214 ExtensionAction* browser_action = |
| 215 extension_action_manager->GetBrowserAction(**it); | 215 extension_action_manager->GetBrowserAction(*it->get()); |
| 216 if (browser_action) { | 216 if (browser_action) { |
| 217 browser_action->ClearAllValuesForTab(SessionID::IdForTab(web_contents())); | 217 browser_action->ClearAllValuesForTab(SessionID::IdForTab(web_contents())); |
| 218 content::NotificationService::current()->Notify( | 218 content::NotificationService::current()->Notify( |
| 219 chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED, | 219 chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED, |
| 220 content::Source<ExtensionAction>(browser_action), | 220 content::Source<ExtensionAction>(browser_action), |
| 221 content::NotificationService::NoDetails()); | 221 content::NotificationService::NoDetails()); |
| 222 } | 222 } |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 | 225 |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 } | 459 } |
| 460 } | 460 } |
| 461 | 461 |
| 462 void TabHelper::SetTabId(RenderViewHost* render_view_host) { | 462 void TabHelper::SetTabId(RenderViewHost* render_view_host) { |
| 463 render_view_host->Send( | 463 render_view_host->Send( |
| 464 new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(), | 464 new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(), |
| 465 SessionID::IdForTab(web_contents()))); | 465 SessionID::IdForTab(web_contents()))); |
| 466 } | 466 } |
| 467 | 467 |
| 468 } // namespace extensions | 468 } // namespace extensions |
| OLD | NEW |