Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve working with history #68

Closed
wants to merge 2 commits into from
Closed

Improve working with history #68

wants to merge 2 commits into from

Conversation

janRucka
Copy link
Contributor

@janRucka janRucka commented Mar 3, 2017

On webview: getPagesHistory function, returning array of URLs, titles and favicons of pages in history, getCurrentHistoryIndex function, returning current history index

chrome.history.addUrl - optional title attribute added

See:
nwjs/nw.js#1507

Our project:
https://groups.google.com/forum/#!topic/nwjs-general/TmZUq-JHIuQ

janRucka added 2 commits March 3, 2017 18:31
Webview now has:
-getPagesHistory function, returning array of URLs, titles and favicons of pages in history. Titles and favicons are not known for current page because array is created before page is fully loaded.
-getCurrentHistoryIndex function, returning current history index
@rogerwang
Copy link
Member

Could you please add documentation and submit to nw21 the upcoming stable branch?

@janRucka
Copy link
Contributor Author

janRucka commented Mar 7, 2017

I divided it into two new pull requests (so feel free to close this one):

Optional title for chrome.history.addUrl
#73
Documentation:
nwjs/nw.js#5753

Navigation history getter
#72
Documentation:
nwjs/nw.js#5752

And I recommend add this (new) pull request as well. It is event for favicon and title change. I think these three changes are complementary to each other:
#74
Documentation:
nwjs/nw.js#5754

@rogerwang rogerwang closed this Mar 8, 2017
rogerwang pushed a commit that referenced this pull request Mar 11, 2017
…d data URL navigations

This CL adds a console warning when a page navigates the top level frame to a
data URL.

The browser tests are added to WebContentsImpl tests to be consistent with
the view-source URL tests.

This CL also updates most of the layout tests to avoid loading data URLs at
the top level. The only exceptions are xss-DENIED-* tests which will be updated
when the actual blocking happens.

