| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 5 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 case CommandToggleTabAudioMuted: { | 975 case CommandToggleTabAudioMuted: { |
| 976 const std::vector<int>& indices = GetIndicesForCommand(context_index); | 976 const std::vector<int>& indices = GetIndicesForCommand(context_index); |
| 977 const bool mute = !chrome::AreAllTabsMuted(*this, indices); | 977 const bool mute = !chrome::AreAllTabsMuted(*this, indices); |
| 978 if (mute) | 978 if (mute) |
| 979 content::RecordAction(UserMetricsAction("TabContextMenu_MuteTabs")); | 979 content::RecordAction(UserMetricsAction("TabContextMenu_MuteTabs")); |
| 980 else | 980 else |
| 981 content::RecordAction(UserMetricsAction("TabContextMenu_UnmuteTabs")); | 981 content::RecordAction(UserMetricsAction("TabContextMenu_UnmuteTabs")); |
| 982 for (std::vector<int>::const_iterator i = indices.begin(); | 982 for (std::vector<int>::const_iterator i = indices.begin(); |
| 983 i != indices.end(); ++i) { | 983 i != indices.end(); ++i) { |
| 984 chrome::SetTabAudioMuted(GetWebContentsAt(*i), mute, | 984 chrome::SetTabAudioMuted(GetWebContentsAt(*i), mute, |
| 985 TAB_MUTED_REASON_CONTEXT_MENU, std::string()); | 985 TabMutedReason::CONTEXT_MENU, std::string()); |
| 986 } | 986 } |
| 987 break; | 987 break; |
| 988 } | 988 } |
| 989 | 989 |
| 990 case CommandBookmarkAllTabs: { | 990 case CommandBookmarkAllTabs: { |
| 991 content::RecordAction( | 991 content::RecordAction( |
| 992 UserMetricsAction("TabContextMenu_BookmarkAllTabs")); | 992 UserMetricsAction("TabContextMenu_BookmarkAllTabs")); |
| 993 | 993 |
| 994 delegate_->BookmarkAllTabs(); | 994 delegate_->BookmarkAllTabs(); |
| 995 break; | 995 break; |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1361 | 1361 |
| 1362 void TabStripModel::FixOpenersAndGroupsReferencing(int index) { | 1362 void TabStripModel::FixOpenersAndGroupsReferencing(int index) { |
| 1363 WebContents* old_contents = GetWebContentsAtImpl(index); | 1363 WebContents* old_contents = GetWebContentsAtImpl(index); |
| 1364 for (WebContentsData* data : contents_data_) { | 1364 for (WebContentsData* data : contents_data_) { |
| 1365 if (data->group() == old_contents) | 1365 if (data->group() == old_contents) |
| 1366 data->set_group(contents_data_[index]->group()); | 1366 data->set_group(contents_data_[index]->group()); |
| 1367 if (data->opener() == old_contents) | 1367 if (data->opener() == old_contents) |
| 1368 data->set_opener(contents_data_[index]->opener()); | 1368 data->set_opener(contents_data_[index]->opener()); |
| 1369 } | 1369 } |
| 1370 } | 1370 } |
| OLD | NEW |