Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: ash/display/resolution_notification_controller.cc

Issue 684253002: Provide default implementations for NotificationDelegate methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ash/system/chromeos/bluetooth/bluetooth_notification_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 22 matching lines...) Expand all
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 virtual ~ResolutionChangeNotificationDelegate();
40 40
41 private: 41 private:
42 // message_center::NotificationDelegate overrides: 42 // message_center::NotificationDelegate overrides:
43 virtual void Display() override;
44 virtual void Error() override;
45 virtual void Close(bool by_user) override; 43 virtual void Close(bool by_user) override;
46 virtual void Click() override; 44 virtual void Click() override;
47 virtual bool HasClickedListener() override; 45 virtual bool HasClickedListener() override;
48 virtual void ButtonClick(int button_index) override; 46 virtual void ButtonClick(int button_index) override;
49 47
50 ResolutionNotificationController* controller_; 48 ResolutionNotificationController* controller_;
51 bool has_timeout_; 49 bool has_timeout_;
52 50
53 DISALLOW_COPY_AND_ASSIGN(ResolutionChangeNotificationDelegate); 51 DISALLOW_COPY_AND_ASSIGN(ResolutionChangeNotificationDelegate);
54 }; 52 };
55 53
56 ResolutionChangeNotificationDelegate::ResolutionChangeNotificationDelegate( 54 ResolutionChangeNotificationDelegate::ResolutionChangeNotificationDelegate(
57 ResolutionNotificationController* controller, 55 ResolutionNotificationController* controller,
58 bool has_timeout) 56 bool has_timeout)
59 : controller_(controller), 57 : controller_(controller),
60 has_timeout_(has_timeout) { 58 has_timeout_(has_timeout) {
61 DCHECK(controller_); 59 DCHECK(controller_);
62 } 60 }
63 61
64 ResolutionChangeNotificationDelegate::~ResolutionChangeNotificationDelegate() { 62 ResolutionChangeNotificationDelegate::~ResolutionChangeNotificationDelegate() {
65 } 63 }
66 64
67 void ResolutionChangeNotificationDelegate::Display() {
68 }
69
70 void ResolutionChangeNotificationDelegate::Error() {
71 }
72
73 void ResolutionChangeNotificationDelegate::Close(bool by_user) { 65 void ResolutionChangeNotificationDelegate::Close(bool by_user) {
74 if (by_user) 66 if (by_user)
75 controller_->AcceptResolutionChange(false); 67 controller_->AcceptResolutionChange(false);
76 } 68 }
77 69
78 void ResolutionChangeNotificationDelegate::Click() { 70 void ResolutionChangeNotificationDelegate::Click() {
79 controller_->AcceptResolutionChange(true); 71 controller_->AcceptResolutionChange(true);
80 } 72 }
81 73
82 bool ResolutionChangeNotificationDelegate::HasClickedListener() { 74 bool ResolutionChangeNotificationDelegate::HasClickedListener() {
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 this, 301 this,
310 &ResolutionNotificationController::OnTimerTick); 302 &ResolutionNotificationController::OnTimerTick);
311 } 303 }
312 } 304 }
313 305
314 void ResolutionNotificationController::SuppressTimerForTest() { 306 void ResolutionNotificationController::SuppressTimerForTest() {
315 g_use_timer = false; 307 g_use_timer = false;
316 } 308 }
317 309
318 } // namespace ash 310 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/system/chromeos/bluetooth/bluetooth_notification_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698