mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	- CefURLRequest::Create is no longer supported in the renderer process (see https://crbug.com/891872). Use CefFrame::CreateURLRequest instead. - Mac platform definitions have been changed from `MACOSX` to `MAC` (see https://crbug.com/1105907) and related CMake macro names have been updated. The old `OS_MACOSX` define is still set in code and CMake for backwards compatibility. - Linux ARM build is currently broken (see https://crbug.com/1123214).
		
			
				
	
	
		
			108 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			108 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
// 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_BROWSER_ALLOY_ALLOY_BROWSER_MAIN_H_
 | 
						|
#define CEF_LIBCEF_BROWSER_ALLOY_ALLOY_BROWSER_MAIN_H_
 | 
						|
#pragma once
 | 
						|
 | 
						|
#include "libcef/browser/request_context_impl.h"
 | 
						|
 | 
						|
#include "base/macros.h"
 | 
						|
#include "base/strings/string_piece.h"
 | 
						|
#include "build/build_config.h"
 | 
						|
#include "components/prefs/pref_service.h"
 | 
						|
#include "content/public/browser/browser_main_parts.h"
 | 
						|
 | 
						|
namespace content {
 | 
						|
struct MainFunctionParams;
 | 
						|
}
 | 
						|
 | 
						|
namespace extensions {
 | 
						|
class ExtensionsBrowserClient;
 | 
						|
class ExtensionsClient;
 | 
						|
}  // namespace extensions
 | 
						|
 | 
						|
#if defined(USE_AURA)
 | 
						|
namespace wm {
 | 
						|
class WMState;
 | 
						|
}
 | 
						|
#endif
 | 
						|
 | 
						|
#if defined(TOOLKIT_VIEWS)
 | 
						|
namespace views {
 | 
						|
class ViewsDelegate;
 | 
						|
#if defined(OS_MAC)
 | 
						|
class LayoutProvider;
 | 
						|
#endif
 | 
						|
}  // namespace views
 | 
						|
#endif  // defined(TOOLKIT_VIEWS)
 | 
						|
 | 
						|
class CefDevToolsDelegate;
 | 
						|
 | 
						|
class AlloyBrowserMainParts : public content::BrowserMainParts {
 | 
						|
 public:
 | 
						|
  explicit AlloyBrowserMainParts(const content::MainFunctionParams& parameters);
 | 
						|
  ~AlloyBrowserMainParts() override;
 | 
						|
 | 
						|
  int PreEarlyInitialization() override;
 | 
						|
  void ToolkitInitialized() override;
 | 
						|
  void PreMainMessageLoopStart() override;
 | 
						|
  void PostMainMessageLoopStart() override;
 | 
						|
  int PreCreateThreads() override;
 | 
						|
  void PreMainMessageLoopRun() override;
 | 
						|
  void PostMainMessageLoopRun() override;
 | 
						|
  void PostDestroyThreads() override;
 | 
						|
 | 
						|
  CefRefPtr<CefRequestContextImpl> request_context() const {
 | 
						|
    return global_request_context_;
 | 
						|
  }
 | 
						|
  CefDevToolsDelegate* devtools_delegate() const { return devtools_delegate_; }
 | 
						|
 | 
						|
  scoped_refptr<base::SingleThreadTaskRunner> background_task_runner() const {
 | 
						|
    return background_task_runner_;
 | 
						|
  }
 | 
						|
  scoped_refptr<base::SingleThreadTaskRunner> user_visible_task_runner() const {
 | 
						|
    return user_visible_task_runner_;
 | 
						|
  }
 | 
						|
  scoped_refptr<base::SingleThreadTaskRunner> user_blocking_task_runner()
 | 
						|
      const {
 | 
						|
    return user_blocking_task_runner_;
 | 
						|
  }
 | 
						|
 | 
						|
 private:
 | 
						|
#if defined(OS_WIN)
 | 
						|
  void PlatformInitialize();
 | 
						|
#endif  // defined(OS_WIN)
 | 
						|
 | 
						|
  CefRefPtr<CefRequestContextImpl> global_request_context_;
 | 
						|
  CefDevToolsDelegate* devtools_delegate_;  // Deletes itself.
 | 
						|
 | 
						|
  std::unique_ptr<extensions::ExtensionsClient> extensions_client_;
 | 
						|
  std::unique_ptr<extensions::ExtensionsBrowserClient>
 | 
						|
      extensions_browser_client_;
 | 
						|
 | 
						|
  // Blocking task runners exposed via CefTaskRunner. For consistency with
 | 
						|
  // previous named thread behavior always execute all pending tasks before
 | 
						|
  // shutdown (e.g. to make sure critical data is saved to disk).
 | 
						|
  // |background_task_runner_| is also passed to SQLitePersistentCookieStore.
 | 
						|
  scoped_refptr<base::SingleThreadTaskRunner> background_task_runner_;
 | 
						|
  scoped_refptr<base::SingleThreadTaskRunner> user_visible_task_runner_;
 | 
						|
  scoped_refptr<base::SingleThreadTaskRunner> user_blocking_task_runner_;
 | 
						|
 | 
						|
#if defined(USE_AURA)
 | 
						|
  std::unique_ptr<wm::WMState> wm_state_;
 | 
						|
#endif
 | 
						|
 | 
						|
#if defined(TOOLKIT_VIEWS)
 | 
						|
  std::unique_ptr<views::ViewsDelegate> views_delegate_;
 | 
						|
#if defined(OS_MAC)
 | 
						|
  std::unique_ptr<views::LayoutProvider> layout_provider_;
 | 
						|
#endif
 | 
						|
#endif  // defined(TOOLKIT_VIEWS)
 | 
						|
 | 
						|
  DISALLOW_COPY_AND_ASSIGN(AlloyBrowserMainParts);
 | 
						|
};
 | 
						|
 | 
						|
#endif  // CEF_LIBCEF_BROWSER_ALLOY_ALLOY_BROWSER_MAIN_H_
 |