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/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 | 80 |
81 // Executes the action of the given |extension| on the |browser|'s active | 81 // Executes the action of the given |extension| on the |browser|'s active |
82 // web contents. If |grant_tab_permissions| is true, this will also grant | 82 // web contents. If |grant_tab_permissions| is true, this will also grant |
83 // activeTab to the extension (so this should only be done if this is through | 83 // activeTab to the extension (so this should only be done if this is through |
84 // a direct user action). Returns the action that should be taken. | 84 // a direct user action). Returns the action that should be taken. |
85 ExtensionAction::ShowAction ExecuteExtensionAction( | 85 ExtensionAction::ShowAction ExecuteExtensionAction( |
86 const Extension* extension, | 86 const Extension* extension, |
87 Browser* browser, | 87 Browser* browser, |
88 bool grant_active_tab_permissions); | 88 bool grant_active_tab_permissions); |
89 | 89 |
90 // Opens the popup for the given |extension| in the given |browser|'s window. | |
91 // See ExecuteExtensionAction for the definition of | |
92 // |grant_active_tab_permissions|. | |
Finnur
2014/08/27 11:53:02
Hmm... I wonder if we should just duplicate the co
Devlin
2014/08/27 15:43:22
Done.
| |
93 bool ShowExtensionActionPopup(const Extension* extension, | |
94 Browser* browser, | |
95 bool grant_active_tab_permissions); | |
96 | |
90 // Notifies that there has been a change in the given |extension_action|. | 97 // Notifies that there has been a change in the given |extension_action|. |
91 void NotifyChange(ExtensionAction* extension_action, | 98 void NotifyChange(ExtensionAction* extension_action, |
92 content::WebContents* web_contents, | 99 content::WebContents* web_contents, |
93 content::BrowserContext* browser_context); | 100 content::BrowserContext* browser_context); |
94 | 101 |
95 // Clears the values for all ExtensionActions for the tab associated with the | 102 // Clears the values for all ExtensionActions for the tab associated with the |
96 // given |web_contents| (and signals that page actions changed). | 103 // given |web_contents| (and signals that page actions changed). |
97 void ClearAllValuesForTab(content::WebContents* web_contents); | 104 void ClearAllValuesForTab(content::WebContents* web_contents); |
98 | 105 |
99 // Notifies that the current set of page actions for |web_contents| has | 106 // Notifies that the current set of page actions for |web_contents| has |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
473 class PageActionGetPopupFunction | 480 class PageActionGetPopupFunction |
474 : public extensions::ExtensionActionGetPopupFunction { | 481 : public extensions::ExtensionActionGetPopupFunction { |
475 public: | 482 public: |
476 DECLARE_EXTENSION_FUNCTION("pageAction.getPopup", PAGEACTION_GETPOPUP) | 483 DECLARE_EXTENSION_FUNCTION("pageAction.getPopup", PAGEACTION_GETPOPUP) |
477 | 484 |
478 protected: | 485 protected: |
479 virtual ~PageActionGetPopupFunction() {} | 486 virtual ~PageActionGetPopupFunction() {} |
480 }; | 487 }; |
481 | 488 |
482 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H _ | 489 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H _ |
OLD | NEW |