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

Side by Side Diff: sky/viewer/internals.cc

Issue 1191013004: Teach the analyzer about dart:sky.internals. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « sky/sdk/lib/internals.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « sky/sdk/lib/internals.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698