2013-01-03 18:24:24 +01:00
|
|
|
// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
|
2012-04-03 03:34:16 +02:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
|
2016-11-18 00:52:42 +01:00
|
|
|
#ifndef CEF_TESTS_SHARED_COMMON_CLIENT_APP_H_
|
|
|
|
#define CEF_TESTS_SHARED_COMMON_CLIENT_APP_H_
|
2012-04-03 03:34:16 +02:00
|
|
|
#pragma once
|
|
|
|
|
2012-06-19 18:29:49 +02:00
|
|
|
#include <vector>
|
2015-01-31 05:41:36 +01:00
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "include/cef_app.h"
|
|
|
|
|
2015-01-23 20:09:34 +01:00
|
|
|
namespace client {
|
|
|
|
|
2015-01-31 05:41:36 +01:00
|
|
|
// Base class for customizing process-type-based behavior.
|
|
|
|
class ClientApp : public CefApp {
|
2012-04-03 03:34:16 +02:00
|
|
|
public:
|
2015-01-31 05:41:36 +01:00
|
|
|
ClientApp();
|
2012-06-11 17:52:49 +02:00
|
|
|
|
2015-01-31 05:41:36 +01:00
|
|
|
enum ProcessType {
|
|
|
|
BrowserProcess,
|
|
|
|
RendererProcess,
|
|
|
|
ZygoteProcess,
|
|
|
|
OtherProcess,
|
2012-04-03 03:34:16 +02:00
|
|
|
};
|
|
|
|
|
2015-01-31 05:41:36 +01:00
|
|
|
// Determine the process type based on command-line arguments.
|
|
|
|
static ProcessType GetProcessType(CefRefPtr<CefCommandLine> command_line);
|
2012-04-12 22:21:50 +02:00
|
|
|
|
2015-01-31 05:41:36 +01:00
|
|
|
protected:
|
|
|
|
// Schemes that will be registered with the global cookie manager.
|
|
|
|
std::vector<CefString> cookieable_schemes_;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
private:
|
2015-02-03 00:18:16 +01:00
|
|
|
// Registers custom schemes. Implemented by cefclient in
|
|
|
|
// client_app_delegates_common.cc
|
2017-02-07 22:25:11 +01:00
|
|
|
static void RegisterCustomSchemes(CefRawPtr<CefSchemeRegistrar> registrar,
|
2012-06-19 18:29:49 +02:00
|
|
|
std::vector<CefString>& cookiable_schemes);
|
2012-04-24 20:01:48 +02:00
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// CefApp methods.
|
2015-01-23 00:34:29 +01:00
|
|
|
void OnRegisterCustomSchemes(
|
2017-02-07 22:25:11 +01:00
|
|
|
CefRawPtr<CefSchemeRegistrar> registrar) OVERRIDE;
|
2014-07-10 17:41:30 +02:00
|
|
|
|
2015-01-31 05:41:36 +01:00
|
|
|
DISALLOW_COPY_AND_ASSIGN(ClientApp);
|
2012-04-03 03:34:16 +02:00
|
|
|
};
|
|
|
|
|
2015-01-23 20:09:34 +01:00
|
|
|
} // namespace client
|
|
|
|
|
2016-11-18 00:52:42 +01:00
|
|
|
#endif // CEF_TESTS_SHARED_COMMON_CLIENT_APP_H_
|