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

Unified Diff: sky/viewer/services/inspector_impl.cc

Issue 690433004: Add inspect command to skydb (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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
« sky/engine/web/WebViewImpl.cpp ('K') | « sky/viewer/services/inspector_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/viewer/services/inspector_impl.cc
diff --git a/sky/viewer/services/inspector_impl.cc b/sky/viewer/services/inspector_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a5343fa9600723ac64b2513f202966330e1700ab
--- /dev/null
+++ b/sky/viewer/services/inspector_impl.cc
@@ -0,0 +1,28 @@
+// Copyright 2014 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 "sky/viewer/services/inspector_impl.h"
+
+#include "sky/engine/public/web/WebDocument.h"
+#include "sky/engine/public/web/WebElement.h"
+#include "sky/engine/public/web/WebFrame.h"
+#include "sky/engine/public/web/WebView.h"
+#include "sky/viewer/document_view.h"
+
+namespace sky {
+
+InspectorServiceImpl::InspectorServiceImpl(DocumentView* view)
+ : view_(view->GetWeakPtr()) {
+}
+
+InspectorServiceImpl::~InspectorServiceImpl() {
+}
+
+void InspectorServiceImpl::Inject() {
+ if (!view_)
+ return;
+ view_->web_view()->injectModule("/sky/framework/inspector/inspector.sky");
+}
+
+} // namespace sky
« sky/engine/web/WebViewImpl.cpp ('K') | « sky/viewer/services/inspector_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698