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

Unified Diff: sky/viewer/document_view.cc

Issue 922893002: Merge the Sky Engine changes from the SkyDart branch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « sky/viewer/document_view.h ('k') | sky/viewer/internals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/viewer/document_view.cc
diff --git a/sky/viewer/document_view.cc b/sky/viewer/document_view.cc
index 1a2e2867f1739ece9e6161c6d0cfa26c3811d0bf..30ea4080968c149d83c3991c89a9a81604d1a625 100644
--- a/sky/viewer/document_view.cc
+++ b/sky/viewer/document_view.cc
@@ -34,14 +34,11 @@
#include "sky/engine/public/web/WebScriptSource.h"
#include "sky/engine/public/web/WebSettings.h"
#include "sky/engine/public/web/WebView.h"
-#include "sky/engine/v8_inspector/inspector_backend_mojo.h"
-#include "sky/engine/v8_inspector/inspector_host.h"
#include "sky/viewer/converters/input_event_types.h"
#include "sky/viewer/converters/url_request_types.h"
#include "sky/viewer/internals.h"
#include "sky/viewer/platform/weburlloader_impl.h"
#include "sky/viewer/runtime_flags.h"
-#include "sky/viewer/script/script_runner.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkDevice.h"
@@ -100,8 +97,6 @@ scoped_ptr<ui::TouchEvent> ConvertToUITouchEvent(
} // namespace
-static int s_next_debugger_id = 1;
-
DocumentView::DocumentView(
mojo::InterfaceRequest<mojo::ServiceProvider> services,
mojo::ServiceProviderPtr exported_services,
@@ -113,12 +108,9 @@ DocumentView::DocumentView(
web_view_(nullptr),
root_(nullptr),
view_manager_client_factory_(shell_, this),
- inspector_service_factory_(this),
bitmap_rasterizer_(nullptr),
- debugger_id_(s_next_debugger_id++),
weak_factory_(this) {
exported_services_.AddService(&view_manager_client_factory_);
- inspector_service_provider_impl_.AddService(&inspector_service_factory_);
}
DocumentView::~DocumentView() {
@@ -141,9 +133,6 @@ void DocumentView::OnEmbed(
imported_services_ = exposed_services.Pass();
navigator_host_.set_service_provider(imported_services_.get());
- if (services.is_pending())
- inspector_service_provider_impl_.Bind(services.Pass());
-
Load(response_.Pass());
UpdateRootSizeAndViewportMetrics(root_->bounds());
@@ -269,14 +258,9 @@ void DocumentView::didAddMessageToConsole(
const blink::WebString& stack_trace) {
}
-void DocumentView::didCreateScriptContext(blink::WebLocalFrame* frame,
- v8::Handle<v8::Context> context) {
- script_runner_.reset(new ScriptRunner(frame, context));
-
- v8::Isolate* isolate = context->GetIsolate();
- gin::Handle<Internals> internals = Internals::Create(isolate, this);
- context->Global()->Set(gin::StringToV8(isolate, "internals"),
- gin::ConvertToV8(isolate, internals));
+void DocumentView::didCreateIsolate(blink::WebLocalFrame* frame,
+ Dart_Isolate isolate) {
+ Internals::Create(isolate, this);
}
blink::ServiceProvider* DocumentView::services() {
@@ -355,31 +339,8 @@ void DocumentView::OnViewInputEvent(
}
}
-class InspectorHostImpl : public inspector::InspectorHost {
- public:
- InspectorHostImpl(blink::WebView* web_view, mojo::Shell* shell)
- : web_view_(web_view), shell_(shell) {}
-
- virtual ~InspectorHostImpl() {}
-
- mojo::Shell* GetShell() override { return shell_; }
- v8::Isolate* GetIsolate() override { return blink::mainThreadIsolate(); }
- v8::Local<v8::Context> GetContext() override {
- return web_view_->mainFrame()->mainWorldScriptContext();
- }
-
- private:
- blink::WebView* web_view_;
- mojo::Shell* shell_;
-};
-
void DocumentView::StartDebuggerInspectorBackend() {
- if (!inspector_backend_) {
- inspector_host_.reset(new InspectorHostImpl(web_view_, shell_));
- inspector_backend_.reset(
- new inspector::InspectorBackendMojo(inspector_host_.get()));
- }
- inspector_backend_->Connect();
+ // FIXME: Do we need this for dart?
}
} // namespace sky
« no previous file with comments | « sky/viewer/document_view.h ('k') | sky/viewer/internals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698