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

Unified Diff: chrome/browser/ui/apps/chrome_app_delegate.cc

Issue 2724933002: Convert SetVisuallyDeemphasized IPC to mojo (Closed)
Patch Set: Addressed patch 2 comments Created 3 years, 9 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/apps/chrome_app_delegate.cc
diff --git a/chrome/browser/ui/apps/chrome_app_delegate.cc b/chrome/browser/ui/apps/chrome_app_delegate.cc
index 5b90605119028199a8b6255ab8900720ccef53b1..6700b7cbdef205819823242692d1ebad7c552cbd 100644
--- a/chrome/browser/ui/apps/chrome_app_delegate.cc
+++ b/chrome/browser/ui/apps/chrome_app_delegate.cc
@@ -34,11 +34,14 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/notification_service.h"
-#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/render_frame_host.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
#include "extensions/common/constants.h"
+#include "extensions/common/mojo/app_window_handler.mojom.h"
#include "printing/features/features.h"
+#include "services/service_manager/public/cpp/interface_provider.h"
#if defined(USE_ASH)
#include "ash/common/shelf/shelf_constants.h" // nogncheck
@@ -305,10 +308,12 @@ void ChromeAppDelegate::SetWebContentsBlocked(
if (!blocked)
web_contents->Focus();
// RenderViewHost may be NULL during shutdown.
- content::RenderViewHost* host = web_contents->GetRenderViewHost();
+ content::RenderFrameHost* host = web_contents->GetMainFrame();
if (host) {
- host->Send(new ChromeViewMsg_SetVisuallyDeemphasized(host->GetRoutingID(),
- blocked));
+ extensions::mojom::AppWindowHandlerPtr app_window_handler;
+ host->GetProcess()->GetRemoteInterfaces()->GetInterface(
+ &app_window_handler);
+ app_window_handler->SetVisuallyDeemphasized(blocked);
}
}

Powered by Google App Engine
This is Rietveld 408576698