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 #include "ash/display/resolution_notification_controller.h" | 5 #include "ash/display/resolution_notification_controller.h" |
6 | 6 |
7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
8 #include "ash/display/display_info.h" | 8 #include "ash/display/display_info.h" |
9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 bool g_use_timer = true; | 29 bool g_use_timer = true; |
30 | 30 |
31 class ResolutionChangeNotificationDelegate | 31 class ResolutionChangeNotificationDelegate |
32 : public message_center::NotificationDelegate { | 32 : public message_center::NotificationDelegate { |
33 public: | 33 public: |
34 ResolutionChangeNotificationDelegate( | 34 ResolutionChangeNotificationDelegate( |
35 ResolutionNotificationController* controller, | 35 ResolutionNotificationController* controller, |
36 bool has_timeout); | 36 bool has_timeout); |
37 | 37 |
38 protected: | 38 protected: |
39 virtual ~ResolutionChangeNotificationDelegate(); | 39 ~ResolutionChangeNotificationDelegate() override; |
40 | 40 |
41 private: | 41 private: |
42 // message_center::NotificationDelegate overrides: | 42 // message_center::NotificationDelegate overrides: |
43 virtual void Close(bool by_user) override; | 43 void Close(bool by_user) override; |
44 virtual void Click() override; | 44 void Click() override; |
45 virtual bool HasClickedListener() override; | 45 bool HasClickedListener() override; |
46 virtual void ButtonClick(int button_index) override; | 46 void ButtonClick(int button_index) override; |
47 | 47 |
48 ResolutionNotificationController* controller_; | 48 ResolutionNotificationController* controller_; |
49 bool has_timeout_; | 49 bool has_timeout_; |
50 | 50 |
51 DISALLOW_COPY_AND_ASSIGN(ResolutionChangeNotificationDelegate); | 51 DISALLOW_COPY_AND_ASSIGN(ResolutionChangeNotificationDelegate); |
52 }; | 52 }; |
53 | 53 |
54 ResolutionChangeNotificationDelegate::ResolutionChangeNotificationDelegate( | 54 ResolutionChangeNotificationDelegate::ResolutionChangeNotificationDelegate( |
55 ResolutionNotificationController* controller, | 55 ResolutionNotificationController* controller, |
56 bool has_timeout) | 56 bool has_timeout) |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 this, | 301 this, |
302 &ResolutionNotificationController::OnTimerTick); | 302 &ResolutionNotificationController::OnTimerTick); |
303 } | 303 } |
304 } | 304 } |
305 | 305 |
306 void ResolutionNotificationController::SuppressTimerForTest() { | 306 void ResolutionNotificationController::SuppressTimerForTest() { |
307 g_use_timer = false; | 307 g_use_timer = false; |
308 } | 308 } |
309 | 309 |
310 } // namespace ash | 310 } // namespace ash |
OLD | NEW |