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

Unified Diff: chrome/browser/extensions/browser_event_router.cc

Issue 11365201: Remove TabContents from TabStripModelObserver::TabMoved. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: linux oops Created 8 years, 1 month 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 | « chrome/browser/extensions/browser_event_router.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/browser_event_router.cc
diff --git a/chrome/browser/extensions/browser_event_router.cc b/chrome/browser/extensions/browser_event_router.cc
index 5c42f4a70952bd681fa78d35e68d2a5821fab2a4..c7c9d49daccfe29603fe30ab67ae56806b80b7c7 100644
--- a/chrome/browser/extensions/browser_event_router.cc
+++ b/chrome/browser/extensions/browser_event_router.cc
@@ -313,23 +313,23 @@ void BrowserEventRouter::TabSelectionChanged(
EventRouter::USER_GESTURE_UNKNOWN);
}
-void BrowserEventRouter::TabMoved(TabContents* contents,
+void BrowserEventRouter::TabMoved(WebContents* contents,
int from_index,
int to_index) {
scoped_ptr<ListValue> args(new ListValue());
- args->Append(Value::CreateIntegerValue(
- ExtensionTabUtil::GetTabId(contents->web_contents())));
+ args->Append(Value::CreateIntegerValue(ExtensionTabUtil::GetTabId(contents)));
DictionaryValue* object_args = new DictionaryValue();
object_args->Set(tab_keys::kWindowIdKey, Value::CreateIntegerValue(
- ExtensionTabUtil::GetWindowIdOfTab(contents->web_contents())));
+ ExtensionTabUtil::GetWindowIdOfTab(contents)));
object_args->Set(tab_keys::kFromIndexKey, Value::CreateIntegerValue(
from_index));
object_args->Set(tab_keys::kToIndexKey, Value::CreateIntegerValue(
to_index));
args->Append(object_args);
- DispatchEvent(contents->profile(), events::kOnTabMoved, args.Pass(),
+ Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext());
+ DispatchEvent(profile, events::kOnTabMoved, args.Pass(),
EventRouter::USER_GESTURE_UNKNOWN);
}
« no previous file with comments | « chrome/browser/extensions/browser_event_router.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698