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

Unified Diff: chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.mm

Issue 2718503002: [Mac] Reverse tab alert buttons (i.e. audio) in RTL (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.mm b/chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.mm
index 408c546d650818a67c94d67c4e38043b5ca4c3a8..2181d66b00c78f0ecff6652940287d49ae424511 100644
--- a/chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.mm
+++ b/chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.mm
@@ -8,6 +8,7 @@
#include "base/mac/foundation_util.h"
#include "base/macros.h"
#include "base/threading/thread_task_runner_handle.h"
+#import "chrome/browser/ui/cocoa/l10n_util.h"
#import "chrome/browser/ui/cocoa/tabs/tab_view.h"
#include "content/public/browser/user_metrics.h"
#include "ui/gfx/animation/animation.h"
@@ -85,10 +86,15 @@ class FadeAnimationDelegate : public gfx::AnimationDelegate {
SkColor iconColor = [tabView iconColor];
NSImage* tabIndicatorImage =
chrome::GetTabAlertIndicatorImage(aState, iconColor).ToNSImage();
+ NSImage* affordanceImage =
+ chrome::GetTabAlertIndicatorAffordanceImage(aState, iconColor)
+ .ToNSImage();
+ if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout()) {
+ tabIndicatorImage = cocoa_l10n_util::FlippedImage(tabIndicatorImage);
+ affordanceImage = cocoa_l10n_util::FlippedImage(affordanceImage);
Avi (use Gerrit) 2017/02/23 18:55:39 Both at once! 👍
+ }
[self setImage:tabIndicatorImage];
- affordanceImage_.reset(
- [chrome::GetTabAlertIndicatorAffordanceImage(aState, iconColor)
- .ToNSImage() retain]);
+ affordanceImage_.reset([affordanceImage retain]);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698