diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-19 20:26:25 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-19 20:26:25 +0000 |
commit | 5f362e0129c6f92953d1e772d72c07d9f0906ab2 (patch) | |
tree | c180150b6f2808cbd61cc2a7cdab918e4f54e01c /chrome/browser/extensions/extension_tabs_module.h | |
parent | a1a82d5215198f9ed128f6fc0b1f14cdf3034867 (diff) | |
download | chromium_src-5f362e0129c6f92953d1e772d72c07d9f0906ab2.zip chromium_src-5f362e0129c6f92953d1e772d72c07d9f0906ab2.tar.gz chromium_src-5f362e0129c6f92953d1e772d72c07d9f0906ab2.tar.bz2 |
fix chrome.tabs.onUpdated bugs, add browsertest.
This CL addresses a few issues related to the behavior of the onUpdated event.
Issue 1: The page re-entering the load state and the completing was causing multiple 'complete' status events to be fired. We now only report the first 'complete' after the didNavigate message is fired (iframe navigation, for example).
Issue 2: We were initializing the URL when the TabEntry was created, and this caused us to fail to send the url with the first navigation because we thought it wasn't changing.
BUG=27208,37149
Review URL: http://codereview.chromium.org/2111010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47717 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 | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/chrome/browser/extensions/extension_tabs_module.h b/chrome/browser/extensions/extension_tabs_module.h index 8e82981..432ee22 100644 --- a/chrome/browser/extensions/extension_tabs_module.h +++ b/chrome/browser/extensions/extension_tabs_module.h @@ -21,17 +21,9 @@ 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 std::string GetTabStatusText(bool is_loading); static int GetWindowIdOfTab(const TabContents* tab_contents); static ListValue* CreateTabList(const Browser* browser); static DictionaryValue* CreateTabValue(const TabContents* tab_contents); |