forked from flutter-tizen/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatform_view_channel.h
More file actions
52 lines (38 loc) · 1.53 KB
/
Copy pathplatform_view_channel.h
File metadata and controls
52 lines (38 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef EMBEDDER_PLATFORM_VIEW_CHANNEL_H_
#define EMBEDDER_PLATFORM_VIEW_CHANNEL_H_
#include <Ecore_Input.h>
#include <map>
#include <memory>
#include <string>
#include "flutter/shell/platform/common/client_wrapper/include/flutter/binary_messenger.h"
#include "flutter/shell/platform/common/client_wrapper/include/flutter/method_channel.h"
#include "rapidjson/document.h"
class PlatformView;
class PlatformViewFactory;
namespace flutter {
class PlatformViewChannel {
public:
explicit PlatformViewChannel(BinaryMessenger* messenger);
virtual ~PlatformViewChannel();
void Dispose();
void RemoveViewInstanceIfNeeded(int view_id);
void ClearViewInstances();
void ClearViewFactories();
std::map<std::string, std::unique_ptr<PlatformViewFactory>>& ViewFactories() {
return view_factories_;
}
std::map<int, PlatformView*>& ViewInstances() { return view_instances_; }
void SendKeyEvent(Ecore_Event_Key* key, bool is_down);
int CurrentFocusedViewId();
private:
void HandleMethodCall(const MethodCall<EncodableValue>& call,
std::unique_ptr<MethodResult<EncodableValue>> result);
std::unique_ptr<MethodChannel<EncodableValue>> channel_;
std::map<std::string, std::unique_ptr<PlatformViewFactory>> view_factories_;
std::map<int, PlatformView*> view_instances_;
};
} // namespace flutter
#endif // EMBEDDER_PLATFORM_VIEW_CHANNEL_H_