Chromium Code Reviews| Index: chrome/browser/extensions/chrome_extension_function_details.h |
| diff --git a/chrome/browser/extensions/chrome_extension_function_details.h b/chrome/browser/extensions/chrome_extension_function_details.h |
| index ba09652ba014a418a432a2dfcccd5d89d43704e9..8ea440e38100e289ee6cfea7c5766f62a859c2cc 100644 |
| --- a/chrome/browser/extensions/chrome_extension_function_details.h |
| +++ b/chrome/browser/extensions/chrome_extension_function_details.h |
| @@ -6,6 +6,7 @@ |
| #define CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_FUNCTION_DETAILS_H_ |
| #include "base/macros.h" |
| +#include "ui/gfx/native_widget_types.h" |
| class Browser; |
| class Profile; |
| @@ -57,6 +58,18 @@ class ChromeExtensionFunctionDetails { |
| // contents then defaults to the foremost one. |
| content::WebContents* GetAssociatedWebContents(); |
| + // Gets the web contents where the function is originated. This will return |
| + // the sender's web contents if it's not from a background page. Otherwise |
| + // this method will try to find the web contents from source_tab_id if it's |
| + // not TabStripModel::kNoTab, or find the app's web contents by the extension |
| + // id. If the web contents still can't be found, NULL will be returned. |
| + content::WebContents* GetOriginWebContents(); |
|
not at google - send to devlin
2015/07/10 22:52:48
I like it.
|
| + |
| + // Find a UI surface to display any UI (like a permission prompt) for the |
| + // extension calling this function. If the origin's window can't be found, |
| + // the browser's window will be returned. |
| + gfx::NativeWindow GetNativeWindowForUI(); |
| + |
| // Returns a pointer to the associated UIThreadExtensionFunction |
| UIThreadExtensionFunction* function() { return function_; } |
| const UIThreadExtensionFunction* function() const { return function_; } |