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

Unified Diff: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h

Issue 2555783002: [Mac] Ensure Omnibox text is always right-aligned in RTL (Closed)
Patch Set: Friend tests instead of exposing private method Created 4 years 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
Index: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h
index d90e5d8e64bfaf58f7b018d1053a345276fdbd0f..9ad740e47950a1b708823edc7cd521a9d559ab91 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h
@@ -133,6 +133,10 @@ class OmniboxViewMac : public OmniboxView,
AutocompleteTextField* field() const { return field_; }
private:
+ FRIEND_TEST_ALL_PREFIXES(OmniboxViewMacTest,
Mark Mentovai 2016/12/12 17:45:24 #include "base/gtest_prod_util.h" for this macro.
lgrey 2016/12/12 18:13:33 Done.
+ WritingDirectionLTR);
+ FRIEND_TEST_ALL_PREFIXES(OmniboxViewMacTest,
+ WritingDirectionRTL);
// Called when the user hits backspace in |field_|. Checks whether
// keyword search is being terminated. Returns true if the
// backspace should be intercepted (not forwarded on to the standard
@@ -173,14 +177,14 @@ class OmniboxViewMac : public OmniboxView,
// though here we cannot really do the in-place operation they do.
void EmphasizeURLComponents() override;
- // Apply our font and paragraph style to |attributedString|.
- void ApplyTextStyle(NSMutableAttributedString* attributedString);
-
// Calculates text attributes according to |display_text| and applies them
// to the given |attributedString| object.
void ApplyTextAttributes(const base::string16& display_text,
NSMutableAttributedString* attributedString);
+ // Apply our font and paragraph style to |attributedString|.
+ void ApplyTextStyle(NSMutableAttributedString* attributedString);
Mark Mentovai 2016/12/12 17:45:24 I don’t see why this needs to move.
lgrey 2016/12/12 18:13:33 Accidentally put it back in the wrong place after
+
// Return the number of UTF-16 units in the current buffer, excluding the
// suggested text.
int GetOmniboxTextLength() const override;

Powered by Google App Engine
This is Rietveld 408576698