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

Side by Side Diff: chrome/browser/ui/tabs/tab_strip_model.cc

Issue 1827083004: UI: Rename MediaState to AlertState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-tab-indicator
Patch Set: Keep gypi ordered Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/tabs/OWNERS ('k') | chrome/browser/ui/tabs/tab_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tabs/OWNERS ('k') | chrome/browser/ui/tabs/tab_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698