]> git.sesse.net Git - casparcg/blob - dependencies64/cef/linux/tests/shared/common/client_app.h
225f8080532971f522750987aa869efda38a1d41
[casparcg] / dependencies64 / cef / linux / tests / shared / common / client_app.h
1 // Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
2 // reserved. Use of this source code is governed by a BSD-style license that
3 // can be found in the LICENSE file.
4
5 #ifndef CEF_TESTS_SHARED_COMMON_CLIENT_APP_H_
6 #define CEF_TESTS_SHARED_COMMON_CLIENT_APP_H_
7 #pragma once
8
9 #include <vector>
10
11 #include "include/cef_app.h"
12
13 namespace client {
14
15 // Base class for customizing process-type-based behavior.
16 class ClientApp : public CefApp {
17  public:
18   ClientApp();
19
20   enum ProcessType {
21     BrowserProcess,
22     RendererProcess,
23     ZygoteProcess,
24     OtherProcess,
25   };
26
27   // Determine the process type based on command-line arguments.
28   static ProcessType GetProcessType(CefRefPtr<CefCommandLine> command_line);
29
30  protected:
31   // Schemes that will be registered with the global cookie manager.
32   std::vector<CefString> cookieable_schemes_;
33
34  private:
35   // Registers custom schemes. Implemented by cefclient in
36   // client_app_delegates_common.cc
37   static void RegisterCustomSchemes(CefRawPtr<CefSchemeRegistrar> registrar,
38                                     std::vector<CefString>& cookiable_schemes);
39
40   // CefApp methods.
41   void OnRegisterCustomSchemes(
42       CefRawPtr<CefSchemeRegistrar> registrar) OVERRIDE;
43
44   DISALLOW_COPY_AND_ASSIGN(ClientApp);
45 };
46
47 }  // namespace client
48
49 #endif  // CEF_TESTS_SHARED_COMMON_CLIENT_APP_H_