| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UPGRADE_DETECTOR_H_ | 5 #ifndef CHROME_BROWSER_UPGRADE_DETECTOR_H_ |
| 6 #define CHROME_BROWSER_UPGRADE_DETECTOR_H_ | 6 #define CHROME_BROWSER_UPGRADE_DETECTOR_H_ |
| 7 | 7 |
| 8 #include "base/timer.h" | 8 #include "base/timer.h" |
| 9 #include "chrome/browser/idle.h" | 9 #include "chrome/browser/idle.h" |
| 10 #include "ui/gfx/image/image.h" | 10 #include "ui/gfx/image/image.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 return upgrade_detected_time_; | 68 return upgrade_detected_time_; |
| 69 } | 69 } |
| 70 | 70 |
| 71 // Retrieves the right icon ID based on the degree of severity (see | 71 // Retrieves the right icon ID based on the degree of severity (see |
| 72 // UpgradeNotificationAnnoyanceLevel, each level has an an accompanying icon | 72 // UpgradeNotificationAnnoyanceLevel, each level has an an accompanying icon |
| 73 // to go with it). |type| determines which class of icons the caller wants, | 73 // to go with it). |type| determines which class of icons the caller wants, |
| 74 // either an icon appropriate for badging the wrench menu or one to display | 74 // either an icon appropriate for badging the wrench menu or one to display |
| 75 // within the wrench menu. | 75 // within the wrench menu. |
| 76 int GetIconResourceID(UpgradeNotificationIconType type); | 76 int GetIconResourceID(UpgradeNotificationIconType type); |
| 77 | 77 |
| 78 UpgradeNotificationAnnoyanceLevel upgrade_notification_stage() const { |
| 79 return upgrade_notification_stage_; |
| 80 } |
| 81 |
| 78 protected: | 82 protected: |
| 79 UpgradeDetector(); | 83 UpgradeDetector(); |
| 80 | 84 |
| 81 // Sends out UPGRADE_DETECTED notification and record upgrade_detected_time_. | 85 // Sends out UPGRADE_DETECTED notification and record upgrade_detected_time_. |
| 82 void NotifyUpgradeDetected(); | 86 void NotifyUpgradeDetected(); |
| 83 | 87 |
| 84 // Sends out UPGRADE_RECOMMENDED notification and set notify_upgrade_. | 88 // Sends out UPGRADE_RECOMMENDED notification and set notify_upgrade_. |
| 85 void NotifyUpgradeRecommended(); | 89 void NotifyUpgradeRecommended(); |
| 86 | 90 |
| 87 void set_upgrade_notification_stage(UpgradeNotificationAnnoyanceLevel stage) { | 91 void set_upgrade_notification_stage(UpgradeNotificationAnnoyanceLevel stage) { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 114 UpgradeNotificationAnnoyanceLevel upgrade_notification_stage_; | 118 UpgradeNotificationAnnoyanceLevel upgrade_notification_stage_; |
| 115 | 119 |
| 116 // Whether we have waited long enough after detecting an upgrade (to see | 120 // Whether we have waited long enough after detecting an upgrade (to see |
| 117 // is we should start nagging about upgrading). | 121 // is we should start nagging about upgrading). |
| 118 bool notify_upgrade_; | 122 bool notify_upgrade_; |
| 119 | 123 |
| 120 DISALLOW_COPY_AND_ASSIGN(UpgradeDetector); | 124 DISALLOW_COPY_AND_ASSIGN(UpgradeDetector); |
| 121 }; | 125 }; |
| 122 | 126 |
| 123 #endif // CHROME_BROWSER_UPGRADE_DETECTOR_H_ | 127 #endif // CHROME_BROWSER_UPGRADE_DETECTOR_H_ |
| OLD | NEW |