Index: chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_bubble_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_bubble_controller.h |
similarity index 66% |
copy from chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_controller.h |
copy to chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_bubble_controller.h |
index 75f27b20ae231853c79bb61bcccce6dcc26af76f..f43fd8841ef4ba28fa364fb1a5e97352a908505f 100644 |
--- a/chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_controller.h |
+++ b/chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_bubble_controller.h |
@@ -2,46 +2,37 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_CONTROLLER_H_ |
-#define CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_CONTROLLER_H_ |
+#ifndef CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_BUBBLE_CONTROLLER_H_ |
+#define CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_BUBBLE_CONTROLLER_H_ |
#include <memory> |
#include <string> |
#include "base/macros.h" |
+#include "chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_controller.h" |
#include "chrome/browser/ui/desktop_ios_promotion/sms_service.h" |
namespace desktop_ios_promotion { |
enum class PromotionEntryPoint; |
-enum class PromotionDismissalReason; |
} |
class DesktopIOSPromotionView; |
-class Profile; |
-class PrefService; |
// This class provides data to the Desktop to mobile promotion and control the |
// promotion actions. |
-class DesktopIOSPromotionController { |
+class DesktopIOSPromotionBubbleController |
+ : public DesktopIOSPromotionController { |
public: |
// Must be instantiated on the UI thread. |
- DesktopIOSPromotionController( |
+ DesktopIOSPromotionBubbleController( |
Profile* profile, |
DesktopIOSPromotionView* promotion_view, |
desktop_ios_promotion::PromotionEntryPoint entry_point); |
- ~DesktopIOSPromotionController(); |
- |
- // Returns the current promotion entry point. |
- desktop_ios_promotion::PromotionEntryPoint entry_point() const { |
- return entry_point_; |
- } |
+ ~DesktopIOSPromotionBubbleController(); |
// 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(); |
@@ -49,11 +40,6 @@ class DesktopIOSPromotionController { |
// set. |
std::string GetUsersRecoveryPhoneNumber(); |
- // Used for testing. |
- desktop_ios_promotion::PromotionDismissalReason dismissal_reason() const { |
- return dismissal_reason_; |
- } |
- |
private: |
// Updates the user's recovery phone number once the sms_service phone query |
// returns a response. |
@@ -66,20 +52,16 @@ class DesktopIOSPromotionController { |
bool success, |
const std::string& number); |
- PrefService* profile_prefs_; |
- const desktop_ios_promotion::PromotionEntryPoint entry_point_; |
// Service used to send SMS to the user recovery phone number. |
SMSService* sms_service_; |
// User's recovery phone number, this is updated by the sms_service. |
std::string recovery_number_; |
// A Weak pointer to the promotion view. |
DesktopIOSPromotionView* promotion_view_; |
- // Track the action that is responsible for the promotion Dismissal. |
- desktop_ios_promotion::PromotionDismissalReason dismissal_reason_; |
- base::WeakPtrFactory<DesktopIOSPromotionController> weak_ptr_factory_; |
+ base::WeakPtrFactory<DesktopIOSPromotionBubbleController> weak_ptr_factory_; |
- DISALLOW_COPY_AND_ASSIGN(DesktopIOSPromotionController); |
+ DISALLOW_COPY_AND_ASSIGN(DesktopIOSPromotionBubbleController); |
}; |
-#endif // CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_CONTROLLER_H_ |
+#endif // CHROME_BROWSER_UI_DESKTOP_IOS_PROMOTION_DESKTOP_IOS_PROMOTION_BUBBLE_CONTROLLER_H_ |