| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "sky/viewer/document_view.h" | 5 #include "sky/viewer/document_view.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 } | 196 } |
| 197 | 197 |
| 198 void DocumentView::didAddMessageToConsole( | 198 void DocumentView::didAddMessageToConsole( |
| 199 const blink::WebConsoleMessage& message, | 199 const blink::WebConsoleMessage& message, |
| 200 const blink::WebString& source_name, | 200 const blink::WebString& source_name, |
| 201 unsigned source_line, | 201 unsigned source_line, |
| 202 const blink::WebString& stack_trace) { | 202 const blink::WebString& stack_trace) { |
| 203 } | 203 } |
| 204 | 204 |
| 205 void DocumentView::didCreateScriptContext(blink::WebLocalFrame* frame, | 205 void DocumentView::didCreateScriptContext(blink::WebLocalFrame* frame, |
| 206 v8::Handle<v8::Context> context, | 206 v8::Handle<v8::Context> context) { |
| 207 int extensionGroup, | |
| 208 int worldId) { | |
| 209 script_runner_.reset(new ScriptRunner(frame, context)); | 207 script_runner_.reset(new ScriptRunner(frame, context)); |
| 210 | 208 |
| 211 v8::Isolate* isolate = context->GetIsolate(); | 209 v8::Isolate* isolate = context->GetIsolate(); |
| 212 gin::Handle<Internals> internals = Internals::Create(isolate, this); | 210 gin::Handle<Internals> internals = Internals::Create(isolate, this); |
| 213 context->Global()->Set(gin::StringToV8(isolate, "internals"), | 211 context->Global()->Set(gin::StringToV8(isolate, "internals"), |
| 214 gin::ConvertToV8(isolate, internals)); | 212 gin::ConvertToV8(isolate, internals)); |
| 215 } | 213 } |
| 216 | 214 |
| 217 blink::ServiceProvider& DocumentView::services() { | 215 blink::ServiceProvider& DocumentView::services() { |
| 218 return *this; | 216 return *this; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 void DocumentView::StartDebuggerInspectorBackend() { | 276 void DocumentView::StartDebuggerInspectorBackend() { |
| 279 if (!inspector_backend_) { | 277 if (!inspector_backend_) { |
| 280 inspector_host_.reset(new InspectorHostImpl(web_view_, shell_)); | 278 inspector_host_.reset(new InspectorHostImpl(web_view_, shell_)); |
| 281 inspector_backend_.reset( | 279 inspector_backend_.reset( |
| 282 new inspector::InspectorBackendMojo(inspector_host_.get())); | 280 new inspector::InspectorBackendMojo(inspector_host_.get())); |
| 283 } | 281 } |
| 284 inspector_backend_->Connect(); | 282 inspector_backend_->Connect(); |
| 285 } | 283 } |
| 286 | 284 |
| 287 } // namespace sky | 285 } // namespace sky |
| OLD | NEW |