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

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: DO NOT SUBMIT/ having only Update() 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs_event_router.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1c6a9eb3358c0f269e36ebd6a6d9c3c25150740d..7a0801a8c1d8fb068895fe8569af2401f7e36628 100644
--- a/chrome/browser/extensions/api/tabs/tabs_event_router.h
+++ b/chrome/browser/extensions/api/tabs/tabs_event_router.h
@@ -148,19 +148,8 @@ class TabsEventRouter : public TabStripModelObserver,
// |contents|.
explicit TabEntry(content::WebContents* contents);
- // Indicate via a list of key/value pairs if a tab is loading based on its
- // WebContents. Whether the state has changed or not is used to determine
- // if events needs to be sent to extensions during processing of
- // TabChangedAt(). If this method indicates that a tab should "hold" a
- // state-change to "loading", the DidNavigate() method should eventually
- // send a similar message to undo it. If false, the returned key/value
- // pairs list is empty.
- scoped_ptr<base::DictionaryValue> UpdateLoadState();
-
- // Indicate via a list of key/value pairs that a tab load has resulted in a
- // navigation and the destination url is available for inspection. The list
- // is empty if no updates should be sent.
- scoped_ptr<base::DictionaryValue> DidNavigate();
+ // Indicate via a list of key/value pairs that being changed when called.
+ scoped_ptr<base::DictionaryValue> Update();
// Update the audible and muted states and return whether they were changed
bool SetAudible(bool new_val);
@@ -171,17 +160,14 @@ class TabsEventRouter : public TabStripModelObserver,
private:
content::WebContents* contents_;
- // Whether we are waiting to fire the 'complete' status change. This will
- // occur the first time the WebContents stops loading after the
- // NAV_ENTRY_COMMITTED was fired. The tab may go back into and out of the
- // loading state subsequently, but we will ignore those changes.
- bool complete_waiting_on_load_;
-
// Previous audible and muted states
bool was_audible_;
bool was_muted_;
GURL url_;
+
+ // Indicate the last 'status' value.
+ std::string status_;
};
// Gets the TabEntry for the given |contents|. Returns linked_ptr<TabEntry>
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698