mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Convert defined(OS_XXX) to BUILDFLAG(IS_XXX) in libcef
See https://crbug.com/1234043 for background.
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
#include "third_party/widevine/cdm/buildflags.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
#include "ui/ozone/buildflags.h"
|
||||
#if defined(USE_AURA) && BUILDFLAG(OZONE_PLATFORM_X11)
|
||||
#include "ui/events/devices/x11/touch_factory_x11.h"
|
||||
@@ -54,7 +54,7 @@
|
||||
#include "ui/views/widget/desktop_aura/desktop_screen.h"
|
||||
#include "ui/wm/core/wm_state.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#include "chrome/browser/chrome_browser_main_win.h"
|
||||
#include "chrome/browser/win/parental_controls.h"
|
||||
#include "components/os_crypt/os_crypt.h"
|
||||
@@ -62,7 +62,7 @@
|
||||
#endif // defined(USE_AURA)
|
||||
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
#if defined(OS_MAC)
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
#include "chrome/browser/ui/views/chrome_layout_provider.h"
|
||||
#include "chrome/browser/ui/views/chrome_views_delegate.h"
|
||||
#else
|
||||
@@ -70,11 +70,11 @@
|
||||
#endif
|
||||
#endif // defined(TOOLKIT_VIEWS)
|
||||
|
||||
#if defined(USE_AURA) && defined(OS_LINUX)
|
||||
#if defined(USE_AURA) && BUILDFLAG(IS_LINUX)
|
||||
#include "ui/base/ime/init/input_method_initializer.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
#include "libcef/browser/printing/print_dialog_linux.h"
|
||||
#endif
|
||||
|
||||
@@ -95,7 +95,7 @@ AlloyBrowserMainParts::~AlloyBrowserMainParts() {
|
||||
}
|
||||
|
||||
int AlloyBrowserMainParts::PreEarlyInitialization() {
|
||||
#if defined(USE_AURA) && defined(OS_LINUX)
|
||||
#if defined(USE_AURA) && BUILDFLAG(IS_LINUX)
|
||||
// TODO(linux): Consider using a real input method or
|
||||
// views::LinuxUI::SetInstance.
|
||||
ui::InitializeInputMethodForTesting();
|
||||
@@ -113,7 +113,7 @@ void AlloyBrowserMainParts::ToolkitInitialized() {
|
||||
#endif // defined(USE_AURA)
|
||||
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
#if defined(OS_MAC)
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
views_delegate_ = std::make_unique<ChromeViewsDelegate>();
|
||||
layout_provider_ = ChromeLayoutProvider::CreateLayoutProvider();
|
||||
#else
|
||||
@@ -123,13 +123,13 @@ void AlloyBrowserMainParts::ToolkitInitialized() {
|
||||
}
|
||||
|
||||
void AlloyBrowserMainParts::PreCreateMainMessageLoop() {
|
||||
#if defined(OS_LINUX)
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
#if defined(USE_AURA) && BUILDFLAG(OZONE_PLATFORM_X11)
|
||||
ui::TouchFactory::SetTouchDeviceListFromCommandLine();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// Initialize the OSCrypt.
|
||||
PrefService* local_state = g_browser_process->local_state();
|
||||
DCHECK(local_state);
|
||||
@@ -139,13 +139,13 @@ void AlloyBrowserMainParts::PreCreateMainMessageLoop() {
|
||||
// installer_util references strings that are normally compiled into
|
||||
// setup.exe. In Chrome, these strings are in the locale files.
|
||||
ChromeBrowserMainPartsWin::SetupInstallerUtilStrings();
|
||||
#endif // defined(OS_WIN)
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
media_router::ChromeMediaRouterFactory::DoPlatformInit();
|
||||
}
|
||||
|
||||
void AlloyBrowserMainParts::PostCreateMainMessageLoop() {
|
||||
#if defined(OS_LINUX)
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
printing::PrintingContextLinux::SetCreatePrintDialogFunction(
|
||||
&CefPrintDialogLinux::CreatePrintDialog);
|
||||
printing::PrintingContextLinux::SetPdfPaperSizeFunction(
|
||||
@@ -154,7 +154,7 @@ void AlloyBrowserMainParts::PostCreateMainMessageLoop() {
|
||||
}
|
||||
|
||||
int AlloyBrowserMainParts::PreCreateThreads() {
|
||||
#if defined(OS_WIN)
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
PlatformInitialize();
|
||||
#endif
|
||||
|
||||
@@ -211,7 +211,7 @@ int AlloyBrowserMainParts::PreMainMessageLoopRun() {
|
||||
|
||||
CefDevToolsManagerDelegate::StartHttpHandler(browser_context);
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// Windows parental controls calls can be slow, so we do an early init here
|
||||
// that calculates this value off of the UI thread.
|
||||
InitializeWinParentalControls();
|
||||
@@ -260,7 +260,7 @@ void AlloyBrowserMainParts::PostDestroyThreads() {
|
||||
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
views_delegate_.reset();
|
||||
#if defined(OS_MAC)
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
layout_provider_.reset();
|
||||
#endif
|
||||
#endif // defined(TOOLKIT_VIEWS)
|
||||
|
Reference in New Issue
Block a user