| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/display_util.h" | 5 #include "ash/display/display_util.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "ash/common/new_window_controller.h" | 10 #include "ash/common/new_window_controller.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // A notification delegate that will start the feedback app when the notication | 51 // A notification delegate that will start the feedback app when the notication |
| 52 // is clicked. | 52 // is clicked. |
| 53 class DisplayErrorNotificationDelegate | 53 class DisplayErrorNotificationDelegate |
| 54 : public message_center::NotificationDelegate { | 54 : public message_center::NotificationDelegate { |
| 55 public: | 55 public: |
| 56 DisplayErrorNotificationDelegate() = default; | 56 DisplayErrorNotificationDelegate() = default; |
| 57 | 57 |
| 58 // message_center::NotificationDelegate: | 58 // message_center::NotificationDelegate: |
| 59 void ButtonClick(int index) override { | 59 void ButtonClick(int index) override { |
| 60 DCHECK_EQ(0, index); | 60 DCHECK_EQ(0, index); |
| 61 WmShell::Get()->new_window_controller()->OpenFeedbackPage(); | 61 Shell::Get()->new_window_controller()->OpenFeedbackPage(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 // Private destructor since NotificationDelegate is ref-counted. | 65 // Private destructor since NotificationDelegate is ref-counted. |
| 66 ~DisplayErrorNotificationDelegate() override = default; | 66 ~DisplayErrorNotificationDelegate() override = default; |
| 67 | 67 |
| 68 DISALLOW_COPY_AND_ASSIGN(DisplayErrorNotificationDelegate); | 68 DISALLOW_COPY_AND_ASSIGN(DisplayErrorNotificationDelegate); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 | 71 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 message_center::NotificationList::Notifications notifications = | 202 message_center::NotificationList::Notifications notifications = |
| 203 message_center::MessageCenter::Get()->GetVisibleNotifications(); | 203 message_center::MessageCenter::Get()->GetVisibleNotifications(); |
| 204 for (auto* const notification : notifications) { | 204 for (auto* const notification : notifications) { |
| 205 if (notification->id() == kDisplayErrorNotificationId) | 205 if (notification->id() == kDisplayErrorNotificationId) |
| 206 return notification->message(); | 206 return notification->message(); |
| 207 } | 207 } |
| 208 return base::string16(); | 208 return base::string16(); |
| 209 } | 209 } |
| 210 | 210 |
| 211 } // namespace ash | 211 } // namespace ash |
| OLD | NEW |