Commit Graph
27 Commits
Author SHA1 Message Date
mkarolin bbda8634b8 WebUI: remove @out_folder@ stripping.
It is no longer needed: when necessary resource_path can be used in the
grd.

Chromium change:

https://bugs.chromium.org/p/chromium/issues/detail?id=1171239

https://source.chromium.org/chromium/chromium/src/+/48b1ba996d2e019abad844fc47a5a1710b9da737

commit 48b1ba996d2e019abad844fc47a5a1710b9da737
Author: dpapad <dpapad@chromium.org>
Date:   Mon Feb 8 21:10:42 2021 +0000

    WebUI: Remove aliasing mechanism in SharedResourcesDataSource

    The last few entries in the alias map were either
     1) Unnecessary because the URLs were no longer used
        (views/resources/ case)
     2) Unnecessary because they could be replaced with |resource_path|
        (lottie case)
2021-03-23 14:55:27 -04:00
Mario Sanchez Prada 61a4a23f48 Migrate away from GritResourceMap and into webui::ResourcePath
Adapt Brave-specific code and overrides to use this equivalent struct.

Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/a696151783d69bc6e8884246418d771d06cd9f53

commit a696151783d69bc6e8884246418d771d06cd9f53
Author: dpapad <dpapad@chromium.org>
Date:   Tue Feb 16 12:34:08 2021 +0000

    WebuI: Delete GritResourceMap struct in favor of webui::ResourcePath.

     - Move webui::ResourcePath definition to its own file in
       ui/base/webui/.
     - Modify Grit to use webui::ResourcePath, and delete the identical
       GritResourceMap struct.
     - Remove the AddResourcePathsBulk() override that used GritResourceMap.

    This is in preparation of moving AddResourcePathsBulk to WebUIDataSource
    itself.

    Bug: 1176299
2021-03-23 14:55:24 -04:00
bridiver fb3c0f5561 buildtools/checkdeps/checkdeps.py brave --extra-repos=brave runs succesfully 2021-02-06 13:34:00 -07:00
Pete Miller e90fa9feb2 NTP WebUI: take global fonts and css out of JS bundle
Already served from chrome://brave-resource/... which will benefit from async parsing and cross-page caching
2020-07-07 15:41:59 -07:00
mkarolin 764e2c8543 WebUI code moved to run on the UI thread.
Chromium change:

https://chromium.googlesource.com/chromium/src/+/76ad70a295931ca8b0ff3613bd266b8fb34bc177

commit 76ad70a295931ca8b0ff3613bd266b8fb34bc177
Author: John Abd-El-Malek <jam@chromium.org>
Date:   Mon May 18 16:08:12 2020 +0000

    Reland "Move WebUI code to run on the UI thread."

    This reverts commit 8f6d95238903920fbc13d3bc805f095a0a4c8df2.

    Per analysis of all the waterfall bots that run this chrome_all_tast_tests, this doesn't affect the flakiness. Details in
    https://bugs.chromium.org/p/chromium/issues/detail?id=1082326#c51

    Original change's description:
    > Revert moving WebUI code to run on the UI thread as there are still PFQ flakes.
    >
    > Revert "Reland "Move WebUI code to run on the UI thread only.""
    >
    > This reverts commit 52fd322ec1451094dfd5b2a82cabbc47e3839e30.
    >
    > Revert "Reland "Remove InstantIOContext since it's not needed anymore.""
    >
    > This reverts commit 6360b9fdb0023228011e4e872ea2831760dd03c5.
    >
    > Revert "Add extra thread hops in WebUI code on ChromeOS to simulate old timing."
    >
    > This reverts commit dbb65740f2e7d349218ed3be4838a5a9c7ce2986.
    >
    > Bug: 1082326, 1062873
2020-07-01 18:12:02 -04:00
Max Karolinskiy f3524b83d7 Lint fixes II. 2020-05-26 10:02:29 -04:00
mkarolin 76fd90619f BlinkTestMsgStart has been removed.
BlinkTestHostMsg has been converted to Mojo. We used that IPC method
for
  BraveViewHostMsg_JavaScriptBlocked,
  BraveViewHostMsg_FingerprintingBlocked, and
  BraveFrameMsg_AllowScriptsOnce
messages.

Changed our code to use ChromeMsgStart and FrameMsgStart.

Chromium change:

https://chromium.googlesource.com/chromium/src.git/+/31755f407c3da7280224c677ce62768d8c858a50

