forked from chromiumembedded/java-cef
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdevtools_message_observer.h
More file actions
37 lines (29 loc) · 1.34 KB
/
devtools_message_observer.h
File metadata and controls
37 lines (29 loc) · 1.34 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
// Copyright (c) 2024 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef JCEF_NATIVE_DEVTOOLS_MESSAGE_OBSERVER_H_
#define JCEF_NATIVE_DEVTOOLS_MESSAGE_OBSERVER_H_
#pragma once
#include <jni.h>
#include "include/cef_devtools_message_observer.h"
#include "jni_scoped_helpers.h"
// DevToolsMessageObserver implementation.
class DevToolsMessageObserver : public CefDevToolsMessageObserver {
public:
DevToolsMessageObserver(JNIEnv* env, jobject observer);
// CefDevToolsMessageObserver methods
virtual void OnDevToolsMethodResult(CefRefPtr<CefBrowser> browser,
int message_id,
bool success,
const void* result,
size_t result_size) override;
virtual void OnDevToolsEvent(CefRefPtr<CefBrowser> browser,
const CefString& method,
const void* params,
size_t params_size) override;
protected:
ScopedJNIObjectGlobal handle_;
// Include the default reference counting implementation.
IMPLEMENT_REFCOUNTING(DevToolsMessageObserver);
};
#endif // JCEF_NATIVE_DEVTOOLS_MESSAGE_OBSERVER_H_