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

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

Issue 9234042: Re-land alexbost's experimental offscreenTabs API. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 9 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/extension_tab_util.h
diff --git a/chrome/browser/extensions/extension_tab_util.h b/chrome/browser/extensions/extension_tab_util.h
index 5a2fe7798472d2c91cf69222beeb1347754ef127..ed11e2c6955ed7fc36672091ee781a363233f51d 100644
--- a/chrome/browser/extensions/extension_tab_util.h
+++ b/chrome/browser/extensions/extension_tab_util.h
@@ -9,6 +9,8 @@
#include <string>
class Browser;
+class Extension;
+class GURL;
class Profile;
class TabContents;
class TabContentsWrapper;
@@ -62,6 +64,20 @@ class ExtensionTabUtil {
TabStripModel** tab_strip,
TabContentsWrapper** contents,
int* tab_index);
+
+ // Takes |url_string| and returns a GURL which is either valid and absolute
+ // or invalid. If |url_string| is not directly interpretable as a valid (it is
+ // likely a relative URL) an attempt is made to resolve it. |extension| is
+ // provided so it can be resolved relative to its extension base
+ // (chrome-extension://<id>/). Using the source frame url would be more
+ // correct, but because the api shipped with urls resolved relative to their
+ // extension base, we decided it wasn't worth breaking existing extensions to
+ // fix.
+ static GURL ResolvePossiblyRelativeURL(const std::string& url_string,
+ const Extension* extension);
+
+ // Returns true if |url| is used for testing crashes.
+ static bool IsCrashURL(const GURL& url);
};
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H__
« no previous file with comments | « chrome/browser/extensions/extension_function_registry.cc ('k') | chrome/browser/extensions/extension_tab_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698