Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
Loading...
Searching...
No Matches
mock_signal_handler.cc
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
#include "
flutter/shell/platform/linux/testing/mock_signal_handler.h
"
6
7
namespace
flutter
{
8
namespace
testing {
9
10
SignalHandler::SignalHandler
(gpointer
instance
,
11
const
gchar*
name
,
12
GCallback
callback
) {
13
id_ = g_signal_connect_data(
instance
,
name
,
callback
,
this
,
nullptr
,
14
G_CONNECT_SWAPPED);
15
g_weak_ref_init(&instance_,
instance
);
16
}
17
18
SignalHandler::~SignalHandler
() {
19
g_autoptr
(GObject)
instance
= G_OBJECT(g_weak_ref_get(&instance_));
20
if
(
instance
!=
nullptr
) {
21
g_signal_handler_disconnect(
instance
, id_);
22
}
23
g_weak_ref_clear(&instance_);
24
}
25
26
}
// namespace testing
27
}
// namespace flutter
flutter::testing::SignalHandler::SignalHandler
SignalHandler(gpointer instance, const gchar *name, GCallback callback)
Definition
mock_signal_handler.cc:10
flutter::testing::SignalHandler::~SignalHandler
virtual ~SignalHandler()
Definition
mock_signal_handler.cc:18
instance
VkInstance instance
Definition
main.cc:64
g_autoptr
g_autoptr(FlEngine) engine
callback
FlutterDesktopBinaryReply callback
Definition
flutter_windows_view_unittests.cc:53
mock_signal_handler.h
flutter
Definition
asset_manager.cc:10
flutter::name
DEF_SWITCHES_START aot vmservice shared library name
Definition
switch_defs.h:27
shell
platform
linux
testing
mock_signal_handler.cc
Generated on Sun Jul 5 2026 07:45:21 for Flutter Engine Uber Docs by
1.9.8