| 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 | 8 |
| 9 #include "ash/common/new_window_delegate.h" | |
| 10 #include "ash/common/system/system_notifier.h" | 9 #include "ash/common/system/system_notifier.h" |
| 11 #include "ash/common/wm_shell.h" | 10 #include "ash/common/wm_shell.h" |
| 12 #include "ash/display/display_manager.h" | 11 #include "ash/display/display_manager.h" |
| 13 | |
| 14 #include "ash/display/extended_mouse_warp_controller.h" | 12 #include "ash/display/extended_mouse_warp_controller.h" |
| 15 #include "ash/display/null_mouse_warp_controller.h" | 13 #include "ash/display/null_mouse_warp_controller.h" |
| 16 #include "ash/display/unified_mouse_warp_controller.h" | 14 #include "ash/display/unified_mouse_warp_controller.h" |
| 17 | |
| 18 #include "ash/host/ash_window_tree_host.h" | 15 #include "ash/host/ash_window_tree_host.h" |
| 16 #include "ash/public/interfaces/new_window.mojom.h" |
| 19 #include "ash/shell.h" | 17 #include "ash/shell.h" |
| 20 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
| 21 #include "grit/ash_resources.h" | 19 #include "grit/ash_resources.h" |
| 22 #include "ui/aura/env.h" | 20 #include "ui/aura/env.h" |
| 23 #include "ui/aura/window_tree_host.h" | 21 #include "ui/aura/window_tree_host.h" |
| 24 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
| 25 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
| 26 #include "ui/display/display.h" | 24 #include "ui/display/display.h" |
| 27 #include "ui/display/manager/managed_display_info.h" | 25 #include "ui/display/manager/managed_display_info.h" |
| 28 #include "ui/gfx/geometry/point.h" | 26 #include "ui/gfx/geometry/point.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 47 // is clicked. | 45 // is clicked. |
| 48 class DisplayErrorNotificationDelegate | 46 class DisplayErrorNotificationDelegate |
| 49 : public message_center::NotificationDelegate { | 47 : public message_center::NotificationDelegate { |
| 50 public: | 48 public: |
| 51 DisplayErrorNotificationDelegate() = default; | 49 DisplayErrorNotificationDelegate() = default; |
| 52 | 50 |
| 53 // message_center::NotificationDelegate: | 51 // message_center::NotificationDelegate: |
| 54 bool HasClickedListener() override { return true; } | 52 bool HasClickedListener() override { return true; } |
| 55 | 53 |
| 56 void Click() override { | 54 void Click() override { |
| 57 WmShell::Get()->new_window_delegate()->OpenFeedbackPage(); | 55 WmShell::Get()->new_window_client()->OpenFeedbackPage(); |
| 58 } | 56 } |
| 59 | 57 |
| 60 private: | 58 private: |
| 61 // Private destructor since NotificationDelegate is ref-counted. | 59 // Private destructor since NotificationDelegate is ref-counted. |
| 62 ~DisplayErrorNotificationDelegate() override = default; | 60 ~DisplayErrorNotificationDelegate() override = default; |
| 63 | 61 |
| 64 DISALLOW_COPY_AND_ASSIGN(DisplayErrorNotificationDelegate); | 62 DISALLOW_COPY_AND_ASSIGN(DisplayErrorNotificationDelegate); |
| 65 }; | 63 }; |
| 66 | 64 |
| 67 | 65 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 message_center::NotificationList::Notifications notifications = | 190 message_center::NotificationList::Notifications notifications = |
| 193 message_center::MessageCenter::Get()->GetVisibleNotifications(); | 191 message_center::MessageCenter::Get()->GetVisibleNotifications(); |
| 194 for (auto* const notification : notifications) { | 192 for (auto* const notification : notifications) { |
| 195 if (notification->id() == kDisplayErrorNotificationId) | 193 if (notification->id() == kDisplayErrorNotificationId) |
| 196 return notification->message(); | 194 return notification->message(); |
| 197 } | 195 } |
| 198 return base::string16(); | 196 return base::string16(); |
| 199 } | 197 } |
| 200 | 198 |
| 201 } // namespace ash | 199 } // namespace ash |
| OLD | NEW |