| 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 0b3092a3cba646622d45ed464b0e1782db5a2a9e..bbf042becab605f75203072f52d9de5610ddcdff 100644
|
| --- a/chrome/browser/extensions/extension_tab_util.h
|
| +++ b/chrome/browser/extensions/extension_tab_util.h
|
| @@ -12,6 +12,7 @@
|
| #include "ui/base/window_open_disposition.h"
|
|
|
| class Browser;
|
| +class ChromeAsyncExtensionFunction;
|
| class GURL;
|
| class Profile;
|
| class TabStripModel;
|
| @@ -36,6 +37,26 @@ class WindowController;
|
| // Provides various utility functions that help manipulate tabs.
|
| class ExtensionTabUtil {
|
| public:
|
| + struct OpenTabParams {
|
| + OpenTabParams();
|
| + ~OpenTabParams();
|
| +
|
| + bool create_browser_if_needed;
|
| + scoped_ptr<int> window_id;
|
| + scoped_ptr<int> opener_tab_id;
|
| + scoped_ptr<std::string> url;
|
| + scoped_ptr<bool> active;
|
| + scoped_ptr<bool> pinned;
|
| + scoped_ptr<int> index;
|
| + };
|
| +
|
| + // Opens a new tab given an extension function |function| and creation
|
| + // parameters |params|. Returns a Tab object if successful, or NULL and
|
| + // optionally sets |error| if an error occurs.
|
| + static base::DictionaryValue* OpenTab(ChromeAsyncExtensionFunction* function,
|
| + const OpenTabParams& params,
|
| + std::string* error);
|
| +
|
| static int GetWindowId(const Browser* browser);
|
| static int GetWindowIdOfTabStripModel(const TabStripModel* tab_strip_model);
|
| static int GetTabId(const content::WebContents* web_contents);
|
| @@ -43,6 +64,9 @@ class ExtensionTabUtil {
|
| static int GetWindowIdOfTab(const content::WebContents* web_contents);
|
| static base::ListValue* CreateTabList(const Browser* browser,
|
| const Extension* extension);
|
| + static Browser* GetBrowserFromWindowID(ChromeAsyncExtensionFunction* function,
|
| + int window_id,
|
| + std::string* error_message);
|
|
|
| // Creates a Tab object (see chrome/common/extensions/api/tabs.json) with
|
| // information about the state of a browser tab. Depending on the
|
|
|