Compare commits

...

20 Commits
7151 ... 5672

Author SHA1 Message Date
Marshall Greenblatt
0b338553e5 win: cmake: VS2022 is now required (fixes #3516) 2023-06-01 13:07:54 +03:00
Marshall Greenblatt
0dd5c9267e win: Fix ambiguous max() usage (fixes #3524, see #3422) 2023-06-01 12:53:28 +03:00
Marshall Greenblatt
9c21cbcf48 win: Update msvs_env.bat to prefer VS2022 (fixes #3509) 2023-06-01 12:53:21 +03:00
Marshall Greenblatt
e3ac1237fe Update to Chromium version 113.0.5672.129 2023-05-31 08:02:23 +00:00
Marshall Greenblatt
525fa10dfc Update to Chromium version 113.0.5672.128 2023-05-26 13:37:56 +03:00
Nik Pavlov
f37637fada alloy: views: mac: Add three-finger-swipe navigation gesture support
This adds support for the three-finger-swipe navigation gesture with
Alloy/Views. The default implementation matches the Chrome runtime
and navigates the browser back/forward. We also add an Alloy/Views-
specific client callback in CefBrowserViewDelegate for optional
custom handling of the gesture event.
2023-05-26 12:48:38 +03:00
Marshall Greenblatt
8329f0ff9a Add missing include for std::numeric_limits (see #3422) 2023-05-26 12:45:58 +03:00
Vladimir Kharitonov
0782efb327 Update CefRange type to match gfx::Range (fixes #3422) 2023-05-26 12:45:44 +03:00
Marshall Greenblatt
ae645e2362 tools: Fix incorrect SharedMemoryRegion translation (fixes #3498) 2023-05-26 12:44:59 +03:00
Marshall Greenblatt
e452d8278b Update to Chromium version 113.0.5672.93 2023-05-09 08:08:51 +00:00
Marshall Greenblatt
327635f0dc Replace NOTREACHED() with DCHECK(false) in generated files (see #3500)
Restores the old behavior of assertion in Debug build only.
2023-05-08 19:26:07 +03:00
Marshall Greenblatt
4dbecb3301 Replace NOTREACHED() with DCHECK(false) (fixes #3500)
Restores the old behavior of assertion in Debug build only.
2023-05-08 18:37:28 +03:00
Marshall Greenblatt
153b1862fa cmake: win: Fix incorrect /STACK value (fixes #3491) 2023-05-06 15:39:50 +03:00
Marshall Greenblatt
fef20aa308 Update to Chromium version 113.0.5672.63 2023-04-27 13:12:00 +00:00
Nik Pavlov
fdb5b779be mac: views: Add CefWindowDelegate::OnWindowFullscreenTransition 2023-04-20 15:05:25 -04:00
Marshall Greenblatt
8c943a46f1 Update to Chromium version 113.0.5672.53 2023-04-20 13:50:27 +00:00
Marshall Greenblatt
c8aea0b594 Update to Chromium version 113.0.5672.37 2023-04-17 17:43:33 +00:00
Marshall Greenblatt
58803df744 Update to Chromium version 113.0.5672.35 2023-04-14 15:00:12 +00:00
Marshall Greenblatt
1bf717ce43 alloy: Fix incorrect rendering of PiP overlay on mouseover (fixes #3482)
Initialize the Chrome color mixer so that ColorProvider returns the expected
semi-transparent color for overlay background in video_overlay_window_views.cc
instead of the default opaque red color (kPlaceholderColor).
2023-04-11 14:38:49 -04:00
Marshall Greenblatt
ef3882bdef Update to Chromium version 113.0.5672.24 2023-04-06 13:02:34 -04:00
454 changed files with 1466 additions and 1231 deletions

View File

@@ -7,5 +7,6 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/113.0.5672.0'
'chromium_checkout': 'refs/tags/113.0.5672.129',
'depot_tools_checkout': '2075f733e8'
}

View File

@@ -13,7 +13,7 @@
#
# Linux: Ninja, GCC 7.5.0+, Unix Makefiles
# MacOS: Ninja, Xcode 12.2 to 13.0
# Windows: Ninja, Visual Studio 2019+
# Windows: Ninja, Visual Studio 2022
#
# Ninja is a cross-platform open-source tool for running fast builds using
# pre-installed platform toolchains (GNU, clang, Xcode or MSVC). It can be
@@ -54,9 +54,9 @@
# recommended.
#
# - Windows requirements:
# Visual Studio 2019 or newer building on Windows 10 or newer. Windows 10
# 64-bit is recommended. Newer versions will likely also work but may not have
# been tested.
# Visual Studio 2022 building on Windows 10 or newer. Windows 10/11 64-bit is
# recommended. Newer versions will likely also work but may not have been
# tested.
#
# BUILD EXAMPLES
#
@@ -96,35 +96,35 @@
# > ninja cefclient cefsimple
#
# To perform a Windows build using a 32-bit CEF binary distribution:
# Using the Visual Studio 2019 IDE:
# > cmake -G "Visual Studio 16" -A Win32 ..
# Using the Visual Studio 2022 IDE:
# > cmake -G "Visual Studio 17" -A Win32 ..
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
#
# Using Ninja with Visual Studio 2019 command-line tools:
# Using Ninja with Visual Studio 2022 command-line tools:
# (this path may be different depending on your Visual Studio installation)
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars32.bat"
# > "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars32.bat"
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
# > ninja cefclient cefsimple
#
# To perform a Windows build using a 64-bit CEF binary distribution:
# Using the Visual Studio 2019 IDE:
# > cmake -G "Visual Studio 16" -A x64 ..
# Using the Visual Studio 2022 IDE:
# > cmake -G "Visual Studio 17" -A x64 ..
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
#
# Using Ninja with Visual Studio 2019 command-line tools:
# Using Ninja with Visual Studio 2022 command-line tools:
# (this path may be different depending on your Visual Studio installation)
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat"
# > "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat"
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
# > ninja cefclient cefsimple
#
# To perform a Windows build using an ARM64 CEF binary distribution:
# Using the Visual Studio 2019 IDE:
# > cmake -G "Visual Studio 16" -A arm64 ..
# Using the Visual Studio 2022 IDE:
# > cmake -G "Visual Studio 17" -A arm64 ..
# Open build\cef.sln in Visual Studio and select Build > Build Solution.
#
# Using Ninja with Visual Studio 2019 command-line tools:
# Using Ninja with Visual Studio 2022 command-line tools:
# (this path may be different depending on your Visual Studio installation)
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
# > "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsamd64_arm64.bat"
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
# > ninja cefsimple
@@ -132,8 +132,8 @@
# Global setup.
#
# For VS2019 and Xcode 12+ support.
cmake_minimum_required(VERSION 3.19)
# For VS2022 and Xcode 12+ support.
cmake_minimum_required(VERSION 3.21)
# Only generate Debug and Release configuration types.
set(CMAKE_CONFIGURATION_TYPES Debug Release)

View File

@@ -461,7 +461,7 @@ if(OS_WINDOWS)
# only) uses fibers to switch to a 4MiB stack at runtime via
# CefRunWinMainWithPreferredStackSize().
list(APPEND CEF_EXE_LINKER_FLAGS
/STACK:0x8000
/STACK:0x80000
)
else()
# Increase the initial stack size to 8MiB from the default 1MiB.

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=e38c41a553d518abcd1b912d32281e99b93c4fd7$
// $hash=94e93810316b74e54eb315d97c6fc6f1cc0c9cc5$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_DELEGATE_CAPI_H_
@@ -120,6 +120,18 @@ typedef struct _cef_browser_view_delegate_t {
///
cef_chrome_toolbar_type_t(CEF_CALLBACK* get_chrome_toolbar_type)(
struct _cef_browser_view_delegate_t* self);
///
/// Called when |browser_view| receives a gesture command. Return true (1) to
/// handle (or disable) a |gesture_command| or false (0) to propagate the
/// gesture to the browser for default handling. This function will only be
/// called with the Alloy runtime. To handle these commands with the Chrome
/// runtime implement cef_command_handler_t::OnChromeCommand instead.
///
int(CEF_CALLBACK* on_gesture_command)(
struct _cef_browser_view_delegate_t* self,
struct _cef_browser_view_t* browser_view,
cef_gesture_command_t gesture_command);
} cef_browser_view_delegate_t;
#ifdef __cplusplus

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=9f0389a439e6787282880d53375369829adb6a3d$
// $hash=7201d268e16fc89f255b6ccd00d043f34fe77584$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_DELEGATE_CAPI_H_
@@ -139,7 +139,7 @@ typedef struct _cef_window_delegate_t {
///
/// Return true (1) if |window| should be created with standard window buttons
/// like close, minimize and zoom.
/// like close, minimize and zoom. This function is only supported on macOS.
///
int(CEF_CALLBACK* with_standard_window_buttons)(
struct _cef_window_delegate_t* self,
@@ -198,6 +198,17 @@ typedef struct _cef_window_delegate_t {
int(CEF_CALLBACK* on_key_event)(struct _cef_window_delegate_t* self,
struct _cef_window_t* window,
const cef_key_event_t* event);
///
/// Called when the |window| is transitioning to or from fullscreen mode. The
/// transition occurs in two stages, with |is_competed| set to false (0) when
/// the transition starts and true (1) when the transition completes. This
/// function is only supported on macOS.
///
void(CEF_CALLBACK* on_window_fullscreen_transition)(
struct _cef_window_delegate_t* self,
struct _cef_window_t* window,
int is_completed);
} cef_window_delegate_t;
#ifdef __cplusplus

View File

@@ -42,13 +42,13 @@
// way that may cause binary incompatibility with other builds. The universal
// hash value will change if any platform is affected whereas the platform hash
// values will change only if that particular platform is affected.
#define CEF_API_HASH_UNIVERSAL "149694d7fffd78ef85e127229819c69e2189ef32"
#define CEF_API_HASH_UNIVERSAL "509090f3945a0c74991845085f47240f11389523"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "6f31babeb3f7d2723af55fbd32868284694e4015"
#define CEF_API_HASH_PLATFORM "1c9ed9d86408e2d84cf88d4a8c865a2872eb40bd"
#elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "ff1bc603897dca8e100a1d4f9391ef4e49db02df"
#define CEF_API_HASH_PLATFORM "8cc9baa9653847ce54b2da84431d573bc3669505"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "7f1ef8d0456bdcaff80c4e15a9806c603f204455"
#define CEF_API_HASH_PLATFORM "741b042aa3d663f9e4ffad0b59d1bfb4faa03e70"
#endif
#ifdef __cplusplus

View File

@@ -3000,8 +3000,8 @@ typedef enum {
/// Structure representing a range.
///
typedef struct _cef_range_t {
int from;
int to;
uint32_t from;
uint32_t to;
} cef_range_t;
///
@@ -3488,6 +3488,14 @@ typedef enum {
CEF_PREFERENCES_TYPE_REQUEST_CONTEXT,
} cef_preferences_type_t;
///
/// Specifies the gesture commands.
///
typedef enum {
CEF_GESTURE_COMMAND_BACK,
CEF_GESTURE_COMMAND_FORWARD,
} cef_gesture_command_t;
#ifdef __cplusplus
}
#endif

View File

@@ -31,6 +31,8 @@
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_
#pragma once
#include <limits>
#include "include/internal/cef_string.h"
#include "include/internal/cef_string_list.h"
#include "include/internal/cef_types.h"
@@ -215,7 +217,12 @@ class CefRange : public cef_range_t {
public:
CefRange() : cef_range_t{} {}
CefRange(const cef_range_t& r) : cef_range_t(r) {}
CefRange(int from, int to) : cef_range_t{from, to} {}
CefRange(uint32_t from, uint32_t to) : cef_range_t{from, to} {}
static CefRange InvalidRange() {
return CefRange((std::numeric_limits<uint32_t>::max)(),
(std::numeric_limits<uint32_t>::max)());
}
void Set(int from_val, int to_val) { from = from_val, to = to_val; }
};

View File

@@ -114,6 +114,19 @@ class CefBrowserViewDelegate : public CefViewDelegate {
///
/*--cef(default_retval=CEF_CTT_NONE)--*/
virtual ChromeToolbarType GetChromeToolbarType() { return CEF_CTT_NONE; }
///
/// Called when |browser_view| receives a gesture command. Return true to
/// handle (or disable) a |gesture_command| or false to propagate the gesture
/// to the browser for default handling. This method will only be called with
/// the Alloy runtime. To handle these commands with the Chrome runtime
/// implement CefCommandHandler::OnChromeCommand instead.
///
/*--cef()--*/
virtual bool OnGestureCommand(CefRefPtr<CefBrowserView> browser_view,
cef_gesture_command_t gesture_command) {
return false;
}
};
#endif // CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_DELEGATE_H_

View File

@@ -130,7 +130,7 @@ class CefWindowDelegate : public CefPanelDelegate {
///
/// Return true if |window| should be created with standard window buttons
/// like close, minimize and zoom.
/// like close, minimize and zoom. This method is only supported on macOS.
///
/*--cef()--*/
virtual bool WithStandardWindowButtons(CefRefPtr<CefWindow> window) {
@@ -196,6 +196,16 @@ class CefWindowDelegate : public CefPanelDelegate {
const CefKeyEvent& event) {
return false;
}
///
/// Called when the |window| is transitioning to or from fullscreen mode. The
/// transition occurs in two stages, with |is_competed| set to false when the
/// transition starts and true when the transition completes.
/// This method is only supported on macOS.
///
/*--cef()--*/
virtual void OnWindowFullscreenTransition(CefRefPtr<CefWindow> window,
bool is_completed) {}
};
#endif // CEF_INCLUDE_VIEWS_CEF_WINDOW_DELEGATE_H_

View File

@@ -440,30 +440,30 @@ ProfileKey* AlloyBrowserContext::GetProfileKey() const {
policy::SchemaRegistryService*
AlloyBrowserContext::GetPolicySchemaRegistryService() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
policy::UserCloudPolicyManager*
AlloyBrowserContext::GetUserCloudPolicyManager() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
policy::ProfilePolicyConnector*
AlloyBrowserContext::GetProfilePolicyConnector() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
const policy::ProfilePolicyConnector*
AlloyBrowserContext::GetProfilePolicyConnector() const {
NOTREACHED();
DCHECK(false);
return nullptr;
}
bool AlloyBrowserContext::IsNewProfile() const {
NOTREACHED();
DCHECK(false);
return false;
}

View File

@@ -296,7 +296,7 @@ void AlloyBrowserHostImpl::CloseBrowser(bool force_close) {
bool AlloyBrowserHostImpl::TryCloseBrowser() {
if (!CEF_CURRENTLY_ON_UIT()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return false;
}
@@ -333,7 +333,7 @@ CefWindowHandle AlloyBrowserHostImpl::GetOpenerWindowHandle() {
double AlloyBrowserHostImpl::GetZoomLevel() {
// Verify that this method is being called on the UI thread.
if (!CEF_CURRENTLY_ON_UIT()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return 0;
}
@@ -416,7 +416,7 @@ void AlloyBrowserHostImpl::CloseDevTools() {
bool AlloyBrowserHostImpl::HasDevTools() {
if (!CEF_CURRENTLY_ON_UIT()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return false;
}
@@ -481,7 +481,7 @@ void AlloyBrowserHostImpl::WasResized() {
void AlloyBrowserHostImpl::WasHidden(bool hidden) {
if (!IsWindowless()) {
NOTREACHED() << "Window rendering is not disabled";
DCHECK(false) << "Window rendering is not disabled";
return;
}
@@ -498,7 +498,7 @@ void AlloyBrowserHostImpl::WasHidden(bool hidden) {
void AlloyBrowserHostImpl::NotifyScreenInfoChanged() {
if (!IsWindowless()) {
NOTREACHED() << "Window rendering is not disabled";
DCHECK(false) << "Window rendering is not disabled";
return;
}
@@ -516,7 +516,7 @@ void AlloyBrowserHostImpl::NotifyScreenInfoChanged() {
void AlloyBrowserHostImpl::Invalidate(PaintElementType type) {
if (!IsWindowless()) {
NOTREACHED() << "Window rendering is not disabled";
DCHECK(false) << "Window rendering is not disabled";
return;
}
@@ -533,7 +533,7 @@ void AlloyBrowserHostImpl::Invalidate(PaintElementType type) {
void AlloyBrowserHostImpl::SendExternalBeginFrame() {
if (!IsWindowless()) {
NOTREACHED() << "Window rendering is not disabled";
DCHECK(false) << "Window rendering is not disabled";
return;
}
@@ -551,7 +551,7 @@ void AlloyBrowserHostImpl::SendExternalBeginFrame() {
void AlloyBrowserHostImpl::SendTouchEvent(const CefTouchEvent& event) {
if (!IsWindowless()) {
NOTREACHED() << "Window rendering is not disabled";
DCHECK(false) << "Window rendering is not disabled";
return;
}
@@ -582,7 +582,7 @@ void AlloyBrowserHostImpl::SendCaptureLostEvent() {
int AlloyBrowserHostImpl::GetWindowlessFrameRate() {
// Verify that this method is being called on the UI thread.
if (!CEF_CURRENTLY_ON_UIT()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return 0;
}
@@ -795,7 +795,7 @@ void AlloyBrowserHostImpl::ImeSetComposition(
const CefRange& replacement_range,
const CefRange& selection_range) {
if (!IsWindowless()) {
NOTREACHED() << "Window rendering is not disabled";
DCHECK(false) << "Window rendering is not disabled";
return;
}
@@ -817,7 +817,7 @@ void AlloyBrowserHostImpl::ImeCommitText(const CefString& text,
const CefRange& replacement_range,
int relative_cursor_pos) {
if (!IsWindowless()) {
NOTREACHED() << "Window rendering is not disabled";
DCHECK(false) << "Window rendering is not disabled";
return;
}
@@ -836,7 +836,7 @@ void AlloyBrowserHostImpl::ImeCommitText(const CefString& text,
void AlloyBrowserHostImpl::ImeFinishComposingText(bool keep_selection) {
if (!IsWindowless()) {
NOTREACHED() << "Window rendering is not disabled";
DCHECK(false) << "Window rendering is not disabled";
return;
}
@@ -854,7 +854,7 @@ void AlloyBrowserHostImpl::ImeFinishComposingText(bool keep_selection) {
void AlloyBrowserHostImpl::ImeCancelComposition() {
if (!IsWindowless()) {
NOTREACHED() << "Window rendering is not disabled";
DCHECK(false) << "Window rendering is not disabled";
return;
}
@@ -875,7 +875,7 @@ void AlloyBrowserHostImpl::DragTargetDragEnter(
const CefMouseEvent& event,
CefBrowserHost::DragOperationsMask allowed_ops) {
if (!IsWindowless()) {
NOTREACHED() << "Window rendering is not disabled";
DCHECK(false) << "Window rendering is not disabled";
return;
}
@@ -887,7 +887,7 @@ void AlloyBrowserHostImpl::DragTargetDragEnter(
}
if (!drag_data.get()) {
NOTREACHED();
DCHECK(false);
return;
}
@@ -900,7 +900,7 @@ void AlloyBrowserHostImpl::DragTargetDragOver(
const CefMouseEvent& event,
CefBrowserHost::DragOperationsMask allowed_ops) {
if (!IsWindowless()) {
NOTREACHED() << "Window rendering is not disabled";
DCHECK(false) << "Window rendering is not disabled";
return;
}
@@ -918,7 +918,7 @@ void AlloyBrowserHostImpl::DragTargetDragOver(
void AlloyBrowserHostImpl::DragTargetDragLeave() {
if (!IsWindowless()) {
NOTREACHED() << "Window rendering is not disabled";
DCHECK(false) << "Window rendering is not disabled";
return;
}
@@ -936,7 +936,7 @@ void AlloyBrowserHostImpl::DragTargetDragLeave() {
void AlloyBrowserHostImpl::DragTargetDrop(const CefMouseEvent& event) {
if (!IsWindowless()) {
NOTREACHED() << "Window rendering is not disabled";
DCHECK(false) << "Window rendering is not disabled";
return;
}
@@ -953,7 +953,7 @@ void AlloyBrowserHostImpl::DragTargetDrop(const CefMouseEvent& event) {
void AlloyBrowserHostImpl::DragSourceSystemDragEnded() {
if (!IsWindowless()) {
NOTREACHED() << "Window rendering is not disabled";
DCHECK(false) << "Window rendering is not disabled";
return;
}
@@ -974,7 +974,7 @@ void AlloyBrowserHostImpl::DragSourceEndedAt(
int y,
CefBrowserHost::DragOperationsMask op) {
if (!IsWindowless()) {
NOTREACHED() << "Window rendering is not disabled";
DCHECK(false) << "Window rendering is not disabled";
return;
}
@@ -1004,7 +1004,7 @@ void AlloyBrowserHostImpl::SetAudioMuted(bool mute) {
bool AlloyBrowserHostImpl::IsAudioMuted() {
if (!CEF_CURRENTLY_ON_UIT()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return false;
}
if (!web_contents()) {

View File

@@ -29,6 +29,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/media/router/chrome_media_router_factory.h"
#include "chrome/browser/net/system_network_context_manager.h"
#include "chrome/browser/ui/color/chrome_color_mixers.h"
#include "chrome/browser/ui/javascript_dialogs/chrome_javascript_app_modal_dialog_view_factory.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/common/chrome_switches.h"
@@ -187,6 +188,11 @@ void AlloyBrowserMainParts::ToolkitInitialized() {
#else
InstallChromeJavaScriptAppModalDialogViewFactory();
#endif
// On GTK that builds the native theme that, in turn, adds the GTK core color
// mixer; core mixers should all be added before we add chrome mixers.
ui::ColorProviderManager::Get().AppendColorProviderInitializer(
base::BindRepeating(AddChromeColorMixers));
}
void AlloyBrowserMainParts::PreCreateMainMessageLoop() {

View File

@@ -219,7 +219,7 @@ void CefBrowserPlatformDelegateAlloy::CreateExtensionHost(
extension, web_contents_, url, host_type);
// Load will be triggered by ProcessManager::CreateBackgroundHost.
} else {
NOTREACHED() << " Unsupported extension host type: " << host_type;
DCHECK(false) << " Unsupported extension host type: " << host_type;
}
}

View File

@@ -136,27 +136,27 @@ void ChromeBrowserProcessAlloy::CleanupOnUIThread() {
}
void ChromeBrowserProcessAlloy::EndSession() {
NOTREACHED();
DCHECK(false);
}
void ChromeBrowserProcessAlloy::FlushLocalStateAndReply(
base::OnceClosure reply) {
NOTREACHED();
DCHECK(false);
}
device::GeolocationManager* ChromeBrowserProcessAlloy::geolocation_manager() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
metrics_services_manager::MetricsServicesManager*
ChromeBrowserProcessAlloy::GetMetricsServicesManager() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
metrics::MetricsService* ChromeBrowserProcessAlloy::metrics_service() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
@@ -168,7 +168,7 @@ ChromeBrowserProcessAlloy::system_network_context_manager() {
network::NetworkQualityTracker*
ChromeBrowserProcessAlloy::network_quality_tracker() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
@@ -197,17 +197,17 @@ PrefService* ChromeBrowserProcessAlloy::local_state() {
scoped_refptr<network::SharedURLLoaderFactory>
ChromeBrowserProcessAlloy::shared_url_loader_factory() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
variations::VariationsService* ChromeBrowserProcessAlloy::variations_service() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
BrowserProcessPlatformPart* ChromeBrowserProcessAlloy::platform_part() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
@@ -218,19 +218,19 @@ ChromeBrowserProcessAlloy::extension_event_router_forwarder() {
}
NotificationUIManager* ChromeBrowserProcessAlloy::notification_ui_manager() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
NotificationPlatformBridge*
ChromeBrowserProcessAlloy::notification_platform_bridge() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
void ChromeBrowserProcessAlloy::SetGeolocationManager(
std::unique_ptr<device::GeolocationManager> geolocation_manager) {
NOTREACHED();
DCHECK(false);
}
policy::ChromeBrowserPolicyConnector*
@@ -247,25 +247,25 @@ policy::PolicyService* ChromeBrowserProcessAlloy::policy_service() {
}
IconManager* ChromeBrowserProcessAlloy::icon_manager() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
GpuModeManager* ChromeBrowserProcessAlloy::gpu_mode_manager() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
void ChromeBrowserProcessAlloy::CreateDevToolsProtocolHandler() {
NOTREACHED();
DCHECK(false);
}
void ChromeBrowserProcessAlloy::CreateDevToolsAutoOpener() {
NOTREACHED();
DCHECK(false);
}
bool ChromeBrowserProcessAlloy::IsShuttingDown() {
NOTREACHED();
DCHECK(false);
return false;
}
@@ -294,7 +294,7 @@ ChromeBrowserProcessAlloy::background_printing_manager() {
IntranetRedirectDetector*
ChromeBrowserProcessAlloy::intranet_redirect_detector() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
@@ -309,29 +309,29 @@ void ChromeBrowserProcessAlloy::SetApplicationLocale(
}
DownloadStatusUpdater* ChromeBrowserProcessAlloy::download_status_updater() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
DownloadRequestLimiter* ChromeBrowserProcessAlloy::download_request_limiter() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
BackgroundModeManager* ChromeBrowserProcessAlloy::background_mode_manager() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
void ChromeBrowserProcessAlloy::set_background_mode_manager_for_test(
std::unique_ptr<BackgroundModeManager> manager) {
NOTREACHED();
DCHECK(false);
}
#endif
StatusTray* ChromeBrowserProcessAlloy::status_tray() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
@@ -342,12 +342,12 @@ ChromeBrowserProcessAlloy::safe_browsing_service() {
subresource_filter::RulesetService*
ChromeBrowserProcessAlloy::subresource_filter_ruleset_service() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
StartupData* ChromeBrowserProcessAlloy::startup_data() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
@@ -379,55 +379,55 @@ ChromeBrowserProcessAlloy::component_updater() {
MediaFileSystemRegistry*
ChromeBrowserProcessAlloy::media_file_system_registry() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
WebRtcLogUploader* ChromeBrowserProcessAlloy::webrtc_log_uploader() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
network_time::NetworkTimeTracker*
ChromeBrowserProcessAlloy::network_time_tracker() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
gcm::GCMDriver* ChromeBrowserProcessAlloy::gcm_driver() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
resource_coordinator::TabManager* ChromeBrowserProcessAlloy::GetTabManager() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
resource_coordinator::ResourceCoordinatorParts*
ChromeBrowserProcessAlloy::resource_coordinator_parts() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
BuildState* ChromeBrowserProcessAlloy::GetBuildState() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
SerialPolicyAllowedPorts*
ChromeBrowserProcessAlloy::serial_policy_allowed_ports() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
HidPolicyAllowedDevices*
ChromeBrowserProcessAlloy::hid_policy_allowed_devices() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
HidSystemTrayIcon* ChromeBrowserProcessAlloy::hid_system_tray_icon() {
NOTREACHED();
DCHECK(false);
return nullptr;
}

View File

@@ -54,7 +54,7 @@ bool ChromeProfileAlloy::IsOffTheRecord() const {
}
const Profile::OTRProfileID& ChromeProfileAlloy::GetOTRProfileID() const {
NOTREACHED();
DCHECK(false);
static base::NoDestructor<Profile::OTRProfileID> otr_profile_id(
Profile::OTRProfileID::PrimaryID());
return *otr_profile_id;
@@ -68,19 +68,19 @@ variations::VariationsClient* ChromeProfileAlloy::GetVariationsClient() {
}
scoped_refptr<base::SequencedTaskRunner> ChromeProfileAlloy::GetIOTaskRunner() {
NOTREACHED();
DCHECK(false);
return scoped_refptr<base::SequencedTaskRunner>();
}
std::string ChromeProfileAlloy::GetProfileUserName() const {
NOTREACHED();
DCHECK(false);
return std::string();
}
Profile* ChromeProfileAlloy::GetOffTheRecordProfile(
const Profile::OTRProfileID& otr_profile_id,
bool create_if_needed) {
NOTREACHED();
DCHECK(false);
return nullptr;
}
@@ -89,7 +89,7 @@ std::vector<Profile*> ChromeProfileAlloy::GetAllOffTheRecordProfiles() {
}
void ChromeProfileAlloy::DestroyOffTheRecordProfile(Profile* otr_profile) {
NOTREACHED();
DCHECK(false);
}
bool ChromeProfileAlloy::HasOffTheRecordProfile(
@@ -115,17 +115,17 @@ bool ChromeProfileAlloy::IsChild() const {
ExtensionSpecialStoragePolicy*
ChromeProfileAlloy::GetExtensionSpecialStoragePolicy() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
bool ChromeProfileAlloy::IsSameOrParent(Profile* profile) {
NOTREACHED();
DCHECK(false);
return false;
}
base::Time ChromeProfileAlloy::GetStartTime() const {
NOTREACHED();
DCHECK(false);
return base::Time();
}
@@ -139,30 +139,30 @@ void ChromeProfileAlloy::set_last_selected_directory(
}
GURL ChromeProfileAlloy::GetHomePage() {
NOTREACHED();
DCHECK(false);
return GURL();
}
bool ChromeProfileAlloy::WasCreatedByVersionOrLater(
const std::string& version) {
NOTREACHED();
DCHECK(false);
return false;
}
base::Time ChromeProfileAlloy::GetCreationTime() const {
NOTREACHED();
DCHECK(false);
return base::Time();
}
void ChromeProfileAlloy::SetCreationTimeForTesting(base::Time creation_time) {
NOTREACHED();
DCHECK(false);
}
void ChromeProfileAlloy::RecordPrimaryMainFrameNavigation() {
NOTREACHED();
DCHECK(false);
}
bool ChromeProfileAlloy::IsSignedIn() {
NOTREACHED();
DCHECK(false);
return false;
}

View File

@@ -29,7 +29,7 @@ class AlloyConstrainedWindowViewsClient
if (auto browser = GetPreferredBrowser(parent)) {
return browser->platform_delegate()->GetWebContentsModalDialogHost();
}
NOTREACHED();
DCHECK(false);
return nullptr;
}
@@ -73,4 +73,4 @@ class AlloyConstrainedWindowViewsClient
std::unique_ptr<constrained_window::ConstrainedWindowViewsClient>
CreateAlloyConstrainedWindowViewsClient() {
return std::make_unique<AlloyConstrainedWindowViewsClient>();
}
}

View File

@@ -33,7 +33,7 @@ bool AlloyWebContentsDialogHelper::IsWebContentsVisible(
} else if (auto native_view = web_contents->GetNativeView()) {
return platform_util::IsVisible(native_view);
}
NOTREACHED();
DCHECK(false);
return false;
}
@@ -51,7 +51,7 @@ gfx::NativeView AlloyWebContentsDialogHelper::GetHostView() const {
if (auto widget = browser_delegate_->GetWindowWidget()) {
return widget->GetNativeView();
}
NOTREACHED();
DCHECK(false);
return gfx::NativeView();
}
@@ -66,7 +66,7 @@ gfx::AcceleratedWidget AlloyWebContentsDialogHelper::GetHostWidget() const {
return parent_widget;
}
#endif // defined(USE_AURA)
NOTREACHED();
DCHECK(false);
return gfx::kNullAcceleratedWidget;
}

View File

@@ -77,6 +77,6 @@ CefRefPtr<CefFrameHostImpl> CefBrowserFrame::GetFrameHost(
return browser->browser_info()->GetFrameForHost(rfh, nullptr,
prefer_speculative);
}
NOTREACHED();
DCHECK(false);
return nullptr;
}

View File

@@ -493,7 +493,7 @@ void CefBrowserHostBase::GetNavigationEntries(
CefRefPtr<CefNavigationEntry> CefBrowserHostBase::GetVisibleNavigationEntry() {
if (!CEF_CURRENTLY_ON_UIT()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return nullptr;
}

View File

@@ -53,20 +53,20 @@ bool CefBrowserHost::CreateBrowser(
CefRefPtr<CefRequestContext> request_context) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return false;
}
// Verify that the settings structure is a valid size.
if (settings.size != sizeof(cef_browser_settings_t)) {
NOTREACHED() << "invalid CefBrowserSettings structure size";
DCHECK(false) << "invalid CefBrowserSettings structure size";
return false;
}
// Verify windowless rendering requirements.
if (windowInfo.windowless_rendering_enabled &&
!client->GetRenderHandler().get()) {
NOTREACHED() << "CefRenderHandler implementation is required";
DCHECK(false) << "CefRenderHandler implementation is required";
return false;
}
@@ -110,13 +110,13 @@ CefRefPtr<CefBrowser> CefBrowserHost::CreateBrowserSync(
CefRefPtr<CefRequestContext> request_context) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return nullptr;
}
// Verify that the settings structure is a valid size.
if (settings.size != sizeof(cef_browser_settings_t)) {
NOTREACHED() << "invalid CefBrowserSettings structure size";
DCHECK(false) << "invalid CefBrowserSettings structure size";
return nullptr;
}
@@ -134,7 +134,7 @@ CefRefPtr<CefBrowser> CefBrowserHost::CreateBrowserSync(
// Verify windowless rendering requirements.
if (windowInfo.windowless_rendering_enabled &&
!client->GetRenderHandler().get()) {
NOTREACHED() << "CefRenderHandler implementation is required";
DCHECK(false) << "CefRenderHandler implementation is required";
return nullptr;
}

View File

@@ -358,7 +358,7 @@ void CefBrowserInfoManager::RemoveBrowserInfo(
}
}
NOTREACHED();
DCHECK(false);
}
void CefBrowserInfoManager::DestroyAllBrowsers() {

View File

@@ -20,14 +20,14 @@ CefBrowserPlatformDelegate::~CefBrowserPlatformDelegate() {
content::WebContents* CefBrowserPlatformDelegate::CreateWebContents(
CefBrowserCreateParams& create_params,
bool& own_web_contents) {
NOTREACHED();
DCHECK(false);
return nullptr;
}
void CefBrowserPlatformDelegate::CreateViewForWebContents(
content::WebContentsView** view,
content::RenderViewHostDelegateView** delegate_view) {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::WebContentsCreated(
@@ -48,7 +48,7 @@ void CefBrowserPlatformDelegate::AddNewContents(
const blink::mojom::WindowFeatures& window_features,
bool user_gesture,
bool* was_blocked) {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::WebContentsDestroyed(
@@ -87,12 +87,12 @@ void CefBrowserPlatformDelegate::CreateExtensionHost(
const extensions::Extension* extension,
const GURL& url,
extensions::mojom::ViewType host_type) {
NOTREACHED();
DCHECK(false);
}
extensions::ExtensionHost* CefBrowserPlatformDelegate::GetExtensionHost()
const {
NOTREACHED();
DCHECK(false);
return nullptr;
}
@@ -109,32 +109,32 @@ void CefBrowserPlatformDelegate::BrowserDestroyed(CefBrowserHostBase* browser) {
}
bool CefBrowserPlatformDelegate::CreateHostWindow() {
NOTREACHED();
DCHECK(false);
return true;
}
void CefBrowserPlatformDelegate::CloseHostWindow() {
NOTREACHED();
DCHECK(false);
}
CefWindowHandle CefBrowserPlatformDelegate::GetHostWindowHandle() const {
NOTREACHED();
DCHECK(false);
return kNullWindowHandle;
}
views::Widget* CefBrowserPlatformDelegate::GetWindowWidget() const {
NOTREACHED();
DCHECK(false);
return nullptr;
}
CefRefPtr<CefBrowserView> CefBrowserPlatformDelegate::GetBrowserView() const {
NOTREACHED();
DCHECK(false);
return nullptr;
}
web_modal::WebContentsModalDialogHost*
CefBrowserPlatformDelegate::GetWebContentsModalDialogHost() const {
NOTREACHED();
DCHECK(false);
return nullptr;
}
@@ -150,12 +150,12 @@ void CefBrowserPlatformDelegate::PopupBrowserCreated(
bool is_devtools) {}
SkColor CefBrowserPlatformDelegate::GetBackgroundColor() const {
NOTREACHED();
DCHECK(false);
return SkColor();
}
void CefBrowserPlatformDelegate::WasResized() {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::SendKeyEvent(const CefKeyEvent& event) {
@@ -200,7 +200,7 @@ void CefBrowserPlatformDelegate::SizeTo(int width, int height) {}
gfx::Point CefBrowserPlatformDelegate::GetScreenPoint(
const gfx::Point& view,
bool want_dip_coords) const {
NOTREACHED();
DCHECK(false);
return gfx::Point();
}
@@ -210,7 +210,7 @@ void CefBrowserPlatformDelegate::ViewText(const std::string& text) {
bool CefBrowserPlatformDelegate::HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
NOTREACHED();
DCHECK(false);
return false;
}
@@ -227,7 +227,7 @@ bool CefBrowserPlatformDelegate::IsNeverComposited(
CefEventHandle CefBrowserPlatformDelegate::GetEventHandle(
const content::NativeWebKeyboardEvent& event) const {
NOTREACHED();
DCHECK(false);
return kNullEventHandle;
}
@@ -256,28 +256,28 @@ bool CefBrowserPlatformDelegate::HasExternalParent() const {
}
void CefBrowserPlatformDelegate::WasHidden(bool hidden) {
NOTREACHED();
DCHECK(false);
}
bool CefBrowserPlatformDelegate::IsHidden() const {
NOTREACHED();
DCHECK(false);
return false;
}
void CefBrowserPlatformDelegate::NotifyScreenInfoChanged() {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::Invalidate(cef_paint_element_type_t type) {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::SendExternalBeginFrame() {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::SetWindowlessFrameRate(int frame_rate) {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::ImeSetComposition(
@@ -285,43 +285,43 @@ void CefBrowserPlatformDelegate::ImeSetComposition(
const std::vector<CefCompositionUnderline>& underlines,
const CefRange& replacement_range,
const CefRange& selection_range) {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::ImeCommitText(
const CefString& text,
const CefRange& replacement_range,
int relative_cursor_pos) {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::ImeFinishComposingText(bool keep_selection) {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::ImeCancelComposition() {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::DragTargetDragEnter(
CefRefPtr<CefDragData> drag_data,
const CefMouseEvent& event,
cef_drag_operations_mask_t allowed_ops) {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::DragTargetDragOver(
const CefMouseEvent& event,
cef_drag_operations_mask_t allowed_ops) {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::DragTargetDragLeave() {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::DragTargetDrop(const CefMouseEvent& event) {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::StartDragging(
@@ -331,33 +331,33 @@ void CefBrowserPlatformDelegate::StartDragging(
const gfx::Vector2d& image_offset,
const blink::mojom::DragEventSourceInfo& event_info,
content::RenderWidgetHostImpl* source_rwh) {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::UpdateDragCursor(
ui::mojom::DragOperation operation) {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::DragSourceEndedAt(
int x,
int y,
cef_drag_operations_mask_t op) {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::DragSourceSystemDragEnded() {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::AccessibilityEventReceived(
const content::AXEventNotificationDetails& eventData) {
NOTREACHED();
DCHECK(false);
}
void CefBrowserPlatformDelegate::AccessibilityLocationChangesReceived(
const std::vector<content::AXLocationChangeNotificationDetails>& locData) {
NOTREACHED();
DCHECK(false);
}
gfx::Point CefBrowserPlatformDelegate::GetDialogPosition(

View File

@@ -138,6 +138,6 @@ std::unique_ptr<CefBrowserPlatformDelegate> CefBrowserPlatformDelegate::Create(
return std::move(native_delegate);
}
NOTREACHED();
DCHECK(false);
return nullptr;
}

View File

@@ -56,7 +56,7 @@ CefBrowserPlatformDelegateChrome::GetWebContentsModalDialogHost() const {
ChromeWebModalDialogManagerDelegate* manager = chrome_browser_;
return manager->GetWebContentsModalDialogHost();
}
NOTREACHED();
DCHECK(false);
return nullptr;
}
@@ -143,6 +143,6 @@ gfx::NativeWindow CefBrowserPlatformDelegateChrome::GetNativeWindow() const {
if (chrome_browser_ && chrome_browser_->window()) {
return chrome_browser_->window()->GetNativeWindow();
}
NOTREACHED();
DCHECK(false);
return gfx::NativeWindow();
}

View File

@@ -299,7 +299,7 @@ bool CefInitialize(const CefMainArgs& args,
}
if (settings.size != sizeof(cef_settings_t)) {
NOTREACHED() << "invalid CefSettings structure size";
DCHECK(false) << "invalid CefSettings structure size";
return false;
}
@@ -314,13 +314,13 @@ bool CefInitialize(const CefMainArgs& args,
void CefShutdown() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return;
}
// Must always be called on the same thread as Initialize.
if (!g_context->OnInitThread()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return;
}
@@ -335,13 +335,13 @@ void CefShutdown() {
void CefDoMessageLoopWork() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return;
}
// Must always be called on the same thread as Initialize.
if (!g_context->OnInitThread()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return;
}
@@ -352,13 +352,13 @@ void CefDoMessageLoopWork() {
void CefRunMessageLoop() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return;
}
// Must always be called on the same thread as Initialize.
if (!g_context->OnInitThread()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return;
}
@@ -368,13 +368,13 @@ void CefRunMessageLoop() {
void CefQuitMessageLoop() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return;
}
// Must always be called on the same thread as Initialize.
if (!g_context->OnInitThread()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return;
}
@@ -403,7 +403,7 @@ int CefRunMainWithPreferredStackSize(mainPtr main, int argc, char* argv[]) {
void CefSetOSModalLoop(bool osModalLoop) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return;
}

View File

@@ -227,7 +227,7 @@ class CefDevToolsFrontend::NetworkResourceLoader
bindings_->loaders_.erase(bindings_->loaders_.find(this));
}
void OnRetry(base::OnceClosure start_retry) override { NOTREACHED(); }
void OnRetry(base::OnceClosure start_retry) override { DCHECK(false); }
const int stream_id_;
CefDevToolsFrontend* const bindings_;

View File

@@ -94,7 +94,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
base::FilePath dir_path = suggested_path.DirName();
if (!base::DirectoryExists(dir_path) &&
!base::CreateDirectory(dir_path)) {
NOTREACHED() << "failed to create the download directory";
DCHECK(false) << "failed to create the download directory";
suggested_path.clear();
}
}

View File

@@ -54,7 +54,7 @@ CefRefPtr<CefExtensionHandler> CefExtensionImpl::GetHandler() {
CefRefPtr<CefRequestContext> CefExtensionImpl::GetLoaderContext() {
if (!CEF_CURRENTLY_ON_UIT()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return nullptr;
}
@@ -63,7 +63,7 @@ CefRefPtr<CefRequestContext> CefExtensionImpl::GetLoaderContext() {
bool CefExtensionImpl::IsLoaded() {
if (!CEF_CURRENTLY_ON_UIT()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return false;
}

View File

@@ -26,7 +26,7 @@ void CefExtensionHostDelegate::OnMainFrameCreatedForBackgroundPage(
content::JavaScriptDialogManager*
CefExtensionHostDelegate::GetJavaScriptDialogManager() {
// Never routed here from AlloyBrowserHostImpl.
NOTREACHED();
DCHECK(false);
return nullptr;
}
@@ -46,7 +46,7 @@ void CefExtensionHostDelegate::ProcessMediaAccessRequest(
content::MediaResponseCallback callback,
const Extension* extension) {
// Never routed here from AlloyBrowserHostImpl.
NOTREACHED();
DCHECK(false);
}
bool CefExtensionHostDelegate::CheckMediaAccessPermission(
@@ -55,18 +55,18 @@ bool CefExtensionHostDelegate::CheckMediaAccessPermission(
blink::mojom::MediaStreamType type,
const Extension* extension) {
// Never routed here from AlloyBrowserHostImpl.
NOTREACHED();
DCHECK(false);
return false;
}
content::PictureInPictureResult CefExtensionHostDelegate::EnterPictureInPicture(
content::WebContents* web_contents) {
NOTREACHED();
DCHECK(false);
return content::PictureInPictureResult::kNotSupported;
}
void CefExtensionHostDelegate::ExitPictureInPicture() {
NOTREACHED();
DCHECK(false);
}
} // namespace extensions

View File

@@ -500,20 +500,20 @@ void CefExtensionSystem::InstallUpdate(
const base::FilePath& temp_dir,
bool install_immediately,
InstallUpdateCallback install_update_callback) {
NOTREACHED();
DCHECK(false);
base::DeletePathRecursively(temp_dir);
}
void CefExtensionSystem::PerformActionBasedOnOmahaAttributes(
const std::string& extension_id,
const base::Value& attributes) {
NOTREACHED();
DCHECK(false);
}
bool CefExtensionSystem::FinishDelayedInstallationIfReady(
const std::string& extension_id,
bool install_immediately) {
NOTREACHED();
DCHECK(false);
return false;
}

View File

@@ -28,7 +28,7 @@ CefExtensionsAPIClient::CefExtensionsAPIClient() {}
AppViewGuestDelegate* CefExtensionsAPIClient::CreateAppViewGuestDelegate()
const {
// TODO(extensions): Implement to support Apps.
NOTREACHED();
DCHECK(false);
return nullptr;
}

View File

@@ -246,7 +246,7 @@ ProcessManagerDelegate* CefExtensionsBrowserClient::GetProcessManagerDelegate()
std::unique_ptr<ExtensionHostDelegate>
CefExtensionsBrowserClient::CreateExtensionHostDelegate() {
// CEF does not use the ExtensionHost constructor that calls this method.
NOTREACHED();
DCHECK(false);
return std::unique_ptr<ExtensionHostDelegate>();
}
@@ -353,7 +353,7 @@ std::unique_ptr<RuntimeAPIDelegate>
CefExtensionsBrowserClient::CreateRuntimeAPIDelegate(
content::BrowserContext* context) const {
// TODO(extensions): Implement to support Apps.
NOTREACHED();
DCHECK(false);
return nullptr;
}
@@ -378,7 +378,7 @@ void CefExtensionsBrowserClient::BroadcastEventToRenderers(
ExtensionCache* CefExtensionsBrowserClient::GetExtensionCache() {
// Only used by Chrome via ExtensionService.
NOTREACHED();
DCHECK(false);
return nullptr;
}

View File

@@ -34,19 +34,19 @@ void CefValueStore::set_status_code(StatusCode status_code) {
size_t CefValueStore::GetBytesInUse(const std::string& key) {
// Let SettingsStorageQuotaEnforcer implement this.
NOTREACHED() << "Not implemented";
DCHECK(false) << "Not implemented";
return 0;
}
size_t CefValueStore::GetBytesInUse(const std::vector<std::string>& keys) {
// Let SettingsStorageQuotaEnforcer implement this.
NOTREACHED() << "Not implemented";
DCHECK(false) << "Not implemented";
return 0;
}
size_t CefValueStore::GetBytesInUse() {
// Let SettingsStorageQuotaEnforcer implement this.
NOTREACHED() << "Not implemented";
DCHECK(false) << "Not implemented";
return 0;
}

View File

@@ -491,7 +491,7 @@ CefFileDialogManager::MaybeRunDelegate(
mode = FILE_DIALOG_SAVE;
break;
default:
NOTREACHED();
DCHECK(false);
break;
}

View File

@@ -227,12 +227,12 @@ CefRefPtr<CefBrowser> CefFrameHostImpl::GetBrowser() {
}
CefRefPtr<CefV8Context> CefFrameHostImpl::GetV8Context() {
NOTREACHED() << "GetV8Context cannot be called from the browser process";
DCHECK(false) << "GetV8Context cannot be called from the browser process";
return nullptr;
}
void CefFrameHostImpl::VisitDOM(CefRefPtr<CefDOMVisitor> visitor) {
NOTREACHED() << "VisitDOM cannot be called from the browser process";
DCHECK(false) << "VisitDOM cannot be called from the browser process";
}
CefRefPtr<CefURLRequest> CefFrameHostImpl::CreateURLRequest(
@@ -243,7 +243,7 @@ CefRefPtr<CefURLRequest> CefFrameHostImpl::CreateURLRequest(
}
if (!CefTaskRunnerImpl::GetCurrentTaskRunner()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return nullptr;
}

View File

@@ -46,7 +46,7 @@ CefRefPtr<CefPreferenceManager>
CefPreferenceManager::GetGlobalPreferenceManager() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return nullptr;
}

View File

@@ -26,7 +26,7 @@ SkColorType GetSkColorType(cef_color_type_t color_type) {
break;
}
NOTREACHED();
DCHECK(false);
return kUnknown_SkColorType;
}
@@ -42,7 +42,7 @@ SkAlphaType GetSkAlphaType(cef_alpha_type_t alpha_type) {
break;
}
NOTREACHED();
DCHECK(false);
return kUnknown_SkAlphaType;
}

View File

@@ -230,12 +230,12 @@ bool CefMainRunner::Initialize(CefSettings* settings,
const int exit_code =
ContentMainInitialize(args, windows_sandbox_info, &settings->no_sandbox);
if (exit_code >= 0) {
NOTREACHED() << "ContentMainInitialize failed";
DCHECK(false) << "ContentMainInitialize failed";
return false;
}
if (!ContentMainRun(initialized, std::move(context_initialized))) {
NOTREACHED() << "ContentMainRun failed";
DCHECK(false) << "ContentMainRun failed";
return false;
}

View File

@@ -130,7 +130,7 @@ class CefRegistrationImpl : public CefRegistration,
case blink::mojom::PresentationConnectionState::TERMINATED:
return CEF_MRCS_TERMINATED;
}
NOTREACHED();
DCHECK(false);
return CEF_MRCS_UNKNOWN;
}

View File

@@ -54,7 +54,7 @@ class CefSimpleMenuModel : public ui::MenuModel {
case MENUITEMTYPE_SUBMENU:
return TYPE_SUBMENU;
default:
NOTREACHED();
DCHECK(false);
return TYPE_COMMAND;
}
}
@@ -1109,7 +1109,7 @@ void CefMenuModelImpl::OnMenuClosed() {
bool CefMenuModelImpl::VerifyContext() {
if (base::PlatformThread::CurrentId() != supported_thread_id_) {
// This object should only be accessed from the thread that created it.
NOTREACHED();
DCHECK(false);
return false;
}

View File

@@ -161,7 +161,7 @@ ui::MouseEvent CefBrowserPlatformDelegateNativeAura::TranslateUiClickEvent(
changed_button_flags |= ui::EF_RIGHT_MOUSE_BUTTON;
break;
default:
NOTREACHED();
DCHECK(false);
}
ui::MouseEvent result(event_type, location, root_location, time_stamp, flags,

View File

@@ -276,7 +276,7 @@ ui::KeyEvent CefBrowserPlatformDelegateNativeLinux::TranslateUiKeyEvent(
type = ui::ET_KEY_RELEASED;
break;
default:
NOTREACHED();
DCHECK(false);
}
#if BUILDFLAG(OZONE_PLATFORM_X11)

View File

@@ -563,7 +563,7 @@ CefBrowserPlatformDelegateNativeMac::TranslateWebClickEvent(
result.button = blink::WebMouseEvent::Button::kRight;
break;
default:
NOTREACHED();
DCHECK(false);
}
result.click_count = clickCount;

View File

@@ -466,7 +466,7 @@ bool CefBrowserPlatformDelegateNativeWin::HandleKeyboardEvent(
msg.message = event.is_system_key ? WM_SYSCHAR : WM_CHAR;
break;
default:
NOTREACHED();
DCHECK(false);
return false;
}
@@ -521,7 +521,7 @@ ui::KeyEvent CefBrowserPlatformDelegateNativeWin::TranslateUiKeyEvent(
type = ui::ET_KEY_RELEASED;
break;
default:
NOTREACHED();
DCHECK(false);
}
ui::DomKey dom_key =

View File

@@ -70,7 +70,7 @@ display::Display::Rotation OrientationAngleToRotation(
if (orientation_angle == 270) {
return display::Display::ROTATE_90;
}
NOTREACHED();
DCHECK(false);
return display::Display::ROTATE_0;
}

View File

@@ -363,7 +363,7 @@ bool OnLicenseUI(std::string* mime_type, std::string* output) {
ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(
IDR_CEF_LICENSE_TXT);
if (piece.empty()) {
NOTREACHED() << "Failed to load license txt resource.";
DCHECK(false) << "Failed to load license txt resource.";
return false;
}
@@ -381,7 +381,7 @@ bool OnVersionUI(Profile* profile,
ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(
IDR_CEF_VERSION_HTML);
if (tmpl.empty()) {
NOTREACHED() << "Failed to load version html resource.";
DCHECK(false) << "Failed to load version html resource.";
return false;
}

View File

@@ -38,7 +38,7 @@ void LoadFromDisk(const base::FilePath& path) {
void CefLoadCRLSetsFile(const CefString& path) {
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return;
}

View File

@@ -50,7 +50,7 @@ std::string GetMimeType(const std::string& filename) {
return "application/font-woff2";
}
NOTREACHED() << "No known mime type for file: " << filename.c_str();
DCHECK(false) << "No known mime type for file: " << filename.c_str();
return "text/plain";
}
@@ -80,7 +80,7 @@ class RedirectHandler : public CefResourceHandler {
int bytes_to_read,
int& bytes_read,
CefRefPtr<CefResourceReadCallback> callback) override {
NOTREACHED();
DCHECK(false);
return false;
}
@@ -177,8 +177,8 @@ class InternalHandlerFactory : public CefSchemeHandlerFactory {
ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(
action.resource_id);
if (str.empty()) {
NOTREACHED() << "Failed to load internal resource for id: "
<< action.resource_id << " URL: " << url.spec().c_str();
DCHECK(false) << "Failed to load internal resource for id: "
<< action.resource_id << " URL: " << url.spec().c_str();
return nullptr;
}
action.bytes =

View File

@@ -695,7 +695,7 @@ void CefBrowserURLRequest::Cancel() {
bool CefBrowserURLRequest::VerifyContext() {
if (!context_->CalledOnValidThread()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return false;
}

View File

@@ -553,7 +553,7 @@ void StreamReaderURLLoader::FollowRedirect(
const net::HttpRequestHeaders& modified_headers,
const net::HttpRequestHeaders& modified_cors_exempt_headers,
const absl::optional<GURL>& new_url) {
NOTREACHED();
DCHECK(false);
}
void StreamReaderURLLoader::SetPriority(net::RequestPriority priority,
@@ -852,4 +852,4 @@ bool StreamReaderURLLoader::byte_range_valid() const {
return byte_range_.IsValid() && byte_range_.first_byte_position() >= 0;
}
} // namespace net_service
} // namespace net_service

View File

@@ -214,14 +214,14 @@ bool CefAddCrossOriginWhitelistEntry(const CefString& source_origin,
bool allow_target_subdomains) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED();
DCHECK(false);
return false;
}
std::string source_url = source_origin;
GURL gurl = GURL(source_url);
if (gurl.is_empty() || !gurl.is_valid()) {
NOTREACHED() << "Invalid source_origin URL: " << source_url;
DCHECK(false) << "Invalid source_origin URL: " << source_url;
return false;
}
@@ -245,14 +245,14 @@ bool CefRemoveCrossOriginWhitelistEntry(const CefString& source_origin,
bool allow_target_subdomains) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED();
DCHECK(false);
return false;
}
std::string source_url = source_origin;
GURL gurl = GURL(source_url);
if (gurl.is_empty() || !gurl.is_valid()) {
NOTREACHED() << "Invalid source_origin URL: " << source_url;
DCHECK(false) << "Invalid source_origin URL: " << source_url;
return false;
}
@@ -273,7 +273,7 @@ bool CefRemoveCrossOriginWhitelistEntry(const CefString& source_origin,
bool CefClearCrossOriginWhitelist() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED();
DCHECK(false);
return false;
}

View File

@@ -26,7 +26,7 @@ ui::MotionEvent::ToolType CefPointerTypeToMotionEventToolType(
case CEF_POINTER_TYPE_UNKNOWN:
return ui::MotionEvent::ToolType::UNKNOWN;
}
NOTREACHED();
DCHECK(false);
return ui::MotionEvent::ToolType::UNKNOWN;
}

View File

@@ -175,7 +175,7 @@ ui::ImeTextSpan::UnderlineStyle GetImeUnderlineStyle(
return ui::ImeTextSpan::UnderlineStyle::kNone;
}
NOTREACHED();
DCHECK(false);
return ui::ImeTextSpan::UnderlineStyle::kSolid;
}
@@ -489,7 +489,7 @@ CefRenderWidgetHostViewOSR::GetDisplayFeature() {
void CefRenderWidgetHostViewOSR::SetDisplayFeatureForTesting(
const content::DisplayFeature* display_feature) {
NOTREACHED();
DCHECK(false);
}
blink::mojom::PointerLockResult CefRenderWidgetHostViewOSR::LockMouse(
@@ -905,7 +905,7 @@ void CefRenderWidgetHostViewOSR::NotifyHostAndDelegateOnWasShown(
blink::mojom::RecordContentToVisibleTimeRequestPtr visible_time_request) {
// We don't call RenderWidgetHostViewBase::OnShowWithPageVisibility, so this
// method should not be called.
NOTREACHED();
DCHECK(false);
}
void CefRenderWidgetHostViewOSR::
@@ -914,14 +914,14 @@ void CefRenderWidgetHostViewOSR::
visible_time_request) {
// We don't call RenderWidgetHostViewBase::OnShowWithPageVisibility, so this
// method should not be called.
NOTREACHED();
DCHECK(false);
}
void CefRenderWidgetHostViewOSR::
CancelSuccessfulPresentationTimeRequestForHostAndDelegate() {
// We don't call RenderWidgetHostViewBase::OnShowWithPageVisibility, so this
// method should not be called.
NOTREACHED();
DCHECK(false);
}
std::unique_ptr<content::SyntheticGestureTarget>

View File

@@ -315,16 +315,16 @@ bool CefTouchSelectionControllerClientOSR::SupportsAnimation() const {
bool CefTouchSelectionControllerClientOSR::InternalClient::SupportsAnimation()
const {
NOTREACHED();
DCHECK(false);
return false;
}
void CefTouchSelectionControllerClientOSR::SetNeedsAnimate() {
NOTREACHED();
DCHECK(false);
}
void CefTouchSelectionControllerClientOSR::InternalClient::SetNeedsAnimate() {
NOTREACHED();
DCHECK(false);
}
void CefTouchSelectionControllerClientOSR::MoveCaret(
@@ -405,7 +405,7 @@ void CefTouchSelectionControllerClientOSR::OnSelectionEvent(
void CefTouchSelectionControllerClientOSR::InternalClient::OnSelectionEvent(
ui::SelectionEventType event) {
NOTREACHED();
DCHECK(false);
}
void CefTouchSelectionControllerClientOSR::OnDragUpdate(
@@ -415,7 +415,7 @@ void CefTouchSelectionControllerClientOSR::OnDragUpdate(
void CefTouchSelectionControllerClientOSR::InternalClient::OnDragUpdate(
const ui::TouchSelectionDraggable::Type type,
const gfx::PointF& position) {
NOTREACHED();
DCHECK(false);
}
std::unique_ptr<ui::TouchHandleDrawable>
@@ -427,12 +427,12 @@ void CefTouchSelectionControllerClientOSR::DidScroll() {}
std::unique_ptr<ui::TouchHandleDrawable>
CefTouchSelectionControllerClientOSR::InternalClient::CreateDrawable() {
NOTREACHED();
DCHECK(false);
return nullptr;
}
void CefTouchSelectionControllerClientOSR::InternalClient::DidScroll() {
NOTREACHED();
DCHECK(false);
}
bool CefTouchSelectionControllerClientOSR::IsCommandIdEnabled(

View File

@@ -43,7 +43,7 @@ bool CefGetPath(PathKey key, CefString& path) {
pref_key = chrome::DIR_RESOURCES;
break;
default:
NOTREACHED() << "invalid argument";
DCHECK(false) << "invalid argument";
return false;
}

View File

@@ -225,7 +225,7 @@ cef_permission_request_types_t GetCefRequestType(
return CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT;
}
NOTREACHED();
DCHECK(false);
return CEF_PERMISSION_TYPE_NONE;
}

View File

@@ -35,7 +35,7 @@ const char* GetTypeString(base::Value::Type type) {
return "LIST";
}
NOTREACHED();
DCHECK(false);
return "UNKNOWN";
}

View File

@@ -74,7 +74,7 @@ class CefPreferenceRegistrarImpl : public CefPreferenceRegistrar {
} else if (impl_value.type() == base::Value::Type::LIST) {
registry_->RegisterListPref(name, std::move(impl_value));
} else {
NOTREACHED();
DCHECK(false);
}
}

View File

@@ -196,7 +196,7 @@ blink::mojom::PreferredColorScheme ToBlinkPreferredColorScheme(
return blink::mojom::PreferredColorScheme::kLight;
}
NOTREACHED();
DCHECK(false);
}
// From chrome/browser/chrome_content_browser_client.cc

View File

@@ -12,12 +12,12 @@
bool CefLaunchProcess(CefRefPtr<CefCommandLine> command_line) {
if (!command_line.get()) {
NOTREACHED() << "invalid parameter";
DCHECK(false) << "invalid parameter";
return false;
}
if (!content::CurrentlyOnProcessLauncherTaskRunner()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return false;
}

View File

@@ -94,7 +94,7 @@ class ResolveHostHelper : public network::ResolveHostClientBase {
CefRefPtr<CefRequestContext> CefRequestContext::GetGlobalContext() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return nullptr;
}
@@ -109,7 +109,7 @@ CefRefPtr<CefRequestContext> CefRequestContext::CreateContext(
CefRefPtr<CefRequestContextHandler> handler) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return nullptr;
}
@@ -126,7 +126,7 @@ CefRefPtr<CefRequestContext> CefRequestContext::CreateContext(
CefRefPtr<CefRequestContextHandler> handler) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return nullptr;
}
@@ -183,12 +183,12 @@ CefRequestContextImpl::GetOrCreateForRequestContext(
bool CefRequestContextImpl::VerifyBrowserContext() const {
if (!CEF_CURRENTLY_ON_UIT()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return false;
}
if (!browser_context() || !browser_context()->IsInitialized()) {
NOTREACHED() << "Uninitialized context";
DCHECK(false) << "Uninitialized context";
return false;
}

View File

@@ -13,7 +13,7 @@ bool CefRegisterSchemeHandlerFactory(
CefRefPtr<CefSchemeHandlerFactory> factory) {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return false;
}
@@ -24,7 +24,7 @@ bool CefRegisterSchemeHandlerFactory(
bool CefClearSchemeHandlerFactories() {
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return false;
}

View File

@@ -25,16 +25,16 @@
#define CEF_CURRENTLY_ON_HT() CurrentlyOnHandlerThread()
#define CEF_REQUIRE_HT() DCHECK(CEF_CURRENTLY_ON_HT())
#define CEF_REQUIRE_HT_RETURN(var) \
if (!CEF_CURRENTLY_ON_HT()) { \
NOTREACHED() << "called on invalid thread"; \
return var; \
#define CEF_REQUIRE_HT_RETURN(var) \
if (!CEF_CURRENTLY_ON_HT()) { \
DCHECK(false) << "called on invalid thread"; \
return var; \
}
#define CEF_REQUIRE_HT_RETURN_VOID() \
if (!CEF_CURRENTLY_ON_HT()) { \
NOTREACHED() << "called on invalid thread"; \
return; \
#define CEF_REQUIRE_HT_RETURN_VOID() \
if (!CEF_CURRENTLY_ON_HT()) { \
DCHECK(false) << "called on invalid thread"; \
return; \
}
#define CEF_POST_TASK_HT(task) task_runner_->PostTask(FROM_HERE, task);

View File

@@ -540,7 +540,7 @@ bool CefSimpleMenuModelImpl::SetFontListAt(int index,
bool CefSimpleMenuModelImpl::VerifyContext() {
if (base::PlatformThread::CurrentId() != supported_thread_id_) {
// This object should only be accessed from the thread that created it.
NOTREACHED();
DCHECK(false);
return false;
}

View File

@@ -25,18 +25,18 @@
#define CEF_REQUIRE_UIT() CEF_REQUIRE(CEF_UIT)
#define CEF_REQUIRE_IOT() CEF_REQUIRE(CEF_IOT)
#define CEF_REQUIRE_RETURN(id, var) \
if (!CEF_CURRENTLY_ON(id)) { \
NOTREACHED() << "called on invalid thread"; \
return var; \
#define CEF_REQUIRE_RETURN(id, var) \
if (!CEF_CURRENTLY_ON(id)) { \
DCHECK(false) << "called on invalid thread"; \
return var; \
}
#define CEF_REQUIRE_UIT_RETURN(var) CEF_REQUIRE_RETURN(CEF_UIT, var)
#define CEF_REQUIRE_IOT_RETURN(var) CEF_REQUIRE_RETURN(CEF_IOT, var)
#define CEF_REQUIRE_RETURN_VOID(id) \
if (!CEF_CURRENTLY_ON(id)) { \
NOTREACHED() << "called on invalid thread"; \
return; \
#define CEF_REQUIRE_RETURN_VOID(id) \
if (!CEF_CURRENTLY_ON(id)) { \
DCHECK(false) << "called on invalid thread"; \
return; \
}
#define CEF_REQUIRE_UIT_RETURN_VOID() CEF_REQUIRE_RETURN_VOID(CEF_UIT)
#define CEF_REQUIRE_IOT_RETURN_VOID() CEF_REQUIRE_RETURN_VOID(CEF_IOT)

View File

@@ -12,12 +12,12 @@
bool CefBeginTracing(const CefString& categories,
CefRefPtr<CefCompletionCallback> callback) {
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return false;
}
if (!CEF_CURRENTLY_ON_UIT()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return false;
}
@@ -32,12 +32,12 @@ bool CefBeginTracing(const CefString& categories,
bool CefEndTracing(const CefString& tracing_file,
CefRefPtr<CefEndTracingCallback> callback) {
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
DCHECK(false) << "context not valid";
return false;
}
if (!CEF_CURRENTLY_ON_UIT()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return false;
}

View File

@@ -218,6 +218,23 @@ void CefBrowserViewImpl::OnBoundsChanged() {
}
}
void CefBrowserViewImpl::OnGestureCommand(cef_gesture_command_t command) {
if (delegate()->OnGestureCommand(this, command)) {
return;
}
if (browser_) {
switch (command) {
case CEF_GESTURE_COMMAND_BACK:
browser_->GoBack();
break;
case CEF_GESTURE_COMMAND_FORWARD:
browser_->GoForward();
break;
}
}
}
CefBrowserViewImpl::CefBrowserViewImpl(
CefRefPtr<CefBrowserViewDelegate> delegate)
: ParentClass(delegate), weak_ptr_factory_(this) {}

View File

@@ -74,6 +74,7 @@ class CefBrowserViewImpl
// CefBrowserViewView::Delegate methods:
void OnBrowserViewAdded() override;
void OnBoundsChanged() override;
void OnGestureCommand(cef_gesture_command_t command) override;
// Return the WebView representation of this object.
views::WebView* web_view() const;

View File

@@ -4,8 +4,28 @@
#include "libcef/browser/views/browser_view_view.h"
#include <optional>
#include "libcef/browser/views/browser_view_impl.h"
namespace {
std::optional<cef_gesture_command_t> GetGestureCommand(
ui::GestureEvent* event) {
#if defined(OS_MAC)
if (event->details().type() == ui::ET_GESTURE_SWIPE) {
if (event->details().swipe_left()) {
return cef_gesture_command_t::CEF_GESTURE_COMMAND_BACK;
} else if (event->details().swipe_right()) {
return cef_gesture_command_t::CEF_GESTURE_COMMAND_FORWARD;
}
}
#endif
return std::nullopt;
}
} // namespace
CefBrowserViewView::CefBrowserViewView(CefBrowserViewDelegate* cef_delegate,
Delegate* browser_view_delegate)
: ParentClass(cef_delegate), browser_view_delegate_(browser_view_delegate) {
@@ -38,3 +58,9 @@ void CefBrowserViewView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
ParentClass::OnBoundsChanged(previous_bounds);
browser_view_delegate_->OnBoundsChanged();
}
void CefBrowserViewView::OnGestureEvent(ui::GestureEvent* event) {
if (auto command = GetGestureCommand(event)) {
browser_view_delegate_->OnGestureCommand(*command);
}
}

View File

@@ -41,6 +41,9 @@ class CefBrowserViewView
// Called when the BrowserView bounds have changed.
virtual void OnBoundsChanged() = 0;
// Called when the BrowserView receives a gesture command.
virtual void OnGestureCommand(cef_gesture_command_t command) = 0;
protected:
virtual ~Delegate() {}
};
@@ -54,6 +57,7 @@ class CefBrowserViewView
void ViewHierarchyChanged(
const views::ViewHierarchyChangedDetails& details) override;
void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
void OnGestureEvent(ui::GestureEvent* event) override;
private:
// Not owned by this object.

View File

@@ -30,6 +30,8 @@ class CefNativeWidgetMac : public views::NativeWidgetMac {
void GetWindowFrameTitlebarHeight(bool* override_titlebar_height,
float* titlebar_height) override;
void OnWindowFullscreenTransitionStart() override;
void OnWindowFullscreenTransitionComplete() override;
private:
const CefRefPtr<CefWindow> window_;

View File

@@ -52,3 +52,13 @@ void CefNativeWidgetMac::GetWindowFrameTitlebarHeight(
override_titlebar_height, titlebar_height);
}
}
void CefNativeWidgetMac::OnWindowFullscreenTransitionStart() {
views::NativeWidgetMac::OnWindowFullscreenTransitionStart();
window_delegate_->OnWindowFullscreenTransition(window_, false);
}
void CefNativeWidgetMac::OnWindowFullscreenTransitionComplete() {
views::NativeWidgetMac::OnWindowFullscreenTransitionComplete();
window_delegate_->OnWindowFullscreenTransition(window_, true);
}

View File

@@ -486,7 +486,7 @@ void CefXmlReaderImpl::AppendError(const CefString& error_str) {
bool CefXmlReaderImpl::VerifyContext() {
if (base::PlatformThread::CurrentId() != supported_thread_id_) {
// This object should only be accessed from the thread that created it.
NOTREACHED();
DCHECK(false);
return false;
}

View File

@@ -58,7 +58,7 @@ OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)) {
whence = SEEK_SET;
break;
default:
NOTREACHED();
DCHECK(false);
return -1;
}
return reader->Seek(offset, whence);
@@ -295,7 +295,7 @@ bool CefZipReaderImpl::GetFileInfo() {
bool CefZipReaderImpl::VerifyContext() {
if (base::PlatformThread::CurrentId() != supported_thread_id_) {
// This object should only be accessed from the thread that created it.
NOTREACHED();
DCHECK(false);
return false;
}

View File

@@ -100,7 +100,7 @@ void CefCrashReportUploadThread::ProcessPendingReport(
return;
case CrashReportDatabase::kCannotRequestUpload:
NOTREACHED();
DCHECK(false);
return;
}

View File

@@ -37,7 +37,7 @@ void CefCommandLineImpl::InitFromArgv(int argc, const char* const* argv) {
CEF_VALUE_VERIFY_RETURN_VOID(true);
mutable_value()->InitFromArgv(argc, argv);
#else
NOTREACHED() << "method not supported on this platform";
DCHECK(false) << "method not supported on this platform";
#endif
}
@@ -47,7 +47,7 @@ void CefCommandLineImpl::InitFromString(const CefString& command_line) {
const std::wstring& str16 = command_line;
mutable_value()->ParseFromString(str16);
#else
NOTREACHED() << "method not supported on this platform";
DCHECK(false) << "method not supported on this platform";
#endif
}

View File

@@ -8,10 +8,10 @@
#include "libcef/browser/stream_impl.h"
#include "libcef/common/drag_data_impl.h"
#define CHECK_READONLY_RETURN_VOID() \
if (read_only_) { \
NOTREACHED() << "object is read only"; \
return; \
#define CHECK_READONLY_RETURN_VOID() \
if (read_only_) { \
DCHECK(false) << "object is read only"; \
return; \
}
CefDragDataImpl::CefDragDataImpl(const content::DropData& data)
@@ -214,4 +214,4 @@ CefPoint CefDragDataImpl::GetImageHotspot() {
bool CefDragDataImpl::HasImage() {
base::AutoLock lock_scope(lock_);
return image_ ? true : false;
}
}

View File

@@ -15,7 +15,7 @@ namespace {
bool AllowFileIO() {
if (CefCurrentlyOn(TID_UI) || CefCurrentlyOn(TID_IO)) {
NOTREACHED() << "file IO is not allowed on the current thread";
DCHECK(false) << "file IO is not allowed on the current thread";
return false;
}
return true;

View File

@@ -158,16 +158,16 @@ void GetHeaderMap(const CefRequest::HeaderMap& source,
} // namespace
#define CHECK_READONLY_RETURN(val) \
if (read_only_) { \
NOTREACHED() << "object is read only"; \
return val; \
#define CHECK_READONLY_RETURN(val) \
if (read_only_) { \
DCHECK(false) << "object is read only"; \
return val; \
}
#define CHECK_READONLY_RETURN_VOID() \
if (read_only_) { \
NOTREACHED() << "object is read only"; \
return; \
#define CHECK_READONLY_RETURN_VOID() \
if (read_only_) { \
DCHECK(false) << "object is read only"; \
return; \
}
#define SETBOOLFLAG(obj, flags, method, FLAG) \
@@ -752,7 +752,7 @@ CefRequestImpl::NetReferrerPolicyToBlinkReferrerPolicy(
case REFERRER_POLICY_NO_REFERRER:
return network::mojom::ReferrerPolicy::kNever;
}
NOTREACHED();
DCHECK(false);
return network::mojom::ReferrerPolicy::kDefault;
}
@@ -779,7 +779,7 @@ cef_referrer_policy_t CefRequestImpl::BlinkReferrerPolicyToNetReferrerPolicy(
case network::mojom::ReferrerPolicy::kDefault:
return REFERRER_POLICY_DEFAULT;
}
NOTREACHED();
DCHECK(false);
return REFERRER_POLICY_DEFAULT;
}
@@ -1179,7 +1179,7 @@ void CefPostDataElementImpl::Get(network::ResourceRequestBody& body) const {
body.AppendFileRange(path, 0, std::numeric_limits<uint64_t>::max(),
base::Time());
} else {
NOTREACHED();
DCHECK(false);
}
}

View File

@@ -113,7 +113,7 @@ base::FilePath GetUserDataPath(CefSettings* settings,
return result;
}
NOTREACHED();
DCHECK(false);
return result;
}
@@ -130,7 +130,7 @@ bool DownloadPathIsDangerous(const base::FilePath& download_path) {
base::FilePath desktop_dir;
if (!base::PathService::Get(base::DIR_USER_DESKTOP, &desktop_dir)) {
NOTREACHED();
DCHECK(false);
return false;
}
return (download_path == desktop_dir);

View File

@@ -18,10 +18,10 @@
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/platform/web_url_response.h"
#define CHECK_READONLY_RETURN_VOID() \
if (read_only_) { \
NOTREACHED() << "object is read only"; \
return; \
#define CHECK_READONLY_RETURN_VOID() \
if (read_only_) { \
DCHECK(false) << "object is read only"; \
return; \
}
// CefResponse ----------------------------------------------------------------

View File

@@ -104,7 +104,7 @@ CefTaskRunnerImpl::GetCurrentTaskRunner() {
} else if (current_id == BrowserThread::IO) {
return content::GetIOThreadTaskRunner({});
} else {
NOTREACHED();
DCHECK(false);
}
}

View File

@@ -29,7 +29,7 @@ CefRefPtr<CefThread> CefThread::CreateThread(
bool stoppable,
cef_com_init_mode_t com_init_mode) {
if (!CefTaskRunnerImpl::GetCurrentTaskRunner()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return nullptr;
}
@@ -130,7 +130,7 @@ void CefThreadImpl::Stop() {
return;
}
if (!owner_task_runner_->RunsTasksInCurrentSequence()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return;
}
@@ -144,7 +144,7 @@ bool CefThreadImpl::IsRunning() {
return false;
}
if (!owner_task_runner_->RunsTasksInCurrentSequence()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return false;
}

View File

@@ -18,12 +18,12 @@ CefRefPtr<CefURLRequest> CefURLRequest::Create(
CefRefPtr<CefURLRequestClient> client,
CefRefPtr<CefRequestContext> request_context) {
if (!request.get() || !client.get()) {
NOTREACHED() << "called with invalid parameters";
DCHECK(false) << "called with invalid parameters";
return nullptr;
}
if (!CefTaskRunnerImpl::GetCurrentTaskRunner()) {
NOTREACHED() << "called on invalid thread";
DCHECK(false) << "called on invalid thread";
return nullptr;
}
@@ -37,7 +37,7 @@ CefRefPtr<CefURLRequest> CefURLRequest::Create(
}
return nullptr;
} else {
NOTREACHED() << "called in unsupported process";
DCHECK(false) << "called in unsupported process";
return nullptr;
}
}

View File

@@ -84,7 +84,7 @@ class CefValueController
inline bool VerifyThread() {
if (!thread_safe() && !on_correct_thread()) {
// This object should only be accessed from the thread that created it.
NOTREACHED() << "object accessed from incorrect thread.";
DCHECK(false) << "object accessed from incorrect thread.";
return false;
}
return true;
@@ -349,7 +349,7 @@ class CefValueBase : public CefType, public CefValueController::Object {
inline bool VerifyAttached() const {
if (detached()) {
// This object should not be accessed after being detached.
NOTREACHED() << "object accessed after being detached.";
DCHECK(false) << "object accessed after being detached.";
return false;
}
return true;
@@ -397,7 +397,7 @@ class CefValueBase : public CefType, public CefValueController::Object {
if (read_only() && modify) {
// This object cannot be modified.
NOTREACHED() << "mutation attempted on read-only object.";
DCHECK(false) << "mutation attempted on read-only object.";
return false;
}

View File

@@ -296,7 +296,7 @@ CefValueType CefValueImpl::GetType() {
case base::Value::Type::STRING:
return VTYPE_STRING;
default:
NOTREACHED();
DCHECK(false);
break;
}
}

View File

@@ -13,7 +13,7 @@ namespace {
bool AllowWait() {
if (CefCurrentlyOn(TID_UI) || CefCurrentlyOn(TID_IO)) {
NOTREACHED() << "waiting is not allowed on the current thread";
DCHECK(false) << "waiting is not allowed on the current thread";
return false;
}
return true;

View File

@@ -53,7 +53,7 @@ bool CefBrowserImpl::IsValid() {
}
CefRefPtr<CefBrowserHost> CefBrowserImpl::GetHost() {
NOTREACHED() << "GetHost cannot be called from the render process";
DCHECK(false) << "GetHost cannot be called from the render process";
return nullptr;
}

View File

@@ -271,7 +271,7 @@ void CefDOMDocumentImpl::Detach() {
bool CefDOMDocumentImpl::VerifyContext() {
if (!CEF_CURRENTLY_ON_RT() || frame_ == nullptr) {
NOTREACHED();
DCHECK(false);
return false;
}
return true;

View File

@@ -293,7 +293,7 @@ CefString CefDOMNodeImpl::GetElementTagName() {
}
if (!node_.IsElementNode()) {
NOTREACHED();
DCHECK(false);
return str;
}
@@ -312,7 +312,7 @@ bool CefDOMNodeImpl::HasElementAttributes() {
}
if (!node_.IsElementNode()) {
NOTREACHED();
DCHECK(false);
return false;
}
@@ -326,7 +326,7 @@ bool CefDOMNodeImpl::HasElementAttribute(const CefString& attrName) {
}
if (!node_.IsElementNode()) {
NOTREACHED();
DCHECK(false);
return false;
}
@@ -341,7 +341,7 @@ CefString CefDOMNodeImpl::GetElementAttribute(const CefString& attrName) {
}
if (!node_.IsElementNode()) {
NOTREACHED();
DCHECK(false);
return str;
}
@@ -361,7 +361,7 @@ void CefDOMNodeImpl::GetElementAttributes(AttributeMap& attrMap) {
}
if (!node_.IsElementNode()) {
NOTREACHED();
DCHECK(false);
return;
}
@@ -385,7 +385,7 @@ bool CefDOMNodeImpl::SetElementAttribute(const CefString& attrName,
}
if (!node_.IsElementNode()) {
NOTREACHED();
DCHECK(false);
return false;
}
@@ -402,7 +402,7 @@ CefString CefDOMNodeImpl::GetElementInnerText() {
}
if (!node_.IsElementNode()) {
NOTREACHED();
DCHECK(false);
return str;
}
@@ -422,7 +422,7 @@ CefRect CefDOMNodeImpl::GetElementBounds() {
}
if (!node_.IsElementNode()) {
NOTREACHED();
DCHECK(false);
return rect;
}
@@ -440,14 +440,14 @@ void CefDOMNodeImpl::Detach() {
bool CefDOMNodeImpl::VerifyContext() {
if (!document_.get()) {
NOTREACHED();
DCHECK(false);
return false;
}
if (!document_->VerifyContext()) {
return false;
}
if (node_.IsNull()) {
NOTREACHED();
DCHECK(false);
return false;
}
return true;

View File

@@ -105,7 +105,7 @@ void CefFrameImpl::SelectAll() {
}
void CefFrameImpl::ViewSource() {
NOTREACHED() << "ViewSource cannot be called from the renderer process";
DCHECK(false) << "ViewSource cannot be called from the renderer process";
}
void CefFrameImpl::GetSource(CefRefPtr<CefStringVisitor> visitor) {
@@ -258,7 +258,7 @@ void CefFrameImpl::VisitDOM(CefRefPtr<CefDOMVisitor> visitor) {
CefRefPtr<CefURLRequest> CefFrameImpl::CreateURLRequest(
CefRefPtr<CefRequest> request,
CefRefPtr<CefURLRequestClient> client) {
NOTREACHED() << "CreateURLRequest cannot be called from the render process";
DCHECK(false) << "CreateURLRequest cannot be called from the render process";
return nullptr;
}

View File

@@ -375,7 +375,7 @@ void CefRenderManager::OnBrowserDestroyed(CefBrowserImpl* browser) {
}
// No browser was found in the map.
NOTREACHED();
DCHECK(false);
}
CefGuestView* CefRenderManager::GetGuestViewForView(blink::WebView* view) {
@@ -398,7 +398,7 @@ void CefRenderManager::OnGuestViewDestroyed(CefGuestView* guest_view) {
}
// No guest view was found in the map.
NOTREACHED();
DCHECK(false);
}
// Enable deprecation warnings on Windows. See http://crbug.com/585142.

View File

@@ -16,16 +16,16 @@
#define CEF_REQUIRE_RT() DCHECK(CEF_CURRENTLY_ON_RT())
#define CEF_REQUIRE_RT_RETURN(var) \
if (!CEF_CURRENTLY_ON_RT()) { \
NOTREACHED() << "called on invalid thread"; \
return var; \
#define CEF_REQUIRE_RT_RETURN(var) \
if (!CEF_CURRENTLY_ON_RT()) { \
DCHECK(false) << "called on invalid thread"; \
return var; \
}
#define CEF_REQUIRE_RT_RETURN_VOID() \
if (!CEF_CURRENTLY_ON_RT()) { \
NOTREACHED() << "called on invalid thread"; \
return; \
#define CEF_REQUIRE_RT_RETURN_VOID() \
if (!CEF_CURRENTLY_ON_RT()) { \
DCHECK(false) << "called on invalid thread"; \
return; \
}
#define CEF_RENDER_TASK_RUNNER() \

View File

@@ -228,7 +228,7 @@ class V8TrackObject : public CefTrackNode {
int AdjustExternallyAllocatedMemory(int change_in_bytes) {
int new_value = external_memory_ + change_in_bytes;
if (new_value < 0) {
NOTREACHED() << "External memory usage cannot be less than 0 bytes";
DCHECK(false) << "External memory usage cannot be less than 0 bytes";
change_in_bytes = -(external_memory_);
new_value = 0;
}
@@ -861,26 +861,26 @@ bool CefRegisterExtension(const CefString& extension_name,
// Helper macros
#define CEF_V8_HAS_ISOLATE() (!!CefV8IsolateManager::Get())
#define CEF_V8_REQUIRE_ISOLATE_RETURN(var) \
if (!CEF_V8_HAS_ISOLATE()) { \
NOTREACHED() << "V8 isolate is not valid"; \
return var; \
#define CEF_V8_REQUIRE_ISOLATE_RETURN(var) \
if (!CEF_V8_HAS_ISOLATE()) { \
DCHECK(false) << "V8 isolate is not valid"; \
return var; \
}
#define CEF_V8_CURRENTLY_ON_MLT() \
(!handle_.get() || handle_->BelongsToCurrentThread())
#define CEF_V8_REQUIRE_MLT_RETURN(var) \
CEF_V8_REQUIRE_ISOLATE_RETURN(var); \
if (!CEF_V8_CURRENTLY_ON_MLT()) { \
NOTREACHED() << "called on incorrect thread"; \
return var; \
#define CEF_V8_REQUIRE_MLT_RETURN(var) \
CEF_V8_REQUIRE_ISOLATE_RETURN(var); \
if (!CEF_V8_CURRENTLY_ON_MLT()) { \
DCHECK(false) << "called on incorrect thread"; \
return var; \
}
#define CEF_V8_HANDLE_IS_VALID() (handle_.get() && handle_->IsValid())
#define CEF_V8_REQUIRE_VALID_HANDLE_RETURN(ret) \
CEF_V8_REQUIRE_MLT_RETURN(ret); \
if (!CEF_V8_HANDLE_IS_VALID()) { \
NOTREACHED() << "V8 handle is not valid"; \
DCHECK(false) << "V8 handle is not valid"; \
return ret; \
}
@@ -888,11 +888,11 @@ bool CefRegisterExtension(const CefString& extension_name,
(CEF_V8_HAS_ISOLATE() && CEF_V8_CURRENTLY_ON_MLT() && \
CEF_V8_HANDLE_IS_VALID())
#define CEF_V8_REQUIRE_OBJECT_RETURN(ret) \
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(ret); \
if (type_ != TYPE_OBJECT) { \
NOTREACHED() << "V8 value is not an object"; \
return ret; \
#define CEF_V8_REQUIRE_OBJECT_RETURN(ret) \
CEF_V8_REQUIRE_VALID_HANDLE_RETURN(ret); \
if (type_ != TYPE_OBJECT) { \
DCHECK(false) << "V8 value is not an object"; \
return ret; \
}
// CefV8HandleBase
@@ -1087,7 +1087,7 @@ bool CefV8ContextImpl::Eval(const CefString& code,
}
if (code.empty()) {
NOTREACHED() << "invalid input parameter";
DCHECK(false) << "invalid input parameter";
return false;
}
@@ -1115,7 +1115,7 @@ bool CefV8ContextImpl::Eval(const CefString& code,
return true;
}
NOTREACHED();
DCHECK(false);
return false;
}
@@ -1330,7 +1330,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateObject(
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return nullptr;
}
@@ -1350,7 +1350,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateObject(
v8::MaybeLocal<v8::Object> maybe_object = tmpl->NewInstance(context);
if (!maybe_object.ToLocal<v8::Object>(&obj)) {
NOTREACHED() << "Failed to create V8 Object with interceptor";
DCHECK(false) << "Failed to create V8 Object with interceptor";
return nullptr;
}
} else {
@@ -1381,7 +1381,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateArray(int length) {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return nullptr;
}
@@ -1411,7 +1411,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateArrayBuffer(
v8::HandleScope handle_scope(isolate);
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return nullptr;
}
@@ -1453,7 +1453,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateFunction(
CEF_V8_REQUIRE_ISOLATE_RETURN(nullptr);
if (!handler.get()) {
NOTREACHED() << "invalid parameter";
DCHECK(false) << "invalid parameter";
return nullptr;
}
@@ -1462,7 +1462,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateFunction(
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return nullptr;
}
@@ -1477,7 +1477,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateFunction(
v8::MaybeLocal<v8::Function> maybe_func = tmpl->GetFunction(context);
v8::Local<v8::Function> func;
if (!maybe_func.ToLocal(&func)) {
NOTREACHED() << "failed to create V8 function";
DCHECK(false) << "failed to create V8 function";
return nullptr;
}
@@ -1506,7 +1506,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreatePromise() {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return nullptr;
}
@@ -1672,7 +1672,7 @@ v8::Local<v8::Value> CefV8ValueImpl::GetV8Value(bool should_persist) {
break;
}
NOTREACHED() << "Invalid type for CefV8ValueImpl";
DCHECK(false) << "Invalid type for CefV8ValueImpl";
return v8::Local<v8::Value>();
}
@@ -1867,7 +1867,7 @@ bool CefV8ValueImpl::IsUserCreated() {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return false;
}
@@ -1918,7 +1918,7 @@ bool CefV8ValueImpl::HasValue(const CefString& key) {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return false;
}
@@ -1931,7 +1931,7 @@ bool CefV8ValueImpl::HasValue(int index) {
CEF_V8_REQUIRE_OBJECT_RETURN(false);
if (index < 0) {
NOTREACHED() << "invalid input parameter";
DCHECK(false) << "invalid input parameter";
return false;
}
@@ -1940,7 +1940,7 @@ bool CefV8ValueImpl::HasValue(int index) {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return false;
}
@@ -1957,7 +1957,7 @@ bool CefV8ValueImpl::DeleteValue(const CefString& key) {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return false;
}
@@ -1974,7 +1974,7 @@ bool CefV8ValueImpl::DeleteValue(int index) {
CEF_V8_REQUIRE_OBJECT_RETURN(false);
if (index < 0) {
NOTREACHED() << "invalid input parameter";
DCHECK(false) << "invalid input parameter";
return false;
}
@@ -1983,7 +1983,7 @@ bool CefV8ValueImpl::DeleteValue(int index) {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return false;
}
@@ -2004,7 +2004,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(const CefString& key) {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return nullptr;
}
@@ -2025,7 +2025,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(int index) {
CEF_V8_REQUIRE_OBJECT_RETURN(nullptr);
if (index < 0) {
NOTREACHED() << "invalid input parameter";
DCHECK(false) << "invalid input parameter";
return nullptr;
}
@@ -2034,7 +2034,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(int index) {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return nullptr;
}
@@ -2063,7 +2063,7 @@ bool CefV8ValueImpl::SetValue(const CefString& key,
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return false;
}
@@ -2087,7 +2087,7 @@ bool CefV8ValueImpl::SetValue(const CefString& key,
return (!HasCaught(context, try_catch) && set.FromJust());
}
} else {
NOTREACHED() << "invalid input parameter";
DCHECK(false) << "invalid input parameter";
return false;
}
}
@@ -2096,7 +2096,7 @@ bool CefV8ValueImpl::SetValue(int index, CefRefPtr<CefV8Value> value) {
CEF_V8_REQUIRE_OBJECT_RETURN(false);
if (index < 0) {
NOTREACHED() << "invalid input parameter";
DCHECK(false) << "invalid input parameter";
return false;
}
@@ -2107,7 +2107,7 @@ bool CefV8ValueImpl::SetValue(int index, CefRefPtr<CefV8Value> value) {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return false;
}
@@ -2119,7 +2119,7 @@ bool CefV8ValueImpl::SetValue(int index, CefRefPtr<CefV8Value> value) {
v8::Maybe<bool> set = obj->Set(context, index, impl->GetV8Value(true));
return (!HasCaught(context, try_catch) && set.FromJust());
} else {
NOTREACHED() << "invalid input parameter";
DCHECK(false) << "invalid input parameter";
return false;
}
}
@@ -2134,7 +2134,7 @@ bool CefV8ValueImpl::SetValue(const CefString& key,
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return false;
}
@@ -2176,7 +2176,7 @@ bool CefV8ValueImpl::GetKeys(std::vector<CefString>& keys) {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return false;
}
@@ -2204,7 +2204,7 @@ bool CefV8ValueImpl::SetUserData(CefRefPtr<CefBaseRefCounted> user_data) {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return false;
}
@@ -2228,7 +2228,7 @@ CefRefPtr<CefBaseRefCounted> CefV8ValueImpl::GetUserData() {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return nullptr;
}
@@ -2251,7 +2251,7 @@ int CefV8ValueImpl::GetExternallyAllocatedMemory() {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return 0;
}
@@ -2274,7 +2274,7 @@ int CefV8ValueImpl::AdjustExternallyAllocatedMemory(int change_in_bytes) {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return 0;
}
@@ -2297,13 +2297,13 @@ int CefV8ValueImpl::GetArrayLength() {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return 0;
}
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
if (!value->IsArray()) {
NOTREACHED() << "V8 value is not an array";
DCHECK(false) << "V8 value is not an array";
return 0;
}
@@ -2321,13 +2321,13 @@ CefV8ValueImpl::GetArrayBufferReleaseCallback() {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return nullptr;
}
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
if (!value->IsArrayBuffer()) {
NOTREACHED() << "V8 value is not an array buffer";
DCHECK(false) << "V8 value is not an array buffer";
return nullptr;
}
@@ -2349,13 +2349,13 @@ bool CefV8ValueImpl::NeuterArrayBuffer() {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return false;
}
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
if (!value->IsArrayBuffer()) {
NOTREACHED() << "V8 value is not an array buffer";
DCHECK(false) << "V8 value is not an array buffer";
return false;
}
v8::Local<v8::Object> obj = value->ToObject(context).ToLocalChecked();
@@ -2377,13 +2377,13 @@ CefString CefV8ValueImpl::GetFunctionName() {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return rv;
}
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
if (!value->IsFunction()) {
NOTREACHED() << "V8 value is not a function";
DCHECK(false) << "V8 value is not a function";
return rv;
}
@@ -2402,13 +2402,13 @@ CefRefPtr<CefV8Handler> CefV8ValueImpl::GetFunctionHandler() {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
if (context.IsEmpty()) {
NOTREACHED() << "not currently in a V8 context";
DCHECK(false) << "not currently in a V8 context";
return nullptr;
}
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
if (!value->IsFunction()) {
NOTREACHED() << "V8 value is not a function";
DCHECK(false) << "V8 value is not a function";
return nullptr;
}
@@ -2439,16 +2439,16 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::ExecuteFunctionWithContext(
v8::HandleScope handle_scope(isolate);
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
if (!value->IsFunction()) {
NOTREACHED() << "V8 value is not a function";
DCHECK(false) << "V8 value is not a function";
return nullptr;
}
if (context.get() && !context->IsValid()) {
NOTREACHED() << "invalid V8 context parameter";
DCHECK(false) << "invalid V8 context parameter";
return nullptr;
}
if (object.get() && (!object->IsValid() || !object->IsObject())) {
NOTREACHED() << "invalid V8 object parameter";
DCHECK(false) << "invalid V8 object parameter";
return nullptr;
}
@@ -2456,7 +2456,7 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::ExecuteFunctionWithContext(
if (argc > 0) {
for (int i = 0; i < argc; ++i) {
if (!arguments[i].get() || !arguments[i]->IsValid()) {
NOTREACHED() << "invalid V8 arguments parameter";
DCHECK(false) << "invalid V8 arguments parameter";
return nullptr;
}
}
@@ -2523,12 +2523,12 @@ bool CefV8ValueImpl::ResolvePromise(CefRefPtr<CefV8Value> arg) {
v8::HandleScope handle_scope(isolate);
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
if (!value->IsPromise()) {
NOTREACHED() << "V8 value is not a Promise";
DCHECK(false) << "V8 value is not a Promise";
return false;
}
if (arg.get() && !arg->IsValid()) {
NOTREACHED() << "invalid V8 arg parameter";
DCHECK(false) << "invalid V8 arg parameter";
return false;
}
@@ -2562,7 +2562,7 @@ bool CefV8ValueImpl::RejectPromise(const CefString& errorMsg) {
v8::HandleScope handle_scope(isolate);
v8::Local<v8::Value> value = handle_->GetNewV8Handle(false);
if (!value->IsPromise()) {
NOTREACHED() << "V8 value is not a Promise";
DCHECK(false) << "V8 value is not a Promise";
return false;
}

View File

@@ -20,7 +20,7 @@ bool QueryCancellationTraitsForNonCancellables(
case BindStateBase::MAYBE_VALID:
return true;
}
NOTREACHED();
DCHECK(false);
return false;
}

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=1ed29ea773cbebaa14bbd019d7902d98e336e964$
// $hash=3ad767f0b424a886e1783b416f532fbaf6b8cbbe$
//
#include "libcef_dll/cpptoc/accessibility_handler_cpptoc.h"
@@ -88,7 +88,7 @@ CefRefPtr<CefAccessibilityHandler> CefCppToCRefCounted<
cef_accessibility_handler_t>::UnwrapDerived(CefWrapperType type,
cef_accessibility_handler_t*
s) {
NOTREACHED() << "Unexpected class type: " << type;
DCHECK(false) << "Unexpected class type: " << type;
return nullptr;
}

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=f90f2c0c5749139bef7c914fbb4f17cfe585e4e8$
// $hash=3b8d5f1990e9638e0baf2c3351c779f53c8b868a$
//
#include "libcef_dll/cpptoc/app_cpptoc.h"
@@ -141,7 +141,7 @@ CefRefPtr<CefApp>
CefCppToCRefCounted<CefAppCppToC, CefApp, cef_app_t>::UnwrapDerived(
CefWrapperType type,
cef_app_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
DCHECK(false) << "Unexpected class type: " << type;
return nullptr;
}

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=0e814467a4d428a493930a3e72123dfd6721786e$
// $hash=5f113123b4a9cd31cb451c9b9e60d5e04c38a6b7$
//
#include "libcef_dll/cpptoc/audio_handler_cpptoc.h"
@@ -195,7 +195,7 @@ CefRefPtr<CefAudioHandler> CefCppToCRefCounted<
CefAudioHandler,
cef_audio_handler_t>::UnwrapDerived(CefWrapperType type,
cef_audio_handler_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
DCHECK(false) << "Unexpected class type: " << type;
return nullptr;
}

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=0a14f97c38bffa0ead433d74df13b04028c44a21$
// $hash=708e231fbc5c80191b2a9ba3d6295a6b5ecf925e$
//
#include "libcef_dll/cpptoc/auth_callback_cpptoc.h"
@@ -72,7 +72,7 @@ CefRefPtr<CefAuthCallback> CefCppToCRefCounted<
CefAuthCallback,
cef_auth_callback_t>::UnwrapDerived(CefWrapperType type,
cef_auth_callback_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
DCHECK(false) << "Unexpected class type: " << type;
return nullptr;
}

Some files were not shown because too many files have changed in this diff Show More