Flutter Engine
Loading...
Searching...
No Matches
platform_message.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef FLUTTER_LIB_UI_WINDOW_PLATFORM_MESSAGE_H_
6
#define FLUTTER_LIB_UI_WINDOW_PLATFORM_MESSAGE_H_
7
8
#include <string>
9
#include <vector>
10
11
#include "
flutter/fml/memory/ref_counted.h
"
12
#include "
flutter/fml/memory/ref_ptr.h
"
13
#include "
flutter/lib/ui/window/platform_message_response.h
"
14
15
namespace
flutter
{
16
17
class
PlatformMessage
{
18
public
:
19
PlatformMessage
(std::string
channel
,
20
fml::MallocMapping
data
,
21
fml::RefPtr<PlatformMessageResponse>
response
);
22
PlatformMessage
(std::string
channel
,
23
fml::RefPtr<PlatformMessageResponse>
response
);
24
~PlatformMessage
();
25
26
const
std::string&
channel
()
const
{
return
channel_; }
27
const
fml::MallocMapping
&
data
()
const
{
return
data_; }
28
bool
hasData
() {
return
has_data_; }
29
30
const
fml::RefPtr<PlatformMessageResponse>
&
response
()
const
{
31
return
response_;
32
}
33
34
fml::MallocMapping
releaseData
() {
return
std::move(data_); }
35
36
private
:
37
std::string channel_;
38
fml::MallocMapping
data_;
39
bool
has_data_;
40
fml::RefPtr<PlatformMessageResponse>
response_;
41
};
42
43
}
// namespace flutter
44
45
#endif
// FLUTTER_LIB_UI_WINDOW_PLATFORM_MESSAGE_H_
flutter::PlatformMessage
Definition
platform_message.h:17
flutter::PlatformMessage::channel
const std::string & channel() const
Definition
platform_message.h:26
flutter::PlatformMessage::~PlatformMessage
~PlatformMessage()
flutter::PlatformMessage::releaseData
fml::MallocMapping releaseData()
Definition
platform_message.h:34
flutter::PlatformMessage::hasData
bool hasData()
Definition
platform_message.h:28
flutter::PlatformMessage::response
const fml::RefPtr< PlatformMessageResponse > & response() const
Definition
platform_message.h:30
flutter::PlatformMessage::data
const fml::MallocMapping & data() const
Definition
platform_message.h:27
fml::MallocMapping
A Mapping like NonOwnedMapping, but uses Free as its release proc.
Definition
mapping.h:144
fml::RefPtr
Definition
ref_ptr.h:65
flutter
Definition
asset_manager.cc:10
platform_message_response.h
ref_counted.h
ref_ptr.h
lib
ui
window
platform_message.h
Generated on Thu Nov 6 2025 16:11:25 for Flutter Engine by
1.9.8