| 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/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 bool grant_active_tab_permissions); | 84 bool grant_active_tab_permissions); |
| 85 | 85 |
| 86 // Opens the popup for the given |extension| in the given |browser|'s window. | 86 // Opens the popup for the given |extension| in the given |browser|'s window. |
| 87 // If |grant_active_tab_permissions| is true, this grants the extension | 87 // If |grant_active_tab_permissions| is true, this grants the extension |
| 88 // activeTab (so this should only be done if this is through a direct user | 88 // activeTab (so this should only be done if this is through a direct user |
| 89 // action). | 89 // action). |
| 90 bool ShowExtensionActionPopup(const Extension* extension, | 90 bool ShowExtensionActionPopup(const Extension* extension, |
| 91 Browser* browser, | 91 Browser* browser, |
| 92 bool grant_active_tab_permissions); | 92 bool grant_active_tab_permissions); |
| 93 | 93 |
| 94 // Returns true if the given |extension| wants to run on the tab pointed to |
| 95 // by |web_contents|. |
| 96 bool ExtensionWantsToRun(const Extension* extension, |
| 97 content::WebContents* web_contents); |
| 98 |
| 94 // Notifies that there has been a change in the given |extension_action|. | 99 // Notifies that there has been a change in the given |extension_action|. |
| 95 void NotifyChange(ExtensionAction* extension_action, | 100 void NotifyChange(ExtensionAction* extension_action, |
| 96 content::WebContents* web_contents, | 101 content::WebContents* web_contents, |
| 97 content::BrowserContext* browser_context); | 102 content::BrowserContext* browser_context); |
| 98 | 103 |
| 99 // Clears the values for all ExtensionActions for the tab associated with the | 104 // Clears the values for all ExtensionActions for the tab associated with the |
| 100 // given |web_contents| (and signals that page actions changed). | 105 // given |web_contents| (and signals that page actions changed). |
| 101 void ClearAllValuesForTab(content::WebContents* web_contents); | 106 void ClearAllValuesForTab(content::WebContents* web_contents); |
| 102 | 107 |
| 103 // Notifies that the current set of page actions for |web_contents| has | 108 // Notifies that the current set of page actions for |web_contents| has |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 class PageActionGetPopupFunction | 442 class PageActionGetPopupFunction |
| 438 : public extensions::ExtensionActionGetPopupFunction { | 443 : public extensions::ExtensionActionGetPopupFunction { |
| 439 public: | 444 public: |
| 440 DECLARE_EXTENSION_FUNCTION("pageAction.getPopup", PAGEACTION_GETPOPUP) | 445 DECLARE_EXTENSION_FUNCTION("pageAction.getPopup", PAGEACTION_GETPOPUP) |
| 441 | 446 |
| 442 protected: | 447 protected: |
| 443 virtual ~PageActionGetPopupFunction() {} | 448 virtual ~PageActionGetPopupFunction() {} |
| 444 }; | 449 }; |
| 445 | 450 |
| 446 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H
_ | 451 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H
_ |
| OLD | NEW |