| Index: chrome/browser/extensions/api/tabs/tabs_api.cc
|
| diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| index 4816da7e0687d8ce20a9b3f0af4717c47edc2252..c157b3cad2cd007e5e8f5bed0705870c410c906a 100644
|
| --- a/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| +++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| @@ -43,6 +43,7 @@
|
| #include "chrome/browser/ui/host_desktop.h"
|
| #include "chrome/browser/ui/panels/panel_manager.h"
|
| #include "chrome/browser/ui/tabs/tab_strip_model.h"
|
| +#include "chrome/browser/ui/tabs/tab_utils.h"
|
| #include "chrome/browser/ui/window_sizer/window_sizer.h"
|
| #include "chrome/browser/web_applications/web_app.h"
|
| #include "chrome/common/chrome_switches.h"
|
| @@ -908,6 +909,16 @@ bool TabsQueryFunction::RunSync() {
|
| continue;
|
| }
|
|
|
| + if (!MatchesBool(params->query_info.audible.get(),
|
| + chrome::IsPlayingAudio(web_contents))) {
|
| + continue;
|
| + }
|
| +
|
| + if (!MatchesBool(params->query_info.muted.get(),
|
| + chrome::IsTabAudioMuted(web_contents))) {
|
| + continue;
|
| + }
|
| +
|
| if (!title.empty() && !MatchPattern(web_contents->GetTitle(),
|
| base::UTF8ToUTF16(title)))
|
| continue;
|
| @@ -1185,6 +1196,11 @@ bool TabsUpdateFunction::RunAsync() {
|
| tab_index = tab_strip->GetIndexOfWebContents(contents);
|
| }
|
|
|
| + if (params->update_properties.muted.get()) {
|
| + bool muted = *params->update_properties.muted;
|
| + chrome::SetTabAudioMuted(contents, muted, extension()->id());
|
| + }
|
| +
|
| if (params->update_properties.opener_tab_id.get()) {
|
| int opener_id = *params->update_properties.opener_tab_id;
|
|
|
|
|