Skip to content

Commit

Permalink
fix: clean up after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
brenca committed Aug 9, 2019
1 parent f1ad011 commit 9c408bd
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 104 deletions.
154 changes: 77 additions & 77 deletions patches/chromium/.patches
@@ -1,77 +1,77 @@
add_realloc.patch
build_gn.patch
dcheck.patch
accelerator.patch
blink_file_path.patch
blink_local_frame.patch
blink_world_context.patch
browser_compositor_mac.patch
can_create_window.patch
disable_hidden.patch
dom_storage_limits.patch
out_of_process_instance.patch
render_widget_host_view_base.patch
render_widget_host_view_mac.patch
thread_capabilities.patch
web_contents.patch
webview_cross_drag.patch
disable_user_gesture_requirement_for_beforeunload_dialogs.patch
gin_enable_disable_v8_platform.patch
blink-worker-enable-csp-in-file-scheme.patch
disable-redraw-lock.patch
v8_context_snapshot_generator.patch
boringssl_build_gn.patch
pepper_flash.patch
no_cache_storage_check.patch
blink_fix_prototype_assert.patch
libgtkui_export.patch
gtk_visibility.patch
sysroot.patch
mas_blink_no_private_api.patch
mas_no_private_api.patch
resource_file_conflict.patch
scroll_bounce_flag.patch
mas-cfisobjc.patch
mas-cgdisplayusesforcetogray.patch
mas-audiodeviceduck.patch
mas-lssetapplicationlaunchservicesserverconnectionstatus.patch
ignore_rc_check.patch
enable_widevine.patch
chrome_key_systems.patch
allow_nested_error_trackers.patch
blink_initialization_order.patch
ssl_security_state_tab_helper.patch
exclude-a-few-test-files-from-build.patch
desktop_media_list.patch
proxy_config_monitor.patch
gritsettings_resource_ids.patch
isolate_holder.patch
notification_provenance.patch
content_browser_main_loop.patch
dump_syms.patch
command-ismediakey.patch
tts.patch
printing.patch
verbose_generate_breakpad_symbols.patch
support_mixed_sandbox_with_zygote.patch
autofill_size_calculation.patch
fix_disable_usage_of_abort_report_np_in_mas_builds.patch
fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch
fix_disable_usage_of_setapplicationisdaemon_and.patch
unsandboxed_ppapi_processes_skip_zygote.patch
patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch
build_add_electron_tracing_category.patch
disable_custom_libcxx_on_windows.patch
feat_offscreen_rendering_with_viz_compositor.patch
worker_context_will_destroy.patch
fix_breakpad_symbol_generation_on_linux_arm.patch
frame_host_manager.patch
crashpad_pid_check.patch
chore_add_debounce_on_the_updatewebcontentsvisibility_method_to.patch
network_service_allow_remote_certificate_verification_logic.patch
put_back_deleted_colors_for_autofill.patch
build_win_disable_zc_twophase.patch
disable_color_correct_rendering.patch
add_contentgpuclient_precreatemessageloop_callback.patch
fix_use_weakptr_to_detect_deletion.patch
picture-in-picture.patch
add_realloc.patch
build_gn.patch
dcheck.patch
accelerator.patch
blink_file_path.patch
blink_local_frame.patch
blink_world_context.patch
browser_compositor_mac.patch
can_create_window.patch
disable_hidden.patch
dom_storage_limits.patch
out_of_process_instance.patch
render_widget_host_view_base.patch
render_widget_host_view_mac.patch
thread_capabilities.patch
web_contents.patch
webview_cross_drag.patch
disable_user_gesture_requirement_for_beforeunload_dialogs.patch
gin_enable_disable_v8_platform.patch
blink-worker-enable-csp-in-file-scheme.patch
disable-redraw-lock.patch
v8_context_snapshot_generator.patch
boringssl_build_gn.patch
pepper_flash.patch
no_cache_storage_check.patch
blink_fix_prototype_assert.patch
libgtkui_export.patch
gtk_visibility.patch
sysroot.patch
mas_blink_no_private_api.patch
mas_no_private_api.patch
resource_file_conflict.patch
scroll_bounce_flag.patch
mas-cfisobjc.patch
mas-cgdisplayusesforcetogray.patch
mas-audiodeviceduck.patch
mas-lssetapplicationlaunchservicesserverconnectionstatus.patch
ignore_rc_check.patch
enable_widevine.patch
chrome_key_systems.patch
allow_nested_error_trackers.patch
blink_initialization_order.patch
ssl_security_state_tab_helper.patch
exclude-a-few-test-files-from-build.patch
desktop_media_list.patch
proxy_config_monitor.patch
gritsettings_resource_ids.patch
isolate_holder.patch
notification_provenance.patch
content_browser_main_loop.patch
dump_syms.patch
command-ismediakey.patch
tts.patch
printing.patch
verbose_generate_breakpad_symbols.patch
support_mixed_sandbox_with_zygote.patch
autofill_size_calculation.patch
fix_disable_usage_of_abort_report_np_in_mas_builds.patch
fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch
fix_disable_usage_of_setapplicationisdaemon_and.patch
unsandboxed_ppapi_processes_skip_zygote.patch
patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch
build_add_electron_tracing_category.patch
disable_custom_libcxx_on_windows.patch
feat_offscreen_rendering_with_viz_compositor.patch
worker_context_will_destroy.patch
fix_breakpad_symbol_generation_on_linux_arm.patch
frame_host_manager.patch
crashpad_pid_check.patch
chore_add_debounce_on_the_updatewebcontentsvisibility_method_to.patch
network_service_allow_remote_certificate_verification_logic.patch
put_back_deleted_colors_for_autofill.patch
build_win_disable_zc_twophase.patch
disable_color_correct_rendering.patch
add_contentgpuclient_precreatemessageloop_callback.patch
fix_use_weakptr_to_detect_deletion.patch
picture-in-picture.patch
@@ -1,50 +1,50 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Heilig Benedek <benecene@gmail.com>
Date: Wed, 3 Apr 2019 16:11:00 +0200
Date: Sat, 10 Aug 2019 00:41:50 +0200
Subject: feat: enable picture in picture mode for video players


