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

Unified Diff: sky/viewer/document_view.cc

Issue 727593004: Wire up the Inspector V8 Debugger (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Actually works 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
Index: sky/viewer/document_view.cc
diff --git a/sky/viewer/document_view.cc b/sky/viewer/document_view.cc
index 0bfbeca61cc1ae882737332713e88baaba237217..499829902106d4db3980bd489355785522bf5cb6 100644
--- a/sky/viewer/document_view.cc
+++ b/sky/viewer/document_view.cc
@@ -64,6 +64,8 @@ mojo::Target WebNavigationPolicyToNavigationTarget(
} // namespace
+static int s_next_debugger_id = 1;
+
DocumentView::DocumentView(
mojo::URLResponsePtr response,
mojo::ShellPtr shell,
@@ -75,6 +77,7 @@ DocumentView::DocumentView(
view_manager_client_factory_(shell_.get(), this),
inspector_service_factory_(this),
compositor_thread_(compositor_thread),
+ debugger_id_(s_next_debugger_id++),
eseidel 2014/11/18 19:38:48 This ended up not being used, will remove.
abarth-chromium 2014/11/18 22:37:37 ok
weak_factory_(this) {
shell_.set_client(this);
}
@@ -191,8 +194,6 @@ void DocumentView::didCreateScriptContext(blink::WebLocalFrame* frame,
v8::Handle<v8::Context> context,
int extensionGroup,
int worldId) {
- if (frame != web_view_->mainFrame())
- return;
script_runner_.reset(new ScriptRunner(frame, context));
v8::Isolate* isolate = context->GetIsolate();
@@ -209,6 +210,10 @@ mojo::NavigatorHost* DocumentView::NavigatorHost() {
return navigator_host_.get();
}
+mojo::Shell* DocumentView::Shell() {
+ return shell_.get();
+}
+
void DocumentView::OnViewBoundsChanged(mojo::View* view,
const mojo::Rect& old_bounds,
const mojo::Rect& new_bounds) {

Powered by Google App Engine
This is Rietveld 408576698