mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Create 2272 release branch for CEF3.
git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/2272@1993 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
69
libcef/common/main_delegate.h
Normal file
69
libcef/common/main_delegate.h
Normal file
@@ -0,0 +1,69 @@
|
||||
// Copyright (c) 2011 The Chromium 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_LIBCEF_COMMON_MAIN_DELEGATE_H_
|
||||
#define CEF_LIBCEF_COMMON_MAIN_DELEGATE_H_
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "libcef/common/content_client.h"
|
||||
#include "include/cef_app.h"
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/public/app/content_main_delegate.h"
|
||||
|
||||
namespace base {
|
||||
class Thread;
|
||||
}
|
||||
|
||||
namespace content {
|
||||
class BrowserMainRunner;
|
||||
}
|
||||
|
||||
class CefContentBrowserClient;
|
||||
class CefContentRendererClient;
|
||||
class CefContentUtilityClient;
|
||||
|
||||
class CefMainDelegate : public content::ContentMainDelegate {
|
||||
public:
|
||||
explicit CefMainDelegate(CefRefPtr<CefApp> application);
|
||||
~CefMainDelegate() override;
|
||||
|
||||
bool BasicStartupComplete(int* exit_code) override;
|
||||
void PreSandboxStartup() override;
|
||||
int RunProcess(
|
||||
const std::string& process_type,
|
||||
const content::MainFunctionParams& main_function_params) override;
|
||||
void ProcessExiting(const std::string& process_type) override;
|
||||
#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
|
||||
void ZygoteForked() override;
|
||||
#endif
|
||||
content::ContentBrowserClient* CreateContentBrowserClient() override;
|
||||
content::ContentRendererClient*
|
||||
CreateContentRendererClient() override;
|
||||
content::ContentUtilityClient* CreateContentUtilityClient() override;
|
||||
|
||||
// Shut down the browser runner.
|
||||
void ShutdownBrowser();
|
||||
|
||||
CefContentBrowserClient* browser_client() { return browser_client_.get(); }
|
||||
CefContentClient* content_client() { return &content_client_; }
|
||||
|
||||
private:
|
||||
void InitializeResourceBundle();
|
||||
|
||||
scoped_ptr<content::BrowserMainRunner> browser_runner_;
|
||||
scoped_ptr<base::Thread> ui_thread_;
|
||||
|
||||
scoped_ptr<CefContentBrowserClient> browser_client_;
|
||||
scoped_ptr<CefContentRendererClient> renderer_client_;
|
||||
scoped_ptr<CefContentUtilityClient> utility_client_;
|
||||
CefContentClient content_client_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefMainDelegate);
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_COMMON_MAIN_DELEGATE_H_
|
Reference in New Issue
Block a user