| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_CHROMEOS_STATUS_DATA_PROMO_NOTIFICATION_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_DATA_PROMO_NOTIFICATION_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_STATUS_DATA_PROMO_NOTIFICATION_H_ | 6 #define CHROME_BROWSER_CHROMEOS_STATUS_DATA_PROMO_NOTIFICATION_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "ui/views/widget/widget.h" | 11 #include "ui/views/widget/widget.h" |
| 12 | 12 |
| 13 class PrefService; |
| 14 |
| 13 namespace views { | 15 namespace views { |
| 14 class View; | 16 class View; |
| 15 } // namespace views | 17 } // namespace views |
| 16 | 18 |
| 17 namespace chromeos { | 19 namespace chromeos { |
| 18 class MessageBubble; | 20 class MessageBubble; |
| 19 class MessageBubbleLinkListener; | 21 class MessageBubbleLinkListener; |
| 20 class NetworkLibrary; | 22 class NetworkLibrary; |
| 21 | 23 |
| 22 class DataPromoNotification : public views::Widget::Observer { | 24 class DataPromoNotification : public views::Widget::Observer { |
| 23 public: | 25 public: |
| 24 DataPromoNotification(); | 26 DataPromoNotification(); |
| 25 virtual ~DataPromoNotification(); | 27 virtual ~DataPromoNotification(); |
| 26 | 28 |
| 29 static void RegisterPrefs(PrefService* local_state); |
| 30 |
| 27 const std::string& deal_info_url() const { return deal_info_url_; } | 31 const std::string& deal_info_url() const { return deal_info_url_; } |
| 28 const std::string& deal_topup_url() const { return deal_topup_url_; } | 32 const std::string& deal_topup_url() const { return deal_topup_url_; } |
| 29 | 33 |
| 30 // Shows 3G promo notification if needed. | 34 // Shows 3G promo notification if needed. |
| 31 void ShowOptionalMobileDataPromoNotification( | 35 void ShowOptionalMobileDataPromoNotification( |
| 32 NetworkLibrary* cros, | 36 NetworkLibrary* cros, |
| 33 views::View* host, | 37 views::View* host, |
| 34 MessageBubbleLinkListener* listener); | 38 MessageBubbleLinkListener* listener); |
| 35 | 39 |
| 36 // Closes message bubble. | 40 // Closes message bubble. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 55 | 59 |
| 56 // Factory for delaying showing promo notification. | 60 // Factory for delaying showing promo notification. |
| 57 base::WeakPtrFactory<DataPromoNotification> weak_ptr_factory_; | 61 base::WeakPtrFactory<DataPromoNotification> weak_ptr_factory_; |
| 58 | 62 |
| 59 DISALLOW_COPY_AND_ASSIGN(DataPromoNotification); | 63 DISALLOW_COPY_AND_ASSIGN(DataPromoNotification); |
| 60 }; | 64 }; |
| 61 | 65 |
| 62 } // namespace chromeos | 66 } // namespace chromeos |
| 63 | 67 |
| 64 #endif // CHROME_BROWSER_CHROMEOS_STATUS_DATA_PROMO_NOTIFICATION_H_ | 68 #endif // CHROME_BROWSER_CHROMEOS_STATUS_DATA_PROMO_NOTIFICATION_H_ |
| OLD | NEW |