BUG=594215,699277
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2694903007
Cr-Commit-Position: refs/heads/master@{#455226}
(cherry picked from commit b29954e)

Review-Url: https://codereview.chromium.org/2734783010 .
Cr-Commit-Position: refs/branch-heads/3029@{#68}
Cr-Branched-From: 939b32e-refs/heads/master@{#454471}
fpn pushed a commit to bebo/chromium.src that referenced this pull request Mar 22, 2017
… PID."

Suspect cause of crbug.com/690118

> Bind Android ChildProcessServices to a specific client PID.
>
> A ChildProcessService may only be setup once, but nothing enforced this limit,
> and a second client of the service would receive no indication of failure. This
> situation could occur with Android WebView in multi-process mode, if two
> android:processes in the same package tried to use WebView.
>
> To solve this issue, introduce an initial handshake message in
> IChildProcessService that must be issued before setupConnection. This method
> binds the service to the calling PID. If that binding fails, the
> ChildProcessLauncher can then re-try creating a service process using the
> next available slot.
>
> BUG=558377,683133
>
> Review-Url: https://codereview.chromium.org/2626413004
> Cr-Commit-Position: refs/heads/master@{#445779}
> (cherry picked from commit abd3ee7)
>
> Review-Url: https://codereview.chromium.org/2650013003 .
> Cr-Commit-Position: refs/branch-heads/2987@{nwjs#68}
> Cr-Branched-From: ad51088-refs/heads/master@{#444943}

BUG=690118

Review-Url: https://codereview.chromium.org/2695083002 .
Cr-Commit-Position: refs/branch-heads/2987@{#502}
Cr-Branched-From: ad51088-refs/heads/master@{#444943}
GnorTech pushed a commit that referenced this pull request Apr 26, 2017
…blingManager and DeviceDisabledScreen

crrev.com/2714493002 uncovered a circular dependency between BrowserProcessPlatformPart::InitializeDeviceDisablingManager and DeviceDisabledScreen::DeviceDisabledScreen. Previously there was a part in the call stack that forked off into an asynchronous call, DeviceDisablingManager::UpdateFromCrosSettings, which would queue up a callback in case the CrosSettings wasn't ready yet (and it wasn't). The referenced CL fixed a bug by immediately loading the settings, but it unfortunately broke the assumption here.

The suggested fix breaks the dependency by moving Init() outside of the constructor (so the object exists at the time further code called from Init() tries to access it).

This bug was causing a crash for disabled devices (ui wouldn't start).

The circle starts on the "device_disabling_manager_.reset" line.

TEST=manual
BUG=709518

Review-Url: https://codereview.chromium.org/2815893002
Cr-Commit-Position: refs/heads/master@{#464708}
(cherry picked from commit 87c761f)

Review-Url: https://codereview.chromium.org/2832673002 .
Cr-Commit-Position: refs/branch-heads/3071@{#68}
Cr-Branched-From: a106f0a-refs/heads/master@{#464641}
GnorTech pushed a commit that referenced this pull request Aug 5, 2017
If RecordUserEvent happened before the ModelTypeStore initialized,
we would deref null and cause a crash. The other usages of store_
are driven by sync, which shouldn't call into us until we tell sync
that we're ready, so they should not need an null check. This fix is
ultimately a hack, and can be removed once crbug.com/709094 is done.

[email protected]

(cherry picked from commit 2aa9702)

Bug: 748384
Change-Id: Iafeffee0d9bb77b5d539b72992b085d1833015ee
Reviewed-on: https://chromium-review.googlesource.com/584554
Reviewed-by: Patrick Noland <[email protected]>
Commit-Queue: Patrick Noland <[email protected]>
Commit-Queue: Sky Malice <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#489385}
Reviewed-on: https://chromium-review.googlesource.com/587830
Reviewed-by: Sky Malice <[email protected]>
Cr-Commit-Position: refs/branch-heads/3163@{#68}
Cr-Branched-From: ff259ba-refs/heads/master@{#488528}
GnorTech pushed a commit that referenced this pull request Sep 14, 2017
[email protected]

(cherry picked from commit a3851d4)

Bug: 762091
Change-Id: Ie26464c103d8884d4d82dee0457a39fff52dc58f
Reviewed-on: https://chromium-review.googlesource.com/650946
Reviewed-by: David Trainor <[email protected]>
Commit-Queue: Megan Jablonski <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#500028}
Reviewed-on: https://chromium-review.googlesource.com/655179
Reviewed-by: Megan Jablonski <[email protected]>
Cr-Commit-Position: refs/branch-heads/3202@{#68}
Cr-Branched-From: fa6a5d8-refs/heads/master@{#499098}
GnorTech pushed a commit that referenced this pull request Oct 27, 2017
BUG=774979, 774641
[email protected]

(cherry picked from commit 7659567)

Change-Id: I810121de4fb572b0f6919a25afaf7aac88c2f629
Reviewed-on: https://chromium-review.googlesource.com/721260
Reviewed-by: David Trainor <[email protected]>
Commit-Queue: Matthew Jones <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#509221}
Reviewed-on: https://chromium-review.googlesource.com/728322
Reviewed-by: Matthew Jones <[email protected]>
Cr-Commit-Position: refs/branch-heads/3239@{#68}
Cr-Branched-From: adb61db-refs/heads/master@{#508578}
rogerwang pushed a commit that referenced this pull request Jan 29, 2018
If LocalFrameView::PerformLayout() ends up calling
LocalFrameView::ViewportSizeChanged(), then
it may in turn call AutofillAgent::DidChangeScrollOffset().

However, FindFormAndFieldForFormControlElement() and
ElementBoundsInWindow() requires that document life cycle to be
mutatable (and thus not in the middle of perform layout).

Therefore, posting a task to delay calling these functions outside
PerformLayout().

Note that this uses a similar mechanism as
FormTracker::TextFieldDidChange().

BUG=804886

Change-Id: Ibe6e6d9921185f075d16c6c955d45d17ad490fd5
Reviewed-on: https://chromium-review.googlesource.com/882664
Reviewed-by: Mathieu Perreault <[email protected]>
Commit-Queue: Changwan Ryu <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#531528}(cherry picked from commit 9db32db)
Reviewed-on: https://chromium-review.googlesource.com/884265
Reviewed-by: Changwan Ryu <[email protected]>
Cr-Commit-Position: refs/branch-heads/3325@{#68}
Cr-Branched-From: bc084a8-refs/heads/master@{#530369}
GnorTech pushed a commit that referenced this pull request Mar 20, 2018
The "media.autoplay_allowed" preference can be set to allow autoplay as
a Chrome Policy. It is meant to be used for internal websites that may
be broken by the change described at chromium.org/audio-video/autoplay.

Bug: 779087, 819234
Change-Id: I6a2b5a13e80adfc72056536bc9cf425e30f50e6a
Reviewed-on: https://chromium-review.googlesource.com/941956
Commit-Queue: François Beaufort <[email protected]>
Reviewed-by: Julian Pastarmov <[email protected]>
Reviewed-by: Mounir Lamouri <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#540805}(cherry picked from commit 4f8107d)
Reviewed-on: https://chromium-review.googlesource.com/951943
Reviewed-by: François Beaufort <[email protected]>
Cr-Commit-Position: refs/branch-heads/3359@{#68}
Cr-Branched-From: 66afc5e-refs/heads/master@{#540276}
rogerwang pushed a commit that referenced this pull request Apr 25, 2018
[email protected]

Change-Id: I9a36c88c9bf1131f7f742a4ca7a500b596be70e3
Reviewed-on: https://chromium-review.googlesource.com/1015329
Reviewed-by: [email protected] <[email protected]>
Cr-Commit-Position: refs/branch-heads/3396@{#68}
Cr-Branched-From: 9ef2aa8-refs/heads/master@{#550428}
rogerwang pushed a commit that referenced this pull request Jun 19, 2018
The current BlueZ adapter implementation for BLE advertisement does not
unregister advertisements when BluetoothAdapter scoped referenece
pointer is destructed. This cause BluetoothAdapter::advertisements_
queue to increase indeterminately as BluetoothAdapter is a Chrome wide
singleton object. Manually unregister any ongoing advertisement once
CableDiscovery is destructed.

Bug: 846535
Change-Id: If7782132f99e580bfa5f6e9a0da2a116375e6b7c
Reviewed-on: https://chromium-review.googlesource.com/1072929
Commit-Queue: Jun Choi <[email protected]>
Reviewed-by: Tim Song <[email protected]>
Reviewed-by: Balazs Engedy <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#563003}(cherry picked from commit 7698eb3)
Reviewed-on: https://chromium-review.googlesource.com/1081181
Reviewed-by: Jun Choi <[email protected]>
Cr-Commit-Position: refs/branch-heads/3440@{#68}
Cr-Branched-From: 010ddcf-refs/heads/master@{#561733}
GnorTech pushed a commit that referenced this pull request Aug 4, 2018
Resetting the text to the default color is incorrect - OmniboxTextView::SetText
contains logic to apply special colors depending on the type of result. This
change adds a method to OmniboxTextView called ReapplyStyling() which causes
OmniboxTextView to recompute and reapply this text styling.  This is necessary
in high contrast modes because these use different text styling for the selected
or hovered result.

[email protected]

(cherry picked from commit c50c83b)

Bug: 865918
Change-Id: Ia2c68e6cb3329b1d58d86dc9f6999420810a9d6d
Reviewed-on: https://chromium-review.googlesource.com/1145136
Reviewed-by: Leonard Grey <[email protected]>
Commit-Queue: Elly Fong-Jones <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#577519}
Reviewed-on: https://chromium-review.googlesource.com/1150090
Reviewed-by: Elly Fong-Jones <[email protected]>
Cr-Commit-Position: refs/branch-heads/3497@{#68}
Cr-Branched-From: 271eaf5-refs/heads/master@{#576753}
rogerwang pushed a commit that referenced this pull request Sep 15, 2018
This CL updates TetherService and TetherHostFetcher to use the
MultiDeviceSetupClient's GetFeatureState() function to determine whether
the feature should be active or not. This fixes a few edge cases:
  (1) If the Instant Tethering user preference is enabled, but the
      Better Together suite is disabled, we should not start up the
      feature.
  (2) If the preference is enabled, but the host device does not support
      Instant Tethering, we should not start up the feature.

This CL eliminates the MULTIDEVICE_HOST_UNVERIFIED metrics enum since
an unverified host results in NO_AVAILABLE_HOSTS; it replaces that enum
value with BETTER_TOGETHER_SUITE_DISABLED, which can occur in practice.
Note that because the old metric value has not yet been pushed to users,
it is okay to replace it with a new value instead of deprecating it.

[email protected]

(cherry picked from commit 7bddbb1)

Bug: 875502, 824568
Change-Id: Ia85f0ba31871c94ed9eb0cb2ef3c4699bb0000dd
Reviewed-on: https://chromium-review.googlesource.com/1196172
Reviewed-by: Zentaro Kavanagh <[email protected]>
Commit-Queue: Kyle Horimoto <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#587894}
Reviewed-on: https://chromium-review.googlesource.com/1208139
Reviewed-by: Ryan Hansberry <[email protected]>
Cr-Commit-Position: refs/branch-heads/3538@{#68}
Cr-Branched-From: 79f7c91-refs/heads/master@{#587811}
rogerwang pushed a commit that referenced this pull request Oct 31, 2018
[email protected]

Change-Id: Ia5538f26befee9d5452cd0280e85b53af2f1cf27
Reviewed-on: https://chromium-review.googlesource.com/c/1284731
Reviewed-by: [email protected] <[email protected]>
Cr-Commit-Position: refs/branch-heads/3578@{#68}
Cr-Branched-From: 4226ddf-refs/heads/master@{#599034}
rogerwang pushed a commit that referenced this pull request Dec 18, 2018
The class mojo::DataPipe shouldn't be used. In its constructor, it
CHECKs the data pipe is created. It can fails when system resources are
insufficient.

This CL replaces the mojo::DataPipe and handles the insuficient resource
case.

Note: No crash reports has been received so far because this URLLoader
      is not used often enough.

Bug: 911652
Change-Id: I09e9ec7cf883a3682466e528b6010fe326916400
Reviewed-on: https://chromium-review.googlesource.com/c/1355124
Commit-Queue: Arthur Sonzogni <[email protected]>
Reviewed-by: Camille Lamy <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#613562}(cherry picked from commit 7d47a55)
Reviewed-on: https://chromium-review.googlesource.com/c/1361873
Reviewed-by: Arthur Sonzogni <[email protected]>
Cr-Commit-Position: refs/branch-heads/3626@{#68}
Cr-Branched-From: d897fb1-refs/heads/master@{#612437}
rogerwang pushed a commit that referenced this pull request Feb 10, 2019
…blet mode.

On entering tablet mode, recently added functionality uses split view to
represent windows that were snapped in desktop mode, but it does not
work well with ARC. The ARC window is neither maximized nor involved in
split view. As a temporary solution, it shall be maximized.

[email protected]

Test: TabletModeControllerTest.StartTablet*Arc*
Bug: 922282
Change-Id: I5246be23ad7f1f742a84ee44335007186a96b014
Reviewed-on: https://chromium-review.googlesource.com/c/1435437
Reviewed-by: Mitsuru Oshima <[email protected]>
Commit-Queue: Avery Musbach <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#626821}(cherry picked from commit 4858ef9)
Reviewed-on: https://chromium-review.googlesource.com/c/1446394
Reviewed-by: Xiaoqian Dai <[email protected]>
Cr-Commit-Position: refs/branch-heads/3683@{#68}
Cr-Branched-From: e510299-refs/heads/master@{#625896}
rogerwang pushed a commit that referenced this pull request Mar 24, 2019
This CL fixes issue with background notifications not working after
PWA migration. This was caused due to StreamingConnectionEstablisher
not clearing state in TearDown. Also fixed related issue with stopping
service worker in TearDown.

Bug: 939581
Change-Id: Icfda555117fac726b39f34b8a601dc447c9d6ef5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1510655
Reviewed-by: Jeremy Klein <[email protected]>
Commit-Queue: Azeem Arshad <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#639129}(cherry picked from commit a9aab3a9d68f69e0482bff47a00dfaf07aaeeaee)
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1518849
Reviewed-by: Azeem Arshad <[email protected]>
Cr-Commit-Position: refs/branch-heads/3729@{#68}
Cr-Branched-From: d4a8972-refs/heads/master@{#638880}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants