2 * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 import { WebApplication } from '../src/web_application';
21 export class WebApplicationDelegate {
22 webApplication: WebApplication;
23 constructor(webApplication: WebApplication) {
24 this.webApplication = webApplication;
27 backgroundExecutable() { return false; }
29 canIgnoreSuspend() { return false; }
31 clearSuface(webContents: any) { }
32 handleAppControlEvent(appControl: any) { return true; }
33 handleProxyInfo(authInfo: any, callback: any) { return false; }
34 initialize(options: RuntimeOption) { }
35 isPreloading() { return false; }
36 needInpectorGuide() { return false; }
37 needReload(src: string) {
38 let originalUrl = this.webApplication.mainWindow.webContents.getURL();
39 if (src !== originalUrl) {
44 needShowTimer() { return true; }
46 profileName() { return 'common' }