Commit 3b8a2f1e authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Leverage ImmersiveModeControllerChromeos to Lacros

CL also instantiates chromeos::TabletState in the context of the
lacros/chrome.
For now it is dummy, but https://crrev.com/c/2491517 (see the
relation chain) plumbs it to zcr_remove_shell_v1 EXO extension.

BUG=1113900
R=jamescook@chromium.org, sky@chromium.org

Change-Id: Ieffa750e5b7051304219f8a1833157242ff435eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2488225
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820832}
parent 4cca0ff7
......@@ -30,6 +30,7 @@
#include "base/threading/thread_task_runner_handle.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/banners/app_banner_manager.h"
......@@ -3284,7 +3285,7 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
}
bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {
#if defined(OS_CHROMEOS)
#if defined(OS_CHROMEOS) || BUILDFLAG(IS_LACROS)
// Kiosk mode needs the whole screen.
if (chrome::IsRunningInAppMode())
return false;
......
......@@ -5,8 +5,9 @@
#include "chrome/browser/ui/views/frame/immersive_mode_controller_stub.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#if defined(OS_CHROMEOS)
#if defined(OS_CHROMEOS) || BUILDFLAG(IS_LACROS)
#include "chrome/browser/ui/views/frame/immersive_mode_controller_chromeos.h"
#endif
......@@ -17,7 +18,7 @@
namespace chrome {
std::unique_ptr<ImmersiveModeController> CreateImmersiveModeController() {
#if defined(OS_CHROMEOS)
#if defined(OS_CHROMEOS) || BUILDFLAG(IS_LACROS)
return std::make_unique<ImmersiveModeControllerChromeos>();
#elif defined(OS_MAC)
return CreateImmersiveModeControllerMac();
......
......@@ -212,7 +212,10 @@ source_set("wayland") {
# TODO(crbug.com/1052397): Rename chromeos_is_browser_only to is_lacros.
if (chromeos_is_browser_only) {
deps += [ "//chromeos/crosapi/cpp" ]
deps += [
"//chromeos/crosapi/cpp",
"//chromeos/ui/base",
]
}
defines = [ "OZONE_IMPLEMENTATION" ]
......
include_rules = [
# For Lacros.
"+chromeos/crosapi/cpp/crosapi_constants.h",
"+chromeos/ui/base",
]
......@@ -8,6 +8,7 @@
#include <memory>
#include <vector>
#include "build/chromeos_buildflags.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/events/event.h"
#include "ui/ozone/platform/wayland/common/wayland_object.h"
......@@ -16,6 +17,10 @@
#include "ui/ozone/platform/wayland/host/wayland_data_source.h"
#include "ui/ozone/platform/wayland/host/wayland_window_manager.h"
#if BUILDFLAG(IS_LACROS)
#include "chromeos/ui/base/tablet_state.h"
#endif
namespace gfx {
class Point;
}
......@@ -235,6 +240,10 @@ class WaylandConnection {
// Manages Wayland windows.
WaylandWindowManager wayland_window_manager_;
#if BUILDFLAG(IS_LACROS)
chromeos::TabletState tablet_state_;
#endif
bool scheduled_flush_ = false;
EventSerial serial_;
......
......@@ -17,6 +17,7 @@
#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
......@@ -652,11 +653,11 @@ void Label::PaintText(gfx::Canvas* canvas) {
if (display_text_)
display_text_->Draw(canvas);
#if DCHECK_IS_ON() && !defined(OS_CHROMEOS)
// TODO(crbug.com/1139395): Enable this DCHECK on ChromeOS by fixing either
// this check (to correctly idenfify more paints-on-opaque cases), refactoring
// parents to use background() or by fixing subpixel-rendering issues that the
// DCHECK detects.
#if DCHECK_IS_ON() && !defined(OS_CHROMEOS) && !BUILDFLAG(IS_LACROS)
// TODO(crbug.com/1139395): Enable this DCHECK on ChromeOS and LaCrOS by
// fixing either this check (to correctly idenfify more paints-on-opaque
// cases), refactoring parents to use background() or by fixing
// subpixel-rendering issues that the DCHECK detects.
if (!display_text_ || display_text_->subpixel_rendering_suppressed())
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment