Home | History | Annotate | Download | only in status
      1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_DATA_PROMO_NOTIFICATION_H_
      6 #define CHROME_BROWSER_CHROMEOS_STATUS_DATA_PROMO_NOTIFICATION_H_
      7 
      8 #include "base/basictypes.h"
      9 #include "base/memory/weak_ptr.h"
     10 
     11 class PrefRegistrySimple;
     12 
     13 namespace ash {
     14 class NetworkTrayDelegate;
     15 }
     16 
     17 namespace views {
     18 class View;
     19 }
     20 
     21 namespace chromeos {
     22 class NetworkLibrary;
     23 
     24 class DataPromoNotification {
     25  public:
     26   DataPromoNotification();
     27   virtual ~DataPromoNotification();
     28 
     29   static void RegisterPrefs(PrefRegistrySimple* registry);
     30 
     31   const std::string& deal_info_url() const { return deal_info_url_; }
     32   const std::string& deal_topup_url() const { return deal_topup_url_; }
     33 
     34   // Shows 3G promo notification if needed.
     35   void ShowOptionalMobileDataPromoNotification(
     36       NetworkLibrary* cros,
     37       views::View* host,
     38       ash::NetworkTrayDelegate* listener);
     39 
     40   // Closes message bubble.
     41   void CloseNotification();
     42 
     43  private:
     44   // True if check for promo needs to be done,
     45   // otherwise just ignore it for current session.
     46   bool check_for_promo_;
     47 
     48   // Current carrier deal info URL.
     49   std::string deal_info_url_;
     50 
     51   // Current carrier deal top-up URL.
     52   std::string deal_topup_url_;
     53 
     54   // Factory for delaying showing promo notification.
     55   base::WeakPtrFactory<DataPromoNotification> weak_ptr_factory_;
     56 
     57   DISALLOW_COPY_AND_ASSIGN(DataPromoNotification);
     58 };
     59 
     60 }  // namespace chromeos
     61 
     62 #endif  // CHROME_BROWSER_CHROMEOS_STATUS_DATA_PROMO_NOTIFICATION_H_
     63