New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 598086 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature

Blocking:
issue 469019



Sign in to add a comment

UI: Rename Media State Indicator

Project Member Reported by ortuno@chromium.org, Mar 25 2016

Issue description

With the inclusion of Bluetooth to the Media State Indicator, the name "Media State Indicator" becomes a misnomer. We should rename it. jyasskin proposed Active Permission Indicator.

Tab Utils:
TabMediaState -> TabActivePermission

TAB_MEDIA_STATE_NONE                -> TabActivePermission::NONE
TAB_MEDIA_STATE_RECORDING           -> TabActivePermission::MEDIA_RECORDING
TAB_MEDIA_STATE_CAPTURING           -> TabActivePermission::TAB_CAPTURING
TAB_MEDIA_STATE_AUDIO_PLAYING       -> TabActivePermission::AUDIO_PLAYING
TAB_MEDIA_STATE_AUDIO_MUTING        -> TabActivePermission::AUDIO_MUTING
TAB_MEDIA_STATE_BLUETOOTH_CONNECTED -> TabActivePermission::BLUETOOTH_CONNECTED


TAB_MUTED_REASON_NONE            -> TabMutedReason::NONE
TAB_MUTED_REASON_CONTEXT_MENU    -> TabMutedReason::CONTEXT_MENU
TAB_MUTED_REASON_AUDIO_INDICATOR -> TabMutedReason::AUDIO_INDICATOR
TAB_MUTED_REASON_MEDIA_CAPTURE   -> TabMutedReason::MEDIA_CAPTURE
TAB_MUTED_REASON_EXTENSION       -> TabMutedReason::EXTENSION

TAB_MUTED_RESULT_SUCCESS          -> TabMutedResult::SUCCESS
TAB_MUTED_RESULT_FAIL_NOT_ENABLED -> TabMutedResult::FAIL_NOT_ENABLED
TAB_MUTED_RESULT_FAIL_TABCAPTURE  -> TabMutedResult::FAIL_TABCAPTURE

ShouldTabShowMediaIndicator          -> ShouldTabShowActivePermissionIndicator
GetTabMediaStateForContents          -> GetTabActivePermissionForContents
GetTabMediaIndicatorImage            -> GetTabActivePermissionIndicatorImage
GetTabMediaIndicatorAffordanceImage  -> GetTabActivePermissionIndicatorAffordanceImage
CreateTabMediaIndicatorFadeAnimation -> CreateTabActivePermissionIndicatorFadeAnimation

Views:

MediaIndicatorButton:
MediaIndicatorButton   -> ActivePermissionIndicatorButton
TransitionToMediaState -> TransitionToActivePermission

Tab:
MediaStateChanged        -> ActivePermissionChanged
ShouldShowMediaIndicator -> ShouldShowActivePermissionIndicator

TabUnitTest:
GetMediaIndicatorBounds -> GetActivePermissionIndicatorBounds

Cocoa:
BrowserWindowCocoa:
UpdateMediaState -> UpdateActivePermission

BrowserWindowController:
setMediaState -> setActivePermission

TabController:
setMediaState -> setActivePermission

 

Comment 1 by ortuno@chromium.org, Mar 29 2016

Rename to AlertState AlertIndicator

Tab Utils:
TabMediaState -> TabAlertState

TAB_MEDIA_STATE_NONE                -> TabAlertState::NONE
TAB_MEDIA_STATE_RECORDING           -> TabAlertState::MEDIA_RECORDING
TAB_MEDIA_STATE_CAPTURING           -> TabAlertState::TAB_CAPTURING
TAB_MEDIA_STATE_AUDIO_PLAYING       -> TabAlertState::AUDIO_PLAYING
TAB_MEDIA_STATE_AUDIO_MUTING        -> TabAlertState::AUDIO_MUTING
TAB_MEDIA_STATE_BLUETOOTH_CONNECTED -> TabAlertState::BLUETOOTH_CONNECTED


TAB_MUTED_REASON_NONE            -> TabMutedReason::NONE
TAB_MUTED_REASON_CONTEXT_MENU    -> TabMutedReason::CONTEXT_MENU
TAB_MUTED_REASON_AUDIO_INDICATOR -> TabMutedReason::AUDIO_INDICATOR
TAB_MUTED_REASON_MEDIA_CAPTURE   -> TabMutedReason::MEDIA_CAPTURE
TAB_MUTED_REASON_EXTENSION       -> TabMutedReason::EXTENSION

TAB_MUTED_RESULT_SUCCESS          -> TabMutedResult::SUCCESS
TAB_MUTED_RESULT_FAIL_NOT_ENABLED -> TabMutedResult::FAIL_NOT_ENABLED
TAB_MUTED_RESULT_FAIL_TABCAPTURE  -> TabMutedResult::FAIL_TABCAPTURE

