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 private: 31 // Registers custom schemes. Implemented by cefclient in 32 // client_app_delegates_common.cc 33 static void RegisterCustomSchemes(CefRawPtr<CefSchemeRegistrar> registrar); 34 35 // CefApp methods. 36 void OnRegisterCustomSchemes( 37 CefRawPtr<CefSchemeRegistrar> registrar) override; 38 39 DISALLOW_COPY_AND_ASSIGN(ClientApp); 40 }; 41 42 } // namespace client 43 44 #endif // CEF_TESTS_SHARED_COMMON_CLIENT_APP_H_ 45