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

Issue 757033005: Make tab audible and muted states and cause available for an extension API (Closed)

Created:
6 years ago by Jared Sohn
Modified:
5 years, 9 months ago
Reviewers:
miu, sky
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, feature-media-reviews_chromium.org, miu+watch_chromium.org, nasko+codewatch_chromium.org, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make tab audible and muted states available for an extension API * Added 'cause' parameter to mute method to indicate if muted state was changed by a user or by an extension. * Added support for audible and muted event listeners. A future patch that relies on these changes will update an API to make the audible and muted states available to extensions. BUG=438903 Committed: https://crrev.com/dccb8dd3c2453f93475d1958c48f2489937be0dc Cr-Commit-Position: refs/heads/master@{#319574}

Patch Set 1 #

Total comments: 7

Patch Set 2 : changes for miu's review #

Patch Set 3 : adding owners (sky for chrome/browser/ui/tabs/tab_strip_model.cc, jam for changes in content/public… #

Total comments: 2

Patch Set 4 : Improve naming/capitalization for muted toggle strings; remove audible/muted event-listener code fr… #

Total comments: 1

Patch Set 5 : MutedToggleCause --> muted_toggle_cause #

Total comments: 1

Patch Set 6 : please disregard this patch set (uploaded wrong one; working on cleaning it up) #

Patch Set 7 : Better webcontents_impl decoupling #

Total comments: 2

Patch Set 8 : Made two changes suggested by miu #

Patch Set 9 : Remove mute->muted renames #

Total comments: 1

Patch Set 10 : Remove TabAudibleStateChanged and TabMutedStateChange #

Total comments: 1

Patch Set 11 : extern new constants #

Total comments: 1

Patch Set 12 : Document cause within method declaration #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -6 lines) Patch
M AUTHORS View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/tabs/tab_strip_model.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/tabs/tab_utils.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +17 lines, -2 lines 0 comments Download
M chrome/browser/ui/tabs/tab_utils.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +31 lines, -1 line 0 comments Download
M chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 42 (8 generated)
miu
Looks good. Just some minor tweaks, and then we can loop in an owner for ...
6 years ago (2014-12-05 23:46:48 UTC) #2
Jared Sohn
Thanks for your feedback; I have made the suggested changes. I just want your input ...
6 years ago (2014-12-07 22:39:45 UTC) #3
Jared Sohn
I am looking for OWNERS approval from sky@chromium.org for chrome/browser/ui/tabs/tab_strip_model.cc and jam@chromium.org for content/public/browser/* and ...
6 years ago (2014-12-07 23:07:52 UTC) #4
miu
Added sky@ and jam@ as reviewers (not sure if they saw your request on cc'ed ...
6 years ago (2014-12-09 01:50:22 UTC) #6
miu
lgtm % the one change: https://codereview.chromium.org/757033005/diff/1/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm File chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm (right): https://codereview.chromium.org/757033005/diff/1/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm#newcode834 chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm:834: chrome::SetTabAudioMuted(contents, !chrome::IsTabAudioMuted(contents), "user"); On ...
6 years ago (2014-12-09 01:56:24 UTC) #7
sky
https://codereview.chromium.org/757033005/diff/40001/chrome/browser/ui/tabs/tab_utils.h File chrome/browser/ui/tabs/tab_utils.h (right): https://codereview.chromium.org/757033005/diff/40001/chrome/browser/ui/tabs/tab_utils.h#newcode36 chrome/browser/ui/tabs/tab_utils.h:36: const char kUserMuteToggleCause[] = "user"; On 2014/12/09 01:56:24, miu ...
6 years ago (2014-12-09 16:37:45 UTC) #8
jam
chrome is the one telling content to mute a tab. why should content then notify ...
6 years ago (2014-12-09 17:20:06 UTC) #9
Jared Sohn
On 2014/12/09 at 16:37:45, sky wrote: > https://codereview.chromium.org/757033005/diff/40001/chrome/browser/ui/tabs/tab_utils.h > File chrome/browser/ui/tabs/tab_utils.h (right): > > https://codereview.chromium.org/757033005/diff/40001/chrome/browser/ui/tabs/tab_utils.h#newcode36 ...
6 years ago (2014-12-09 17:51:13 UTC) #10
Jared Sohn
On 2014/12/09 at 01:56:24, miu wrote: > lgtm % the one change: > > https://codereview.chromium.org/757033005/diff/1/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm ...
6 years ago (2014-12-09 17:58:52 UTC) #11
sky
Add a comment to make that clear. It also isn't clear why kUserMuteToggleCause corresponds to. ...
6 years ago (2014-12-09 19:24:20 UTC) #12
miu
On 2014/12/09 17:20:06, jam wrote: > chrome is the one telling content to mute a ...
6 years ago (2014-12-09 21:00:47 UTC) #13
Jared Sohn
This has been done in the most recent patch. On 2014/12/09 at 19:24:20, sky wrote: ...
6 years ago (2014-12-19 06:56:13 UTC) #14
Jared Sohn
On 2014/12/09 at 17:20:06, jam wrote: > chrome is the one telling content to mute ...
6 years ago (2014-12-19 07:03:33 UTC) #15
miu
https://codereview.chromium.org/757033005/diff/60001/content/browser/web_contents/web_contents_impl.h File content/browser/web_contents/web_contents_impl.h (right): https://codereview.chromium.org/757033005/diff/60001/content/browser/web_contents/web_contents_impl.h#newcode1081 content/browser/web_contents/web_contents_impl.h:1081: std::string mutedToggleCause_; style (underscores, not camel case): This should ...
6 years ago (2014-12-20 03:42:38 UTC) #16
Jared Sohn
On 2014/12/20 at 03:42:38, miu wrote: > https://codereview.chromium.org/757033005/diff/60001/content/browser/web_contents/web_contents_impl.h > File content/browser/web_contents/web_contents_impl.h (right): > > https://codereview.chromium.org/757033005/diff/60001/content/browser/web_contents/web_contents_impl.h#newcode1081 ...
6 years ago (2014-12-20 23:00:53 UTC) #17
Jared Sohn
On 2014/12/20 at 23:00:53, Jared Sohn wrote: > On 2014/12/20 at 03:42:38, miu wrote: > ...
5 years, 11 months ago (2015-01-09 22:57:50 UTC) #18
jam
content shouldn't be changed. audio muted cause is something that's only used by chrome, so ...
5 years, 11 months ago (2015-01-15 23:22:01 UTC) #19
miu
On 2015/01/09 22:57:50, Jared Sohn wrote: > Happy new year. Can I get some feedback ...
5 years, 11 months ago (2015-01-16 22:25:40 UTC) #20
miu
https://codereview.chromium.org/757033005/diff/80001/chrome/browser/ui/tabs/tab_utils.cc File chrome/browser/ui/tabs/tab_utils.cc (right): https://codereview.chromium.org/757033005/diff/80001/chrome/browser/ui/tabs/tab_utils.cc#newcode260 chrome/browser/ui/tabs/tab_utils.cc:260: contents->SetAudioMuted(muted, cause); Following up on what jam said: > ...
5 years, 11 months ago (2015-01-16 23:04:12 UTC) #21
Jared Sohn
Thanks. Code similar to what you described is working for me. I will post a ...
5 years, 11 months ago (2015-01-19 09:48:18 UTC) #22
miu
lgtm, assuming these two comments are addressed: https://codereview.chromium.org/757033005/diff/120001/chrome/browser/ui/tabs/tab_utils.cc File chrome/browser/ui/tabs/tab_utils.cc (right): https://codereview.chromium.org/757033005/diff/120001/chrome/browser/ui/tabs/tab_utils.cc#newcode21 chrome/browser/ui/tabs/tab_utils.cc:21: content::WebContentsUserData<LastMuteMetadata> { ...
5 years, 11 months ago (2015-01-22 00:55:23 UTC) #23
Jared Sohn
I just removed the code that would change 'mute' to 'muted'. This along with earlier ...
5 years, 10 months ago (2015-01-31 01:03:14 UTC) #25
sky
https://codereview.chromium.org/757033005/diff/160001/chrome/browser/ui/tabs/tab_strip_model_observer.h File chrome/browser/ui/tabs/tab_strip_model_observer.h (right): https://codereview.chromium.org/757033005/diff/160001/chrome/browser/ui/tabs/tab_strip_model_observer.h#newcode135 chrome/browser/ui/tabs/tab_strip_model_observer.h:135: virtual void TabAudibleStateChanged(content::WebContents* contents, I don't think this makes ...
5 years, 10 months ago (2015-02-02 15:43:06 UTC) #26
miu
On 2015/02/02 15:43:06, sky wrote: > https://codereview.chromium.org/757033005/diff/160001/chrome/browser/ui/tabs/tab_strip_model_observer.h#newcode135 > chrome/browser/ui/tabs/tab_strip_model_observer.h:135: virtual void > TabAudibleStateChanged(content::WebContents* contents, > ...
5 years, 10 months ago (2015-02-02 20:31:17 UTC) #27
Jared Sohn
On 2015/02/02 at 20:31:17, miu wrote: > On 2015/02/02 15:43:06, sky wrote: > > https://codereview.chromium.org/757033005/diff/160001/chrome/browser/ui/tabs/tab_strip_model_observer.h#newcode135 ...
5 years, 10 months ago (2015-02-07 22:33:13 UTC) #28
Jared Sohn
On 2015/02/07 at 22:33:13, Jared Sohn wrote: > On 2015/02/02 at 20:31:17, miu wrote: > ...
5 years, 10 months ago (2015-02-11 23:27:18 UTC) #29
miu
lgtm % one thing: https://codereview.chromium.org/757033005/diff/180001/chrome/browser/ui/tabs/tab_utils.h File chrome/browser/ui/tabs/tab_utils.h (right): https://codereview.chromium.org/757033005/diff/180001/chrome/browser/ui/tabs/tab_utils.h#newcode40 chrome/browser/ui/tabs/tab_utils.h:40: const char kMutedToggleCauseUser[] = "user"; ...
5 years, 10 months ago (2015-02-19 20:02:44 UTC) #30
Jared Sohn
@sky, Can I get a LGTM from you?
5 years, 9 months ago (2015-03-05 01:20:29 UTC) #32
sky
LGTM https://codereview.chromium.org/757033005/diff/200001/chrome/browser/ui/tabs/tab_utils.h File chrome/browser/ui/tabs/tab_utils.h (right): https://codereview.chromium.org/757033005/diff/200001/chrome/browser/ui/tabs/tab_utils.h#newcode111 chrome/browser/ui/tabs/tab_utils.h:111: const std::string& cause); Document what cause is. Especially ...
5 years, 9 months ago (2015-03-05 16:52:43 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/757033005/220001
5 years, 9 months ago (2015-03-07 22:58:37 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_TIMED_OUT, no build URL) mac_chromium_rel_ng on ...
5 years, 9 months ago (2015-03-08 00:59:16 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/757033005/220001
5 years, 9 months ago (2015-03-08 03:12:44 UTC) #40
commit-bot: I haz the power
Committed patchset #12 (id:220001)
5 years, 9 months ago (2015-03-08 03:54:38 UTC) #41
commit-bot: I haz the power
5 years, 9 months ago (2015-03-08 03:55:13 UTC) #42
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/dccb8dd3c2453f93475d1958c48f2489937be0dc
Cr-Commit-Position: refs/heads/master@{#319574}

Powered by Google App Engine
This is Rietveld 408576698