ShouldTabShowMediaIndicator          -> ShouldTabShowActivePermissionIndicator
GetTabMediaStateForContents          -> GetTabAlertStateForContents
GetTabMediaIndicatorImage            -> GetTabAlertIndicatorImage
GetTabMediaIndicatorAffordanceImage  -> GetTabAlertIndicatorAffordanceImage
CreateTabMediaIndicatorFadeAnimation -> CreateTabAlertIndicatorFadeAnimation

Views:

MediaIndicatorButton:
MediaIndicatorButton   -> AlertIndicatorButton
TransitionToMediaState -> TransitionToAlertState

Tab:
MediaStateChanged        -> AlertStateChanged
ShouldShowMediaIndicator -> ShouldShowAlertIndicator

TabUnitTest:
GetMediaIndicatorBounds -> GetAlertIndicatorBounds

Cocoa:
BrowserWindowCocoa:
UpdateMediaState -> UpdateAlertState

BrowserWindowController:
setMediaState -> setAlertState

TabController:
setMediaState -> setMediaState

Project Member

Comment 2 by bugdroid1@chromium.org, Mar 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/71c3f14505c8c25dad48ab124da342f579a315fb

commit 71c3f14505c8c25dad48ab124da342f579a315fb
Author: ortuno <ortuno@chromium.org>
Date: Wed Mar 30 18:26:58 2016

UI: Rename MediaState to AlertState

With the inclusion of Bluetooth to the Media State Indicator, the name
"Media State Indicator" becomes a misnomer. This patch makes the enum
"TabMediaState" into an "enum class" named "TabAlertState" and renames the class
"MediaIndicatorButton" to "AlertIndicatorButton".

Since we were there already, this patch also converts the "TabMutedReason" and
"TabMutedResult" into enum classes.

See issue for a summary of the new names.

BUG= 598086 

Review URL: https://codereview.chromium.org/1827083004

Cr-Commit-Position: refs/heads/master@{#384028}

[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/app/generated_resources.grd
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/extensions/api/tabs/tabs_api.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/extensions/extension_tab_util.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/browser_window_cocoa.h
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/browser_window_cocoa.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/browser_window_controller.h
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/browser_window_controller.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/OWNERS
[rename] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.h
[rename] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.mm
[rename] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa_unittest.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/tab_controller.h
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/tab_controller.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/tab_strip_controller.h
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/tab_view.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/tabs/OWNERS
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/tabs/tab_strip_model.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/tabs/tab_utils.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/tabs/tab_utils.h
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/OWNERS
[rename] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/alert_indicator_button.cc
[rename] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/alert_indicator_button.h
[rename] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/alert_indicator_button_unittest.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/tab.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/tab.h
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/tab_renderer_data.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/tab_renderer_data.h
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/tab_unittest.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/chrome_browser_ui.gypi
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/chrome_tests_unit.gypi
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/tools/metrics/actions/actions.xml

Project Member

Comment 3 by bugdroid1@chromium.org, Mar 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/71c3f14505c8c25dad48ab124da342f579a315fb

commit 71c3f14505c8c25dad48ab124da342f579a315fb
Author: ortuno <ortuno@chromium.org>
Date: Wed Mar 30 18:26:58 2016

UI: Rename MediaState to AlertState

With the inclusion of Bluetooth to the Media State Indicator, the name
"Media State Indicator" becomes a misnomer. This patch makes the enum
"TabMediaState" into an "enum class" named "TabAlertState" and renames the class
"MediaIndicatorButton" to "AlertIndicatorButton".

Since we were there already, this patch also converts the "TabMutedReason" and
"TabMutedResult" into enum classes.

See issue for a summary of the new names.

BUG= 598086 

Review URL: https://codereview.chromium.org/1827083004

Cr-Commit-Position: refs/heads/master@{#384028}

[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/app/generated_resources.grd
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/extensions/api/tabs/tabs_api.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/extensions/extension_tab_util.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/browser_window_cocoa.h
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/browser_window_cocoa.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/browser_window_controller.h
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/browser_window_controller.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/OWNERS
[rename] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.h
[rename] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.mm
[rename] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa_unittest.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/tab_controller.h
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/tab_controller.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/tab_strip_controller.h
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/cocoa/tabs/tab_view.mm
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/tabs/OWNERS
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/tabs/tab_strip_model.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/tabs/tab_utils.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/tabs/tab_utils.h
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/OWNERS
[rename] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/alert_indicator_button.cc
[rename] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/alert_indicator_button.h
[rename] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/alert_indicator_button_unittest.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/tab.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/tab.h
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/tab_renderer_data.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/tab_renderer_data.h
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/browser/ui/views/tabs/tab_unittest.cc
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/chrome_browser_ui.gypi
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/chrome/chrome_tests_unit.gypi
[modify] https://crrev.com/71c3f14505c8c25dad48ab124da342f579a315fb/tools/metrics/actions/actions.xml

Status: Fixed (was: Started)

Sign in to add a comment