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

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

Issue 2724933002: Convert SetVisuallyDeemphasized IPC to mojo (Closed)
Patch Set: Addressed Ken's 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
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/common/extensions/chrome_extension_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2b6963745e8f342f90cc988c42f52f829dfbce98 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.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,11 @@ 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::AppWindowPtr app_window;
+ host->GetProcess()->GetRemoteInterfaces()->GetInterface(&app_window);
+ app_window->SetVisuallyDeemphasized(blocked);
}
}
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/common/extensions/chrome_extension_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698