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

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

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

Powered by Google App Engine
This is Rietveld 408576698