Index torch_player_service cc --- torch_player_service cc revision 834

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Index: torch_player_service.cc
===================================================================
--- torch_player_service.cc (revision 8340)
+++ torch_player_service.cc (working copy)
@@ -47,7 +47,7 @@
void Service::PlayUrl(const GURL& url, bool open_new_tab)
{
auto item = make_linked_ptr(new UrlItem(url));
- PlayItem(item, 0, open_new_tab);
+ PlayItem(item, open_new_tab);
}
void Service::PlayTorrent(const torrent::Hash& hash,
@@ -55,7 +55,7 @@
bool open_new_tab)
{
auto item = make_linked_ptr(new TorrentItem(hash, inner_path, profile_));
- PlayItem(item, item->GetPlayIndex(), open_new_tab);
+ PlayItem(item, open_new_tab);
}
void Service::StopPlaying(int tab_id)
@@ -200,8 +200,7 @@
chrome::ShowSingletonTabOverwritingNTP(browser, params);
}
-void Service::PlayItem(const linked_ptr<Item>& item,
- size_t play_index, bool open_new_tab)
+void Service::PlayItem(const linked_ptr<Item>& item, bool open_new_tab)
{
if (open_new_tab)
{
@@ -219,10 +218,10 @@
}
else
{
- auto item = *it;
- item->SetPlayIndex(play_index);
- FOR_EACH_OBSERVER(Observer, observers_, OnReopenTab(item->GetTabId()));
- SetTabFocused(*item);
+ auto equal_item = *it;
+ equal_item->SetPlayIndex(item->GetPlayIndex());
+ FOR_EACH_OBSERVER(Observer, observers_, OnReopenTab(equal_item->GetTabId()));
+ SetTabFocused(*equal_item);
}
}
}