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

Unified Diff: content/shell/browser/layout_test/layout_test_devtools_bindings.h

Issue 2756623002: DevTools: extract bindings from ShellDevToolsFrontend (Closed)
Patch Set: fixup Created 3 years, 9 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: content/shell/browser/layout_test/layout_test_devtools_bindings.h
diff --git a/content/shell/browser/layout_test/layout_test_devtools_frontend.h b/content/shell/browser/layout_test/layout_test_devtools_bindings.h
similarity index 54%
rename from content/shell/browser/layout_test/layout_test_devtools_frontend.h
rename to content/shell/browser/layout_test/layout_test_devtools_bindings.h
index a58c6f4826421b9ea161a69857894df31b0b99eb..9eac11104a9fdb51bd3d671d26b5e6c91a318340 100644
--- a/content/shell/browser/layout_test/layout_test_devtools_frontend.h
+++ b/content/shell/browser/layout_test/layout_test_devtools_bindings.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_
-#define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_
+#ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_BINDINGS_H_
+#define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_BINDINGS_H_
#include "base/compiler_specific.h"
#include "base/macros.h"
@@ -11,32 +11,25 @@
namespace content {
-class Shell;
class WebContents;
-class LayoutTestDevToolsFrontend : public ShellDevToolsFrontend {
+class LayoutTestDevToolsBindings : public ShellDevToolsBindings {
public:
- static LayoutTestDevToolsFrontend* Show(WebContents* inspected_contents,
- const std::string& settings,
- const std::string& frontend_url);
+ LayoutTestDevToolsBindings(WebContents* devtools_contents,
+ WebContents* inspected_contents);
static GURL GetDevToolsPathAsURL(const std::string& frontend_url);
static GURL MapJSTestURL(const GURL& test_url);
- void ReuseFrontend(const std::string& settings,
- const std::string frontend_url);
+ void LoadDevTools(const std::string& settings,
+ const std::string& frontend_url);
void EvaluateInFrontend(int call_id, const std::string& expression);
- private:
- LayoutTestDevToolsFrontend(Shell* frontend_shell,
- WebContents* inspected_contents);
- ~LayoutTestDevToolsFrontend() override;
+ ~LayoutTestDevToolsBindings() override;
- // content::DevToolsAgentHostClient implementation.
- void AgentHostClosed(DevToolsAgentHost* agent_host, bool replaced) override;
-
- // ShellDevToolsFrontend overrides.
+ private:
+ // ShellDevToolsBindings overrides.
void HandleMessageFromDevToolsFrontend(const std::string& message) override;
// WebContentsObserver implementation.
@@ -46,9 +39,9 @@ class LayoutTestDevToolsFrontend : public ShellDevToolsFrontend {
bool ready_for_test_;
std::vector<std::pair<int, std::string>> pending_evaluations_;
- DISALLOW_COPY_AND_ASSIGN(LayoutTestDevToolsFrontend);
+ DISALLOW_COPY_AND_ASSIGN(LayoutTestDevToolsBindings);
};
} // namespace content
-#endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_
+#endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_BINDINGS_H_

Powered by Google App Engine
This is Rietveld 408576698