commit 31755f407c3da7280224c677ce62768d8c858a50
Author: Gyuyoung Kim <gyuyoung@igalia.com>
Date:   Thu Mar 12 10:27:02 2020 +0000

    Convert BlinkTestHostMsg_PrintMessage to Mojo

    This CL converts BlinkTestHostMsg_PrintMessage to BlinkTestClient
    interface. But, BlinkTestRunner::PrintMessage needs to send a message
    only when it's on the mainframe in order to sync with the existing
    behavior. Like BlinkTestHostMsg_ResetDone conversion, this message
    has been sent to the main frame. So, this CL moves |is_secondary_window|
    from WebTestRenderFrameObserver to BlinkTestRunner.

    Additionally, this CL removes blink_test_messages.h/cc files and related
    things(e.g. BlinkTestMsgStart) finally.

    Bug: 1039247, 1059322
2020-05-26 09:52:30 -04:00
samartnik d7b58059c6 Visual changes for search accelerator button 2020-02-26 17:07:19 -05:00
mkarolin 663f2fd034 Hookup Brave polymer v3 resources to the build.
Adds v3 GRDP with .m.js files.
Adds resources build dependency on modulize target.
Adds data source prefix alias to strip generated path.
2020-01-29 07:43:56 -05:00
mkarolin 8e40d033f1 UrlDataSource::IsGzipped has been removed.
Chromium change:

https://chromium.googlesource.com/chromium/src/+/edfdcea2942f8569b535a9b85ed48dfa31942193

commit edfdcea2942f8569b535a9b85ed48dfa31942193
Author: Joel Hockey <joelhockey@chromium.org>
Date:   Thu Nov 7 21:54:44 2019 +0000

    Remove UrlDataSource::IsGzipped since it is not used

    Added in https://codereview.chromium.org/2149323003, but
    currently has no callers.
2020-01-29 07:42:50 -05:00
mkarolin 79b57daef7 URLDataSource::StartDataRequest signature changes.
Chromium changes:

https://chromium.googlesource.com/chromium/src/+/39f4ff30f2078b6e7301fdbbfc2c23b84fa0538d

commit 39f4ff30f2078b6e7301fdbbfc2c23b84fa0538d
Author: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Date:   Tue Oct 22 17:59:09 2019 +0000

    Pass GURL to URLDataSource::StartDataRequest()

    Bug: 991888

https://chromium.googlesource.com/chromium/src/+/f4b9e94bcc00bace773ea74d0801ba9a32beab8c

commit f4b9e94bcc00bace773ea74d0801ba9a32beab8c
Author: danakj <danakj@chromium.org>
Date:   Fri Nov 29 15:43:04 2019 +0000

    Convert Callback to {Once,Repeating}Callback in //content/browser.

    Use OnceCallback where possible, and use BindRepeating() where it is
    meant to be a RepeatingCallback.

    Majority of this change is a few typedefs that are very widely used:
    - LoadedCallback
    - ValidateTokenCallback
    - ValidateRegistrationCallback
    - GotDataCallback**

    ** Especially this one.

    Bug: 1007760
2020-01-29 07:42:50 -05:00
mkarolin e5adca5d21 Move ResourceRequestInfo::WebContentsGetter to WebContents::Getter
Chromium change:

https://chromium.googlesource.com/chromium/src/+/92bf36029638ae236920177e722650bed2a40e84

commit 92bf36029638ae236920177e722650bed2a40e84
Author: John Abd-El-Malek <jam@chromium.org>
Date:   Wed Jul 31 02:25:48 2019 +0000

    Move ResourceRequestInfo::WebContentsGetter to WebContents::Getter.

    This is in preparation of removing ResourceRequestInfo which isn't needed anymore.

    Bug: 934009
2019-10-09 21:50:27 -04:00
Max Karolinskiy 7d38f211bc Lint fixes. 2019-09-06 13:25:38 -04:00
Max Karolinskiy fde8fc5d9f content/public interfaces are no longer const.
Removed const from overrides.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/4b4eed074e848347f5a5b07d4d4b3fd2f6e13820

commit 4b4eed074e848347f5a5b07d4d4b3fd2f6e13820
Author: Lucas Furukawa Gadani <lfg@chromium.org>
Date:   Tue Jun 4 23:12:04 2019 +0000

    Remove const interfaces from content/public.

    Tbr: boliu@chromium.org, dvadym@chromium.org, bengr@chromium.org
    Bug: 908139
2019-09-05 21:22:08 -04:00
Max Karolinskiy 7538d3c77d Lint fixes. 2019-07-10 16:38:33 -04:00
Max Karolinskiy 2cdbab6380 Minor cosmetic cleanup of brave_shared_resources_data_source.cc 2019-07-10 16:38:32 -04:00
Max Karolinskiy 442645426a No longer need gzipped resource map.
Chromium changes:

