diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-15 04:25:34 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-15 04:25:34 +0000 |
commit | e9a4513ccdb40e341a699285d174b60f20736966 (patch) | |
tree | 7b2ea16fcc25f9b3d6524563e7f92b2907117d93 /chrome/browser/extensions/extension_tabs_module.h | |
parent | 5d063840bdb2c53dc013e2bad48d76cb43ac89a5 (diff) | |
download | chromium_src-e9a4513ccdb40e341a699285d174b60f20736966.zip chromium_src-e9a4513ccdb40e341a699285d174b60f20736966.tar.gz chromium_src-e9a4513ccdb40e341a699285d174b60f20736966.tar.bz2 |
Uploaded & applied on behalf of Roger Tawa (rogerta@google.com).
BUG=11200
R=aa,rafaelw
http://codereview.chromium.org/115250
Review URL: http://codereview.chromium.org/113442
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16146 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_tabs_module.h')
-rw-r--r-- | chrome/browser/extensions/extension_tabs_module.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_tabs_module.h b/chrome/browser/extensions/extension_tabs_module.h index 8a004185..2dd2c27 100644 --- a/chrome/browser/extensions/extension_tabs_module.h +++ b/chrome/browser/extensions/extension_tabs_module.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__ #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__ +#include <string> + #include "chrome/browser/extensions/extension_function.h" class Browser; @@ -14,13 +16,24 @@ class TabStripModel; class ExtensionTabUtil { public: + // Possible tab states. These states are used to calculate the "status" + // property of the Tab object that is used in the extension tab API. + enum TabStatus { + TAB_LOADING, // Waiting for the DOM to load. + TAB_COMPLETE // Tab loading and rendering is complete. + }; + static int GetWindowId(const Browser* browser); static int GetTabId(const TabContents* tab_contents); + static TabStatus GetTabStatus(const TabContents* tab_contents); + static std::string GetTabStatusText(TabStatus status); static int GetWindowIdOfTab(const TabContents* tab_contents); static DictionaryValue* CreateTabValue(const TabContents* tab_contents); static DictionaryValue* CreateTabValue(const TabContents* tab_contents, TabStripModel* tab_strip, int tab_index); + static DictionaryValue* CreateTabChangedValue(const TabContents* contents); + // Any out parameter (|browser|, |tab_strip|, |contents|, & |tab_index|) may // be NULL and will not be set within the function. static bool GetTabById(int tab_id, Profile* profile, Browser** browser, |