From 6731b688adc6e481fb89bc07cd71e76adfbf44d9 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Mon, 31 Jul 2017 02:11:05 +0000 Subject: [PATCH 01/16] Add build script for desktop The utility script is added for desktop build. * Usage: $ ./efl/build/build_desktop.sh --libcc_chromium_efl_path {M56_CHROMIUM_PATH} Change-Id: Idd020fc5353961e30f50d265acee24c32f830197 Signed-off-by: Youngsoo Choi --- efl/build/build_desktop.sh | 25 +++++++++++++++++++++++++ efl/build/common.sh | 9 +++++++++ 2 files changed, 34 insertions(+) create mode 100755 efl/build/build_desktop.sh create mode 100644 efl/build/common.sh diff --git a/efl/build/build_desktop.sh b/efl/build/build_desktop.sh new file mode 100755 index 0000000..63f629f --- /dev/null +++ b/efl/build/build_desktop.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +export SCRIPTDIR=$(readlink -e $(dirname $0)) + +source ${SCRIPTDIR}/common.sh +trap 'error_report $0 $LINENO' ERR SIGINT SIGTERM SIGQUIT + +# "|| :" means "or always succeeding built-in command" +CHROMIUM_EFL_PATH=$(echo "$@" | grep -Po "(?<=\--libcc_chromium_efl_path\s)[^\s]*" || :) + +echo " --libcc_chromium_efl_path : $CHROMIUM_EFL_PATH" + +if [ "$CHROMIUM_EFL_PATH" == "" ]; then + echo "Please set --libcc_chromium_efl_path for desktop build." + exit 1 +fi + +${TOPDIR}/script/bootstrap.py \ + --define "use_efl=1 libchromiumcontent_component=1" \ + --dev \ + --disable_clang \ + -v \ + $@ + +${TOPDIR}/script/build.py -c D diff --git a/efl/build/common.sh b/efl/build/common.sh new file mode 100644 index 0000000..a46b567 --- /dev/null +++ b/efl/build/common.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +export SCRIPTDIR=$(readlink -e $(dirname $0)) +export TOPDIR=$(readlink -f "${SCRIPTDIR}/../..") + +function error_report() { + echo "Error: File:$1 Line:$2" + exit 1 +} -- 2.7.4 From 04ff51672b66c8948aaa54f9b5bd084416ae0499 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Sun, 30 Jul 2017 10:57:54 +0000 Subject: [PATCH 02/16] Support c++11 feature MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit For electron build, c++11 feature is necessary. Otherwise, tons of errors occur like below. >> note: C++11 ‘constexpr’ only available with -std=c++11 or -std=gnu++11 >> error: ‘constexpr’ does not name a type Change-Id: I58307fad59b3d0dfa7ff788797a09564d1337926 Signed-off-by: Youngsoo Choi --- common.gypi | 1 + efl/features.gypi | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 efl/features.gypi diff --git a/common.gypi b/common.gypi index 7c1bf36..0e9c276 100644 --- a/common.gypi +++ b/common.gypi @@ -2,6 +2,7 @@ 'includes': [ 'toolchain.gypi', 'vendor/brightray/brightray.gypi', + 'efl/features.gypi', ], 'variables': { # Tell crashpad to build as external project. diff --git a/efl/features.gypi b/efl/features.gypi new file mode 100644 index 0000000..7a58de9 --- /dev/null +++ b/efl/features.gypi @@ -0,0 +1,11 @@ +{ + 'target_defaults': { + 'target_conditions': [ + ['_toolset=="target"', { + 'cflags_cc': [ + '-std=c++11', + ], + }] + ], + }, +} -- 2.7.4 From db5ddcb5f347f3d3c3c2cb7eda1b58fd6ec9dc02 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Sun, 30 Jul 2017 16:02:42 +0900 Subject: [PATCH 03/16] Build electron linking to chromium-efl The electron has been liked to prebuilt chromium that is downloaded from amazon server. This let electron link to chromium-efl. Change-Id: I8adc61d9d7f5541bc159943e9eb4f7aa20e75d75 Signed-off-by: Youngsoo Choi --- atom/browser/atom_browser_client.h | 2 +- common.gypi | 1 + electron.gyp | 15 ++++++++------- script/bootstrap.py | 19 +++++++++++++------ script/build-libchromiumcontent.py | 2 +- script/update.py | 3 +++ vendor/brightray/brightray.gyp | 9 ++++++++- vendor/brightray/brightray.gypi | 21 ++++++++++++++++----- vendor/brightray/script/bootstrap | 18 ++++++++++++++---- .../vendor/libchromiumcontent/script/build | 3 ++- .../vendor/libchromiumcontent/script/create-dist | 3 ++- .../vendor/libchromiumcontent/script/download | 9 ++++++++- .../vendor/libchromiumcontent/script/update | 12 ++++++++---- 13 files changed, 85 insertions(+), 32 deletions(-) diff --git a/atom/browser/atom_browser_client.h b/atom/browser/atom_browser_client.h index 70573d6..a794fba 100644 --- a/atom/browser/atom_browser_client.h +++ b/atom/browser/atom_browser_client.h @@ -58,7 +58,7 @@ class AtomBrowserClient : public brightray::BrowserClient, content::BrowserContext* browser_context, content::SiteInstance* current_instance, const GURL& dest_url, - content::SiteInstance** new_instance) override; + content::SiteInstance** new_instance); //override; void AppendExtraCommandLineSwitches(base::CommandLine* command_line, int child_process_id) override; void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) override; diff --git a/common.gypi b/common.gypi index 0e9c276..80d3b13 100644 --- a/common.gypi +++ b/common.gypi @@ -15,6 +15,7 @@ 'python': 'python', 'openssl_fips': '', 'openssl_no_asm': 1, + 'use_efl%': 0, 'use_openssl_def': 0, 'OPENSSL_PRODUCT': 'libopenssl.a', 'node_release_urlbase': 'https://atom.io/download/atom-shell', diff --git a/electron.gyp b/electron.gyp index ce3673a..3c5f7c1 100644 --- a/electron.gyp +++ b/electron.gyp @@ -191,21 +191,22 @@ }, { 'copied_libraries': [ '<(PRODUCT_DIR)/lib/libnode.so', - '<(libchromiumcontent_dir)/libffmpeg.so', +# '<(libchromiumcontent_dir)/libffmpeg.so', ], }], ], }, 'destination': '<(PRODUCT_DIR)', 'files': [ +# ' Date: Wed, 2 Aug 2017 06:12:33 +0000 Subject: [PATCH 04/16] Refer to desktop sysroot of chromium-efl Change-Id: Ic4cc6c68cb4ebca5d8fa78e1bedbfa95ad5d7fcf Signed-off-by: Youngsoo Choi --- vendor/brightray/brightray.gyp | 54 ++++++++++++++++------ .../tools/generate_filenames_gypi.py | 5 ++ 2 files changed, 44 insertions(+), 15 deletions(-) diff --git a/vendor/brightray/brightray.gyp b/vendor/brightray/brightray.gyp index b8a5843..0ab858f 100644 --- a/vendor/brightray/brightray.gyp +++ b/vendor/brightray/brightray.gyp @@ -39,26 +39,48 @@ }, 'sources': [ '<@(brightray_sources)' ], 'conditions': [ - # Link with libraries of libchromiumcontent. - ['OS=="linux" and libchromiumcontent_component==0', { - # On Linux we have to use "--whole-archive" to force executable - # to include all symbols, otherwise we will have plenty of - # unresolved symbols errors. + ['use_efl==1', { 'direct_dependent_settings': { 'ldflags': [ + '-Wl,-rpath=<(libchromiumcontent_shared_libraries_dir)', '-Wl,--whole-archive', '<@(libchromiumcontent_libraries)', +# ' Date: Sun, 30 Jul 2017 11:03:26 +0000 Subject: [PATCH 05/16] Use platform toolchain The electron has used toolchain debian_wheezy_amd64-sysroot that is downloaded from amazon server. This makes electron use platfrom toolchain. Change-Id: I59ba9d8954a770b7a95d0c4c2540678acffeb3e9 Signed-off-by: Youngsoo Choi --- common.gypi | 9 ++++++++- electron.gyp | 22 ++++++++++++---------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/common.gypi b/common.gypi index 80d3b13..3c8aaf0 100644 --- a/common.gypi +++ b/common.gypi @@ -1,9 +1,16 @@ { 'includes': [ - 'toolchain.gypi', 'vendor/brightray/brightray.gypi', 'efl/features.gypi', ], + 'conditions': [ + ['use_efl!=1', { + 'includes': [ + 'toolchain.gypi', + ], + }] + ], + 'variables': { # Tell crashpad to build as external project. 'crashpad_dependencies': 'external', diff --git a/electron.gyp b/electron.gyp index 3c5f7c1..49735c5 100644 --- a/electron.gyp +++ b/electron.gyp @@ -342,16 +342,6 @@ '<@(lib_sources_linux)', '<@(lib_sources_nss)', ], - 'link_settings': { - 'ldflags': [ - # Make binary search for libraries under current directory, so we - # don't have to manually set $LD_LIBRARY_PATH: - # http://serverfault.com/questions/279068/cant-find-so-in-the-same-directory-as-the-executable - '-rpath \$$ORIGIN', - # Make native module dynamic loading work. - '-rdynamic', - ], - }, # Required settings of using breakpad. 'cflags_cc': [ '-Wno-empty-body', @@ -364,6 +354,18 @@ 'vendor/breakpad/breakpad.gyp:breakpad_client', ], }], # OS=="linux" + ['use_efl!=1', { + 'link_settings': { + 'ldflags': [ + # Make binary search for libraries under current directory, so we + # don't have to manually set $LD_LIBRARY_PATH: + # http://serverfault.com/questions/279068/cant-find-so-in-the-same-directory-as-the-executable + '-rpath \$$ORIGIN', + # Make native module dynamic loading work. + '-rdynamic', + ], + }, + }], # use_efl!=1 ], }, # target <(product_name)_lib { -- 2.7.4 From cf312c859672f3d9174d398c0aa50df0c1fd1d26 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Wed, 2 Aug 2017 08:13:53 +0000 Subject: [PATCH 06/16] Include header path In file included from /home/kenshin.choi/blink/workspace/public/chromium-efl/chromium-efl/content/browser/compositor/image_transport_factory.h:15:0, from /home/kenshin.choi/blink/workspace/public/chromium-efl/chromium-efl/content/browser/renderer_host/delegated_frame_host.h:15, from ../../atom/browser/osr/osr_render_widget_host_view.h:23, from ../../atom/browser/api/atom_api_web_contents.cc:20: /home/kenshin.choi/blink/workspace/public/chromium-efl/chromium-efl/gpu/ipc/common/surface_handle.h:37:2: error: #error Platform not supported. Change-Id: I901bf6fc3134017dd8e9c81ca8e367835a2c9839 Signed-off-by: Youngsoo Choi --- electron.gyp | 1 + vendor/brightray/brightray.gyp | 1 + 2 files changed, 2 insertions(+) diff --git a/electron.gyp b/electron.gyp index 49735c5..d14a04e 100644 --- a/electron.gyp +++ b/electron.gyp @@ -268,6 +268,7 @@ '<(libchromiumcontent_src_dir)/third_party/', '<(libchromiumcontent_src_dir)/components/cdm', '<(libchromiumcontent_src_dir)/third_party/widevine', + '<(libchromiumcontent_src_dir)/tizen_src/chromium_impl', ], 'direct_dependent_settings': { 'include_dirs': [ diff --git a/vendor/brightray/brightray.gyp b/vendor/brightray/brightray.gyp index 0ab858f..e1a4bb2 100644 --- a/vendor/brightray/brightray.gyp +++ b/vendor/brightray/brightray.gyp @@ -18,6 +18,7 @@ '<(libchromiumcontent_src_dir)/third_party/skia/include/core', '<(libchromiumcontent_src_dir)/third_party/mojo/src', '<(libchromiumcontent_src_dir)/third_party/WebKit', + '<(libchromiumcontent_src_dir)/tizen_src/chromium_impl', '<(libchromiumcontent_dir)/gen', ], 'direct_dependent_settings': { -- 2.7.4 From bfa4f35668cd2240120a1a192125f7e8c883552f Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Wed, 2 Aug 2017 14:07:53 +0000 Subject: [PATCH 07/16] Support EFL libraries via jhbuild The ecore, elocation, and elementary are added to be linked in build. Change-Id: Ie021c85e209108bbb51e89baba0fa1dd61a55511 Signed-off-by: Youngsoo Choi --- efl/build/build_desktop.sh | 40 ++++ efl/build/common.sh | 13 ++ efl/build/jhbuild/jhbuild.modules | 222 +++++++++++++++++++++ efl/build/jhbuild/jhbuildrc | 54 +++++ efl/build/system.gyp | 92 +++++++++ electron.gyp | 9 +- vendor/brightray/brightray.gyp | 2 +- .../tools/generate_filenames_gypi.py | 2 +- 8 files changed, 430 insertions(+), 4 deletions(-) create mode 100755 efl/build/jhbuild/jhbuild.modules create mode 100644 efl/build/jhbuild/jhbuildrc create mode 100644 efl/build/system.gyp diff --git a/efl/build/build_desktop.sh b/efl/build/build_desktop.sh index 63f629f..1cb62a3 100755 --- a/efl/build/build_desktop.sh +++ b/efl/build/build_desktop.sh @@ -5,6 +5,8 @@ export SCRIPTDIR=$(readlink -e $(dirname $0)) source ${SCRIPTDIR}/common.sh trap 'error_report $0 $LINENO' ERR SIGINT SIGTERM SIGQUIT +host_arch=$(getHostArch) + # "|| :" means "or always succeeding built-in command" CHROMIUM_EFL_PATH=$(echo "$@" | grep -Po "(?<=\--libcc_chromium_efl_path\s)[^\s]*" || :) @@ -15,6 +17,42 @@ if [ "$CHROMIUM_EFL_PATH" == "" ]; then exit 1 fi +# jhbuild + +JHBUILD_STAMPFILE="${TOPDIR}/out/Dependencies/Root/jhbuild.stamp" + +forceJHBuildIfNeeded() { + if [[ $FORCE_JHBUILD == 1 ]]; then + rm -f $JHBUILD_STAMPFILE + return + fi + + # Check if anything in jhbuild is more recent than stamp file. + if [ $(find $SCRIPTDIR/jhbuild -type f -newer $JHBUILD_STAMPFILE -print | wc -l) != "0" ]; then + rm -f $JHBUILD_STAMPFILE + fi +} + +forceJHBuildIfNeeded + +JHBUILD_DEPS="${TOPDIR}/out/Dependencies/Root" +if [ "${host_arch}" == "x64" ]; then + _LIBDIR=lib64 +elif [ "${host_arch}" == "x86" ]; then + _LIBDIR=lib +fi +export PKG_CONFIG_PATH="${JHBUILD_DEPS}/${_LIBDIR}/pkgconfig" + +jhbuild --no-interact -f ${SCRIPTDIR}/jhbuild/jhbuildrc + +if [ ! -f "$JHBUILD_STAMPFILE" ]; then + if [[ $? == 0 ]]; then + echo "Yay! jhbuild done!" > $JHBUILD_STAMPFILE + fi +fi + +# bootstrap + ${TOPDIR}/script/bootstrap.py \ --define "use_efl=1 libchromiumcontent_component=1" \ --dev \ @@ -22,4 +60,6 @@ ${TOPDIR}/script/bootstrap.py \ -v \ $@ +# build + ${TOPDIR}/script/build.py -c D diff --git a/efl/build/common.sh b/efl/build/common.sh index a46b567..25583ce 100644 --- a/efl/build/common.sh +++ b/efl/build/common.sh @@ -7,3 +7,16 @@ function error_report() { echo "Error: File:$1 Line:$2" exit 1 } + +function getHostOs() { + echo $(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/') +} + +function getHostArch() { + echo $(uname -m | sed -e \ + 's/i.86/x86/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/x86/;s/aarch64/arm64/') +} + +function getPythonVersion() { + echo $(python --version 2>&1 | sed -e 's/Python \([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/') +} diff --git a/efl/build/jhbuild/jhbuild.modules b/efl/build/jhbuild/jhbuild.modules new file mode 100755 index 0000000..d87eb36 --- /dev/null +++ b/efl/build/jhbuild/jhbuild.modules @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/efl/build/jhbuild/jhbuildrc b/efl/build/jhbuild/jhbuildrc new file mode 100644 index 0000000..122866e --- /dev/null +++ b/efl/build/jhbuild/jhbuildrc @@ -0,0 +1,54 @@ +#!/usr/bin/env python +# Copyright (C) 2013 Samsung Electronics +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +import multiprocessing +import sys +import os + +__efl_build_directory = os.path.abspath(os.path.dirname(__file__)) +sys.path = [__efl_build_directory] + sys.path + +build_policy = 'updated' + +__moduleset_file_uri = 'file://' + os.path.join(__efl_build_directory, 'jhbuild.modules') +moduleset = [ __moduleset_file_uri, ] + +#__extra_modules = os.environ.get("WEBKIT_EXTRA_MODULES", "").split(",") +modules = [ 'electron-efl-dependencies', ] + +#outdir = os.environ.get('GN_GENERATOR_OUTPUT', 'out') +outdir = os.path.join(__efl_build_directory, '../../../out') + +checkoutroot = os.path.abspath(os.path.join(outdir,'Dependencies', 'Source')) +prefix = os.path.abspath(os.path.join(outdir,'Dependencies', 'Root')) + +del outdir + +nonotify = True +notrayicon = True + +if 'NUMBER_OF_PROCESSORS' in os.environ: + jobs = os.environ['NUMBER_OF_PROCESSORS'] + +# Use system libraries while building. +if use_lib64: + _libdir = 'lib64' +else: + _libdir = 'lib' + +partial_build = False + diff --git a/efl/build/system.gyp b/efl/build/system.gyp new file mode 100644 index 0000000..e1894c0 --- /dev/null +++ b/efl/build/system.gyp @@ -0,0 +1,92 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'variables': { + 'pkg-config': 'pkg-config', + }, + 'targets': [ + { + 'target_name': 'ecore-x', + 'type': 'none', + 'direct_dependent_settings': { + 'cflags': [ + ' Date: Wed, 2 Aug 2017 15:15:54 +0000 Subject: [PATCH 08/16] Support icu library via jhbuild Change-Id: I1c8a34dc21e234a9123a25c94d165738d3d7c62e Signed-off-by: Youngsoo Choi --- efl/build/build_desktop.sh | 1 + efl/build/jhbuild/handle_exceptional_libs.sh | 30 ++++++++++++++++++++++++++++ efl/build/jhbuild/jhbuild.modules | 11 ++++++++++ electron.gyp | 1 + 4 files changed, 43 insertions(+) create mode 100755 efl/build/jhbuild/handle_exceptional_libs.sh diff --git a/efl/build/build_desktop.sh b/efl/build/build_desktop.sh index 1cb62a3..5d56889 100755 --- a/efl/build/build_desktop.sh +++ b/efl/build/build_desktop.sh @@ -43,6 +43,7 @@ elif [ "${host_arch}" == "x86" ]; then fi export PKG_CONFIG_PATH="${JHBUILD_DEPS}/${_LIBDIR}/pkgconfig" +$SCRIPTDIR/jhbuild/handle_exceptional_libs.sh jhbuild --no-interact -f ${SCRIPTDIR}/jhbuild/jhbuildrc if [ ! -f "$JHBUILD_STAMPFILE" ]; then diff --git a/efl/build/jhbuild/handle_exceptional_libs.sh b/efl/build/jhbuild/handle_exceptional_libs.sh new file mode 100755 index 0000000..a63fb0f --- /dev/null +++ b/efl/build/jhbuild/handle_exceptional_libs.sh @@ -0,0 +1,30 @@ +export SCRIPTDIR=$(readlink -e $(dirname $0)) + +source ${SCRIPTDIR}/common.sh + +echo "** Checkinng exceptional libraries that have different directory name with file name" +echo + +SOURCE_DIR=$TOPDIR/out/Dependencies/Source + +if [ ! -e $SOURCE_DIR ]; then + mkdir -p $SOURCE_DIR +fi +pushd $SOURCE_DIR > /dev/null + +echo "** Checkinng for icu 58.1" +LIB=icu4c-58_1-src +if [ ! -e $LIB ]; then + MD5SUM=1901302aaff1c1633ef81862663d2917 + wget https://jaist.dl.sourceforge.net/project/icu/ICU4C/58.1/$LIB.tgz + if [ "$(md5sum $LIB.tgz | sed -e "s/ .*//g")" == "$MD5SUM" ]; then + tar -zxvf $LIB.tgz > /dev/null + mv icu/source $LIB > /dev/null + cp -f icu/LICENSE ./ > /dev/null + else + echo "Error: Invalid md5sum !!" + exit 1 + fi +fi + +popd > /dev/null diff --git a/efl/build/jhbuild/jhbuild.modules b/efl/build/jhbuild/jhbuild.modules index d87eb36..a00df1b 100755 --- a/efl/build/jhbuild/jhbuild.modules +++ b/efl/build/jhbuild/jhbuild.modules @@ -8,6 +8,7 @@ + @@ -23,6 +24,8 @@ href="ftp://sourceware.org"/> + @@ -204,6 +207,14 @@ + + + + + + Date: Wed, 2 Aug 2017 06:10:57 +0000 Subject: [PATCH 09/16] Remove x11, aura, gtk and views dependency To enable EFL port, the other ports are disabled. Change-Id: I067bd5ab00d8781cb3b2e33483232a1660a8be54 Signed-off-by: Youngsoo Choi --- vendor/brightray/filename_rules.gypi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/vendor/brightray/filename_rules.gypi b/vendor/brightray/filename_rules.gypi index e1ee46d..f24b961 100644 --- a/vendor/brightray/filename_rules.gypi +++ b/vendor/brightray/filename_rules.gypi @@ -73,5 +73,21 @@ ['exclude', '(^|/)views/'], ], }], + ['use_efl==1', { + 'sources/': [ + ['exclude', '_x11(_unittest)?\\.(h|cc)$'], + ['exclude', '(^|/)x11_[^/]*\\.(h|cc)$'], + ['exclude', '(^|/)x11/'], + ['exclude', '_aura(_browsertest|_unittest)?\\.(h|cc)$'], + ['exclude', '(^|/)aura/'], + ['exclude', '_views\\.(h|cc)$'], + ['exclude', '(^|/)views/'], + ['exclude', '_gtk(_browsertest|_unittest)?\\.(h|cc)$'], + ['exclude', '(^|/)gtk/'], + ['exclude', '(^|/)gtk_[^/]*\\.(h|cc)$'], + ['exclude', '(^|/)libgtk2ui/'], + ['exclude', '(^|/)x/'], + ], + }], ] } -- 2.7.4 From dc3365b42f11e6e6cb4bb1de2ce055b2dfa36834 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Sat, 5 Aug 2017 07:42:21 +0000 Subject: [PATCH 10/16] Add flags for desktop linux This adds cflags for desktop linux * Usage in C/C++ #if defined(USE_EFL) // implementation here #endif * Usage in gyp if (desktop_linux) { // implementation here } Change-Id: I73fb49441fb6581bc87b0a5fba05b1ea6de8a46e Signed-off-by: Youngsoo Choi --- common.gypi | 1 + efl/build/build_desktop.sh | 7 +------ efl/build/common.sh | 16 ++++++++++++++++ script/update.py | 1 + vendor/brightray/brightray.gypi | 7 ++++++- 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/common.gypi b/common.gypi index 3c8aaf0..ac3f21c 100644 --- a/common.gypi +++ b/common.gypi @@ -23,6 +23,7 @@ 'openssl_fips': '', 'openssl_no_asm': 1, 'use_efl%': 0, + 'desktop_linux%': 0, 'use_openssl_def': 0, 'OPENSSL_PRODUCT': 'libopenssl.a', 'node_release_urlbase': 'https://atom.io/download/atom-shell', diff --git a/efl/build/build_desktop.sh b/efl/build/build_desktop.sh index 5d56889..0888006 100755 --- a/efl/build/build_desktop.sh +++ b/efl/build/build_desktop.sh @@ -54,12 +54,7 @@ fi # bootstrap -${TOPDIR}/script/bootstrap.py \ - --define "use_efl=1 libchromiumcontent_component=1" \ - --dev \ - --disable_clang \ - -v \ - $@ +hostGypElectronEfl $@ # build diff --git a/efl/build/common.sh b/efl/build/common.sh index 25583ce..cf60c90 100644 --- a/efl/build/common.sh +++ b/efl/build/common.sh @@ -20,3 +20,19 @@ function getHostArch() { function getPythonVersion() { echo $(python --version 2>&1 | sed -e 's/Python \([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/') } + +function hostGypElectronEfl() { + if [[ $SKIP_GYP != 1 ]]; then + local DEFINE_ARGS=" + desktop_linux=1 + libchromiumcontent_component=1 + use_efl=1 + " + ${TOPDIR}/script/bootstrap.py \ + --define "${DEFINE_ARGS}" \ + --dev \ + --disable_clang \ + -v \ + $@ + fi +} diff --git a/script/update.py b/script/update.py index f53dc4f..2a0df3b 100755 --- a/script/update.py +++ b/script/update.py @@ -95,6 +95,7 @@ def run_gyp(target_arch, component): if args.msvs: generator = 'msvs-ninja' + print "GYP defines ::: ", defines return subprocess.call([python, gyp, '-f', generator, '--depth', '.', 'electron.gyp', '-Icommon.gypi'] + defines, env=env) diff --git a/vendor/brightray/brightray.gypi b/vendor/brightray/brightray.gypi index 49037bf..f039d85 100644 --- a/vendor/brightray/brightray.gypi +++ b/vendor/brightray/brightray.gypi @@ -110,7 +110,7 @@ 'DISABLE_NACL', ], 'conditions': [ - ['OS!="mac"', { + ['OS!="mac" and use_efl!=1', { 'defines': [ 'TOOLKIT_VIEWS', 'USE_AURA', @@ -122,6 +122,11 @@ ], }, { 'conditions': [ + ['desktop_linux==1', { + 'defines': [ + 'DESKTOP_LINUX', + ], + }], ['use_efl==1', { 'defines': [ 'USE_EFL', -- 2.7.4 From 1b8662b4501ae9eb8ac38cb59430164d553577ba Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Sat, 5 Aug 2017 07:43:33 +0000 Subject: [PATCH 11/16] Disable desktop_capturer on desktop linux The chromium-efl supports only tizen webrtc using CAPI. So, this disables desktop_capturer using webrtc on desktop linux. Change-Id: Ia6b8481b1347b695ebd07babbbb733cab58bd57c Signed-off-by: Youngsoo Choi --- atom/common/node_bindings.cc | 2 ++ electron.gyp | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/atom/common/node_bindings.cc b/atom/common/node_bindings.cc index ae757b1..fa9e643 100644 --- a/atom/common/node_bindings.cc +++ b/atom/common/node_bindings.cc @@ -36,7 +36,9 @@ REFERENCE_MODULE(atom_browser_auto_updater); REFERENCE_MODULE(atom_browser_browser_view); REFERENCE_MODULE(atom_browser_content_tracing); REFERENCE_MODULE(atom_browser_debugger); +#if !defined(DESKTOP_LINUX) REFERENCE_MODULE(atom_browser_desktop_capturer); +#endif REFERENCE_MODULE(atom_browser_dialog); REFERENCE_MODULE(atom_browser_download_item); REFERENCE_MODULE(atom_browser_global_shortcut); diff --git a/electron.gyp b/electron.gyp index 2f8d7b0..5861329 100644 --- a/electron.gyp +++ b/electron.gyp @@ -373,6 +373,14 @@ ], }, }], # use_efl==1 + ['desktop_linux==1', { + 'sources/': [ + # chromium-efl supports only tizen webrtc using CAPI + # which is not working on desktop linux. + ['exclude', 'atom/browser/api/atom_api_desktop_capturer.cc'], + ['exclude', 'atom/browser/api/atom_api_desktop_capturer.h'], + ], + }], # desktop_linux==1 ], }, # target <(product_name)_lib { -- 2.7.4 From cb0142f7cce78f7aaf4735b5043d7517c2bdfae4 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Sat, 5 Aug 2017 10:08:16 +0000 Subject: [PATCH 12/16] [Bringup] Add mockup APIs to bring up EFL port Following files are added to bring up EFL port. atom/browser/api/atom_api_menu_efl.cc atom/browser/api/atom_api_menu_efl.h atom/browser/api/atom_api_web_contents_efl.cc atom/browser/common_web_contents_delegate_efl.cc atom/browser/native_browser_view_efl.cc atom/browser/native_browser_view_efl.h atom/browser/native_window_efl.cc atom/browser/native_window_efl.h atom/browser/ui/accelerator_util_efl.cc atom/browser/ui/drag_util_efl.cc atom/browser/ui/file_dialog_efl.cc atom/browser/ui/message_box_efl.cc atom/browser/ui/tray_icon_efl.cc atom/browser/ui/tray_icon_efl.h chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.cc chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.h chromium_src/chrome/browser/icon_loader_efllinux.cc Change-Id: I170f4b01c6a140159cb1e370880ad466744198b6 Signed-off-by: Youngsoo Choi --- atom/browser/api/atom_api_menu_efl.cc | 33 +++ atom/browser/api/atom_api_menu_efl.h | 32 +++ atom/browser/api/atom_api_web_contents.cc | 6 +- atom/browser/api/atom_api_web_contents_efl.cc | 18 ++ atom/browser/common_web_contents_delegate_efl.cc | 24 ++ atom/browser/native_browser_view_efl.cc | 34 +++ atom/browser/native_browser_view_efl.h | 33 +++ atom/browser/native_window_efl.cc | 275 +++++++++++++++++++++ atom/browser/native_window_efl.h | 94 +++++++ atom/browser/ui/accelerator_util_efl.cc | 15 ++ atom/browser/ui/drag_util_efl.cc | 25 ++ atom/browser/ui/file_dialog_efl.cc | 33 +++ atom/browser/ui/message_box_efl.cc | 45 ++++ atom/browser/ui/tray_icon_efl.cc | 32 +++ atom/browser/ui/tray_icon_efl.h | 37 +++ .../extensions/global_shortcut_listener_ozone.cc | 64 +++++ .../extensions/global_shortcut_listener_ozone.h | 36 +++ .../chrome/browser/icon_loader_efllinux.cc | 26 ++ electron.gyp | 4 + filenames.gypi | 16 ++ 20 files changed, 881 insertions(+), 1 deletion(-) create mode 100755 atom/browser/api/atom_api_menu_efl.cc create mode 100755 atom/browser/api/atom_api_menu_efl.h create mode 100644 atom/browser/api/atom_api_web_contents_efl.cc create mode 100644 atom/browser/common_web_contents_delegate_efl.cc create mode 100644 atom/browser/native_browser_view_efl.cc create mode 100644 atom/browser/native_browser_view_efl.h create mode 100755 atom/browser/native_window_efl.cc create mode 100755 atom/browser/native_window_efl.h create mode 100644 atom/browser/ui/accelerator_util_efl.cc create mode 100644 atom/browser/ui/drag_util_efl.cc create mode 100755 atom/browser/ui/file_dialog_efl.cc create mode 100755 atom/browser/ui/message_box_efl.cc create mode 100755 atom/browser/ui/tray_icon_efl.cc create mode 100755 atom/browser/ui/tray_icon_efl.h create mode 100644 chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.cc create mode 100644 chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.h create mode 100644 chromium_src/chrome/browser/icon_loader_efllinux.cc diff --git a/atom/browser/api/atom_api_menu_efl.cc b/atom/browser/api/atom_api_menu_efl.cc new file mode 100755 index 0000000..dce7934 --- /dev/null +++ b/atom/browser/api/atom_api_menu_efl.cc @@ -0,0 +1,33 @@ +// Copyright 2015 Samsung Electronics. All rights reserved. +// // Use of this source code is governed by a BSD-style license that can be +// // found in the LICENSE file. + +#include "atom/browser/api/atom_api_menu_efl.h" + +#include "base/logging.h" + +namespace atom { + +namespace api { + +MenuEfl::MenuEfl(v8::Isolate* isolate, v8::Local wrapper) + : Menu(isolate, wrapper), + weak_factory_(this) { +} + +void MenuEfl::PopupAt(Window* window, int x, int y, int positioning_item, bool async) { + NOTIMPLEMENTED(); +} + +void MenuEfl::ClosePopupAt(int32_t window_id) { + NOTIMPLEMENTED(); +} + +// static +mate::WrappableBase* Menu::New(mate::Arguments* args) { + return new MenuEfl(args->isolate(), args->GetThis()); +} + +} // namespace api + +} // namespace atom diff --git a/atom/browser/api/atom_api_menu_efl.h b/atom/browser/api/atom_api_menu_efl.h new file mode 100755 index 0000000..36eeb66 --- /dev/null +++ b/atom/browser/api/atom_api_menu_efl.h @@ -0,0 +1,32 @@ +// Copyright 2015 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef ATOM_BROWSER_API_ATOM_API_MENU_EFL_H_ +#define ATOM_BROWSER_API_ATOM_API_MENU_EFL_H_ + +#include "atom/browser/api/atom_api_menu.h" + +namespace atom { + +namespace api { + +class MenuEfl : public Menu { + public: + MenuEfl(v8::Isolate* isolate, v8::Local wrapper); + + protected: + void PopupAt(Window* window, int x, int y, int positioning_item, bool async) override; + void ClosePopupAt(int32_t window_id) override; + + private: + base::WeakPtrFactory weak_factory_; + + DISALLOW_COPY_AND_ASSIGN(MenuEfl); +}; + +} // namespace api + +} // namespace atom + +#endif // ATOM_BROWSER_API_ATOM_API_MENU_EFL_H_ diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index d3e7bae..fc3a559 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -77,7 +77,7 @@ #include "third_party/WebKit/public/web/WebFindOptions.h" #include "ui/display/screen.h" -#if !defined(OS_MACOSX) +#if !defined(OS_MACOSX) && !defined(USE_EFL) #include "ui/aura/window.h" #endif @@ -1359,11 +1359,15 @@ bool WebContents::IsFocused() const { auto view = web_contents()->GetRenderWidgetHostView(); if (!view) return false; +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else if (GetType() != BACKGROUND_PAGE) { auto window = web_contents()->GetNativeView()->GetToplevelWindow(); if (window && !window->IsVisible()) return false; } +#endif return view->HasFocus(); } diff --git a/atom/browser/api/atom_api_web_contents_efl.cc b/atom/browser/api/atom_api_web_contents_efl.cc new file mode 100644 index 0000000..c029437 --- /dev/null +++ b/atom/browser/api/atom_api_web_contents_efl.cc @@ -0,0 +1,18 @@ +// Copyright (c) 2016 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include "atom/browser/api/atom_api_web_contents.h" + +namespace atom { + +namespace api { + +bool WebContents::IsFocused() const { + NOTIMPLEMENTED(); + return false; +} + +} // namespace api + +} // namespace atom diff --git a/atom/browser/common_web_contents_delegate_efl.cc b/atom/browser/common_web_contents_delegate_efl.cc new file mode 100644 index 0000000..6b147cf --- /dev/null +++ b/atom/browser/common_web_contents_delegate_efl.cc @@ -0,0 +1,24 @@ +// Copyright (c) 2016 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include "atom/browser/common_web_contents_delegate.h" + +#include "atom/browser/native_window_efl.h" +#include "base/strings/string_util.h" +#include "content/public/browser/native_web_keyboard_event.h" +#include "ui/events/keycodes/keyboard_codes.h" + +#if defined(USE_X11) +#include "atom/browser/browser.h" +#endif + +namespace atom { + +void CommonWebContentsDelegate::HandleKeyboardEvent( + content::WebContents* source, + const content::NativeWebKeyboardEvent& event) { + NOTIMPLEMENTED(); +} + +} // namespace atom diff --git a/atom/browser/native_browser_view_efl.cc b/atom/browser/native_browser_view_efl.cc new file mode 100644 index 0000000..d114bcd --- /dev/null +++ b/atom/browser/native_browser_view_efl.cc @@ -0,0 +1,34 @@ +// Copyright (c) 2017 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include "atom/browser/native_browser_view_efl.h" + +#include "brightray/browser/inspectable_web_contents_view.h" +#include "ui/gfx/geometry/rect.h" + +namespace atom { + +NativeBrowserViewEfl::NativeBrowserViewEfl( + brightray::InspectableWebContentsView* web_contents_view) + : NativeBrowserView(web_contents_view) { +} + +NativeBrowserViewEfl::~NativeBrowserViewEfl() { +} + +void NativeBrowserViewEfl::SetBounds(const gfx::Rect& bounds) { + NOTIMPLEMENTED(); +} + +void NativeBrowserViewEfl::SetBackgroundColor(SkColor color) { + NOTIMPLEMENTED(); +} + +// static +NativeBrowserView* NativeBrowserView::Create( + brightray::InspectableWebContentsView* web_contents_view) { + return new NativeBrowserViewEfl(web_contents_view); +} + +} // namespace atom diff --git a/atom/browser/native_browser_view_efl.h b/atom/browser/native_browser_view_efl.h new file mode 100644 index 0000000..42e2d94 --- /dev/null +++ b/atom/browser/native_browser_view_efl.h @@ -0,0 +1,33 @@ +// Copyright (c) 2017 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#ifndef ATOM_BROWSER_NATIVE_BROWSER_VIEW_EFL_H_ +#define ATOM_BROWSER_NATIVE_BROWSER_VIEW_EFL_H_ + +#include "atom/browser/native_browser_view.h" + +namespace atom { + +class NativeBrowserViewEfl : public NativeBrowserView { + public: + explicit NativeBrowserViewEfl( + brightray::InspectableWebContentsView* web_contents_view); + ~NativeBrowserViewEfl() override; + + uint8_t GetAutoResizeFlags() { return auto_resize_flags_; } + void SetAutoResizeFlags(uint8_t flags) override { + auto_resize_flags_ = flags; + } + void SetBounds(const gfx::Rect& bounds) override; + void SetBackgroundColor(SkColor color) override; + + private: + uint8_t auto_resize_flags_; + + DISALLOW_COPY_AND_ASSIGN(NativeBrowserViewEfl); +}; + +} // namespace atom + +#endif // ATOM_BROWSER_NATIVE_BROWSER_VIEW_EFL_H_ diff --git a/atom/browser/native_window_efl.cc b/atom/browser/native_window_efl.cc new file mode 100755 index 0000000..d92c00b --- /dev/null +++ b/atom/browser/native_window_efl.cc @@ -0,0 +1,275 @@ +// Copyright 2015 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "atom/browser/native_window_efl.h" + +#include "base/logging.h" + +namespace atom { + +NativeWindowEfl::NativeWindowEfl( + brightray::InspectableWebContents* web_contents, + const mate::Dictionary& options, + NativeWindow* parent) + : NativeWindow(web_contents, options, parent) { +} + +NativeWindowEfl::~NativeWindowEfl() { +} + +void NativeWindowEfl::Close() { + NOTIMPLEMENTED(); +} + +void NativeWindowEfl::CloseImmediately() { + NOTIMPLEMENTED(); +} + +void NativeWindowEfl::Focus(bool focus) { + NOTIMPLEMENTED(); +} + +bool NativeWindowEfl::IsFocused() { + NOTIMPLEMENTED(); + return true; +} + +void NativeWindowEfl::Show() { + NOTIMPLEMENTED(); +} + +void NativeWindowEfl::ShowInactive() { + NOTIMPLEMENTED(); +} + +void NativeWindowEfl::Hide() { + NOTIMPLEMENTED(); +} + +bool NativeWindowEfl::IsVisible() { + NOTIMPLEMENTED(); + return true; +} + +bool NativeWindowEfl::IsEnabled() { + NOTIMPLEMENTED(); + return true; +} + +void NativeWindowEfl::Maximize() { + NOTIMPLEMENTED(); +} + +void NativeWindowEfl::Unmaximize() { + NOTIMPLEMENTED(); +} + +bool NativeWindowEfl::IsMaximized() { + NOTIMPLEMENTED(); + return true; +} + +void NativeWindowEfl::Minimize() { + NOTIMPLEMENTED(); +} + +void NativeWindowEfl::Restore() { + NOTIMPLEMENTED(); +} + +bool NativeWindowEfl::IsMinimized() { + NOTIMPLEMENTED(); + return true; +} + +void NativeWindowEfl::SetFullScreen(bool fullscreen) { + NOTIMPLEMENTED(); +} + +bool NativeWindowEfl::IsFullscreen() const { + NOTIMPLEMENTED(); + return true; +} + +void NativeWindowEfl::SetBounds(const gfx::Rect& bounds, bool animate) { + NOTIMPLEMENTED(); +} + +gfx::Rect NativeWindowEfl::GetBounds() { + NOTIMPLEMENTED(); + return gfx::Rect(); +} + +void NativeWindowEfl::SetResizable(bool resizable) { + NOTIMPLEMENTED(); +} + +bool NativeWindowEfl::IsResizable() { + NOTIMPLEMENTED(); + return true; +} + +void NativeWindowEfl::SetMovable(bool movable) { + NOTIMPLEMENTED(); +} + +bool NativeWindowEfl::IsMovable() { + NOTIMPLEMENTED(); + return true; +} + +void NativeWindowEfl::SetMinimizable(bool minimizable) { + NOTIMPLEMENTED(); +} + +bool NativeWindowEfl::IsMinimizable() { + NOTIMPLEMENTED(); + return true; +} + +void NativeWindowEfl::SetMaximizable(bool maximizable) { + NOTIMPLEMENTED(); +} + +bool NativeWindowEfl::IsMaximizable() { + NOTIMPLEMENTED(); + return true; +} + +void NativeWindowEfl::SetFullScreenable(bool fullscreenable) { + NOTIMPLEMENTED(); +} + +bool NativeWindowEfl::IsFullScreenable() { + NOTIMPLEMENTED(); + return true; +} + +void NativeWindowEfl::SetClosable(bool closable) { + NOTIMPLEMENTED(); +} + +bool NativeWindowEfl::IsClosable() { + NOTIMPLEMENTED(); + return true; +} + +void NativeWindowEfl::SetAlwaysOnTop(bool top, + const std::string& level, + int relativeLevel, + std::string* error) { + NOTIMPLEMENTED(); +} +bool NativeWindowEfl::IsAlwaysOnTop() { + NOTIMPLEMENTED(); + return true; +} + +void NativeWindowEfl::Center() { + NOTIMPLEMENTED(); +} + +void NativeWindowEfl::Invalidate() { + NOTIMPLEMENTED(); +} + +void NativeWindowEfl::SetTitle(const std::string& title) { + NOTIMPLEMENTED(); +} + +std::string NativeWindowEfl::GetTitle() { + NOTIMPLEMENTED(); +} +void NativeWindowEfl::FlashFrame(bool flash) { + NOTIMPLEMENTED(); +} + +void NativeWindowEfl::SetSkipTaskbar(bool skip) { + NOTIMPLEMENTED(); +} + +void NativeWindowEfl::SetKiosk(bool kiosk) { + NOTIMPLEMENTED(); +} + +bool NativeWindowEfl::IsKiosk() { + NOTIMPLEMENTED(); + return true; +} + +void NativeWindowEfl::SetBackgroundColor(const std::string& color_name) { + NOTIMPLEMENTED(); +} + +void NativeWindowEfl::SetHasShadow(bool has_shadow) { + NOTIMPLEMENTED(); +} + +bool NativeWindowEfl::HasShadow() { + NOTIMPLEMENTED(); + return true; +} + +void NativeWindowEfl::SetIgnoreMouseEvents(bool ignore) { + NOTIMPLEMENTED(); +} + +void NativeWindowEfl::SetContentProtection(bool enable) { + NOTIMPLEMENTED(); +} + +void NativeWindowEfl::SetBrowserView(NativeBrowserView* browser_view) { + NOTIMPLEMENTED(); +} + +gfx::NativeWindow NativeWindowEfl::GetNativeWindow() { + NOTIMPLEMENTED(); + return gfx::NativeWindow(); +} + +gfx::AcceleratedWidget NativeWindowEfl::GetAcceleratedWidget() { + NOTIMPLEMENTED(); + return gfx::AcceleratedWidget(); +} + +void NativeWindowEfl::SetProgressBar(double progress, + const ProgressState state) { + NOTIMPLEMENTED(); +} + +void NativeWindowEfl::SetOverlayIcon(const gfx::Image& overlay, + const std::string& description) { + NOTIMPLEMENTED(); +} + +// Workspace APIs. +void NativeWindowEfl::SetVisibleOnAllWorkspaces(bool visible) { + NOTIMPLEMENTED(); +} + +bool NativeWindowEfl::IsVisibleOnAllWorkspaces() { + NOTIMPLEMENTED(); + return true; +} + +// Converts between content bounds and window bounds. +gfx::Rect NativeWindowEfl::ContentBoundsToWindowBounds(const gfx::Rect& bounds) { + NOTIMPLEMENTED(); + return gfx::Rect(); +} + +gfx::Rect NativeWindowEfl::WindowBoundsToContentBounds(const gfx::Rect& bounds) { + NOTIMPLEMENTED(); + return gfx::Rect(); +} + +// static +NativeWindow* NativeWindow::Create( + brightray::InspectableWebContents* inspectable_web_contents, + const mate::Dictionary& options, + NativeWindow* parent) { + return new NativeWindowEfl(inspectable_web_contents, options, parent); +} + +} diff --git a/atom/browser/native_window_efl.h b/atom/browser/native_window_efl.h new file mode 100755 index 0000000..bd4eb26 --- /dev/null +++ b/atom/browser/native_window_efl.h @@ -0,0 +1,94 @@ +// Copyright 2015 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef ATOM_BROWSER_NATIVE_WINDOW_EFL_H_ +#define ATOM_BROWSER_NATIVE_WINDOW_EFL_H_ + +#include "atom/browser/native_window.h" + +#include +#include + +namespace atom { + +class NativeWindowEfl : public NativeWindow { + public: + NativeWindowEfl(brightray::InspectableWebContents* inspectable_web_contents, + const mate::Dictionary& options, + NativeWindow* parent); + virtual ~NativeWindowEfl() override; + + void Close() override; + void CloseImmediately() override; + void Focus(bool focus) override; + bool IsFocused() override; + void Show() override; + void ShowInactive() override; + void Hide() override; + bool IsVisible() override; + bool IsEnabled() override; + void Maximize() override; + void Unmaximize() override; + bool IsMaximized() override; + void Minimize() override; + void Restore() override; + bool IsMinimized() override; + void SetFullScreen(bool fullscreen) override; + bool IsFullscreen() const override; + void SetBounds(const gfx::Rect& bounds, bool animate = false) override; + gfx::Rect GetBounds() override; + void SetResizable(bool resizable) override; + bool IsResizable() override; + void SetMovable(bool movable) override; + bool IsMovable() override; + void SetMinimizable(bool minimizable) override; + bool IsMinimizable() override; + void SetMaximizable(bool maximizable) override; + bool IsMaximizable() override; + void SetFullScreenable(bool fullscreenable) override; + bool IsFullScreenable() override; + void SetClosable(bool closable) override; + bool IsClosable() override; + void SetAlwaysOnTop(bool top, + const std::string& level = "floating", + int relativeLevel = 0, + std::string* error = nullptr) override; + bool IsAlwaysOnTop() override; + void Center() override; + void Invalidate() override; + void SetTitle(const std::string& title) override; + std::string GetTitle() override; + void FlashFrame(bool flash) override; + void SetSkipTaskbar(bool skip) override; + void SetKiosk(bool kiosk) override; + bool IsKiosk() override; + void SetBackgroundColor(const std::string& color_name) override; + void SetHasShadow(bool has_shadow) override; + bool HasShadow() override; + void SetIgnoreMouseEvents(bool ignore) override; + void SetContentProtection(bool enable) override; + void SetBrowserView(NativeBrowserView* browser_view) override; + gfx::NativeWindow GetNativeWindow() override; + gfx::AcceleratedWidget GetAcceleratedWidget() override; + + void SetProgressBar(double progress, + const ProgressState state) override; + void SetOverlayIcon(const gfx::Image& overlay, + const std::string& description) override; + + // Workspace APIs. + void SetVisibleOnAllWorkspaces(bool visible) override; + bool IsVisibleOnAllWorkspaces() override; + + private: + // Converts between content bounds and window bounds. + virtual gfx::Rect ContentBoundsToWindowBounds(const gfx::Rect& bounds) override; + virtual gfx::Rect WindowBoundsToContentBounds(const gfx::Rect& bounds) override; + + DISALLOW_COPY_AND_ASSIGN(NativeWindowEfl); +}; + +} // namespace atom + +#endif // ATOM_BROWSER_NATIVE_WINDOW_EFL_H_ diff --git a/atom/browser/ui/accelerator_util_efl.cc b/atom/browser/ui/accelerator_util_efl.cc new file mode 100644 index 0000000..d7b7736 --- /dev/null +++ b/atom/browser/ui/accelerator_util_efl.cc @@ -0,0 +1,15 @@ +// Copyright (c) 2013 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include "atom/browser/ui/accelerator_util.h" + +#include "ui/base/accelerators/accelerator.h" + +namespace accelerator_util { + +void SetPlatformAccelerator(ui::Accelerator* accelerator) { + NOTIMPLEMENTED(); +} + +} // namespace accelerator_util diff --git a/atom/browser/ui/drag_util_efl.cc b/atom/browser/ui/drag_util_efl.cc new file mode 100644 index 0000000..416bb5b --- /dev/null +++ b/atom/browser/ui/drag_util_efl.cc @@ -0,0 +1,25 @@ +// Copyright (c) 2016 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include "atom/browser/ui/drag_util.h" + +#include "ui/aura/client/drag_drop_client.h" +#include "ui/aura/window.h" +#include "ui/base/dragdrop/drag_drop_types.h" +#include "ui/base/dragdrop/drag_utils.h" +#include "ui/base/dragdrop/file_info.h" +#include "ui/base/dragdrop/os_exchange_data.h" +#include "ui/display/screen.h" +#include "ui/gfx/geometry/point.h" +#include "ui/views/widget/widget.h" + +namespace atom { + +void DragFileItems(const std::vector& files, + const gfx::Image& icon, + gfx::NativeView view) { + NOTIMPLEMENTED(); +} + +} // namespace atom diff --git a/atom/browser/ui/file_dialog_efl.cc b/atom/browser/ui/file_dialog_efl.cc new file mode 100755 index 0000000..2364e3a --- /dev/null +++ b/atom/browser/ui/file_dialog_efl.cc @@ -0,0 +1,33 @@ +// Copyright 2015 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "atom/browser/ui/file_dialog.h" + +#include "base/logging.h" + +namespace file_dialog { + +bool ShowOpenDialog(const DialogSettings& settings, + std::vector* paths) { + NOTIMPLEMENTED(); + return true; +} + +void ShowOpenDialog(const DialogSettings& settings, + const OpenDialogCallback& callback) { + NOTIMPLEMENTED(); +} + +bool ShowSaveDialog(const DialogSettings& settings, + base::FilePath* path) { + NOTIMPLEMENTED(); + return true; +} + +void ShowSaveDialog(const DialogSettings& settings, + const SaveDialogCallback& callback) { + NOTIMPLEMENTED(); +} + +} // namespace file_dialog diff --git a/atom/browser/ui/message_box_efl.cc b/atom/browser/ui/message_box_efl.cc new file mode 100755 index 0000000..56b8443 --- /dev/null +++ b/atom/browser/ui/message_box_efl.cc @@ -0,0 +1,45 @@ +// Copyright 2015 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "atom/browser/ui/message_box.h" + +#include "base/logging.h" + +namespace atom { + +int ShowMessageBox(NativeWindow* parent_window, + MessageBoxType type, + const std::vector& buttons, + int default_id, + int cancel_id, + int options, + const std::string& title, + const std::string& message, + const std::string& detail, + const gfx::ImageSkia& icon) { + NOTIMPLEMENTED(); + return 0; +} + +void ShowMessageBox(NativeWindow* parent_window, + MessageBoxType type, + const std::vector& buttons, + int default_id, + int cancel_id, + int options, + const std::string& title, + const std::string& message, + const std::string& detail, + const std::string& checkbox_label, + bool checkbox_checked, + const gfx::ImageSkia& icon, + const MessageBoxCallback& callback) { + NOTIMPLEMENTED(); +} + +void ShowErrorBox(const base::string16& title, const base::string16& content) { + NOTIMPLEMENTED(); +} + +} // namespace atom diff --git a/atom/browser/ui/tray_icon_efl.cc b/atom/browser/ui/tray_icon_efl.cc new file mode 100755 index 0000000..388366f --- /dev/null +++ b/atom/browser/ui/tray_icon_efl.cc @@ -0,0 +1,32 @@ +// Copyright 2015 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "atom/browser/ui/tray_icon_efl.h" + +namespace atom { + +TrayIconEfl::TrayIconEfl() { +} + +TrayIconEfl::~TrayIconEfl() { +} + +void TrayIconEfl::SetImage(const gfx::Image& image) { + NOTIMPLEMENTED(); +} + +void TrayIconEfl::SetToolTip(const std::string& tool_tip) { + NOTIMPLEMENTED(); +} + +void TrayIconEfl::SetContextMenu(AtomMenuModel* menu_model) { + NOTIMPLEMENTED(); +} + +// static +TrayIcon* TrayIcon::Create() { + return new TrayIconEfl; +} + +} // namespace atom diff --git a/atom/browser/ui/tray_icon_efl.h b/atom/browser/ui/tray_icon_efl.h new file mode 100755 index 0000000..8111182 --- /dev/null +++ b/atom/browser/ui/tray_icon_efl.h @@ -0,0 +1,37 @@ +// Copyright 2015 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef ATOM_BROWSER_UI_TRAY_ICON_EFL_H_ +#define ATOM_BROWSER_UI_TRAY_ICON_EFL_H_ + +#include + +#include "atom/browser/ui/tray_icon.h" + +namespace atom { + +class TrayIconEfl : public TrayIcon { + public: + TrayIconEfl(); + virtual ~TrayIconEfl(); + + // Sets the image associated with this status icon. + void SetImage(ImageType image) override; + + // Sets the hover text for this status icon. This is also used as the label + // for the menu item which is created as a replacement for the status icon + // click action on platforms that do not support custom click actions for the + // status icon (e.g. Ubuntu Unity). + void SetToolTip(const std::string& tool_tip) override; + + // Set the context menu for this icon. + void SetContextMenu(AtomMenuModel* menu_model) override; + + private: + DISALLOW_COPY_AND_ASSIGN(TrayIconEfl); +}; + +} // namespace atom + +#endif // ATOM_BROWSER_UI_TRAY_ICON_EFL_H_ diff --git a/chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.cc b/chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.cc new file mode 100644 index 0000000..414b1c5 --- /dev/null +++ b/chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.cc @@ -0,0 +1,64 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/extensions/global_shortcut_listener_ozone.h" + +#include "content/public/browser/browser_thread.h" + +using content::BrowserThread; + +namespace extensions { + +// static +GlobalShortcutListener* GlobalShortcutListener::GetInstance() { + CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + static GlobalShortcutListenerOzone* instance = + new GlobalShortcutListenerOzone(); + return instance; +} + +GlobalShortcutListenerOzone::GlobalShortcutListenerOzone() + : is_listening_(false) { + CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + + // TODO(implementor): Remove this. + LOG(ERROR) << "GlobalShortcutListenerOzone object created"; +} + +GlobalShortcutListenerOzone::~GlobalShortcutListenerOzone() { + if (is_listening_) + StopListening(); +} + +void GlobalShortcutListenerOzone::StartListening() { + DCHECK(!is_listening_); // Don't start twice. + NOTIMPLEMENTED(); + is_listening_ = true; +} + +void GlobalShortcutListenerOzone::StopListening() { + DCHECK(is_listening_); // No point if we are not already listening. + NOTIMPLEMENTED(); + is_listening_ = false; +} + +bool GlobalShortcutListenerOzone::RegisterAcceleratorImpl( + const ui::Accelerator& accelerator) { + NOTIMPLEMENTED(); + // To implement: + // 1) Convert modifiers to platform specific modifiers. + // 2) Register for the hotkey. + // 3) If not successful, return false. + // 4) Else, return true. + + return false; +} + +void GlobalShortcutListenerOzone::UnregisterAcceleratorImpl( + const ui::Accelerator& accelerator) { + NOTIMPLEMENTED(); + // To implement: Unregister for the hotkey. +} + +} // namespace extensions diff --git a/chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.h b/chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.h new file mode 100644 index 0000000..fbd954a --- /dev/null +++ b/chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.h @@ -0,0 +1,36 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_OZONE_H_ +#define CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_OZONE_H_ + +#include "base/macros.h" +#include "chrome/browser/extensions/global_shortcut_listener.h" + +namespace extensions { + +// Ozone-specific implementation of the GlobalShortcutListener class that +// listens for global shortcuts. Handles basic keyboard intercepting and +// forwards its output to the base class for processing. +class GlobalShortcutListenerOzone : public GlobalShortcutListener { + public: + GlobalShortcutListenerOzone(); + ~GlobalShortcutListenerOzone() override; + + private: + // GlobalShortcutListener implementation. + void StartListening() override; + void StopListening() override; + bool RegisterAcceleratorImpl(const ui::Accelerator& accelerator) override; + void UnregisterAcceleratorImpl(const ui::Accelerator& accelerator) override; + + // Whether this object is listening for global shortcuts. + bool is_listening_; + + DISALLOW_COPY_AND_ASSIGN(GlobalShortcutListenerOzone); +}; + +} // namespace extensions + +#endif // CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_OZONE_H_ diff --git a/chromium_src/chrome/browser/icon_loader_efllinux.cc b/chromium_src/chrome/browser/icon_loader_efllinux.cc new file mode 100644 index 0000000..4057b90 --- /dev/null +++ b/chromium_src/chrome/browser/icon_loader_efllinux.cc @@ -0,0 +1,26 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/icon_loader.h" + +#include "base/bind.h" +#include "base/message_loop/message_loop.h" +#include "base/nix/mime_util_xdg.h" + +// static +IconLoader::IconGroup IconLoader::GroupForFilepath( + const base::FilePath& file_path) { + return base::nix::GetFileMimeType(file_path); +} + +// static +content::BrowserThread::ID IconLoader::ReadIconThreadID() { + // ReadIcon() calls into views::LinuxUI and GTK2 code, so it must be on the UI + // thread. + return content::BrowserThread::UI; +} + +void IconLoader::ReadIcon() { + NOTIMPLEMENTED(); +} diff --git a/electron.gyp b/electron.gyp index 5861329..2b34eaa 100644 --- a/electron.gyp +++ b/electron.gyp @@ -362,6 +362,10 @@ '<(DEPTH)/efl/build/system.gyp:elementary', '<(DEPTH)/efl/build/system.gyp:icu', ], + 'sources': [ + 'chromium_src/chrome/browser/icon_loader_efllinux.cc', + ], + }, { 'link_settings': { 'ldflags': [ # Make binary search for libraries under current directory, so we diff --git a/filenames.gypi b/filenames.gypi index 8408b27..fc6d857 100644 --- a/filenames.gypi +++ b/filenames.gypi @@ -121,6 +121,8 @@ 'atom/browser/api/atom_api_global_shortcut.h', 'atom/browser/api/atom_api_menu.cc', 'atom/browser/api/atom_api_menu.h', + 'atom/browser/api/atom_api_menu_efl.cc', + 'atom/browser/api/atom_api_menu_efl.h', 'atom/browser/api/atom_api_menu_mac.h', 'atom/browser/api/atom_api_menu_mac.mm', 'atom/browser/api/atom_api_menu_views.cc', @@ -149,6 +151,7 @@ 'atom/browser/api/atom_api_url_request.h', 'atom/browser/api/atom_api_web_contents.cc', 'atom/browser/api/atom_api_web_contents.h', + 'atom/browser/api/atom_api_web_contents_efl.cc', 'atom/browser/api/atom_api_web_contents_mac.mm', 'atom/browser/api/atom_api_web_request.cc', 'atom/browser/api/atom_api_web_request.h', @@ -202,6 +205,7 @@ 'atom/browser/browser_mac.mm', 'atom/browser/browser_win.cc', 'atom/browser/browser_observer.h', + 'atom/browser/common_web_contents_delegate_efl.cc', 'atom/browser/common_web_contents_delegate_mac.mm', 'atom/browser/common_web_contents_delegate_views.cc', 'atom/browser/common_web_contents_delegate.cc', @@ -222,12 +226,16 @@ 'atom/browser/mac/dict_util.mm', 'atom/browser/native_browser_view.cc', 'atom/browser/native_browser_view.h', + 'atom/browser/native_browser_view_efl.cc', + 'atom/browser/native_browser_view_efl.h', 'atom/browser/native_browser_view_mac.h', 'atom/browser/native_browser_view_mac.mm', 'atom/browser/native_browser_view_views.h', 'atom/browser/native_browser_view_views.cc', 'atom/browser/native_window.cc', 'atom/browser/native_window.h', + 'atom/browser/native_window_efl.cc', + 'atom/browser/native_window_efl.h', 'atom/browser/native_window_views_win.cc', 'atom/browser/native_window_views.cc', 'atom/browser/native_window_views.h', @@ -285,6 +293,7 @@ 'atom/browser/render_process_preferences.h', 'atom/browser/ui/accelerator_util.cc', 'atom/browser/ui/accelerator_util.h', + 'atom/browser/ui/accelerator_util_efl.cc', 'atom/browser/ui/accelerator_util_mac.mm', 'atom/browser/ui/accelerator_util_views.cc', 'atom/browser/ui/atom_menu_model.cc', @@ -297,19 +306,24 @@ 'atom/browser/ui/cocoa/atom_touch_bar.h', 'atom/browser/ui/cocoa/atom_touch_bar.mm', 'atom/browser/ui/cocoa/touch_bar_forward_declarations.h', + 'atom/browser/ui/drag_util_efl.cc', 'atom/browser/ui/drag_util_mac.mm', 'atom/browser/ui/drag_util_views.cc', 'atom/browser/ui/drag_util.h', 'atom/browser/ui/file_dialog.h', + 'atom/browser/ui/file_dialog_efl.cc', 'atom/browser/ui/file_dialog_gtk.cc', 'atom/browser/ui/file_dialog_mac.mm', 'atom/browser/ui/file_dialog_win.cc', 'atom/browser/ui/message_box.h', + 'atom/browser/ui/message_box_efl.cc', 'atom/browser/ui/message_box_gtk.cc', 'atom/browser/ui/message_box_mac.mm', 'atom/browser/ui/message_box_win.cc', 'atom/browser/ui/tray_icon.cc', 'atom/browser/ui/tray_icon.h', + 'atom/browser/ui/tray_icon_efl.cc', + 'atom/browser/ui/tray_icon_efl.h', 'atom/browser/ui/tray_icon_gtk.cc', 'atom/browser/ui/tray_icon_gtk.h', 'atom/browser/ui/tray_icon_cocoa.h', @@ -512,6 +526,8 @@ 'chromium_src/chrome/browser/chrome_notification_types.h', 'chromium_src/chrome/browser/extensions/global_shortcut_listener.cc', 'chromium_src/chrome/browser/extensions/global_shortcut_listener.h', + 'chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.cc', + 'chromium_src/chrome/browser/extensions/global_shortcut_listener_ozone.h', 'chromium_src/chrome/browser/extensions/global_shortcut_listener_mac.mm', 'chromium_src/chrome/browser/extensions/global_shortcut_listener_mac.h', 'chromium_src/chrome/browser/extensions/global_shortcut_listener_x11.cc', -- 2.7.4 From ab1e5c52ecf8f2f58ed7fd1c4a96e9e09dbefb23 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Wed, 2 Aug 2017 06:14:29 +0000 Subject: [PATCH 13/16] [Bringup] Handle nonexistent function in chromium v56.0.2924.0 The SystemDragEnded's parameters are different between chromium v56.0.2924.0 and v56.0.2924.87. Following patches need to be migarated from opensource to chromium-efl. Until then, this guards the function. Drag-and-drop: Target drag messages to specific RenderWidgets. https://codereview.chromium.org/2505113002 Drag-and-drop: Target drag messages (the sequel). https://codereview.chromium.org/2509933002 Change-Id: I1d5aa24826936d30fc293c67380dda8cd1aacb08 Signed-off-by: Youngsoo Choi --- atom/browser/osr/osr_web_contents_view.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/atom/browser/osr/osr_web_contents_view.cc b/atom/browser/osr/osr_web_contents_view.cc index 0d9c527..ccfcac8 100644 --- a/atom/browser/osr/osr_web_contents_view.cc +++ b/atom/browser/osr/osr_web_contents_view.cc @@ -143,8 +143,14 @@ void OffScreenWebContentsView::StartDragging( const gfx::Vector2d& image_offset, const content::DragEventSourceInfo& event_info, content::RenderWidgetHostImpl* source_rwh) { + // FIXME: SystemDragEnded related patches need to be migrated + // from opensource to chromium-efl. +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else if (web_contents_) web_contents_->SystemDragEnded(source_rwh); +#endif } void OffScreenWebContentsView::UpdateDragCursor( -- 2.7.4 From 5a7aea4abea2e94425087728fdb0a08d11f5b2d1 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Wed, 2 Aug 2017 06:14:29 +0000 Subject: [PATCH 14/16] [Bringup] Handle non virtual functions in chromium v56.0.2924.0 There's no virtual functions for followings in chromium v56.0.2924.0 but in chromium v56.0.2924.87. The opensource patches, related to followings, need to be migrated to chromium-efl. bool CanBeEmbeddedInsideCrossProcessFrames(); content::RenderWidgetHost* GetOwnerRenderWidgetHost(); content::SiteInstance* GetOwnerSiteInstance(); void ScriptedPrint(bool user_initiated); v8::Local context); Change-Id: I7a6d56d0c0c7eb89a2cd6f29cb7db4415aa03696 Signed-off-by: Youngsoo Choi --- atom/browser/web_view_guest_delegate.h | 12 +++++++++--- atom/renderer/atom_renderer_client.h | 7 ++++++- .../chrome/renderer/printing/print_web_view_helper.h | 6 +++++- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/atom/browser/web_view_guest_delegate.h b/atom/browser/web_view_guest_delegate.h index 329b7ec..44549bf 100644 --- a/atom/browser/web_view_guest_delegate.h +++ b/atom/browser/web_view_guest_delegate.h @@ -61,9 +61,15 @@ class WebViewGuestDelegate : public content::BrowserPluginGuestDelegate, int element_instance_id, bool is_full_page_plugin, const base::Closure& completion_callback) final; - bool CanBeEmbeddedInsideCrossProcessFrames() override; - content::RenderWidgetHost* GetOwnerRenderWidgetHost() override; - content::SiteInstance* GetOwnerSiteInstance() override; +#if defined(USE_EFL) + bool CanBeEmbeddedInsideCrossProcessFrames(); + content::RenderWidgetHost* GetOwnerRenderWidgetHost(); + content::SiteInstance* GetOwnerSiteInstance(); +#else + bool CanBeEmbeddedInsideCrossProcessFrames(); override; + content::RenderWidgetHost* GetOwnerRenderWidgetHost(); override; + content::SiteInstance* GetOwnerSiteInstance(); override; +#endif // WebContentsZoomController::Observer: void OnZoomLevelChanged(content::WebContents* web_contents, diff --git a/atom/renderer/atom_renderer_client.h b/atom/renderer/atom_renderer_client.h index 3feaff4..c9ffb29 100644 --- a/atom/renderer/atom_renderer_client.h +++ b/atom/renderer/atom_renderer_client.h @@ -56,8 +56,13 @@ class AtomRendererClient : public RendererClientBase { bool* send_referrer) override; void DidInitializeWorkerContextOnWorkerThread( v8::Local context) override; +#if defined(USE_EFL) void WillDestroyWorkerContextOnWorkerThread( - v8::Local context) override; + v8::Local context); +#else + void WillDestroyWorkerContextOnWorkerThread( + v8::Local context); override; +#endif // Whether the node integration has been initialized. bool node_integration_initialized_; diff --git a/chromium_src/chrome/renderer/printing/print_web_view_helper.h b/chromium_src/chrome/renderer/printing/print_web_view_helper.h index 4929477..49ad0f5 100644 --- a/chromium_src/chrome/renderer/printing/print_web_view_helper.h +++ b/chromium_src/chrome/renderer/printing/print_web_view_helper.h @@ -95,7 +95,11 @@ class PrintWebViewHelper // RenderFrameObserver implementation. bool OnMessageReceived(const IPC::Message& message) override; void OnDestruct() override; - void ScriptedPrint(bool user_initiated) override; +#if defined(USE_EFL) + void ScriptedPrint(bool user_initiated); +#else + void ScriptedPrint(bool user_initiated); override; +#endif // Message handlers --------------------------------------------------------- #if !defined(DISABLE_BASIC_PRINTING) -- 2.7.4 From d4eaa87b4ee122f8ff922355331b8d64024baed2 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Sun, 6 Aug 2017 09:36:21 +0000 Subject: [PATCH 15/16] [Bringup] Fix ShowColorChooser related linking error EFL port needs to be implemented for ShowColorChooser. Change-Id: I53f68bd573527f1168d8e5c5d4593ccdd0964eaf Signed-off-by: Youngsoo Choi --- atom/browser/common_web_contents_delegate.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index a10f959..22bca61 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -238,7 +238,11 @@ content::ColorChooser* CommonWebContentsDelegate::OpenColorChooser( content::WebContents* web_contents, SkColor color, const std::vector& suggestions) { +#if !defined(USE_EFL) return chrome::ShowColorChooser(web_contents, color); +#else + return nullptr; +#endif } void CommonWebContentsDelegate::RunFileChooser( -- 2.7.4 From 365460c3cef9e37ac70a9e5def88a3cc563252b1 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Sun, 6 Aug 2017 09:06:28 +0000 Subject: [PATCH 16/16] [Bringup] Fix inspectable_web_contents_view related linking error EFL port needs to be implemented for inspectable_web_contents_view. >> undefined reference to `brightray::CreateInspectableContentsView >> (brightray::InspectableWebContentsImpl*)' Change-Id: I95c10c2a60afb59bf3454b739214e0248a492831 Signed-off-by: Youngsoo Choi --- vendor/brightray/browser/inspectable_web_contents_impl.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vendor/brightray/browser/inspectable_web_contents_impl.cc b/vendor/brightray/browser/inspectable_web_contents_impl.cc index 4c52097..95e5024 100644 --- a/vendor/brightray/browser/inspectable_web_contents_impl.cc +++ b/vendor/brightray/browser/inspectable_web_contents_impl.cc @@ -236,7 +236,12 @@ InspectableWebContentsImpl::InspectableWebContentsImpl( } } + // FIXME: The aura is disabled in chromium-efl. +#if defined(USE_EFL) + NOTIMPLEMENTED(); +#else view_.reset(CreateInspectableContentsView(this)); +#endif } InspectableWebContentsImpl::~InspectableWebContentsImpl() { -- 2.7.4