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

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

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

Powered by Google App Engine
This is Rietveld 408576698