Index: chrome/browser/extensions/api/mdns/mdns_api.cc |
diff --git a/chrome/browser/extensions/api/mdns/mdns_api.cc b/chrome/browser/extensions/api/mdns/mdns_api.cc |
index 1dfa4ffe61c14ba94aa404724415c5514762eca4..5777fa896c8337b0e945dba2807f3e1bcc99f625 100644 |
--- a/chrome/browser/extensions/api/mdns/mdns_api.cc |
+++ b/chrome/browser/extensions/api/mdns/mdns_api.cc |
@@ -7,13 +7,14 @@ |
#include <vector> |
#include "base/lazy_instance.h" |
+#include "base/strings/stringprintf.h" |
#include "chrome/browser/extensions/extension_service.h" |
#include "chrome/common/extensions/api/mdns.h" |
+#include "content/public/browser/render_frame_host.h" |
#include "content/public/browser/render_process_host.h" |
-#include "content/public/browser/render_view_host.h" |
+#include "content/public/browser/web_contents.h" |
#include "extensions/browser/extension_host.h" |
#include "extensions/browser/extension_registry.h" |
-#include "extensions/common/extension_messages.h" |
namespace extensions { |
@@ -211,15 +212,10 @@ void MDnsAPI::WriteToConsole(const std::string& service_type, |
extensions::ExtensionHost* host = |
extensions::ProcessManager::Get(browser_context_) |
->GetBackgroundHostForExtension(extension_id); |
- if (!host) |
- continue; |
- content::RenderViewHost* rvh = host->render_view_host(); |
- if (!rvh) |
- continue; |
- rvh->Send(new ExtensionMsg_AddMessageToConsole( |
- rvh->GetRoutingID(), |
- level, |
- logged_message)); |
+ content::RenderFrameHost* rfh = |
not at google - send to devlin
2015/06/19 23:14:58
This should probably use ProcessManager::GetRender
Devlin
2015/06/19 23:53:51
That would be a change in behavior, and it would b
not at google - send to devlin
2015/06/22 17:54:10
I think it's more weird to log it to the backgroun
Devlin
2015/06/22 19:52:32
Added a TODO. I'd like to (try) to avoid behavior
|
+ host ? host->host_contents()->GetMainFrame() : nullptr; |
+ if (rfh) |
+ rfh->AddMessageToConsole(level, logged_message); |
} |
} |