Commit 03ebd855 authored by avi@chromium.org's avatar avi@chromium.org

Remove various TabContents use from TabStripModel.

BUG=107201
TEST=no visible change


Review URL: https://chromiumcodereview.appspot.com/11434091

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170985 0039d316-1c4b-4281-b951-d872f2087c98
parent 3c601776
...@@ -1139,11 +1139,10 @@ void TabStripModel::NotifyIfActiveTabChanged(WebContents* old_contents, ...@@ -1139,11 +1139,10 @@ void TabStripModel::NotifyIfActiveTabChanged(WebContents* old_contents,
} }
void TabStripModel::NotifyIfActiveOrSelectionChanged( void TabStripModel::NotifyIfActiveOrSelectionChanged(
TabContents* old_contents, WebContents* old_contents,
NotifyTypes notify_types, NotifyTypes notify_types,
const TabStripSelectionModel& old_model) { const TabStripSelectionModel& old_model) {
NotifyIfActiveTabChanged(old_contents ? old_contents->web_contents() : NULL, NotifyIfActiveTabChanged(old_contents, notify_types);
notify_types);
if (!selection_model().Equals(old_model)) { if (!selection_model().Equals(old_model)) {
FOR_EACH_OBSERVER(TabStripModelObserver, observers_, FOR_EACH_OBSERVER(TabStripModelObserver, observers_,
...@@ -1154,11 +1153,11 @@ void TabStripModel::NotifyIfActiveOrSelectionChanged( ...@@ -1154,11 +1153,11 @@ void TabStripModel::NotifyIfActiveOrSelectionChanged(
void TabStripModel::SetSelection( void TabStripModel::SetSelection(
const TabStripSelectionModel& new_model, const TabStripSelectionModel& new_model,
NotifyTypes notify_types) { NotifyTypes notify_types) {
TabContents* old_contents = GetActiveTabContents(); WebContents* old_contents = GetActiveWebContents();
TabStripSelectionModel old_model; TabStripSelectionModel old_model;
old_model.Copy(selection_model_); old_model.Copy(selection_model_);
if (new_model.active() != selection_model_.active()) if (new_model.active() != selection_model_.active())
NotifyIfTabDeactivated(old_contents ? old_contents->web_contents() : NULL); NotifyIfTabDeactivated(old_contents);
selection_model_.Copy(new_model); selection_model_.Copy(new_model);
NotifyIfActiveOrSelectionChanged(old_contents, notify_types, old_model); NotifyIfActiveOrSelectionChanged(old_contents, notify_types, old_model);
} }
......
...@@ -520,7 +520,7 @@ class TabStripModel : public content::NotificationObserver { ...@@ -520,7 +520,7 @@ class TabStripModel : public content::NotificationObserver {
// Note: This function might end up sending 0 to 2 notifications in the // Note: This function might end up sending 0 to 2 notifications in the
// following order: ActiveTabChanged, TabSelectionChanged. // following order: ActiveTabChanged, TabSelectionChanged.
void NotifyIfActiveOrSelectionChanged( void NotifyIfActiveOrSelectionChanged(
TabContents* old_contents, content::WebContents* old_contents,
NotifyTypes notify_types, NotifyTypes notify_types,
const TabStripSelectionModel& old_model); const TabStripSelectionModel& old_model);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment