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

Unified Diff: content/shell/notify_done_forwarder.cc

Issue 13795002: [content shell] add support for invoking testRunner.notifyDone in a different process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 8 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 | « content/shell/notify_done_forwarder.h ('k') | content/shell/shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/notify_done_forwarder.cc
diff --git a/content/shell/notify_done_forwarder.cc b/content/shell/notify_done_forwarder.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7de67edff3c9534965fc5cf14f4e7f0cd537cbfe
--- /dev/null
+++ b/content/shell/notify_done_forwarder.cc
@@ -0,0 +1,33 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/shell/notify_done_forwarder.h"
+
+#include "content/shell/shell_messages.h"
+#include "content/shell/webkit_test_controller.h"
+
+namespace content {
+
+DEFINE_WEB_CONTENTS_USER_DATA_KEY(NotifyDoneForwarder);
+
+NotifyDoneForwarder::NotifyDoneForwarder(WebContents* web_contents)
+ : WebContentsObserver(web_contents) {}
+
+NotifyDoneForwarder::~NotifyDoneForwarder() {}
+
+bool NotifyDoneForwarder::OnMessageReceived(const IPC::Message& message) {
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP(NotifyDoneForwarder, message)
+ IPC_MESSAGE_HANDLER(ShellViewHostMsg_TestFinishedInSecondaryWindow,
+ OnTestFinishedInSecondaryWindow)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP()
+ return handled;
+}
+
+void NotifyDoneForwarder::OnTestFinishedInSecondaryWindow() {
+ WebKitTestController::Get()->TestFinishedInSecondaryWindow();
+}
+
+} // namespace content
« no previous file with comments | « content/shell/notify_done_forwarder.h ('k') | content/shell/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698