| 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 #ifndef CHROME_BROWSER_EXTENSIONS_SCRIPT_BUBBLE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SCRIPT_BUBBLE_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_SCRIPT_BUBBLE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_SCRIPT_BUBBLE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 const content::WebContents* web_contents, | 36 const content::WebContents* web_contents, |
| 37 const ExecutingScriptsMap& extension_ids, | 37 const ExecutingScriptsMap& extension_ids, |
| 38 int32 page_id, | 38 int32 page_id, |
| 39 const GURL& on_url) OVERRIDE; | 39 const GURL& on_url) OVERRIDE; |
| 40 | 40 |
| 41 // content::WebContentsObserver implementation. | 41 // content::WebContentsObserver implementation. |
| 42 virtual void DidNavigateMainFrame( | 42 virtual void DidNavigateMainFrame( |
| 43 const content::LoadCommittedDetails& details, | 43 const content::LoadCommittedDetails& details, |
| 44 const content::FrameNavigateParams& params) OVERRIDE; | 44 const content::FrameNavigateParams& params) OVERRIDE; |
| 45 | 45 |
| 46 void OnExtensionUnloaded(const std::string& extension_id); |
| 47 |
| 46 private: | 48 private: |
| 47 // Helper to get the profile of the web contents we're associated with. | 49 // Helper to get the profile of the web contents we're associated with. |
| 48 Profile* profile() const; | 50 Profile* profile() const; |
| 49 | 51 |
| 50 // Helper to get the extension service for the profile of the web contents | 52 // Helper to get the extension service for the profile of the web contents |
| 51 // we're associated with. | 53 // we're associated with. |
| 52 ExtensionService* GetExtensionService() const; | 54 ExtensionService* GetExtensionService() const; |
| 53 | 55 |
| 54 // Helper to update the properties of the script bubble to reflect current | 56 // Helper to update the properties of the script bubble to reflect current |
| 55 // internal state. | 57 // internal state. |
| 56 void UpdateScriptBubble(); | 58 void UpdateScriptBubble(); |
| 57 | 59 |
| 58 // The accumulated set of extension IDs that are operating on this tab. | 60 // The accumulated set of extension IDs that are operating on this tab. |
| 59 std::set<std::string> extensions_running_scripts_; | 61 std::set<std::string> extensions_running_scripts_; |
| 60 | 62 |
| 61 DISALLOW_COPY_AND_ASSIGN(ScriptBubbleController); | 63 DISALLOW_COPY_AND_ASSIGN(ScriptBubbleController); |
| 62 }; | 64 }; |
| 63 | 65 |
| 64 } // namespace extensions | 66 } // namespace extensions |
| 65 | 67 |
| 66 #endif // CHROME_BROWSER_EXTENSIONS_SCRIPT_BUBBLE_CONTROLLER_H_ | 68 #endif // CHROME_BROWSER_EXTENSIONS_SCRIPT_BUBBLE_CONTROLLER_H_ |
| OLD | NEW |