diff --git a/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc b/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc
index fae1519ec6c1d39b70716265385b1736d9905df8..fff8b3bca0403739d014cb242b271279574f97bf 100644
index 8e4deafa1746eeb48802a0503fefb37bedb33d04..127c62efd2327e1f3f09e9b93a0b8344e2714f80 100644
--- a/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc
+++ b/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc
@@ -5,7 +5,7 @@
@@ -4,7 +4,7 @@

#include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h"

#include "chrome/app/vector_icons/vector_icons.h"

-#include "chrome/grit/generated_resources.h"
+#include "electron/grit/electron_resources.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/color_palette.h"
diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc
index 65e0eb972044cab6d687ef8c0ba21e4a6135f409..31bd5b086b47025432fcfeee36b44502573b8bf8 100644
index 0aca25164dcad26cc000e289d6eb9010e336e6fc..70114b5aa865b96d3ace898d1faf515b9098abd9 100644
--- a/chrome/browser/ui/views/overlay/close_image_button.cc
+++ b/chrome/browser/ui/views/overlay/close_image_button.cc
@@ -5,7 +5,7 @@
@@ -4,7 +4,7 @@

#include "chrome/browser/ui/views/overlay/close_image_button.h"

#include "chrome/app/vector_icons/vector_icons.h"

-#include "chrome/grit/generated_resources.h"
+#include "electron/grit/electron_resources.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/color_palette.h"
diff --git a/chrome/browser/ui/views/overlay/mute_image_button.cc b/chrome/browser/ui/views/overlay/mute_image_button.cc
index d60a6465b48e0deb220b4f068ac2ca7118b09a80..56737a5475fdd7dff2b83ead7df70490f9f72e70 100644
index 8c88ef08dd5165c0429dd90e8a76b711ac15a4df..ebdb06a6391b8108fa51796a4ad5f3a8ca489b60 100644
--- a/chrome/browser/ui/views/overlay/mute_image_button.cc
+++ b/chrome/browser/ui/views/overlay/mute_image_button.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/ui/views/overlay/mute_image_button.h"

#include "chrome/app/vector_icons/vector_icons.h"
-#include "chrome/grit/generated_resources.h"
+#include "electron/grit/electron_resources.h"
#include "components/vector_icons/vector_icons.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc
index f10d5abf435270db70dae43b16ac906a9d8329ff..0a87e2330014dc8d493c8b5687a3fb965cb8a96e 100644
index 780863193ca12ec1295752969dfc47ac06a9ae64..e2947b893cfcdb1beaa27beac80a1885ed011ce4 100644
--- a/chrome/browser/ui/views/overlay/overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
@@ -20,7 +20,7 @@
Expand All @@ -57,51 +57,51 @@ index f10d5abf435270db70dae43b16ac906a9d8329ff..0a87e2330014dc8d493c8b5687a3fb96
#include "content/public/browser/picture_in_picture_window_controller.h"
#include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/ui/views/overlay/playback_image_button.cc b/chrome/browser/ui/views/overlay/playback_image_button.cc
index dbbde00f27afbe483755c40adfee795d74a58f33..4bb0242deae3a701b928b60e9bc7fdd7d1c75b8f 100644
index d9e5174ed622fb030bc37d32fbb40b132d7c4c23..1bf19c344721e74bb29c11a4c5c762a75e5cd821 100644
--- a/chrome/browser/ui/views/overlay/playback_image_button.cc
+++ b/chrome/browser/ui/views/overlay/playback_image_button.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/ui/views/overlay/playback_image_button.h"

#include "chrome/app/vector_icons/vector_icons.h"
-#include "chrome/grit/generated_resources.h"
+#include "electron/grit/electron_resources.h"
#include "components/vector_icons/vector_icons.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/views/overlay/resize_handle_button.cc b/chrome/browser/ui/views/overlay/resize_handle_button.cc
index 29fd1e871ccc385a815c390469d53d861c600c25..222e1d248f51730dca52303985e3b9dfed2fe6ad 100644
index ee6b3612d7bdda591e05e5af338a80167ce6cd53..af093f14f1ef49c6de7228b296c32532203ca568 100644
--- a/chrome/browser/ui/views/overlay/resize_handle_button.cc
+++ b/chrome/browser/ui/views/overlay/resize_handle_button.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/ui/views/overlay/resize_handle_button.h"

