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

Unified Diff: sky/engine/v8_inspector/inspector_backend_mojo.cc

Issue 749523002: Move inspector_backend_mojo.cc to v8_inspector (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/v8_inspector/inspector_backend_mojo.h ('k') | sky/engine/web/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/v8_inspector/inspector_backend_mojo.cc
diff --git a/sky/engine/core/inspector/inspector_backend_mojo.cc b/sky/engine/v8_inspector/inspector_backend_mojo.cc
similarity index 73%
rename from sky/engine/core/inspector/inspector_backend_mojo.cc
rename to sky/engine/v8_inspector/inspector_backend_mojo.cc
index ca030fcb3c240b7865f990d36a3f6b3cbe36b7bf..01a69f0a4137f8952ff642e2e9aafaefd5f8b8a7 100644
--- a/sky/engine/core/inspector/inspector_backend_mojo.cc
+++ b/sky/engine/v8_inspector/inspector_backend_mojo.cc
@@ -2,45 +2,43 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "config.h"
-#include "core/inspector/inspector_backend_mojo.h"
+#include "sky/engine/config.h"
+#include "v8_inspector/inspector_backend_mojo.h"
#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
#include "bindings/core/v8/PageScriptDebugServer.h"
#include "bindings/core/v8/ScriptController.h"
-#include "core/frame/FrameHost.h"
-#include "core/inspector/InspectorState.h"
-#include "core/inspector/InstrumentingAgents.h"
-#include "core/inspector/PageDebuggerAgent.h"
-#include "core/page/Page.h"
#include "gen/sky/core/InspectorBackendDispatcher.h"
#include "mojo/public/cpp/application/connect.h"
#include "mojo/public/cpp/application/service_provider_impl.h"
#include "mojo/public/interfaces/application/shell.mojom.h"
-#include "platform/JSONValues.h"
-#include "public/platform/ServiceProvider.h"
+#include "sky/engine/core/frame/FrameHost.h"
+#include "sky/engine/core/inspector/InspectorState.h"
+#include "sky/engine/core/inspector/InstrumentingAgents.h"
+#include "sky/engine/core/inspector/PageDebuggerAgent.h"
+#include "sky/engine/core/page/Page.h"
+#include "sky/engine/platform/JSONValues.h"
+#include "sky/engine/public/platform/ServiceProvider.h"
namespace blink {
class MessageLoopAdaptor : public PageScriptDebugServer::ClientMessageLoop {
-public:
- MessageLoopAdaptor() { }
-
-private:
- virtual void run(Page* page)
- {
- run_loop_.reset(new base::RunLoop());
- run_loop_->Run();
- }
-
- virtual void quitNow()
- {
- if (run_loop_)
- run_loop_->Quit();
- }
-
- scoped_ptr<base::RunLoop> run_loop_;
+ public:
+ MessageLoopAdaptor() {}
+
+ private:
+ virtual void run(Page* page) {
+ run_loop_.reset(new base::RunLoop());
+ run_loop_->Run();
+ }
+
+ virtual void quitNow() {
+ if (run_loop_)
+ run_loop_->Quit();
+ }
+
+ scoped_ptr<base::RunLoop> run_loop_;
};
InspectorBackendMojo::InspectorBackendMojo(const FrameHost& frame_host)
@@ -59,7 +57,8 @@ void InspectorBackendMojo::Connect() {
frontend_.set_client(this);
// Theoretically we should load our state from the inspector cookie.
- inspector_state_ = adoptPtr(new InspectorState(nullptr, JSONObject::create()));
+ inspector_state_ =
+ adoptPtr(new InspectorState(nullptr, JSONObject::create()));
old_frontend_ = adoptPtr(new InspectorFrontend(this));
v8::Isolate* isolate = frame_host_.page().mainFrame()->script().isolate();
@@ -69,7 +68,9 @@ void InspectorBackendMojo::Connect() {
// AgentRegistry used to do this, but we don't need it for one agent.
script_manager_ = InjectedScriptManager::createForPage();
- debugger_agent_ = PageDebuggerAgent::create(&PageScriptDebugServer::shared(), &frame_host_.page(), script_manager_.get());
+ debugger_agent_ =
+ PageDebuggerAgent::create(&PageScriptDebugServer::shared(),
+ &frame_host_.page(), script_manager_.get());
agents_ = adoptPtr(new InstrumentingAgents(debugger_agent_.get()));
debugger_agent_->init(agents_.get(), inspector_state_.get());
debugger_agent_->setFrontend(old_frontend_.get());
@@ -101,7 +102,7 @@ void InspectorBackendMojo::OnMessage(const mojo::String& message) {
// if agents are missing, since we only want this backend to care about
// the Debugger agent, we manually filter here.
if (command_name.startsWith("Debugger"))
- dispatcher_->dispatch(wtf_message);
+ dispatcher_->dispatch(wtf_message);
}
-} // namespace blink
+} // namespace blink
« no previous file with comments | « sky/engine/v8_inspector/inspector_backend_mojo.h ('k') | sky/engine/web/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698