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

Unified Diff: webkit/tools/test_shell/test_shell_devtools_client.cc

Issue 15028002: Delete test_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add dummy test_shell build target. Created 7 years, 7 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: webkit/tools/test_shell/test_shell_devtools_client.cc
diff --git a/webkit/tools/test_shell/test_shell_devtools_client.cc b/webkit/tools/test_shell/test_shell_devtools_client.cc
deleted file mode 100644
index 7ded3e93d9f64fac0e8261310f2385408a36a28f..0000000000000000000000000000000000000000
--- a/webkit/tools/test_shell/test_shell_devtools_client.cc
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) 2010 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 "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgent.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsFrontend.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
-
-#undef LOG
-#include "webkit/tools/test_shell/test_shell_devtools_agent.h"
-#include "webkit/tools/test_shell/test_shell_devtools_callargs.h"
-#include "webkit/tools/test_shell/test_shell_devtools_client.h"
-
-#include "base/bind.h"
-#include "base/command_line.h"
-#include "base/message_loop.h"
-
-using WebKit::WebDevToolsAgent;
-using WebKit::WebDevToolsFrontend;
-using WebKit::WebDevToolsMessageData;
-using WebKit::WebString;
-using WebKit::WebView;
-
-TestShellDevToolsClient::TestShellDevToolsClient(TestShellDevToolsAgent *agent,
- WebView* web_view)
- : weak_factory_(this),
- dev_tools_agent_(agent),
- web_view_(web_view) {
- web_tools_frontend_.reset(WebDevToolsFrontend::create(web_view_, this,
- WebString::fromUTF8("en-US")));
- dev_tools_agent_->attach(this);
-}
-
-TestShellDevToolsClient::~TestShellDevToolsClient() {
- // It is a chance that page will be destroyed at detach step of
- // dev_tools_agent_ and we should clean pending requests a bit earlier.
- weak_factory_.InvalidateWeakPtrs();
- if (dev_tools_agent_)
- dev_tools_agent_->detach();
-}
-
-void TestShellDevToolsClient::sendMessageToBackend(
- const WebString& data) {
- if (dev_tools_agent_)
- dev_tools_agent_->AsyncCall(TestShellDevToolsCallArgs(data));
-}
-
-void TestShellDevToolsClient::activateWindow() {
- NOTIMPLEMENTED();
-}
-
-void TestShellDevToolsClient::closeWindow() {
- NOTIMPLEMENTED();
-}
-
-void TestShellDevToolsClient::dockWindow() {
- NOTIMPLEMENTED();
-}
-
-void TestShellDevToolsClient::undockWindow() {
- NOTIMPLEMENTED();
-}
-
-void TestShellDevToolsClient::AsyncCall(const TestShellDevToolsCallArgs &args) {
- MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&TestShellDevToolsClient::Call, weak_factory_.GetWeakPtr(),
- args));
-}
-
-void TestShellDevToolsClient::Call(const TestShellDevToolsCallArgs &args) {
- web_tools_frontend_->dispatchOnInspectorFrontend(args.data_);
- if (TestShellDevToolsCallArgs::calls_count() == 1)
- all_messages_processed();
-}
-
-void TestShellDevToolsClient::all_messages_processed() {
- web_view_->mainFrame()->executeScript(WebKit::WebScriptSource(
- WebString::fromUTF8("if (window.WebInspector && "
- "WebInspector.queuesAreEmpty) WebInspector.queuesAreEmpty();")));
-}

Powered by Google App Engine
This is Rietveld 408576698