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

Side by Side Diff: sky/engine/bindings-dart/core/dart/DartService.h

Issue 918273002: Remove bindings-dart (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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 #ifndef DartService_h
6 #define DartService_h
7
8 #include "wtf/text/WTFString.h"
9
10 #include <dart_api.h>
11 #include <dart_native_api.h>
12
13 namespace blink {
14
15 class Document;
16
17 class DartServiceRequest {
18 public:
19 DartServiceRequest(const String& request);
20 virtual ~DartServiceRequest();
21
22 // Override this method and it will be called when
23 // the response has been received from the VM service.
24 virtual void ResponseReady(const char* response) = 0;
25
26 const String& GetRequestString() { return m_request; };
27 private:
28 String m_request;
29 };
30
31 class DartService {
32 public:
33 // Returns false if service could not be started.
34 static bool Start(Document*);
35 // Error message if startup failed.
36 static const char* GetErrorMessage();
37 static void MakeServiceRequest(DartServiceRequest*);
38 static bool IsRunning() { return m_isolate; }
39
40 private:
41 static Dart_Handle LoadScript();
42 static Dart_NativeFunction NativeResolver(Dart_Handle name, int numArguments , bool* autoScopeSetup);
43 static Dart_Isolate m_isolate;
44 static const char* m_errorMsg;
45 friend class DartServiceInternal;
46 };
47
48 }
49
50 #endif // DartService_h
OLDNEW
« no previous file with comments | « sky/engine/bindings-dart/core/dart/DartScriptWrappable.h ('k') | sky/engine/bindings-dart/core/dart/DartService.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698