| 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/page_action_controller.h" | 5 #include "chrome/browser/extensions/page_action_controller.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/browser_event_router.h" | 7 #include "chrome/browser/extensions/browser_event_router.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/extensions/extension_system.h" | 9 #include "chrome/browser/extensions/extension_system.h" |
| 10 #include "chrome/browser/extensions/tab_helper.h" | 10 #include "chrome/browser/extensions/tab_helper.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 const content::LoadCommittedDetails& details, | 87 const content::LoadCommittedDetails& details, |
| 88 const content::FrameNavigateParams& params) { | 88 const content::FrameNavigateParams& params) { |
| 89 if (details.is_in_page) | 89 if (details.is_in_page) |
| 90 return; | 90 return; |
| 91 | 91 |
| 92 const std::vector<ExtensionAction*> current_actions = GetCurrentActions(); | 92 const std::vector<ExtensionAction*> current_actions = GetCurrentActions(); |
| 93 | 93 |
| 94 if (current_actions.empty()) | 94 if (current_actions.empty()) |
| 95 return; | 95 return; |
| 96 | 96 |
| 97 TabContents* tab_contents = TabContents::FromWebContents(web_contents()); | |
| 98 for (size_t i = 0; i < current_actions.size(); ++i) { | 97 for (size_t i = 0; i < current_actions.size(); ++i) { |
| 99 current_actions[i]->ClearAllValuesForTab( | 98 current_actions[i]->ClearAllValuesForTab( |
| 100 SessionID::IdForTab(tab_contents)); | 99 SessionID::IdForTab(web_contents())); |
| 101 } | 100 } |
| 102 | 101 |
| 103 NotifyChange(); | 102 NotifyChange(); |
| 104 } | 103 } |
| 105 | 104 |
| 106 ExtensionService* PageActionController::GetExtensionService() const { | 105 ExtensionService* PageActionController::GetExtensionService() const { |
| 107 TabContents* tab_contents = TabContents::FromWebContents(web_contents()); | 106 TabContents* tab_contents = TabContents::FromWebContents(web_contents()); |
| 108 return ExtensionSystem::Get(tab_contents->profile())->extension_service(); | 107 return ExtensionSystem::Get(tab_contents->profile())->extension_service(); |
| 109 } | 108 } |
| 110 | 109 |
| 111 } // namespace extensions | 110 } // namespace extensions |
| OLD | NEW |