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

Unified Diff: Source/core/inspector/InspectorFrontendHost.cpp

Issue 23289002: Introduce InspectorFrontendHost.sendMessageToFrontendHost. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 7 years, 4 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 | « Source/core/inspector/InspectorFrontendHost.h ('k') | Source/core/inspector/InspectorFrontendHost.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorFrontendHost.cpp
diff --git a/Source/core/inspector/InspectorFrontendHost.cpp b/Source/core/inspector/InspectorFrontendHost.cpp
index 98b5238b8cd3bc4e85071f835abdb153ccdf6e70..48347801c2e15ab6b465659a74393b69fa0e255b 100644
--- a/Source/core/inspector/InspectorFrontendHost.cpp
+++ b/Source/core/inspector/InspectorFrontendHost.cpp
@@ -42,6 +42,7 @@
#include "core/page/Page.h"
#include "core/platform/ContextMenu.h"
#include "core/platform/ContextMenuItem.h"
+#include "core/platform/JSONValues.h"
#include "core/platform/Pasteboard.h"
#include "core/platform/network/ResourceError.h"
#include "core/platform/network/ResourceRequest.h"
@@ -151,6 +152,9 @@ void InspectorFrontendHost::requestSetDockSide(const String& side)
void InspectorFrontendHost::closeWindow()
{
if (m_client) {
+ RefPtr<JSONObject> message = JSONObject::create();
+ message->setString("method", "closeWindow");
+ sendMessageToEmbedder(message->toJSONString());
m_client->closeWindow();
disconnectClient(); // Disconnect from client.
}
@@ -233,6 +237,12 @@ void InspectorFrontendHost::sendMessageToBackend(const String& message)
m_client->sendMessageToBackend(message);
}
+void InspectorFrontendHost::sendMessageToEmbedder(const String& message)
+{
+ if (m_client)
+ m_client->sendMessageToEmbedder(message);
+}
+
void InspectorFrontendHost::showContextMenu(Event* event, const Vector<ContextMenuItem>& items)
{
if (!event)
« no previous file with comments | « Source/core/inspector/InspectorFrontendHost.h ('k') | Source/core/inspector/InspectorFrontendHost.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698