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

Unified Diff: chrome/browser/ui/browser_commands.cc

Issue 2434463004: mash: Move directly linked NewWindowDelegate to mojom::NewWindowClient. (Closed)
Patch Set: Actually rename the browser test. Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index 4b328bcd344b0519969b1833423c8ac61d192a61..97523498d245936afc94ff70fabf271ded4d7a22 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -115,6 +115,13 @@
#include "chrome/browser/media/router/media_router_dialog_controller.h" // nogncheck
#endif
+#if defined(USE_ASH)
+#include "chrome/browser/ui/ash/ash_util.h"
+#include "content/public/common/service_manager_connection.h"
+#include "mash/public/interfaces/launchable.mojom.h"
+#include "services/service_manager/public/cpp/connector.h"
+#endif
+
namespace {
const char kOsOverrideForTabletSite[] = "Linux; Android 4.0.3";
}
@@ -1060,7 +1067,21 @@ bool CanOpenTaskManager() {
void OpenTaskManager(Browser* browser) {
#if defined(ENABLE_TASK_MANAGER)
content::RecordAction(UserMetricsAction("TaskManager"));
- chrome::ShowTaskManager(browser);
+
+#if defined(USE_ASH)
+ if (chrome::IsRunningInMash()) {
+ service_manager::Connector* connector =
James Cook 2016/10/21 22:22:31 nit: Maybe comment pointing out that under mash th
Elliot Glaysher 2016/10/21 22:45:56 Done.
+ content::ServiceManagerConnection::GetForProcess()->GetConnector();
+ mash::mojom::LaunchablePtr launchable;
+ connector->ConnectToInterface("service:task_viewer", &launchable);
+ launchable->Launch(mash::mojom::kWindow,
+ mash::mojom::LaunchMode::DEFAULT);
+ }
+ else
+#endif
+ {
+ chrome::ShowTaskManager(browser);
+ }
#else
NOTREACHED();
#endif

Powered by Google App Engine
This is Rietveld 408576698