Index: chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_controller.h |
diff --git a/chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_controller.h b/chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_controller.h |
index c167041e9d958f3e1eeac350cf611fdbab3a8c0e..e40b447b2adcd43aec4ceec9a81d37f96f4d8019 100644 |
--- a/chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_controller.h |
+++ b/chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_controller.h |
@@ -5,28 +5,50 @@ |
#ifndef CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_CONTROLLER_H_ |
#define CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_CONTROLLER_H_ |
+#include <memory> |
+#include <string> |
+ |
#include "base/macros.h" |
+#include "chrome/browser/ui/desktop_ios_promotion/sms_service.h" |
namespace desktop_ios_promotion { |
enum class PromotionEntryPoint; |
} |
+class Profile; |
+class PrefService; |
+ |
// This class provides data to the Desktop to mobile promotion and control the |
// promotion actions. |
class DesktopIOSPromotionController { |
public: |
// Should be instantiated on the UI thread. |
sky
2017/02/16 00:13:36
Should->Must
mrefaat
2017/02/16 21:02:39
Done.
|
- DesktopIOSPromotionController(); |
+ DesktopIOSPromotionController( |
+ Profile* profile, |
+ desktop_ios_promotion::PromotionEntryPoint entry_point); |
~DesktopIOSPromotionController(); |
// Called by the view code when "Send SMS" button is clicked by the user. |
void OnSendSMSClicked(); |
+ // Called by the view code when the promotion is ready to show. |
+ void OnPromotionShown(); |
+ |
// Called by the view code when "No Thanks" button is clicked by the user. |
void OnNoThanksClicked(); |
- // (TODO): If needed verify that functions that affect the UI are done |
- // on the same thread. |
+ private: |
+ PrefService* profile_prefs_; |
+ desktop_ios_promotion::PromotionEntryPoint entry_point_; |
sky
2017/02/16 00:13:36
const
|
+ SMSService* sms_service_; |
+ std::string recovery_number_; |
sky
2017/02/16 00:13:36
Add descriptions of non-obvious members.
mrefaat
2017/02/16 21:02:39
Done.
|
+ base::WeakPtrFactory<DesktopIOSPromotionController> weak_ptr_factory_; |
+ void OnQueryPhoneNumber(SMSService::Request* request, |
sky
2017/02/16 00:13:36
Functions before members.
sky
2017/02/16 00:13:36
Add descriptions for functions.
mrefaat
2017/02/16 21:02:39
Done.
mrefaat
2017/02/16 21:02:39
Done.
mrefaat
2017/02/16 21:02:39
Done.
|
+ bool success, |
+ const std::string& number); |
+ void OnSendSMS(SMSService::Request* request, |
+ bool success, |
+ const std::string& number); |
DISALLOW_COPY_AND_ASSIGN(DesktopIOSPromotionController); |
}; |