| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 class ScriptBadgeController | 53 class ScriptBadgeController |
| 54 : public base::RefCountedThreadSafe<ScriptBadgeController>, | 54 : public base::RefCountedThreadSafe<ScriptBadgeController>, |
| 55 public LocationBarController, | 55 public LocationBarController, |
| 56 public ScriptExecutor, | 56 public ScriptExecutor, |
| 57 public content::WebContentsObserver, | 57 public content::WebContentsObserver, |
| 58 public content::NotificationObserver { | 58 public content::NotificationObserver { |
| 59 public: | 59 public: |
| 60 explicit ScriptBadgeController(TabContents* tab_contents); | 60 explicit ScriptBadgeController(TabContents* tab_contents); |
| 61 | 61 |
| 62 // LocationBarController implementation. | 62 // LocationBarController implementation. |
| 63 virtual std::vector<ExtensionAction*> GetCurrentActions() OVERRIDE; | 63 virtual std::vector<ExtensionAction*> GetCurrentActions() const OVERRIDE; |
| 64 virtual Action OnClicked(const std::string& extension_id, | 64 virtual Action OnClicked(const std::string& extension_id, |
| 65 int mouse_button) OVERRIDE; | 65 int mouse_button) OVERRIDE; |
| 66 | 66 |
| 67 // ScriptExecutor implementation. | 67 // ScriptExecutor implementation. |
| 68 virtual void ExecuteScript(const std::string& extension_id, | 68 virtual void ExecuteScript(const std::string& extension_id, |
| 69 ScriptType script_type, | 69 ScriptType script_type, |
| 70 const std::string& code, | 70 const std::string& code, |
| 71 FrameScope frame_scope, | 71 FrameScope frame_scope, |
| 72 UserScript::RunLocation run_at, | 72 UserScript::RunLocation run_at, |
| 73 WorldType world_type, | 73 WorldType world_type, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 // Listen to extension unloaded notifications. | 133 // Listen to extension unloaded notifications. |
| 134 content::NotificationRegistrar registrar_; | 134 content::NotificationRegistrar registrar_; |
| 135 | 135 |
| 136 DISALLOW_COPY_AND_ASSIGN(ScriptBadgeController); | 136 DISALLOW_COPY_AND_ASSIGN(ScriptBadgeController); |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 } // namespace extensions | 139 } // namespace extensions |
| 140 | 140 |
| 141 #endif // CHROME_BROWSER_EXTENSIONS_SCRIPT_BADGE_CONTROLLER_H_ | 141 #endif // CHROME_BROWSER_EXTENSIONS_SCRIPT_BADGE_CONTROLLER_H_ |
| OLD | NEW |