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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_event_router.h

Issue 1156043002: chrome.tabs.onUpdated doesn't called with 'loading' twice. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/api/tabs/tabs_event_router.h
diff --git a/chrome/browser/extensions/api/tabs/tabs_event_router.h b/chrome/browser/extensions/api/tabs/tabs_event_router.h
index 45a63c39683fe3b3f86c9ce03bd1479e82adfe4e..bad005ec54c0732bb7380102e799972d3198ce0a 100644
--- a/chrome/browser/extensions/api/tabs/tabs_event_router.h
+++ b/chrome/browser/extensions/api/tabs/tabs_event_router.h
@@ -148,19 +148,13 @@ class TabsEventRouter : public TabStripModelObserver,
// std::map<> by value.
TabEntry();
- // Update the load state of the tab based on its WebContents. Returns true
- // if the state changed, false otherwise. Whether the state has changed or
- // not is used to determine if events needs to be sent to extensions during
- // processing of TabChangedAt(). This method will "hold" a state-change
- // to "loading", until the DidNavigate() method which should always follow
- // it. Returns NULL if no updates should be sent.
- base::DictionaryValue* UpdateLoadState(
+ // Update 'complete' state baed on its WebContents.
+ scoped_ptr<base::DictionaryValue> UpdateComplete(
const content::WebContents* contents);
- // Indicates that a tab load has resulted in a navigation and the
- // destination url is available for inspection. Returns NULL if no updates
- // should be sent.
- base::DictionaryValue* DidNavigate(const content::WebContents* contents);
+ // Detect what has changed by holding onto the previous values.
+ scoped_ptr<base::DictionaryValue> Update(
+ const content::WebContents* contents);
private:
// Whether we are waiting to fire the 'complete' status change. This will

Powered by Google App Engine
This is Rietveld 408576698