| 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_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 friend class BrowserContextKeyedAPIFactory<ExtensionActionAPI>; | 111 friend class BrowserContextKeyedAPIFactory<ExtensionActionAPI>; |
| 112 | 112 |
| 113 // Returns the associated extension prefs. | 113 // Returns the associated extension prefs. |
| 114 ExtensionPrefs* GetExtensionPrefs(); | 114 ExtensionPrefs* GetExtensionPrefs(); |
| 115 | 115 |
| 116 // The DispatchEvent methods forward events to the |context|'s event router. | 116 // The DispatchEvent methods forward events to the |context|'s event router. |
| 117 void DispatchEventToExtension(content::BrowserContext* context, | 117 void DispatchEventToExtension(content::BrowserContext* context, |
| 118 const std::string& extension_id, | 118 const std::string& extension_id, |
| 119 events::HistogramValue histogram_value, | 119 events::HistogramValue histogram_value, |
| 120 const std::string& event_name, | 120 const std::string& event_name, |
| 121 scoped_ptr<base::ListValue> event_args); | 121 std::unique_ptr<base::ListValue> event_args); |
| 122 | 122 |
| 123 // BrowserContextKeyedAPI implementation. | 123 // BrowserContextKeyedAPI implementation. |
| 124 void Shutdown() override; | 124 void Shutdown() override; |
| 125 static const char* service_name() { return "ExtensionActionAPI"; } | 125 static const char* service_name() { return "ExtensionActionAPI"; } |
| 126 static const bool kServiceRedirectedInIncognito = true; | 126 static const bool kServiceRedirectedInIncognito = true; |
| 127 | 127 |
| 128 base::ObserverList<Observer> observers_; | 128 base::ObserverList<Observer> observers_; |
| 129 | 129 |
| 130 content::BrowserContext* browser_context_; | 130 content::BrowserContext* browser_context_; |
| 131 | 131 |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 class PageActionGetPopupFunction | 441 class PageActionGetPopupFunction |
| 442 : public extensions::ExtensionActionGetPopupFunction { | 442 : public extensions::ExtensionActionGetPopupFunction { |
| 443 public: | 443 public: |
| 444 DECLARE_EXTENSION_FUNCTION("pageAction.getPopup", PAGEACTION_GETPOPUP) | 444 DECLARE_EXTENSION_FUNCTION("pageAction.getPopup", PAGEACTION_GETPOPUP) |
| 445 | 445 |
| 446 protected: | 446 protected: |
| 447 ~PageActionGetPopupFunction() override {} | 447 ~PageActionGetPopupFunction() override {} |
| 448 }; | 448 }; |
| 449 | 449 |
| 450 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H
_ | 450 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H
_ |
| OLD | NEW |