Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

[Linux] Add support for file-picker #241

Closed
wants to merge 59 commits into from
Closed

[Linux] Add support for file-picker #241

wants to merge 59 commits into from

Conversation

joone
Copy link
Contributor

@joone joone commented Mar 22, 2015

This is part of the file-picker patch, which belongs to Chromium content shell.

Bug=XWALK-950

chrome-tpm and others added 30 commits March 10, 2015 15:56
Just like we did for .xwalk/, ignore the ozone/ directory (it also prevents
it from being deleted if one runs gclient sync with -D).
Since each DesktopNativeWidgetAura uses a sole aura::Window as its
backed, once the title of native widget gets updated, the title of
aura::Window should also be updated in addition to updating the
XWindow created by DesktopRootWindowHostX11.

BUG=crosswalk-project/crosswalk#191
TEST=xwalk_browsertest --gtest_filter=XWalkRuntimeTest.GetWindowTitle

Conflicts:
	ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Rework with 34.0.1847.45 code base
Chromium uses the sourceid of a XIDeviceEvent to decide if it is orignated
from a touch device. See events_x.cc:717. However, Chromium uses deviceid to
check touch device. See touch_factory_x11.cc:158.

As X11 spec, only slave device has same sourceid and device id. So Chromium
should setup touch device list with XISlavePointer other than XIMasterPointer
device.

TESTS=https://github.com/borismus/MagicTouch/blob/master/samples/tracker.html
SetProcessTitleFromCommandLine() plays a role to change process title to
absolute path of the executable with arguments that the CommandLine object has.
For example, we want gpu process title to be "<xwalk dir>/xwalk
--type=gpu-process", not "/proc/self/exe --type=gpu-process"

However, we don't want to change browser process title, because browser process
title should be web app symbolic link path, not xwalk executable absolute path.

SandboxIPC process is the process forked by browser process. We want that
SandboxIPC process title is different from browser process title. Otherwise,
Tizen task switcher misunderstands that SandboxIPC process is also web
application process.

To achieve it,
1. Browser process must not call SetProcessTitleFromCommandLine();
2. Browser process must save argv pointer to change SandboxIPC process title later.
3. SandboxIPC process also calls SetProcessTitleFromCommandLine() to change its own process title.

BUG=crosswalk-project/crosswalk#609

Reworked for 35.0.1908.4
For android trybots, they will use emulator to run tests.
On emulator, the operation will take really a lot of time.
It randomly happens that adb devices return empty list even device
is actually connected, killing adb and restart it can fix this.

CL=https://codereview.chromium.org/24194002

Reworked for 37.0.2062.3
Based on patch from: Kenneth Rohde Christiansen <[email protected]>

Since we have enabled overlay scrollbars we now get the desktop behavior, which means that a thin scroll indicator is always visible, which immediately grows when scrolling and shrinks (animated) back to the small size when scrolling is over.

On Tizen we want a different behavior:
a) no scroll indicator when not scrolling
b) a think scroll indicator which is slightly offset from the right viewport edge
c) the scroll indicator should fade out (animated) when the scroll is over

This patch is changing the scrollbar animator to 'fade out' and fixes 'a)' and 'c)' from the list above.
This includes disabling site themed scrollbars (we use overlay
scrollbars always), enabling double tap to zoom for zoomable pages,
disable auto playing of music (a touch is needed) as well as
moving input fields into the view when focused.

It also enables the fade out scrollbars on all Tizen platforms, not
just mobile.
…ties API

We need these functions in to get the list of Codecs available in the
system for getAVCodecs(). If we ever fork ffmpeg, we can just remove
this patch and add the signatures directly at the ffmpeg's signature
list.
Fix scrollbar lengths so that they match up with the size of the content.
The shared pref here is to save the status for pak file extraction.
Since the pak file is extracted to each app's data folder, the
prefs also needs to be saved for each app individually.

For crosswalk usage, in shared mode, the context in
ResourceExtractor is the context for library apk. Use the
application context of it to get the app's context.

BUG=https://crosswalk-project.org/jira/browse/XWALK-228
…as global functions

Make CodecIDToAudioCodec and CodecIDToVideoCodec available as global functions
so that they can be used by Device Capabilities getAVCodecs() interface to
query the list of supported codecs.
This patch allow us to customize the _NET_WM_PID property of a X11
window that is backing a views::Widget. A new attribute was added to
InitParams that contains the new value, if not set, the PID of the
current running process is used.

The reason for having this ability is to make Task Manager able to
raise the right X11 window when one "running application" is selected.

In Tizen Mobile, we use a shared browser process, that will create all
the windows, and the homescreen launches a different program that will
trigger the launch in the shared browser process. To make Task Manager
work properly we need to set the _NET_WM_PID of the windows we create to
the appropriate PID of the program

