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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 Browser* browser, | 86 Browser* browser, |
87 bool grant_active_tab_permissions); | 87 bool grant_active_tab_permissions); |
88 | 88 |
89 // Notifies that there has been a change in the given |extension_action|. | 89 // Notifies that there has been a change in the given |extension_action|. |
90 void NotifyChange(ExtensionAction* extension_action, | 90 void NotifyChange(ExtensionAction* extension_action, |
91 content::WebContents* web_contents, | 91 content::WebContents* web_contents, |
92 content::BrowserContext* browser_context); | 92 content::BrowserContext* browser_context); |
93 | 93 |
94 // Dispatches the onClicked event for extension that owns the given action. | 94 // Dispatches the onClicked event for extension that owns the given action. |
95 void DispatchExtensionActionClicked(const ExtensionAction& extension_action, | 95 void DispatchExtensionActionClicked(const ExtensionAction& extension_action, |
96 content::WebContents* web_contents); | 96 content::WebContents* web_contents, |
| 97 const Extension* extension); |
97 | 98 |
98 // Clears the values for all ExtensionActions for the tab associated with the | 99 // Clears the values for all ExtensionActions for the tab associated with the |
99 // given |web_contents| (and signals that page actions changed). | 100 // given |web_contents| (and signals that page actions changed). |
100 void ClearAllValuesForTab(content::WebContents* web_contents); | 101 void ClearAllValuesForTab(content::WebContents* web_contents); |
101 | 102 |
102 // Notifies that the current set of page actions for |web_contents| has | 103 // Notifies that the current set of page actions for |web_contents| has |
103 // changed, and signals the browser to update. | 104 // changed, and signals the browser to update. |
104 void NotifyPageActionsChanged(content::WebContents* web_contents); | 105 void NotifyPageActionsChanged(content::WebContents* web_contents); |
105 | 106 |
106 void set_prefs_for_testing(ExtensionPrefs* prefs) { | 107 void set_prefs_for_testing(ExtensionPrefs* prefs) { |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 class PageActionGetPopupFunction | 443 class PageActionGetPopupFunction |
443 : public extensions::ExtensionActionGetPopupFunction { | 444 : public extensions::ExtensionActionGetPopupFunction { |
444 public: | 445 public: |
445 DECLARE_EXTENSION_FUNCTION("pageAction.getPopup", PAGEACTION_GETPOPUP) | 446 DECLARE_EXTENSION_FUNCTION("pageAction.getPopup", PAGEACTION_GETPOPUP) |
446 | 447 |
447 protected: | 448 protected: |
448 ~PageActionGetPopupFunction() override {} | 449 ~PageActionGetPopupFunction() override {} |
449 }; | 450 }; |
450 | 451 |
451 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H
_ | 452 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H
_ |
OLD | NEW |