M117 stage 6

This commit is contained in:
Alexander Frick 2023-10-08 09:41:06 -05:00
parent 47c069edfe
commit 68235158ca
6 changed files with 153 additions and 77 deletions

View File

@ -182,7 +182,6 @@
#include "components/permissions/permission_request_manager.h"
#include "components/prefs/pref_service.h"
#include "components/search/search.h"
#include "components/services/screen_ai/buildflags/buildflags.h"
#include "components/sessions/content/session_tab_helper.h"
#include "components/sessions/core/session_types.h"
#include "components/sessions/core/tab_restore_service.h"
@ -285,11 +284,6 @@
#include "ui/display/types/display_constants.h"
#endif // BUILDFLAG(IS_MAC)
#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
#include "chrome/browser/accessibility/ax_screen_ai_annotator.h"
#include "chrome/browser/accessibility/ax_screen_ai_annotator_factory.h"
#endif
using base::UserMetricsAction;
using content::NativeWebKeyboardEvent;
using content::NavigationController;
@ -973,8 +967,15 @@ void Browser::OnWindowClosing() {
BrowserList::NotifyBrowserCloseStarted(this);
if (!tab_strip_model_->empty())
if (!tab_strip_model_->empty()) {
// Closing all the tabs results in eventually calling back to
// OnWindowClosing() again.
tab_strip_model_->CloseAllTabs();
} else {
// If there are no tabs, then a task will be scheduled (by views) to delete
// this Browser.
is_delete_scheduled_ = true;
}
}
////////////////////////////////////////////////////////////////////////////////
@ -1308,14 +1309,10 @@ void Browser::TabGroupedStateChanged(
}
void Browser::TabStripEmpty() {
// This function is often called with various Browser related classes on the
// stack. Calling code can't handle Browser being deleted here (because it
// may delete the classes on the stack calling into this function). Because of
// this, BrowserWindow::Close() is used, instead of CloseNow(). CloseNow()
// immediately deletes, where was Close() is a hide, and then delete after
// posting a task.
// Note: even though the tab strip is empty, the call to Close() may not
// result in closing this Browser. This can happen in the case of closing
// the last Browser with ongoing downloads.
window_->Close();
is_delete_scheduled_ = true;
// Instant may have visible WebContents that need to be detached before the
// window system closes.
@ -1489,7 +1486,7 @@ content::PreloadingEligibility Browser::IsPrerender2Supported(
content::WebContents& web_contents) {
Profile* profile =
Profile::FromBrowserContext(web_contents.GetBrowserContext());
return prefetch::IsSomePreloadingEnabled(*profile->GetPrefs(), &web_contents);
return prefetch::IsSomePreloadingEnabled(*profile->GetPrefs());
}
std::unique_ptr<content::WebContents> Browser::ActivatePortalWebContents(
@ -1567,7 +1564,8 @@ void Browser::OnWindowDidShow() {
return;
window_has_shown_ = true;
startup_metric_utils::RecordBrowserWindowDisplay(base::TimeTicks::Now());
startup_metric_utils::GetBrowser().RecordBrowserWindowDisplay(
base::TimeTicks::Now());
// Nothing to do for non-tabbed windows.
if (!is_type_normal())
@ -1972,6 +1970,12 @@ std::unique_ptr<content::EyeDropper> Browser::OpenEyeDropper(
return window()->OpenEyeDropper(frame, listener);
}
void Browser::InitiatePreview(content::WebContents& web_contents,
const GURL& url) {
// TODO(b/292184832): Implement PreviewManager and communicate with it here.
NOTIMPLEMENTED();
}
void Browser::DidFinishNavigation(
content::WebContents* web_contents,
content::NavigationHandle* navigation_handle) {
@ -2669,12 +2673,15 @@ void Browser::ScheduleUIUpdate(WebContents* source, unsigned changed_flags) {
scheduled_updates_[source] |= changed_flags;
if (!chrome_updater_factory_.HasWeakPtrs()) {
base::TimeDelta delay = update_ui_immediately_for_testing_
? base::Milliseconds(0)
: kUIUpdateCoalescingTime;
// No task currently scheduled, start another.
base::SingleThreadTaskRunner::GetCurrentDefault()->PostDelayedTask(
FROM_HERE,
base::BindOnce(&Browser::ProcessPendingUIUpdates,
chrome_updater_factory_.GetWeakPtr()),
kUIUpdateCoalescingTime);
delay);
}
}
@ -3303,12 +3310,3 @@ BackgroundContents* Browser::CreateBackgroundContents(
return contents;
}
#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
// TODO(crbug.com/1443349): Update function name (and trigger chain) when usage
// is finalized.
void Browser::RunScreenAIAnnotator() {
screen_ai::AXScreenAIAnnotatorFactory::GetForBrowserContext(profile())
->AnnotateScreenshot(this);
}
#endif

View File

@ -34,7 +34,6 @@
#include "chrome/browser/ui/unload_controller.h"
#include "components/paint_preview/buildflags/buildflags.h"
#include "components/prefs/pref_change_registrar.h"
#include "components/services/screen_ai/buildflags/buildflags.h"
#include "components/sessions/core/session_id.h"
#include "components/translate/content/browser/content_translate_driver.h"
#include "components/zoom/zoom_observer.h"
@ -248,7 +247,7 @@ class Browser : public TabStripModelObserver,
Type type;
// The associated profile.
raw_ptr<Profile, DanglingUntriaged> profile;
raw_ptr<Profile, AcrossTasksDanglingUntriaged> profile;
// Specifies the browser `is_trusted_source_` value.
bool trusted_source = false;
@ -321,9 +320,8 @@ class Browser : public TabStripModelObserver,
// maximizable.
bool can_maximize = true;
// Aspect ratio parameters specific to TYPE_PICTURE_IN_PICTURE.
double initial_aspect_ratio = 1.0;
bool lock_aspect_ratio = false;
// Document Picture in Picture options, specific to TYPE_PICTURE_IN_PICTURE.
absl::optional<blink::mojom::PictureInPictureWindowOptions> pip_options;
private:
friend class Browser;
@ -400,6 +398,12 @@ class Browser : public TabStripModelObserver,
force_skip_warning_user_on_close_ = force_skip_warning_user_on_close;
}
// Sets whether the UI should be immediately updated when scheduled on a
// test.
void set_update_ui_immediately_for_testing() {
update_ui_immediately_for_testing_ = true;
}
// Accessors ////////////////////////////////////////////////////////////////
const CreateParams& create_params() const { return create_params_; }
@ -415,8 +419,6 @@ class Browser : public TabStripModelObserver,
}
CreationSource creation_source() const { return creation_source_; }
bool is_delete_scheduled() const { return is_delete_scheduled_; }
// |window()| will return NULL if called before |CreateBrowserWindow()|
// is done.
BrowserWindow* window() const { return window_; }
@ -572,7 +574,26 @@ class Browser : public TabStripModelObserver,
// It starts beforeunload/unload processing as a side-effect.
bool TabsNeedBeforeUnloadFired();
// Browser closing consists of the following phases:
//
// 1. If the browser has WebContents with before unload handlers, then the
// before unload handlers are processed (this is asynchronous). During this
// phase IsAttemptingToCloseBrowser() returns true. When processing
// completes, the WebContents is removed. Once all WebContents are removed,
// the next phase happens. Note that this phase may be aborted.
// 2. The Browser window is hidden, and a task is posted that results in
// deleting the Browser (Views is responsible for posting the task). This
// phase can not be stopped. During this phase is_delete_scheduled()
// returns true. IsBrowserClosing() is nearly identical to
// is_delete_scheduled(), it's set just before removing the tabs.
//
// Note that there are other cases that may delay closing, such as downloads,
// but that is done before any of these steps.
// TODO(https://crbug.com/1434387): See about unifying IsBrowserClosing() and
// is_delete_scheduled().
bool IsAttemptingToCloseBrowser() const;
bool IsBrowserClosing() const;
bool is_delete_scheduled() const { return is_delete_scheduled_; }
// Invoked when the window containing us is closing. Performs the necessary
// cleanup.
@ -726,6 +747,8 @@ class Browser : public TabStripModelObserver,
std::unique_ptr<content::EyeDropper> OpenEyeDropper(
content::RenderFrameHost* frame,
content::EyeDropperListener* listener) override;
void InitiatePreview(content::WebContents& web_contents,
const GURL& url) override;
bool is_type_normal() const { return type_ == TYPE_NORMAL; }
bool is_type_popup() const { return type_ == TYPE_POPUP; }
@ -772,10 +795,6 @@ class Browser : public TabStripModelObserver,
StatusBubble* GetStatusBubbleForTesting();
#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
void RunScreenAIAnnotator();
#endif
private:
friend class BrowserTest;
friend class ExclusiveAccessTest;
@ -1157,10 +1176,6 @@ class Browser : public TabStripModelObserver,
bool ShouldHideUIForFullscreen() const;
// Indicates if we have called BrowserList::NotifyBrowserCloseStarted for the
// browser.
bool IsBrowserClosing() const;
// Returns true if we can start the shutdown sequence for the browser, i.e.
// the last browser window is being closed.
bool ShouldStartShutdown() const;
@ -1195,7 +1210,7 @@ class Browser : public TabStripModelObserver,
const Type type_;
// This Browser's profile.
const raw_ptr<Profile, DanglingUntriaged> profile_;
const raw_ptr<Profile, AcrossTasksDanglingUntriaged> profile_;
// Prevent Profile deletion until this browser window is closed.
std::unique_ptr<ScopedProfileKeepAlive> profile_keep_alive_;
@ -1333,6 +1348,9 @@ class Browser : public TabStripModelObserver,
// Tells if the browser should skip warning the user when closing the window.
bool force_skip_warning_user_on_close_ = false;
// If true, immediately updates the UI when scheduled.
bool update_ui_immediately_for_testing_ = false;
#if BUILDFLAG(ENABLE_EXTENSIONS)
std::unique_ptr<extensions::ExtensionBrowserWindowHelper>
extension_browser_window_helper_;

View File

@ -249,7 +249,7 @@ const AcceleratorMapping kAcceleratorMap[] = {
#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) && \
(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
{ui::VKEY_S, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN,
IDC_RUN_SCREEN_AI_VISUAL_ANNOTATIONS},
IDC_CONTENT_CONTEXT_RUN_LAYOUT_EXTRACTION},
#endif
};

View File

@ -123,6 +123,14 @@
#include "chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h"
#endif
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/constants/ash_features.h"
#endif
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#include "chromeos/startup/browser_params_proxy.h"
#endif
#if BUILDFLAG(ENABLE_WEBUI_TAB_STRIP)
#include "chrome/browser/ui/views/frame/webui_tab_strip_container_view.h"
#endif // BUILDFLAG(ENABLE_WEBUI_TAB_STRIP)
@ -193,6 +201,16 @@ class TabstripLikeBackground : public views::Background {
const raw_ptr<BrowserView> browser_view_;
};
bool IsCrosBatterySaverAvailable() {
#if BUILDFLAG(IS_CHROMEOS_ASH)
return ash::features::IsBatterySaverAvailable();
#elif BUILDFLAG(IS_CHROMEOS_LACROS)
return chromeos::BrowserParamsProxy::Get()->IsCrosBatterySaverAvailable();
#else
return false;
#endif
}
} // namespace
class ToolbarView::ContainerView : public views::View {
@ -397,7 +415,7 @@ void ToolbarView::Init() {
gfx::Size(kToolbarDividerWidth, kToolbarDividerHeight));
}
if (base::FeatureList::IsEnabled(features::kChromeLabs)) {
if (IsChromeLabsEnabled()) {
chrome_labs_model_ = std::make_unique<ChromeLabsModel>();
UpdateChromeLabsNewBadgePrefs(browser_->profile(),
chrome_labs_model_.get());
@ -407,7 +425,7 @@ void ToolbarView::Init() {
browser_view_, chrome_labs_model_.get()));
show_chrome_labs_button_.Init(
chrome_labs_prefs::kBrowserLabsEnabled, prefs,
chrome_labs_prefs::kBrowserLabsEnabledEnterprisePolicy, prefs,
base::BindRepeating(&ToolbarView::OnChromeLabsPrefChanged,
base::Unretained(this)));
// Set the visibility for the button based on initial enterprise policy
@ -417,8 +435,10 @@ void ToolbarView::Init() {
}
}
battery_saver_button_ = container_view_->AddChildView(
std::make_unique<BatterySaverButton>(browser_view_));
if (!IsCrosBatterySaverAvailable()) {
battery_saver_button_ = container_view_->AddChildView(
std::make_unique<BatterySaverButton>(browser_view_));
}
if (cast)
cast_ = container_view_->AddChildView(std::move(cast));
@ -454,7 +474,7 @@ void ToolbarView::Init() {
(browser_->profile()->IsOffTheRecord() &&
browser_->profile()->GetOTRProfileID().IsCaptivePortal());
#elif BUILDFLAG(IS_CHROMEOS_LACROS)
show_avatar_toolbar_button = !profiles::IsPublicSession();
show_avatar_toolbar_button = !profiles::IsManagedGuestSession();
#endif
const std::string sab_value = base::CommandLine::ForCurrentProcess()->
@ -848,16 +868,12 @@ void ToolbarView::InitLayout() {
// TODO(dfried): rename this constant.
const int location_bar_margin = GetLayoutConstant(TOOLBAR_STANDARD_SPACING);
const views::FlexSpecification account_container_flex_rule =
views::FlexSpecification(views::MinimumFlexSizeRule::kScaleToMinimum,
views::MaximumFlexSizeRule::kPreferred)
.WithOrder(1);
const views::FlexSpecification location_bar_flex_rule =
views::FlexSpecification(views::MinimumFlexSizeRule::kScaleToMinimum,
views::MaximumFlexSizeRule::kUnbounded)
.WithOrder(2);
constexpr int kSidePanelFlexOrder = 3;
constexpr int kExtensionsFlexOrder = 4;
.WithOrder(1);
constexpr int kSidePanelFlexOrder = 2;
constexpr int kExtensionsFlexOrder = 3;
layout_manager_ =
container_view_->SetLayoutManager(std::make_unique<views::FlexLayout>());

View File

@ -537,7 +537,7 @@ void BaseFile::AnnotateWithSourceInformation(
mojo::PendingRemote<quarantine::mojom::Quarantine> remote_quarantine,
OnAnnotationDoneCallback on_annotation_done_callback) {
std::move(on_annotation_done_callback)
.Run(DOWNLOAD_INTERRUPT_REASON_NONE);
.Run(DOWNLOAD_INTERRUPT_REASON_NONE);
}
} // namespace download

View File

@ -470,8 +470,6 @@ source_set("browser") {
"attribution_reporting/common_source_info.h",
"attribution_reporting/create_report_result.cc",
"attribution_reporting/create_report_result.h",
"attribution_reporting/destination_throttler.cc",
"attribution_reporting/destination_throttler.h",
"attribution_reporting/os_registration.cc",
"attribution_reporting/os_registration.h",
"attribution_reporting/rate_limit_result.h",
@ -577,6 +575,8 @@ source_set("browser") {
"blob_storage/blob_registry_wrapper.h",
"blob_storage/chrome_blob_storage_context.cc",
"blob_storage/chrome_blob_storage_context.h",
"blob_storage/file_backed_blob_factory_impl.cc",
"blob_storage/file_backed_blob_factory_impl.h",
"bluetooth/bluetooth_adapter_factory_wrapper.cc",
"bluetooth/bluetooth_adapter_factory_wrapper.h",
"bluetooth/bluetooth_allowed_devices.cc",
@ -787,6 +787,8 @@ source_set("browser") {
"devtools/forwarding_agent_host.h",
"devtools/frame_auto_attacher.cc",
"devtools/frame_auto_attacher.h",
"devtools/mojom_devtools_agent_host.cc",
"devtools/mojom_devtools_agent_host.h",
"devtools/network_service_devtools_observer.cc",
"devtools/network_service_devtools_observer.h",
"devtools/protocol/audits_handler.cc",
@ -905,8 +907,6 @@ source_set("browser") {
"download/save_package_serialization_handler.h",
"download/save_types.cc",
"download/save_types.h",
"environment_integrity/environment_integrity_service_impl.cc",
"environment_integrity/environment_integrity_service_impl.h",
"eye_dropper_chooser_impl.cc",
"eye_dropper_chooser_impl.h",
"feature_observer.cc",
@ -949,14 +949,18 @@ source_set("browser") {
"file_system_access/file_system_access_file_writer_impl.h",
"file_system_access/file_system_access_handle_base.cc",
"file_system_access/file_system_access_handle_base.h",
"file_system_access/file_system_access_lock_manager.cc",
"file_system_access/file_system_access_lock_manager.h",
"file_system_access/file_system_access_manager_impl.cc",
"file_system_access/file_system_access_manager_impl.h",
"file_system_access/file_system_access_observer_host.cc",
"file_system_access/file_system_access_observer_host.h",
"file_system_access/file_system_access_safe_move_helper.cc",
"file_system_access/file_system_access_safe_move_helper.h",
"file_system_access/file_system_access_transfer_token_impl.cc",
"file_system_access/file_system_access_transfer_token_impl.h",
"file_system_access/file_system_access_write_lock_manager.cc",
"file_system_access/file_system_access_write_lock_manager.h",
"file_system_access/file_system_access_watcher_manager.cc",
"file_system_access/file_system_access_watcher_manager.h",
"file_system_access/file_system_chooser.cc",
"file_system_access/file_system_chooser.h",
"file_system_access/fixed_file_system_access_permission_grant.cc",
@ -1022,8 +1026,6 @@ source_set("browser") {
"handwriting/handwriting_recognition_service_impl.h",
"handwriting/handwriting_recognizer_impl.cc",
"handwriting/handwriting_recognizer_impl.h",
"hid/hid_service.cc",
"hid/hid_service.h",
"host_zoom_level_context.cc",
"host_zoom_level_context.h",
"host_zoom_map_impl.cc",
@ -1049,8 +1051,6 @@ source_set("browser") {
"indexed_db/indexed_db_bucket_state_handle.h",
"indexed_db/indexed_db_callback_helpers.cc",
"indexed_db/indexed_db_callback_helpers.h",
"indexed_db/indexed_db_callbacks.cc",
"indexed_db/indexed_db_callbacks.h",
"indexed_db/indexed_db_class_factory.cc",
"indexed_db/indexed_db_class_factory.h",
"indexed_db/indexed_db_client_state_checker_wrapper.cc",
@ -1084,6 +1084,8 @@ source_set("browser") {
"indexed_db/indexed_db_external_object_storage.h",
"indexed_db/indexed_db_factory.cc",
"indexed_db/indexed_db_factory.h",
"indexed_db/indexed_db_factory_client.cc",
"indexed_db/indexed_db_factory_client.h",
"indexed_db/indexed_db_index_writer.cc",
"indexed_db/indexed_db_index_writer.h",
"indexed_db/indexed_db_internals_ui.cc",
@ -1094,8 +1096,6 @@ source_set("browser") {
"indexed_db/indexed_db_leveldb_env.h",
"indexed_db/indexed_db_leveldb_operations.cc",
"indexed_db/indexed_db_leveldb_operations.h",
"indexed_db/indexed_db_metadata_coding.cc",
"indexed_db/indexed_db_metadata_coding.h",
"indexed_db/indexed_db_pending_connection.cc",
"indexed_db/indexed_db_pending_connection.h",
"indexed_db/indexed_db_pre_close_task_queue.cc",
@ -1143,6 +1143,8 @@ source_set("browser") {
"interest_group/auction_url_loader_factory_proxy.h",
"interest_group/auction_worklet_manager.cc",
"interest_group/auction_worklet_manager.h",
"interest_group/bidding_and_auction_response.cc",
"interest_group/bidding_and_auction_response.h",
"interest_group/bidding_and_auction_serializer.cc",
"interest_group/bidding_and_auction_serializer.h",
"interest_group/bidding_and_auction_server_key_fetcher.cc",
@ -1151,6 +1153,8 @@ source_set("browser") {
"interest_group/debuggable_auction_worklet.h",
"interest_group/debuggable_auction_worklet_tracker.cc",
"interest_group/debuggable_auction_worklet_tracker.h",
"interest_group/header_direct_from_seller_signals.cc",
"interest_group/header_direct_from_seller_signals.h",
"interest_group/interest_group_auction.cc",
"interest_group/interest_group_auction.h",
"interest_group/interest_group_auction_reporter.cc",
@ -1472,6 +1476,8 @@ source_set("browser") {
"preloading/prefetch/prefetch_document_manager.h",
"preloading/prefetch/prefetch_features.cc",
"preloading/prefetch/prefetch_features.h",
"preloading/prefetch/prefetch_match_resolver.cc",
"preloading/prefetch/prefetch_match_resolver.h",
"preloading/prefetch/prefetch_metrics.cc",
"preloading/prefetch/prefetch_network_context.cc",
"preloading/prefetch/prefetch_network_context.h",
@ -1752,9 +1758,6 @@ source_set("browser") {
"renderer_host/isolated_web_app_throttle.h",
"renderer_host/keep_alive_handle_factory.cc",
"renderer_host/keep_alive_handle_factory.h",
"renderer_host/loading_state.h",
"renderer_host/local_network_access_util.cc",
"renderer_host/local_network_access_util.h",
"renderer_host/media/aec_dump_manager_impl.cc",
"renderer_host/media/aec_dump_manager_impl.h",
"renderer_host/media/audio_input_device_manager.cc",
@ -1871,6 +1874,8 @@ source_set("browser") {
"renderer_host/pending_beacon_service.h",
"renderer_host/policy_container_host.cc",
"renderer_host/policy_container_host.h",
"renderer_host/private_network_access_util.cc",
"renderer_host/private_network_access_util.h",
"renderer_host/recently_destroyed_hosts.cc",
"renderer_host/recently_destroyed_hosts.h",
"renderer_host/render_frame_host_csp_context.cc",
@ -2015,6 +2020,8 @@ source_set("browser") {
"service_worker/service_worker_context_wrapper.h",
"service_worker/service_worker_controllee_request_handler.cc",
"service_worker/service_worker_controllee_request_handler.h",
"service_worker/service_worker_device_delegate_observer.cc",
"service_worker/service_worker_device_delegate_observer.h",
"service_worker/service_worker_fetch_dispatcher.cc",
"service_worker/service_worker_fetch_dispatcher.h",
"service_worker/service_worker_host.cc",
@ -2177,9 +2184,13 @@ source_set("browser") {
"tracing/memory_instrumentation_util.h",
"tracing/startup_tracing_controller.cc",
"tracing/startup_tracing_controller.h",
"tracing/trace_report_database.cc",
"tracing/trace_report_database.h",
"tracing/tracing_controller_impl.cc",
"tracing/tracing_controller_impl.h",
"tracing/tracing_controller_impl_data_endpoint.cc",
"tracing/tracing_scenario.cc",
"tracing/tracing_scenario.h",
"tracing/tracing_service_controller.cc",
"tracing/tracing_service_controller.h",
"ukm_internals_ui.cc",
@ -2604,8 +2615,8 @@ source_set("browser") {
"renderer_host/text_input_client_mac.mm",
"renderer_host/text_input_host_impl.h",
"renderer_host/text_input_host_impl.mm",
"renderer_host/webmenurunner_mac.h",
"renderer_host/webmenurunner_mac.mm",
"renderer_host/web_menu_runner_mac.h",
"renderer_host/web_menu_runner_mac.mm",
"sandbox_parameters_mac.h",
"sandbox_parameters_mac.mm",
"sandbox_support_mac_impl.h",
@ -2624,6 +2635,7 @@ source_set("browser") {
]
deps += [
":mac_helpers",
"//components/device_event_log",
"//components/remote_cocoa/app_shim",
"//components/remote_cocoa/browser",
"//components/remote_cocoa/common:mojo",
@ -2633,6 +2645,7 @@ source_set("browser") {
]
frameworks += [
"AppKit.framework",
"AVFAudio.framework",
"Carbon.framework",
"CoreGraphics.framework",
"QuartzCore.framework",
@ -2644,6 +2657,8 @@ source_set("browser") {
} else if (is_ios) {
sources += [
"child_process_launcher_helper_ios.cc",
"date_time_chooser/ios/date_time_chooser_ios.h",
"date_time_chooser/ios/date_time_chooser_ios.mm",
"devtools/protocol/native_input_event_builder_ios.mm",
"renderer_host/browser_compositor_ios.h",
"renderer_host/browser_compositor_ios.mm",
@ -2658,6 +2673,8 @@ source_set("browser") {
"renderer_host/popup_menu_helper_ios.mm",
"renderer_host/render_widget_host_view_ios.h",
"renderer_host/render_widget_host_view_ios.mm",
"renderer_host/web_menu_runner_ios.h",
"renderer_host/web_menu_runner_ios.mm",
"speech/tts_ios.mm",
"web_contents/web_contents_view_ios.h",
"web_contents/web_contents_view_ios.mm",
@ -2776,8 +2793,6 @@ source_set("browser") {
"renderer_host/dwrite_font_file_util_win.h",
"renderer_host/dwrite_font_proxy_impl_win.cc",
"renderer_host/dwrite_font_proxy_impl_win.h",
"renderer_host/dwrite_font_uma_logging_win.cc",
"renderer_host/dwrite_font_uma_logging_win.h",
"renderer_host/legacy_render_widget_host_win.cc",
"renderer_host/legacy_render_widget_host_win.h",
"renderer_host/virtual_keyboard_controller_win.cc",
@ -2915,6 +2930,14 @@ source_set("browser") {
sources += [
"media/cdm_file_impl.cc",
"media/cdm_file_impl.h",
"media/cdm_storage_common.cc",
"media/cdm_storage_common.h",
"media/cdm_storage_database.cc",
"media/cdm_storage_database.h",
"media/cdm_storage_host.cc",
"media/cdm_storage_host.h",
"media/cdm_storage_manager.cc",
"media/cdm_storage_manager.h",
"media/media_license_database.cc",
"media/media_license_database.h",
"media/media_license_manager.cc",
@ -2959,6 +2982,13 @@ source_set("browser") {
configs += [ "//build/config/linux/pangocairo" ]
}
if (is_android || is_ios) {
sources += [
"date_time_chooser/date_time_chooser.cc",
"date_time_chooser/date_time_chooser.h",
]
}
if (is_android) {
sources += [
"accessibility/accessibility_tree_formatter_android.cc",
@ -2997,8 +3027,6 @@ source_set("browser") {
"android/content_url_loader_factory.cc",
"android/content_url_loader_factory.h",
"android/content_view_statics.cc",
"android/date_time_chooser_android.cc",
"android/date_time_chooser_android.h",
"android/devtools_auth.cc",
"android/dialog_overlay_impl.cc",
"android/dialog_overlay_impl.h",
@ -3078,6 +3106,8 @@ source_set("browser") {
"child_process_launcher_helper_android.cc",
"contacts/contacts_provider_android.cc",
"contacts/contacts_provider_android.h",
"date_time_chooser/android/date_time_chooser_android.cc",
"date_time_chooser/android/date_time_chooser_android.h",
"font_unique_name_lookup/font_unique_name_lookup.cc",
"font_unique_name_lookup/font_unique_name_lookup.h",
"font_unique_name_lookup/font_unique_name_lookup_service.cc",
@ -3183,6 +3213,10 @@ source_set("browser") {
"direct_sockets/direct_sockets_service_impl.cc",
"direct_sockets/direct_sockets_service_impl.h",
# WebHID is non-Android
"hid/hid_service.cc",
"hid/hid_service.h",
# Non-Android platforms that don't presently support
# enable_screen_capture, like Fuchsia, nevertheless compile
# these files. This follows the pattern of #ifdef-ing around Android
@ -3200,6 +3234,10 @@ source_set("browser") {
"serial/serial_service.cc",
"serial/serial_service.h",
# WebHID is non-Android
"service_worker/service_worker_hid_delegate_observer.cc",
"service_worker/service_worker_hid_delegate_observer.h",
# Most speech code is non-Android.
"speech/endpointer/endpointer.cc",
"speech/endpointer/endpointer.h",
@ -3243,6 +3281,7 @@ source_set("browser") {
deps += [
"//components/speech:speech",
"//components/vector_icons",
"//components/webauthn/json",
"//content/browser/tracing:resources",
]
}
@ -3359,11 +3398,16 @@ source_set("browser") {
"xr/service/xr_permission_results.h",
"xr/service/xr_runtime_manager_impl.cc",
"xr/service/xr_runtime_manager_impl.h",
"xr/webxr_internals/webxr_internals_handler_impl.cc",
"xr/webxr_internals/webxr_internals_handler_impl.h",
"xr/webxr_internals/webxr_internals_ui.cc",
"xr/webxr_internals/webxr_internals_ui.h",
"xr/xr_utils.cc",
"xr/xr_utils.h",
]
deps += [
"//content/browser/xr/webxr_internals/mojom:mojo_bindings",
"//device/vr/buildflags",
"//device/vr/orientation",
"//services/metrics/public/cpp:ukm_builders",