Since both Linux Desktop and Tizen Mobile use the
DesktopWindowTreeHostX11, we don't change DesktopWindowTreeHost.

Rework with 42.0.2302.0 code base.
On Android ICS, the max number of thread local storage is limited to 64.
Chromium TLS provides a mechanism to support large number of TLS slots
which is independent of OS restictions.

This commit is to make sure the ThreadLocalPointer uses the Chromium TLS
mechnism instead of directly calling pthread_create_key, so that it can
avoid the crash if the number of TLS slots allocated exceeds the max number
allowed by OS.

BUG=https://crosswalk-project.org/jira/browse/XWALK-841
Embedders may want to put paks in res/raw instead of assets.
Because for Android Library project, assets is not handled well.
Add intercepter in ResourceExtractor to allow embedder to
provide the interceptable resources' list and the inputstream
to intercept with.
This commit is not upstreamable, check details at
https://codereview.chromium.org/15955009/.

It can be mreged with previous libva patchset
d660a3e Enabling Hardware Acceleration with Libva in linux-x86.
Chromium class inherits from Application directly. This is not suitable
for Crosswalk embedding API. Instead, define a new API which can pass Application
instance as the parameter instead of asking users' application inheriting from
Chromium Application.
This fix is due to the change in upstream:
https://codereview.chromium.org/159173002
We have un-necessary dependency on views. This is a temporary patch to include
desktop_aura/ as part of view target.

[This is oz-wl's 0003-Add-support-to-provide-external-ozone-files-in-views.patch.]
…atusManager

When ApplicationStatus initialized after application started, the onActivityCreated(),
onActivityStarted() and onActivityResumed() callbacks will be missed.
This function will give the chance to simulate these three callbacks.

BUG=XWALK-1366
Currently, Crosswalk for Ozone-wayland shows the title bar by default on IVI.
As a result, when webapps enter fullscreen mode using HTML5 fullscreen API,
their title bar still exist.

This patch allows to hide the title bar in fullscreen mode.

BUG=XWALK-896
The leak is fixed by commit "Make the ResourceExtractor
use the App context"(0f1465d), which is reverted
because xwalk shared mode needs to keep original Context.

In this commit, the static instance of ResourceExtractor
will be released after the background job is done. The
ResourceExtractor should not be used any more from that point.
When activity_1 start activity_2(contains XWalkView), ApplicationStatus will start tracking when XWalkView initialized,
But ApplicationStatus will receive status such as onStop from activity_1, we do not need track activity_1, just ignore it.
For upstream, there is no such kind of case, ApplicationStatus will track all activities inside the package.

BUG=XWALK-1454
Why: There are requirements to customize the MediaPlayer resource
loading on Android which is implemented in Chromium code base.
Till now we have two points:
    1) Support the file:///android_asset in MediaPlayer.
    2) Support app scheme in the resource loading of MediaPlayer.
Unfortunately, the resource loading of MediaPlayer on Andoid goes
a different way from other ports and no interface to handle this.

How: Add a new interface ResourceLoadingFilter to filter the resource
loading(setDataSource) in MediaPlayerBridge, which could be used in
xwalk to do the customization by overriding the function of
shouldOverrideResourceLoading() in xwalk.

BUG=https://crosswalk-project.org/jira/browse/XWALK-880
Use glib main loop when building Ozone (not only for the
extension process). This will make glib based external
extensions work when disabling the extension process.
Crash happens when releasing the audio resource of localusermedia in
openSL ES. On Android there are two ways to get the audio input:
openSL ES and java Recording API. We swtich to the Recording API as a
workaround of the bug. The limitation is Recording API only be avaiable
after version 15 of SDK.

BUG=XWALK-1833
Sudarsana Nagineni and others added 14 commits March 11, 2015 19:14
This patch includes Chromium side changes that are needed for
integrating WebMediaPlayer with the Murphy resource policy daemon.
We support notifications in Android but upstream doesn't so we
should make sure they are enabled.

We should really consider if the "desktop" notifications are the way
forward for us in Android now that we have ServiceWorker and
push notifications.

https://codereview.chromium.org/920153002

BUG=XWALK-3653
Buffer swapping should not be synchronized so that the GPU process
is not blocked by waiting for a frame update from Weston.

BUG=TC-341

(This is oz-wl's 0008-Fix-crash-when-switching-to-console-VT-mode.patch.)

It is not clear from ozone-wayland's pull request #300 if this change
has been submitted upstream.
…er APIs

vaLockBuffer APIs are obsolete. This change will use vaAcquireBufferHandle APIs
to instead of vaLockBuffer APIs.

VA-API version: >= 0.36 (libva 1.4.0)

(This is ozone-wayland's 0012-Use-vaAcquireBufferHandle-APIs-to-instead-of-vaLockB.patch)
(This is ozone-wayland's 0013-Media-Use-upstream-Video-Accelerator.patch)
The ICU 54.1 upgrade added a call to uloc_getDefault() to
base/test/test_suite.cc, but did not add a libicuuc dependency
to the corresponding gyp/gn targets.  This makes it possible to
mix system and bundled ICU headers (and will fail to build if
they differ in version).

BUG=428145

Review URL: https://codereview.chromium.org/943233002

Cr-Commit-Position: refs/heads/master@{#317616}
Requiring users to manually download Android SDK Extras is a step
backwards for automation. We do not use them in Crosswalk or in our
content_shell builds, so for now simply make things work without these
files:

 * Make download_sdk_extras.py do nothing instead of timing out, as
   Crosswalk's bots set CHROME_HEADLESS=1 but the files this script
   tries to fetch are only accessible from Google's network.
 * Make the calls to find(1) in java.gypi create the directories before
   entering them. This is what was causing gyp to fail before even if we
   never depended on the targets requiring the SDK Extras ourselves.

Hopefully we can work together with upstream to make the situation
easier to manage.
…s://codereview.chromium.org/857483004/)

Reason for revert:
This is breaking a lot of things (He's dead jim pages, extensions, and other things). See issue 462026.

Original issue's description:
> Enable ChannelMojo
>
> As we addressed certain amount of the performance problem,
> it's time to give it another try.
>
> [email protected]
> BUG=377980
>
> Committed: https://crrev.com/a06cd1b2fe83b51b0874ca504066f00a17192026
> Cr-Commit-Position: refs/heads/master@{#313184}

[email protected],[email protected]
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=377980

Review URL: https://codereview.chromium.org/1002973002

Cr-Commit-Position: refs/heads/master@{#320394}
[Backport] Revert of Enable ChannelMojo (patchset #3 id:40001 of https:/...
Upstream recently enabled support for notifications and Push API on
Android >= Jelly Bean (see commit d948e02, "Exceptions for enabling Web
Notifications and the Push API by default").

Our support for notifications in Crosswalk is currently simpler (more
similar to desktop-style notifications) and works on ICS devices as
well, so we can be more lax about which devices we actually support.

BUG=XWALK-3654
Use this API to control whether the SurfaceView's surface is placed on top of its window.
Note this only works when SurfaceView is used. For TextureView, it doesn't work.

Related to XWALK-3778,XWALK-3742
[Android] Implement ContentViewRenderView.setZOrderOnTop
[Android] Enable support for notifications on ICS devices.
This is part of the file-picker patch, which belongs to Chromium content shell.

Bug=XWALK-950
@crosswalk-trybot
Copy link

Testing patch series with joone/chromium-crosswalk@dc646fb as its head.

Bot Status
Content Shell Linux [FAILED 💔](https://build.crosswalk-project.org/try/builders/Content Shell Linux/builds/166)
Content Shell Android-x86 [FAILED 💔](https://build.crosswalk-project.org/try/builders/Content Shell Android-x86/builds/167)

@@ -27,6 +30,9 @@ WebUI::TypeID ContentWebUIControllerFactory::GetWebUIType(
#if !defined(OS_ANDROID)
url.host() == kChromeUITracingHost ||
#endif
#if defined(USE_AURA) && defined(OS_LINUX)
url.host() == kChromeUIFilePickerHost ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ident

@PeterWangIntel
Copy link

We can avoid to modify "content" through "content::WebUIControllerFactory::RegisterFactory" (refer to 'chrome_browser_main.cc')

@rakuco rakuco force-pushed the master branch 2 times, most recently from 7e1ccae to 1de2acc Compare April 15, 2015 10:50
@joone
Copy link
Contributor Author

joone commented Apr 16, 2015

@PeterWangIntel @pozdnyako XWalkWebUIControllerFactory was added to xwalk: joone/crosswalk@a4c2047
As a result, we don't need any change in Chromium side so I will close this pull request.

@joone joone closed this Apr 19, 2015
rakuco pushed a commit that referenced this pull request Apr 30, 2015
…e widget (patchset #12 id:330001 of https://codereview.chromium.org/1001573003/)

Reason for revert:
Speculative fix for blank display after cold startup.

Original issue's description:
> Reland "[Android] Preserve the front buffer when the activity is paused"
>
> This change was reverted in r322170 due to WebView breakage. The
> ApplicationStatus dependency has been made optional, allowing
> WebView to opt-out of its use.
>
> Original description: ----------------------------
>
> Currently, when an activity is stopped, we explicitly hide the
> foreground Tab. This is problematic, as current hiding semantics
> might clear the visual front buffer before the window is hidden.
> This in turn causes an unpleasant flickering during activity
> transitions, e.g., when backgrounding Chrome or locking the screen.
>
> Wire Activity onPause/onResume notifications to WindowAndroidObservers,
> allowing the foreground tab to preserve its front buffer while hiding
> its web content. If the tab is explicitly hidden, or the root window
> is lost, the front buffer will be cleared as usual.
>
> BUG=462752,434401
>
> Committed: https://crrev.com/7954daf991a2adda234dc2e886b2d1ddf0049221
> Cr-Commit-Position: refs/heads/master@{#322228}

[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
BUG=481450,481115,434401

Review URL: https://codereview.chromium.org/1109863003

Cr-Commit-Position: refs/heads/master@{#327092}
(cherry picked from commit 631abee)

Review URL: https://codereview.chromium.org/1104293006

Cr-Commit-Position: refs/branch-heads/2357@{#241}
Cr-Branched-From: 59d4494-refs/heads/master@{#323860}
rakuco pushed a commit that referenced this pull request Aug 13, 2015
A quick user might be able to save duplicated bookmarks when he clicks
the star button before the bookmark model is loaded yet. This CL forces
that only one operation can be done before the model is loaded.

BUG=516658

Review URL: https://codereview.chromium.org/1263223005

Cr-Commit-Position: refs/heads/master@{#341976}

[email protected]

Review URL: https://codereview.chromium.org/1277663002 .

Cr-Commit-Position: refs/branch-heads/2454@{#241}
Cr-Branched-From: 12bfc33-refs/heads/master@{#338390}
mrunalk pushed a commit that referenced this pull request Sep 22, 2015
Cr-Commit-Position: refs/branch-heads/2490@{#241}
Cr-Branched-From: 7790a35-refs/heads/master@{#344925}
mrunalk pushed a commit that referenced this pull request Dec 18, 2015
BUG=560226
[email protected]

Review URL: https://codereview.chromium.org/1482243004

Cr-Commit-Position: refs/heads/master@{#362509}
(cherry picked from commit dbadb4c)

Review URL: https://codereview.chromium.org/1495233004 .

Cr-Commit-Position: refs/branch-heads/2564@{#241}
Cr-Branched-From: 1283eca-refs/heads/master@{#359700}
rakuco pushed a commit that referenced this pull request Mar 3, 2016
… disabled

Ensures that when enhanced bookmarks UI is restoring the past filter
for content saved offline, and offline pages are disabled, it is treating
the state as invalid and reverts to the all bookmarks state.

BUG=581976

Review URL: https://codereview.chromium.org/1656103002

Cr-Commit-Position: refs/heads/master@{#372983}
(cherry picked from commit d1b363e)

Review URL: https://codereview.chromium.org/1662563002 .

Cr-Commit-Position: refs/branch-heads/2623@{#241}
Cr-Branched-From: 92d7753-refs/heads/master@{#369907}
huningxin pushed a commit to huningxin/chromium-croswalk that referenced this pull request May 17, 2016
…sable in device mode."

> [DevTools] Show viewport size on resize by default, disable in device mode.
>
> BUG=592847
>
> Review URL: https://codereview.chromium.org/1771853004
>
> Cr-Commit-Position: refs/heads/master@{#380212}

(cherry picked from commit 5e9b5ed)
TBR=pfeldman

Review URL: https://codereview.chromium.org/1807573002 .

Cr-Commit-Position: refs/branch-heads/2661@{crosswalk-project#241}
Cr-Branched-From: ef6f6ae-refs/heads/master@{#378081}
huningxin pushed a commit to huningxin/chromium-croswalk that referenced this pull request Oct 9, 2016
This reverts commit bf790b4.
Reason: Compile failure in RawResourceTest.cpp

BUG=614989

Review URL: https://codereview.chromium.org/2045623002 .

Cr-Commit-Position: refs/branch-heads/2743@{crosswalk-project#241}
Cr-Branched-From: 2b3ae3b-refs/heads/master@{#394939}
imreotto pushed a commit to tenta-browser/chromium-crosswalk that referenced this pull request Nov 2, 2017
Check for null BottomNonEmptySection even if TopNonEmptySection is not
null because of crbug.com/764525.

[email protected]

(cherry picked from commit 3343091)

Bug: 764284
Change-Id: I4d45cbd3432722a8958ba647767d97b782c10512
Reviewed-on: https://chromium-review.googlesource.com/664303
Reviewed-by: David Grogan <[email protected]>
Commit-Queue: Xianzhu Wang <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#501471}
Reviewed-on: https://chromium-review.googlesource.com/668157
Reviewed-by: Xianzhu Wang <[email protected]>
Cr-Commit-Position: refs/branch-heads/3202@{crosswalk-project#241}
Cr-Branched-From: fa6a5d8-refs/heads/master@{#499098}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.