-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathclient_minimal.h
39 lines (29 loc) · 1.19 KB
/
client_minimal.h
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
// Copyright (c) 2017 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 CEF_EXAMPLES_MINIMAL_CLIENT_MINIMAL_H_
#define CEF_EXAMPLES_MINIMAL_CLIENT_MINIMAL_H_
#include "include/cef_client.h"
namespace minimal {
// Minimal implementation of client handlers.
class Client : public CefClient,
public CefDisplayHandler,
public CefLifeSpanHandler {
public:
Client();
// CefClient methods:
CefRefPtr<CefDisplayHandler> GetDisplayHandler() override { return this; }
CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() override { return this; }
// CefDisplayHandler methods:
void OnTitleChange(CefRefPtr<CefBrowser> browser,
const CefString& title) override;
// CefLifeSpanHandler methods:
void OnAfterCreated(CefRefPtr<CefBrowser> browser) override;
bool DoClose(CefRefPtr<CefBrowser> browser) override;
void OnBeforeClose(CefRefPtr<CefBrowser> browser) override;
private:
IMPLEMENT_REFCOUNTING(Client);
DISALLOW_COPY_AND_ASSIGN(Client);
};
} // namespace minimal
#endif // CEF_EXAMPLES_MINIMAL_CLIENT_MINIMAL_H_