OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_ | 5 #ifndef ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_ |
6 #define ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_ | 6 #define ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/display/display_controller.h" | 9 #include "ash/display/display_controller.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 int64 display_id, | 43 int64 display_id, |
44 const gfx::Size& old_resolution, | 44 const gfx::Size& old_resolution, |
45 const gfx::Size& new_resolution, | 45 const gfx::Size& new_resolution, |
46 const base::Closure& accept_callback); | 46 const base::Closure& accept_callback); |
47 | 47 |
48 // Returns true if the notification is visible or scheduled to be visible and | 48 // Returns true if the notification is visible or scheduled to be visible and |
49 // the notification times out. | 49 // the notification times out. |
50 bool DoesNotificationTimeout(); | 50 bool DoesNotificationTimeout(); |
51 | 51 |
52 // Called by the notification delegate when the user accepts the display | 52 // Called by the notification delegate when the user accepts the display |
53 // resolution change. | 53 // resolution change. Set |close_notification| to true when the notification |
54 void AcceptResolutionChange(); | 54 // should be removed at the same time. |
oshima
2013/08/13 01:10:03
nit
s/at the same time/upon invocation/ (or just
Jun Mukai
2013/08/13 02:24:11
Done.
| |
55 void AcceptResolutionChange(bool close_notification); | |
55 | 56 |
56 // Called by the notification delegate when the user wants to revert the | 57 // Called by the notification delegate when the user wants to revert the |
57 // display resolution change. | 58 // display resolution change. |
58 void RevertResolutionChange(); | 59 void RevertResolutionChange(); |
59 | 60 |
60 private: | 61 private: |
61 friend class ResolutionNotificationControllerTest; | 62 friend class ResolutionNotificationControllerTest; |
62 FRIEND_TEST_ALL_PREFIXES(ResolutionNotificationControllerTest, Timeout); | 63 FRIEND_TEST_ALL_PREFIXES(ResolutionNotificationControllerTest, Timeout); |
63 FRIEND_TEST_ALL_PREFIXES(chromeos::DisplayPreferencesTest, PreventStore); | 64 FRIEND_TEST_ALL_PREFIXES(chromeos::DisplayPreferencesTest, PreventStore); |
64 | 65 |
(...skipping 21 matching lines...) Expand all Loading... | |
86 | 87 |
87 scoped_ptr<ResolutionChangeInfo> change_info_; | 88 scoped_ptr<ResolutionChangeInfo> change_info_; |
88 | 89 |
89 DISALLOW_COPY_AND_ASSIGN(ResolutionNotificationController); | 90 DISALLOW_COPY_AND_ASSIGN(ResolutionNotificationController); |
90 }; | 91 }; |
91 | 92 |
92 } // namespace internal | 93 } // namespace internal |
93 } // namespace ash | 94 } // namespace ash |
94 | 95 |
95 #endif // ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_ | 96 #endif // ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_ |
OLD | NEW |