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

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

Issue 2724933002: Convert SetVisuallyDeemphasized IPC to mojo (Closed)
Patch Set: Created 3 years, 10 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..7b2b68508e89c2a3a8c51b55ee1d0513a9f0e0bb 100644
--- a/chrome/browser/ui/apps/chrome_app_delegate.cc
+++ b/chrome/browser/ui/apps/chrome_app_delegate.cc
@@ -34,11 +34,13 @@
#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 "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 +307,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));
+ host->GetProcess()->GetRemoteInterfaces()->GetInterface(
+ &extensions_frame_observer_);
Devlin 2017/03/04 02:19:41 This re-gets the interface each time we send the m
catmullings 2017/03/06 21:20:40 Done.
+ extensions_frame_observer_->SetVisuallyDeemphasized(blocked);
}
}

Powered by Google App Engine
This is Rietveld 408576698