Commit 16c153e6 authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Enable ATK and Glib on Linux/Ozone

BUG=988094,1014934
R=sky
CC=nickdiego,msisov,adunaev

Change-Id: I05b4bae5ccce53053ad4ae8269db849c2db9e569
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2056570Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: default avatarNick Yamane <nickdiego@igalia.com>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742233}
parent 8574431a
......@@ -21,8 +21,7 @@ import("//build/config/chromecast_build.gni")
declare_args() {
# Indicates if Ozone is enabled. Ozone is a low-level library layer for Linux
# that does not require X11. Enabling this feature disables use of glib, x11,
# Pango, and Cairo.
# that does not require X11. Enabling this feature disables use of x11.
use_ozone = is_chromeos || (is_chromecast && !is_android) || is_fuchsia
# Indicates if Aura is enabled. Aura is a low-level windowing library, sort
......@@ -35,7 +34,7 @@ declare_args() {
toolkit_views = is_mac || is_win || is_linux || (is_fuchsia && is_chromecast)
# Whether we should use glib, a low level C utility library.
use_glib = is_linux && !use_ozone
use_glib = is_desktop_linux && !is_chromecast
}
# Additional dependent variables -----------------------------------------------
......@@ -49,7 +48,7 @@ use_x11 = is_linux && !use_ozone
assert(!use_glib || (is_linux && !is_chromeos && !is_chromecast))
# Whether to use atk, the Accessibility ToolKit library
use_atk = is_desktop_linux && use_x11
use_atk = is_desktop_linux && !is_chromecast
# =============================================
# PLEASE DO NOT ADD MORE FLAGS TO THIS FILE
# =============================================
......
......@@ -145,11 +145,4 @@ DiscardAtkKeyEvent AtkUtilAuraLinux::HandleAtkKeyEvent(
return discard ? DiscardAtkKeyEvent::Discard : DiscardAtkKeyEvent::Retain;
}
#if !defined(USE_X11)
DiscardAtkKeyEvent AtkUtilAuraLinux::HandleKeyEvent(
const ui::KeyEvent& ui_key_event) {
NOTREACHED();
}
#endif
} // namespace ui
......@@ -470,6 +470,7 @@ source_set("native_widget_types") {
public_deps = [
":gfx_export",
"//base",
"//ui/base:buildflags",
]
}
......
......@@ -6,6 +6,7 @@ include_rules = [
"+skia/ext",
"+third_party/harfbuzz-ng",
"+third_party/skia",
"+ui/base/buildflags.h",
"+ui/ios",
"-testing/gmock",
......
......@@ -9,6 +9,7 @@
#include "base/logging.h"
#include "build/build_config.h"
#include "ui/base/buildflags.h"
#include "ui/gfx/gfx_export.h"
#if defined(OS_ANDROID)
......@@ -102,7 +103,7 @@ class ViewAndroid;
#endif
class SkBitmap;
#if defined(USE_X11)
#if BUILDFLAG(USE_ATK)
extern "C" {
struct _AtkObject;
typedef struct _AtkObject AtkObject;
......@@ -205,7 +206,7 @@ typedef NSFont* NativeFont;
typedef id NativeViewAccessible;
#else // Android, Linux, Chrome OS, etc.
// Linux doesn't have a native font type.
#if defined(USE_X11)
#if BUILDFLAG(USE_ATK)
typedef AtkObject* NativeViewAccessible;
#else
typedef struct _UnimplementedNativeViewAccessible
......
......@@ -772,13 +772,6 @@ jumbo_component("views") {
"widget/desktop_aura/x11_topmost_window_finder.cc",
"widget/desktop_aura/x11_whole_screen_move_loop.cc",
]
if (use_atk) {
sources += [
"accessibility/view_ax_platform_node_delegate_auralinux.cc",
"accessibility/view_ax_platform_node_delegate_auralinux.h",
]
configs += [ "//build/config/linux/atk" ]
}
} else if (is_win) {
public += [ "widget/desktop_aura/desktop_window_tree_host_win.h" ]
sources += [
......@@ -816,6 +809,13 @@ jumbo_component("views") {
[ "widget/desktop_aura/desktop_window_tree_host_platform.cc" ]
deps += [ "//ui/platform_window/extensions" ]
}
if (use_atk) {
sources += [
"accessibility/view_ax_platform_node_delegate_auralinux.cc",
"accessibility/view_ax_platform_node_delegate_auralinux.h",
]
configs += [ "//build/config/linux/atk" ]
}
}
}
......
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