Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1304)

Unified Diff: chrome/browser/extensions/chrome_extension_function_details.h

Issue 1225693009: Show extension uninstall dialog in browser window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_; }

Powered by Google App Engine
This is Rietveld 408576698