| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_UTIL_H_ | 5 #ifndef CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_UTIL_H_ |
| 6 #define CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_UTIL_H_ | 6 #define CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/common/pref_names.h" | 9 #include "chrome/common/pref_names.h" |
| 10 #include "ui/base/l10n/l10n_util.h" | 10 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 PromotionEntryPoint entry_point); | 74 PromotionEntryPoint entry_point); |
| 75 | 75 |
| 76 // Returns the SMS ID to be used with send SMS API call. | 76 // Returns the SMS ID to be used with send SMS API call. |
| 77 std::string GetSMSID(); | 77 std::string GetSMSID(); |
| 78 | 78 |
| 79 // Returns the Promotion text based on the promotion entry point, Finch | 79 // Returns the Promotion text based on the promotion entry point, Finch |
| 80 // parameters and phone number presence. | 80 // parameters and phone number presence. |
| 81 base::string16 GetPromoText(PromotionEntryPoint entry_point, | 81 base::string16 GetPromoText(PromotionEntryPoint entry_point, |
| 82 const std::string& phone_number = std::string()); | 82 const std::string& phone_number = std::string()); |
| 83 | 83 |
| 84 // Returns the promotion text label width to be used for the promotion Bubble. |
| 85 int GetPromoBubbleTextLabelWidth(PromotionEntryPoint entry_point); |
| 86 |
| 84 // Returns the Promotion title based on the promotion entry point and finch | 87 // Returns the Promotion title based on the promotion entry point and finch |
| 85 // parameters. | 88 // parameters. |
| 86 base::string16 GetPromoTitle(PromotionEntryPoint entry_point); | 89 base::string16 GetPromoTitle(PromotionEntryPoint entry_point); |
| 87 | 90 |
| 88 gfx::ImageSkia GetPromoImage(SkColor color); | 91 gfx::ImageSkia GetPromoImage(SkColor color); |
| 89 | 92 |
| 90 std::string FormatPhoneNumber(const std::string& number); | 93 std::string FormatPhoneNumber(const std::string& number); |
| 91 | 94 |
| 92 // Register all Priority Sync preferences. | 95 // Register all Priority Sync preferences. |
| 93 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 96 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 94 | 97 |
| 95 // Register all local only Preferences. | 98 // Register all local only Preferences. |
| 96 void RegisterLocalPrefs(PrefRegistrySimple* registry); | 99 void RegisterLocalPrefs(PrefRegistrySimple* registry); |
| 97 | 100 |
| 98 // Log promotion dismissal reason for entry points. | 101 // Log promotion dismissal reason for entry points. |
| 99 void LogDismissalReason(PromotionDismissalReason reason, | 102 void LogDismissalReason(PromotionDismissalReason reason, |
| 100 PromotionEntryPoint entry_point); | 103 PromotionEntryPoint entry_point); |
| 101 | 104 |
| 102 } // namespace desktop_ios_promotion | 105 } // namespace desktop_ios_promotion |
| 103 | 106 |
| 104 #endif // CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_UTIL_H_ | 107 #endif // CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_UTIL_H_ |
| OLD | NEW |