| 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/engine/config.h" | 5 #include "sky/engine/config.h" |
| 6 #include "sky/viewer/internals.h" | 6 #include "sky/viewer/internals.h" |
| 7 | 7 |
| 8 #include "mojo/public/cpp/application/connect.h" | 8 #include "mojo/public/cpp/application/connect.h" |
| 9 #include "mojo/public/cpp/bindings/array.h" | 9 #include "mojo/public/cpp/bindings/array.h" |
| 10 #include "sky/engine/public/web/WebDocument.h" | 10 #include "sky/engine/public/web/WebDocument.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 int argument_count, | 84 int argument_count, |
| 85 bool* auto_setup_scope) { | 85 bool* auto_setup_scope) { |
| 86 return GetBuiltin().Resolver(name, argument_count, auto_setup_scope); | 86 return GetBuiltin().Resolver(name, argument_count, auto_setup_scope); |
| 87 } | 87 } |
| 88 | 88 |
| 89 const uint8_t* Symbolizer(Dart_NativeFunction native_function) { | 89 const uint8_t* Symbolizer(Dart_NativeFunction native_function) { |
| 90 return GetBuiltin().Symbolizer(native_function); | 90 return GetBuiltin().Symbolizer(native_function); |
| 91 } | 91 } |
| 92 | 92 |
| 93 const char kLibraryName[] = "dart:sky.internals"; | 93 const char kLibraryName[] = "dart:sky.internals"; |
| 94 |
| 95 // When editing this, also update sky/sdk/lib/internals.dart |
| 96 // so that the analyzer can see it |
| 94 const char kLibrarySource[] = R"DART( | 97 const char kLibrarySource[] = R"DART( |
| 95 String contentAsText() native "contentAsText"; | 98 String contentAsText() native "contentAsText"; |
| 99 String renderTreeAsText() native "renderTreeAsText"; |
| 96 void notifyTestComplete(String test_result) native "notifyTestComplete"; | 100 void notifyTestComplete(String test_result) native "notifyTestComplete"; |
| 97 String renderTreeAsText() native "renderTreeAsText"; | |
| 98 int takeShellProxyHandle() native "takeShellProxyHandle"; | 101 int takeShellProxyHandle() native "takeShellProxyHandle"; |
| 99 int takeServicesProvidedByEmbedder() native "takeServicesProvidedByEmbedder"; | 102 int takeServicesProvidedByEmbedder() native "takeServicesProvidedByEmbedder"; |
| 100 int takeServicesProvidedToEmbedder() native "takeServicesProvidedToEmbedder"; | 103 int takeServicesProvidedToEmbedder() native "takeServicesProvidedToEmbedder"; |
| 101 int takeServiceRegistry() native "takeServiceRegistry"; | 104 int takeServiceRegistry() native "takeServiceRegistry"; |
| 102 )DART"; | 105 )DART"; |
| 103 | 106 |
| 104 } // namespace | 107 } // namespace |
| 105 | 108 |
| 106 void Internals::Create(Dart_Isolate isolate, DocumentView* document_view) { | 109 void Internals::Create(Dart_Isolate isolate, DocumentView* document_view) { |
| 107 DartState* state = DartState::From(isolate); | 110 DartState* state = DartState::From(isolate); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 const mojo::String& application_url, | 182 const mojo::String& application_url, |
| 180 mojo::InterfaceRequest<mojo::ServiceProvider> services, | 183 mojo::InterfaceRequest<mojo::ServiceProvider> services, |
| 181 mojo::ServiceProviderPtr exposed_services) { | 184 mojo::ServiceProviderPtr exposed_services) { |
| 182 if (document_view_) { | 185 if (document_view_) { |
| 183 document_view_->shell()->ConnectToApplication( | 186 document_view_->shell()->ConnectToApplication( |
| 184 application_url, services.Pass(), exposed_services.Pass()); | 187 application_url, services.Pass(), exposed_services.Pass()); |
| 185 } | 188 } |
| 186 } | 189 } |
| 187 | 190 |
| 188 } // namespace sky | 191 } // namespace sky |
| OLD | NEW |