| 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_CHROMEOS_SETTING_LEVEL_BUBBLE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTING_LEVEL_BUBBLE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_SETTING_LEVEL_BUBBLE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_SETTING_LEVEL_BUBBLE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/timer.h" | 10 #include "base/timer.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // 1. Brightness is at 50%. | 37 // 1. Brightness is at 50%. |
| 38 // 2. Power manager dims brightness to 25% automatically. | 38 // 2. Power manager dims brightness to 25% automatically. |
| 39 // 3. User hits the "increase brightness" button, setting brightness to 30%. | 39 // 3. User hits the "increase brightness" button, setting brightness to 30%. |
| 40 // | 40 // |
| 41 // If we didn't update our internal state to 25% after 2), then the animation | 41 // If we didn't update our internal state to 25% after 2), then the animation |
| 42 // displayed in response to 3) would show the bubble animating from 50% down | 42 // displayed in response to 3) would show the bubble animating from 50% down |
| 43 // to 30%, rather than from 25% up to 30%. | 43 // to 30%, rather than from 25% up to 30%. |
| 44 void UpdateWithoutShowingBubble(int percent); | 44 void UpdateWithoutShowingBubble(int percent); |
| 45 | 45 |
| 46 protected: | 46 protected: |
| 47 explicit SettingLevelBubble(SkBitmap* increase_icon, | 47 SettingLevelBubble(SkBitmap* increase_icon, |
| 48 SkBitmap* decrease_icon, | 48 SkBitmap* decrease_icon, |
| 49 SkBitmap* zero_icon); | 49 SkBitmap* zero_icon); |
| 50 virtual ~SettingLevelBubble(); | 50 virtual ~SettingLevelBubble(); |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 void OnTimeout(); | 53 void OnTimeout(); |
| 54 | 54 |
| 55 // Overridden from BubbleDelegate. | 55 // Overridden from BubbleDelegate. |
| 56 virtual void BubbleClosing(Bubble* bubble, bool closed_by_escape); | 56 virtual void BubbleClosing(Bubble* bubble, bool closed_by_escape); |
| 57 virtual bool CloseOnEscape(); | 57 virtual bool CloseOnEscape(); |
| 58 virtual bool FadeInOnShow(); | 58 virtual bool FadeInOnShow(); |
| 59 | 59 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 79 | 79 |
| 80 ui::SlideAnimation animation_; | 80 ui::SlideAnimation animation_; |
| 81 base::OneShotTimer<SettingLevelBubble> timeout_timer_; | 81 base::OneShotTimer<SettingLevelBubble> timeout_timer_; |
| 82 | 82 |
| 83 DISALLOW_COPY_AND_ASSIGN(SettingLevelBubble); | 83 DISALLOW_COPY_AND_ASSIGN(SettingLevelBubble); |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace chromeos | 86 } // namespace chromeos |
| 87 | 87 |
| 88 #endif // CHROME_BROWSER_CHROMEOS_SETTING_LEVEL_BUBBLE_H_ | 88 #endif // CHROME_BROWSER_CHROMEOS_SETTING_LEVEL_BUBBLE_H_ |
| OLD | NEW |