| 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_BADGE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SCRIPT_BADGE_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_SCRIPT_BADGE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_SCRIPT_BADGE_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 class ScriptBadgeController | 49 class ScriptBadgeController |
| 50 : public base::RefCountedThreadSafe<ScriptBadgeController>, | 50 : public base::RefCountedThreadSafe<ScriptBadgeController>, |
| 51 public LocationBarController, | 51 public LocationBarController, |
| 52 public ScriptExecutor, | 52 public ScriptExecutor, |
| 53 public content::WebContentsObserver, | 53 public content::WebContentsObserver, |
| 54 public content::NotificationObserver { | 54 public content::NotificationObserver { |
| 55 public: | 55 public: |
| 56 explicit ScriptBadgeController(TabContents* tab_contents); | 56 explicit ScriptBadgeController(TabContents* tab_contents); |
| 57 | 57 |
| 58 // LocationBarController implementation. | 58 // LocationBarController implementation. |
| 59 virtual std::vector<ExtensionAction*> GetCurrentActions() OVERRIDE; | 59 virtual std::vector<ExtensionAction*> GetCurrentActions() const OVERRIDE; |
| 60 virtual Action OnClicked(const std::string& extension_id, | 60 virtual Action OnClicked(const std::string& extension_id, |
| 61 int mouse_button) OVERRIDE; | 61 int mouse_button) OVERRIDE; |
| 62 virtual void NotifyChange() OVERRIDE; | 62 virtual void NotifyChange() OVERRIDE; |
| 63 | 63 |
| 64 // ScriptExecutor implementation. | 64 // ScriptExecutor implementation. |
| 65 virtual void ExecuteScript(const std::string& extension_id, | 65 virtual void ExecuteScript(const std::string& extension_id, |
| 66 ScriptType script_type, | 66 ScriptType script_type, |
| 67 const std::string& code, | 67 const std::string& code, |
| 68 FrameScope frame_scope, | 68 FrameScope frame_scope, |
| 69 UserScript::RunLocation run_at, | 69 UserScript::RunLocation run_at, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 // Listen to extension unloaded notifications. | 126 // Listen to extension unloaded notifications. |
| 127 content::NotificationRegistrar registrar_; | 127 content::NotificationRegistrar registrar_; |
| 128 | 128 |
| 129 DISALLOW_COPY_AND_ASSIGN(ScriptBadgeController); | 129 DISALLOW_COPY_AND_ASSIGN(ScriptBadgeController); |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 } // namespace extensions | 132 } // namespace extensions |
| 133 | 133 |
| 134 #endif // CHROME_BROWSER_EXTENSIONS_SCRIPT_BADGE_CONTROLLER_H_ | 134 #endif // CHROME_BROWSER_EXTENSIONS_SCRIPT_BADGE_CONTROLLER_H_ |
| OLD | NEW |