forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jni_onload.cc
31 lines (24 loc) · 939 Bytes
/
jni_onload.cc
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
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/public/app/content_jni_onload.h"
#include "content/public/app/content_main.h"
#include "weblayer/app/content_main_delegate_impl.h"
namespace weblayer {
class MainDelegateImpl : public MainDelegate {
public:
void PreMainMessageLoopRun() override {}
void PostMainMessageLoopRun() override {}
void SetMainMessageLoopQuitClosure(base::OnceClosure quit_closure) override {}
};
// This is called by the VM when the shared library is first loaded.
bool OnJNIOnLoadInit() {
if (!content::android::OnJNIOnLoadInit())
return false;
weblayer::MainParams params;
params.delegate = new weblayer::MainDelegateImpl;
content::SetContentMainDelegate(
new weblayer::ContentMainDelegateImpl(params));
return true;
}
} // namespace weblayer