Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
dart-lang
sdk
runtime
vm
native_message_handler.h
Go to the documentation of this file.
1
// Copyright (c) 2012, 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 RUNTIME_VM_NATIVE_MESSAGE_HANDLER_H_
6
#define RUNTIME_VM_NATIVE_MESSAGE_HANDLER_H_
7
8
#include <memory>
9
10
#include "
include/dart_api.h
"
11
#include "
include/dart_native_api.h
"
12
#include "
vm/message_handler.h
"
13
14
namespace
dart
{
15
16
// A NativeMessageHandler accepts messages and dispatches them to
17
// native C handlers.
18
class
NativeMessageHandler
:
public
MessageHandler
{
19
public
:
20
NativeMessageHandler
(
const
char
*
name
,
Dart_NativeMessageHandler
func
);
21
~NativeMessageHandler
();
22
23
const
char
*
name
()
const
{
return
name_; }
24
Dart_NativeMessageHandler
func
()
const
{
return
func_; }
25
26
MessageStatus
HandleMessage
(std::unique_ptr<Message>
message
);
27
28
#if defined(DEBUG)
29
// Check that it is safe to access this handler.
30
void
CheckAccess()
const
;
31
#endif
32
33
private
:
34
char
* name_;
35
Dart_NativeMessageHandler
func_;
36
};
37
38
}
// namespace dart
39
40
#endif
// RUNTIME_VM_NATIVE_MESSAGE_HANDLER_H_
dart::MessageHandler
Definition
message_handler.h:20
dart::MessageHandler::MessageStatus
MessageStatus
Definition
message_handler.h:25
dart::NativeMessageHandler
Definition
native_message_handler.h:18
dart::NativeMessageHandler::func
Dart_NativeMessageHandler func() const
Definition
native_message_handler.h:24
dart::NativeMessageHandler::~NativeMessageHandler
~NativeMessageHandler()
Definition
native_message_handler.cc:21
dart::NativeMessageHandler::HandleMessage
MessageStatus HandleMessage(std::unique_ptr< Message > message)
Definition
native_message_handler.cc:31
dart::NativeMessageHandler::name
const char * name() const
Definition
native_message_handler.h:23
dart_api.h
dart_native_api.h
Dart_NativeMessageHandler
void(* Dart_NativeMessageHandler)(Dart_Port dest_port_id, Dart_CObject *message)
Definition
dart_native_api.h:150
message
Win32Message message
Definition
keyboard_unittests.cc:139
message_handler.h
dart
Definition
dart_vm.cc:33
Generated on Fri Apr 26 2024 06:15:10 for Flutter Engine by
1.9.8