|
@@ -769,12 +769,7 @@ WebContents::WebContents(v8::Isolate* isolate,
|
|
|
content::WebContents* web_contents)
|
|
|
: content::WebContentsObserver(web_contents),
|
|
|
type_(Type::kRemote),
|
|
|
- id_(GetAllWebContents().Add(this)),
|
|
|
- devtools_file_system_indexer_(
|
|
|
- base::MakeRefCounted<DevToolsFileSystemIndexer>()),
|
|
|
- exclusive_access_manager_(std::make_unique<ExclusiveAccessManager>(this)),
|
|
|
- file_task_runner_(
|
|
|
- base::ThreadPool::CreateSequencedTaskRunner({base::MayBlock()}))
|
|
|
+ id_(GetAllWebContents().Add(this))
|
|
|
#if BUILDFLAG(ENABLE_PRINTING)
|
|
|
,
|
|
|
print_task_runner_(CreatePrinterHandlerTaskRunner())
|
|
@@ -807,12 +802,7 @@ WebContents::WebContents(v8::Isolate* isolate,
|
|
|
Type type)
|
|
|
: content::WebContentsObserver(web_contents.get()),
|
|
|
type_(type),
|
|
|
- id_(GetAllWebContents().Add(this)),
|
|
|
- devtools_file_system_indexer_(
|
|
|
- base::MakeRefCounted<DevToolsFileSystemIndexer>()),
|
|
|
- exclusive_access_manager_(std::make_unique<ExclusiveAccessManager>(this)),
|
|
|
- file_task_runner_(
|
|
|
- base::ThreadPool::CreateSequencedTaskRunner({base::MayBlock()}))
|
|
|
+ id_(GetAllWebContents().Add(this))
|
|
|
#if BUILDFLAG(ENABLE_PRINTING)
|
|
|
,
|
|
|
print_task_runner_(CreatePrinterHandlerTaskRunner())
|
|
@@ -828,12 +818,7 @@ WebContents::WebContents(v8::Isolate* isolate,
|
|
|
|
|
|
WebContents::WebContents(v8::Isolate* isolate,
|
|
|
const gin_helper::Dictionary& options)
|
|
|
- : id_(GetAllWebContents().Add(this)),
|
|
|
- devtools_file_system_indexer_(
|
|
|
- base::MakeRefCounted<DevToolsFileSystemIndexer>()),
|
|
|
- exclusive_access_manager_(std::make_unique<ExclusiveAccessManager>(this)),
|
|
|
- file_task_runner_(
|
|
|
- base::ThreadPool::CreateSequencedTaskRunner({base::MayBlock()}))
|
|
|
+ : id_(GetAllWebContents().Add(this))
|
|
|
#if BUILDFLAG(ENABLE_PRINTING)
|
|
|
,
|
|
|
print_task_runner_(CreatePrinterHandlerTaskRunner())
|
|
@@ -1395,7 +1380,7 @@ bool WebContents::PlatformHandleKeyboardEvent(
|
|
|
content::KeyboardEventProcessingResult WebContents::PreHandleKeyboardEvent(
|
|
|
content::WebContents* source,
|
|
|
const content::NativeWebKeyboardEvent& event) {
|
|
|
- if (exclusive_access_manager_->HandleUserKeyEvent(event))
|
|
|
+ if (exclusive_access_manager_.HandleUserKeyEvent(event))
|
|
|
return content::KeyboardEventProcessingResult::HANDLED;
|
|
|
|
|
|
if (event.GetType() == blink::WebInputEvent::Type::kRawKeyDown ||
|
|
@@ -1483,7 +1468,7 @@ void WebContents::OnEnterFullscreenModeForTab(
|
|
|
|
|
|
owner_window()->set_fullscreen_transition_type(
|
|
|
NativeWindow::FullScreenTransitionType::HTML);
|
|
|
- exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
|
|
|
+ exclusive_access_manager_.fullscreen_controller()->EnterFullscreenModeForTab(
|
|
|
requesting_frame, options.display_id);
|
|
|
|
|
|
SetHtmlApiFullscreen(true);
|
|
@@ -1501,7 +1486,7 @@ void WebContents::ExitFullscreenModeForTab(content::WebContents* source) {
|
|
|
|
|
|
// This needs to be called before we exit fullscreen on the native window,
|
|
|
// or the controller will incorrectly think we weren't fullscreen and bail.
|
|
|
- exclusive_access_manager_->fullscreen_controller()->ExitFullscreenModeForTab(
|
|
|
+ exclusive_access_manager_.fullscreen_controller()->ExitFullscreenModeForTab(
|
|
|
source);
|
|
|
|
|
|
SetHtmlApiFullscreen(false);
|
|
@@ -1560,7 +1545,7 @@ void WebContents::RequestExclusivePointerAccess(
|
|
|
bool last_unlocked_by_target,
|
|
|
bool allowed) {
|
|
|
if (allowed) {
|
|
|
- exclusive_access_manager_->mouse_lock_controller()->RequestToLockMouse(
|
|
|
+ exclusive_access_manager_.mouse_lock_controller()->RequestToLockMouse(
|
|
|
web_contents, user_gesture, last_unlocked_by_target);
|
|
|
} else {
|
|
|
web_contents->GotResponseToLockMouseRequest(
|
|
@@ -1580,18 +1565,18 @@ void WebContents::RequestToLockMouse(content::WebContents* web_contents,
|
|
|
}
|
|
|
|
|
|
void WebContents::LostMouseLock() {
|
|
|
- exclusive_access_manager_->mouse_lock_controller()->LostMouseLock();
|
|
|
+ exclusive_access_manager_.mouse_lock_controller()->LostMouseLock();
|
|
|
}
|
|
|
|
|
|
void WebContents::RequestKeyboardLock(content::WebContents* web_contents,
|
|
|
bool esc_key_locked) {
|
|
|
- exclusive_access_manager_->keyboard_lock_controller()->RequestKeyboardLock(
|
|
|
+ exclusive_access_manager_.keyboard_lock_controller()->RequestKeyboardLock(
|
|
|
web_contents, esc_key_locked);
|
|
|
}
|
|
|
|
|
|
void WebContents::CancelKeyboardLockRequest(
|
|
|
content::WebContents* web_contents) {
|
|
|
- exclusive_access_manager_->keyboard_lock_controller()
|
|
|
+ exclusive_access_manager_.keyboard_lock_controller()
|
|
|
->CancelKeyboardLockRequest(web_contents);
|
|
|
}
|
|
|
|