#include "chrome/app/vector_icons/vector_icons.h"
-#include "chrome/grit/generated_resources.h"
+#include "electron/grit/electron_resources.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/hit_test.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/views/overlay/skip_ad_label_button.cc b/chrome/browser/ui/views/overlay/skip_ad_label_button.cc
index bd1d9952d9fe055ba8ae5edfb0777a783d5fab48..50a0ee5e917a23c6901e4f10da8b62057567a451 100644
index da780c96bb757d7382df5f419e2c0fd644ac72b0..ae520bcf73cf6c39ca428c03975746e20b23c3ee 100644
--- a/chrome/browser/ui/views/overlay/skip_ad_label_button.cc
+++ b/chrome/browser/ui/views/overlay/skip_ad_label_button.cc
@@ -4,7 +4,7 @@

#include "chrome/browser/ui/views/overlay/skip_ad_label_button.h"

-#include "chrome/grit/generated_resources.h"
+#include "electron/grit/electron_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/color_palette.h"
#include "ui/views/background.h"
diff --git a/chrome/browser/ui/views/overlay/track_image_button.cc b/chrome/browser/ui/views/overlay/track_image_button.cc
index 3d54f48df70efc7e2f935b45c3088b098f2441b4..1c858fcc8f45698a89171c3dfcb3cdfdfdf9ce14 100644
index 8f42277409a216f81d21723eb03045ac54525b0e..f7a15bfde9a43c15b18e8afbd60a0b19960f2c93 100644
--- a/chrome/browser/ui/views/overlay/track_image_button.cc
+++ b/chrome/browser/ui/views/overlay/track_image_button.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/ui/views/overlay/track_image_button.h"

#include "chrome/app/vector_icons/vector_icons.h"
-#include "chrome/grit/generated_resources.h"
+#include "electron/grit/electron_resources.h"
Expand Down
5 changes: 3 additions & 2 deletions shell/browser/common_web_contents_delegate.cc
Expand Up @@ -641,15 +641,16 @@ void CommonWebContentsDelegate::SetHtmlApiFullscreen(bool enter_fullscreen) {
native_fullscreen_ = false;
}

gfx::Size CommonWebContentsDelegate::EnterPictureInPicture(
content::PictureInPictureResult
CommonWebContentsDelegate::EnterPictureInPicture(
content::WebContents* web_contents,
const viz::SurfaceId& surface_id,
const gfx::Size& natural_size) {
#if BUILDFLAG(ENABLE_PICTURE_IN_PICTURE)
return PictureInPictureWindowManager::GetInstance()->EnterPictureInPicture(
web_contents, surface_id, natural_size);
#else
return gfx::Size();
return content::PictureInPictureResult::kNotSupported;
#endif
}

Expand Down
7 changes: 4 additions & 3 deletions shell/browser/common_web_contents_delegate.h
Expand Up @@ -106,9 +106,10 @@ class CommonWebContentsDelegate : public content::WebContentsDelegate,
bool HandleKeyboardEvent(
content::WebContents* source,
const content::NativeWebKeyboardEvent& event) override;
gfx::Size EnterPictureInPicture(content::WebContents* web_contents,
const viz::SurfaceId&,
const gfx::Size& natural_size) override;
content::PictureInPictureResult EnterPictureInPicture(
content::WebContents* web_contents,
const viz::SurfaceId&,
const gfx::Size& natural_size) override;
void ExitPictureInPicture() override;

// Autofill related events.
Expand Down
1 change: 1 addition & 0 deletions shell/common/api/features.cc
Expand Up @@ -43,6 +43,7 @@ bool IsPrintingEnabled() {

bool IsExtensionsEnabled() {
return BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS);
}

bool IsPictureInPictureEnabled() {
return BUILDFLAG(ENABLE_PICTURE_IN_PICTURE);
Expand Down
2 changes: 1 addition & 1 deletion spec/api-web-contents-spec.js
Expand Up @@ -1286,7 +1286,7 @@ describe('webContents module', () => {
w.webContents.once('did-finish-load', async () => {
const result = await w.webContents.executeJavaScript(
`runTest(${features.isPictureInPictureEnabled()})`, true)
assert.strictEqual(result, true)
expect(result).to.be.true()
done()
})
w.loadFile(path.join(fixtures, 'api', 'picture-in-picture.html'))
Expand Down
1 change: 1 addition & 0 deletions typings/internal-ambient.d.ts
Expand Up @@ -10,6 +10,7 @@ declare namespace NodeJS {
isViewApiEnabled(): boolean;
isTtsEnabled(): boolean;
isPrintingEnabled(): boolean;
isPictureInPictureEnabled(): boolean;
isExtensionsEnabled(): boolean;
isComponentBuild(): boolean;
}
Expand Down

0 comments on commit 9c408bd

Please sign in to comment.