commit 516800beffb1c5dbe305cbd5291c1f2e5243c5a3
Author: dpapad <dpapad@chromium.org>
Date:   Mon May 6 22:38:48 2019 +0000

    Leverage DataPack::IsGzipped() from SharedResourcesDataSource.

    The data sources that serve chrome://resources URLs were previously
    relying on Grit's gzipped_resource_map_source output format. This is
    no longer necessary since DataPack::IsGzipped() is exposed via the
    content client API (or web client API on iOS).

    Also reverting various grd files to use a normal resource_map_source
    Grit output instead. The goal is to eventually
    remove gzipped_resource_map_source output completely, since it should not be
    necessary anymore (but there is more work needed to get there).

    Bug: 738243

commit bca1b9759444b4717c63bd2f02f10997a45530aa
Author: dpapad <dpapad@chromium.org>
Date:   Tue May 14 18:51:02 2019 +0000

    Grit: Remove gzipped_resource_* output formats.

    No longer used anywhere and not needed.

    Bug: 961063
2019-07-10 16:38:31 -04:00
Simon Hong 7fea7a5016 Delete modifying navigator.plugins and mimeTypes
So far, brave only exposes flash when it is available.
Brave will use pdfium as a pdf viewer instead of pdf.js.
That causes plugins and mimeTypes will include pdf things.
That means we expose all that brave have.
So, we don't need to blacklist except flash plugins.
2019-05-30 14:26:05 -07:00
Max Karolinskiy 7c6b428c9e Lint fixes. 2019-05-14 13:41:53 -07:00
Max Karolinskiy 0ccca423a3 ShellMsgStart -> BlinkTestMsgStart.
As indicated in the message below, these are now only intended for
tests. A review of our code using these may be needed.

Chromium change:

commit c113169ee60372b8fe17f0f449860032bf3b859d
Author: danakj <danakj@chromium.org>
Date:   Thu Mar 28 15:19:05 2019 +0000

    Move Shell messages to web_test and rename to BlinkTest.

    These messages are only used by web_test/blink_test_{controller,runner}.
    So move them into common/web_test, to indicate they are for tests not
    content shell.

    Also give them their own target so that test_runner can be made to use
    them, since they are only for tests. I believe this would let us move
    BlinkTestRunner into test_runner, and remove WebTestDelegate interface
    out of content/shell/renderer.

    R=avi@chromium.org
    TBR=inferno

    Bug: 866140
2019-05-14 13:41:48 -07:00
petemill fe624a333f Serve common webui resources from chrome://brave-resources
Adds a new UrlDataSource: BraveSharedResourcesDataSource whose purpose is to:
- Serve shared fonts and css for use in brave and chromium webui
- Host modules for chromium polymer-based webui

Enable client-side caching for chrome://brave-resources since nothing from this domain is profile-specific at the moment
2019-02-21 13:05:31 -08:00
Brian R. Bondy e76a1cd993 Remove code to define destructors out-of-line
commit b6f010b107495bd0487353edfb379c441c9969b6
Author: Hans Wennborg <hans@chromium.org>
Date:   Thu Nov 22 07:26:07 2018 +0000

    IPC_STRUCT_BEGIN: Don't explicitly default copy constructors etc

    The classes may not actually be copyable, copy-assignable, etc. Previously the
    compiler would not complain until trying to *use* the defaulted ctor/operator,
    but the new -Wdefaulted-function-deleted warning warns about this up front.

    (As a concrete example, ExtensionMsg_TabConnectionInfo isn't copy-assignable
    because of base::DictionaryValue member, which is a base::Value, which can't
    be copied.)

    To ensure these structs are still movable, remove the user-declared destructor.
    This is also a simplification in that it removes all the code that was necessary
    to define that destructor out-of-line.
2018-12-17 19:09:52 -05:00
Simon Hong c0fa516e42 Fix build/link error comes from brave_plugin_registry_impl.o
To fix compile/link error, adding brave sources directly to content/browser source list is
most simple and cleaner way. If not, we need more number of patches
and can meet content/public/common dependency cycle.
2018-11-24 00:58:57 +09:00
Pranjal d039e8f1a2 Issue 1549: Return constant results for navigator.plugins and navigator.mimeTypes
auditors: @diracdeltas, @bridiver
2018-11-21 10:21:18 -08:00
Jocelyn Liu 989fb321ab Implement per-origin noscript 2018-05-23 08:39:03 -07:00
Brian R. Bondy ca8d029da5 Move referrer blocking to browser process
Fix https://github.com/brave/brave-browser/issues/185
2018-05-10 09:21:35 -04:00
Brian R. Bondy 4cfd4c3fa1 Add cookie and referrer blocking 2018-04-27 23:09:34 -04:00