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

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

Issue 2521363002: [Extensions] Remove ChromeExtensionFunctionDetails::GetOriginWebContents (Closed)
Patch Set: lazyboy's Created 4 years, 1 month 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 8ea440e38100e289ee6cfea7c5766f62a859c2cc..eab33f20bd2e2e607b9fab335c28257c7b11dd72 100644
--- a/chrome/browser/extensions/chrome_extension_function_details.h
+++ b/chrome/browser/extensions/chrome_extension_function_details.h
@@ -58,16 +58,13 @@ 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();
-
// 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.
+ // extension calling this function. This will check, in order of preference,
+ // - The current window for the function (as defined by
+ // WindowControllerList::CurrentWindowForFunction()),
+ // - The sender web contents
+ // - Open app windows
+ // - A browser with the same profile
gfx::NativeWindow GetNativeWindowForUI();
// Returns a pointer to the associated UIThreadExtensionFunction

Powered by Google App Engine
This is Rietveld 408576698