Merge from Chromium at DEPS revision 278205
This commit was generated by merge_to_master.py.
Change-Id: I23f1e7ea8c154ba72e7fb594436216f861f868ab
diff --git a/content/BUILD.gn b/content/BUILD.gn
index 3be5542..b4f81b3 100644
--- a/content/BUILD.gn
+++ b/content/BUILD.gn
@@ -9,10 +9,46 @@
defines = [ "CONTENT_IMPLEMENTATION" ]
}
+content_components = [
+ "//content/app",
+ "//content/browser",
+ "//content/child",
+ "//content/gpu",
+ "//content/plugin",
+ "//content/ppapi_plugin",
+ "//content/public/app",
+ "//content/public/browser",
+ "//content/public/child",
+ "//content/public/plugin",
+ "//content/public/renderer",
+ "//content/renderer",
+ "//content/utility",
+ "//content/worker",
+]
+
+if (is_component_build) {
+ shared_library("content") {
+ deps = content_components
+ }
+} else {
+ group("content") {
+ deps = content_components
+ }
+}
+
grit("resources") {
source = "content_resources.grd"
}
+# This target exists to "hold" the content_export header so we can do proper
+# inclusion testing of it.
+source_set("export") {
+ visibility = "//content/*"
+ sources = [
+ "content/common/content_export.h"
+ ]
+}
+
# Stubs ------------------------------------------------------------------------
# TODO(brettw) remove this and add a proper dependency on libjingle once that
@@ -58,15 +94,37 @@
}
}
-# This config is a placeholder to set up the V8 include path while Blink is
-# being worked on. Some targets include blink headers which include "v8.h",
-# expecting //v8/include to be on the include search path. We need to track
-# this down and set the include paths properly.
-config("v8_stub_config") {
- include_dirs = [ "//v8/include" ]
-}
-
config("widevine_stub_config") {
# The real implementation does a copy rule to copy the header to the gen dir.
include_dirs = [ "//third_party/widevine/cdm" ]
}
+
+# Sets up include dirs while webrtc is being converted to GN.
+# TODO(GYP) remove when webrtc is ready.
+config("webrtc_stub_config") {
+ defines = [ "WEBRTC_CHROMIUM_BUILD" ]
+ include_dirs = [
+ "//third_party/webrtc/overrides", # Must be first.
+ "//third_party",
+ ]
+
+ if (is_mac) {
+ defines += [ "WEBRTC_MAC" ]
+ } else if (is_win) {
+ defines += [ "WEBRTC_WIN" ]
+ } else if (is_linux) {
+ defines += [ "WEBRTC_LINUX" ]
+ } else if (is_ios) {
+ defines += [ "WEBRTC_MAC", "WEBRTC_IOS" ]
+ } else if (is_android) {
+ defines += [ "WEBRTC_LINUX", "WEBRTC_ANDROID" ]
+ import("//build/config/crypto.gni")
+ if (use_openssl) {
+ defines += [ "WEBRTC_ANDROID_OPENSLEQS" ]
+ }
+ }
+
+ if (is_posix) {
+ defines += [ "WEBRTC_POSIX" ]
+ }
+}
diff --git a/content/app/BUILD.gn b/content/app/BUILD.gn
new file mode 100644
index 0000000..13efa00
--- /dev/null
+++ b/content/app/BUILD.gn
@@ -0,0 +1,62 @@
+# Copyright 2014 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.
+
+source_set("app") {
+ sources = [
+ "android/app_jni_registrar.cc",
+ "android/app_jni_registrar.h",
+ "android/child_process_service.cc",
+ "android/child_process_service.h",
+ "android/content_main.cc",
+ "android/content_main.h",
+ "android/library_loader_hooks.cc",
+ "content_main.cc",
+ "content_main_runner.cc",
+ "mojo/mojo_init.cc",
+ "mojo/mojo_init.h",
+ "startup_helper_win.cc",
+ ]
+
+ configs += [ "//content:content_implementation" ]
+
+ deps = [
+ "//base",
+ "//base:i18n",
+ # This is needed by app/content_main_runner.cc
+ # TODO(brettw) this shouldn't be here, only final executables should be
+ # picking the allocator.
+ "//base/allocator",
+ "//content:export",
+ "//crypto",
+ "//ui/base",
+ "//ui/gfx",
+ "//ui/gfx/geometry",
+ ]
+
+ if (is_win) {
+ deps += [ "//sandbox" ]
+ } else if (is_android) {
+ sources -= [ "content_main.cc" ]
+ deps += [
+ "//content:content_jni_headers",
+ "//skia",
+ "//third_party/android_tools:cpu_features"
+ ]
+ }
+
+ if (is_ios) {
+ sources -= [
+ "content_main.cc",
+ "mojo/mojo_init.cc",
+ "mojo/mojo_init.h",
+ ]
+ } else {
+ deps += [
+ "//mojo/environment:chromium",
+ "//mojo/public/interfaces/service_provider:service_provider",
+ "//mojo/service_manager",
+ "//mojo/system",
+ ]
+ }
+}
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 8c76732..38bf1cb 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -50,6 +50,10 @@
#include "ui/base/ui_base_paths.h"
#include "ui/base/ui_base_switches.h"
+#if defined(OS_ANDROID)
+#include "content/public/common/content_descriptors.h"
+#endif
+
#if defined(USE_TCMALLOC)
#include "third_party/tcmalloc/chromium/src/gperftools/malloc_extension.h"
#if defined(TYPE_PROFILING)
@@ -69,12 +73,11 @@
#endif
#if defined(OS_WIN)
-#include <atlbase.h>
-#include <atlapp.h>
#include <malloc.h>
#include <cstring>
#include "base/strings/string_number_conversions.h"
+#include "ui/base/win/atl_module.h"
#include "ui/base/win/dpi_setup.h"
#include "ui/gfx/win/dpi.h"
#elif defined(OS_MACOSX)
@@ -136,8 +139,6 @@
#if defined(OS_WIN)
-static CAppModule _Module;
-
#endif // defined(OS_WIN)
#if defined(OS_POSIX) && !defined(OS_IOS)
@@ -480,7 +481,7 @@
#if defined(OS_WIN)
RegisterInvalidParamHandler();
- _Module.Init(NULL, static_cast<HINSTANCE>(params.instance));
+ ui::win::CreateATLModuleIfNeeded();
sandbox_info_ = *params.sandbox_info;
#else // !OS_WIN
@@ -703,7 +704,16 @@
RegisterPathProvider();
RegisterContentSchemes(true);
+#if defined(OS_ANDROID)
+ int icudata_fd = base::GlobalDescriptors::GetInstance()->MaybeGet(
+ kAndroidICUDataDescriptor);
+ if (icudata_fd != -1)
+ CHECK(base::i18n::InitializeICUWithFileDescriptor(icudata_fd));
+ else
+ CHECK(base::i18n::InitializeICU());
+#else
CHECK(base::i18n::InitializeICU());
+#endif
InitializeStatsTable(command_line);
@@ -767,16 +777,10 @@
delegate_->ProcessExiting(process_type);
}
-#if !defined(OS_IOS)
- ShutdownMojo();
-#endif
-
#if defined(OS_WIN)
#ifdef _CRTDBG_MAP_ALLOC
_CrtDumpMemoryLeaks();
#endif // _CRTDBG_MAP_ALLOC
-
- _Module.Term();
#endif // OS_WIN
#if defined(OS_MACOSX)
diff --git a/content/app/mojo/mojo_init.cc b/content/app/mojo/mojo_init.cc
index 0532e3e..55630b4 100644
--- a/content/app/mojo/mojo_init.cc
+++ b/content/app/mojo/mojo_init.cc
@@ -6,27 +6,13 @@
#include "base/logging.h"
#include "mojo/embedder/embedder.h"
-#include "mojo/public/cpp/environment/environment.h"
#include "mojo/service_manager/service_manager.h"
namespace content {
-namespace {
-
-mojo::Environment* environment = NULL;
-
-} // namespace
-
void InitializeMojo() {
- DCHECK(!environment);
- environment = new mojo::Environment;
mojo::embedder::Init();
mojo::ServiceManager::GetInstance();
}
-void ShutdownMojo() {
- delete environment;
- environment = NULL;
-}
-
} // namespace content
diff --git a/content/app/mojo/mojo_init.h b/content/app/mojo/mojo_init.h
index cbfb8b0..4a4e5d4 100644
--- a/content/app/mojo/mojo_init.h
+++ b/content/app/mojo/mojo_init.h
@@ -12,8 +12,6 @@
// Perform any necessary Mojo initialization.
CONTENT_EXPORT void InitializeMojo();
-CONTENT_EXPORT void ShutdownMojo();
-
} // namespace content
#endif // CONTENT_COMMON_MOJO_MOJO_INIT_H_
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index b8b7a52..d76f458 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -10,39 +10,21 @@
# Only targets in the content tree can depend directly on this target.
visibility = [ "//content/*" ]
- sources = rebase_path(content_browser_gypi_values.private_browser_sources,
- ".", "//content")
+ defines = []
+ libs = []
+ ldflags = []
- # TODO(GYP) these generated files are listed as sources in content_browser.
- # This is a bit suspicious. The GN grit template will make a source set
- # containing the generated code so it should be sufficient to just depend
- # on the grit rule. But maybe some of these will need to be added?
- #
- # Need this annoying rebase_path call to match what happened with the sources.
- sources -= rebase_path([
- "$root_gen_dir/webkit/grit/devtools_resources.h",
- "$root_gen_dir/webkit/grit/devtools_resources_map.cc",
- "$root_gen_dir/webkit/grit/devtools_resources_map.h",
- "$root_gen_dir/content/browser/tracing/grit/tracing_resources.h",
- "$root_gen_dir/ui/ui_resources/grit/webui_resources_map.cc",
- "$root_gen_dir/content/browser/devtools/devtools_protocol_constants.cc",
- "$root_gen_dir/content/browser/devtools/devtools_protocol_constants.h",
- ], ".")
-
- configs += [ "//content:content_implementation" ]
-
+ # Shared deps. See also non-iOS deps below.
deps = [
"//base",
- "//cc",
"//content:resources",
- "//content/browser/devtools:resources",
+ "//content/browser/service_worker:database_proto",
+ "//content/browser/speech/proto",
"//crypto",
"//google_apis",
"//net",
- "//net:http_server",
"//skia",
"//sql",
- "//third_party/leveldatabase",
"//third_party/re2",
"//third_party/WebKit/public:blink_headers",
"//third_party/zlib",
@@ -56,21 +38,77 @@
"//ui/gfx/geometry",
"//ui/resources",
"//ui/snapshot",
- "//ui/surface",
- "//webkit:resources",
- "//webkit:strings",
- "//webkit/browser:storage",
- "//webkit/common",
- "//webkit/common:storage",
- # TODO(GYP)
- #'browser/service_worker/service_worker_proto.gyp:database_proto',
- #'browser/speech/proto/speech_proto.gyp:speech_proto',
- #'browser/devtools/devtools_resources.gyp:devtools_resources',
- #'content_common_mojo_bindings',
- #'../mojo/mojo.gyp:mojo_cpp_bindings',
- #'../mojo/mojo.gyp:mojo_js_bindings',
- #'../mojo/mojo.gyp:mojo_service_provider_bindings',
- #'../third_party/angle/src/build_angle.gyp:commit_id',
+ ]
+
+ if (is_ios) {
+ # iOS doesn't get the normal file list and only takes these whitelisted
+ # files.
+ sources = [
+ "browser_context.cc",
+ "browser_main_loop.cc",
+ "browser_main_runner.cc",
+ "browser_process_sub_thread.cc",
+ "browser_thread_impl.cc",
+ "browser_url_handler_impl.cc",
+ "cert_store_impl.cc",
+ "download/download_create_info.cc",
+ "notification_service_impl.cc",
+ "signed_certificate_timestamp_store_impl.cc",
+ "user_metrics.cc",
+ "web_contents/navigation_entry_impl.cc",
+ ]
+ } else {
+ # Normal non-iOS sources get everything.
+ sources = rebase_path(content_browser_gypi_values.private_browser_sources,
+ ".", "//content")
+
+ # TODO(GYP) these generated files are listed as sources in content_browser.
+ # This is a bit suspicious. The GN grit template will make a source set
+ # containing the generated code so it should be sufficient to just depend
+ # on the grit rule. But maybe some of these will need to be added?
+ #
+ # Need this annoying rebase_path call to match what happened with the
+ # sources.
+ sources -= rebase_path([
+ "$root_gen_dir/webkit/grit/devtools_resources.h",
+ "$root_gen_dir/webkit/grit/devtools_resources_map.cc",
+ "$root_gen_dir/webkit/grit/devtools_resources_map.h",
+ "$root_gen_dir/content/browser/tracing/grit/tracing_resources.h",
+ "$root_gen_dir/ui/ui_resources/grit/webui_resources_map.cc",
+ "$root_gen_dir/content/browser/devtools/devtools_protocol_constants.cc",
+ "$root_gen_dir/content/browser/devtools/devtools_protocol_constants.h",
+ ], ".")
+
+ # Non-iOS deps.
+ deps += [
+ "//content/browser/devtools:resources",
+ "//content/common:mojo_bindings",
+ "//cc",
+ "//cc:cc_surfaces",
+ "//mojo/public/cpp/bindings",
+ "//mojo/public/interfaces/service_provider:service_provider",
+ "//mojo/public/js/bindings",
+ "//net:http_server",
+ "//third_party/icu",
+ "//third_party/leveldatabase",
+ "//third_party/libyuv",
+ "//ui/resources",
+ "//ui/surface",
+ "//ui/webui/resources",
+ "//webkit:resources",
+ "//webkit:strings",
+ "//webkit/browser:storage",
+ "//webkit/common",
+ "//webkit/common:storage",
+ # TODO(GYP)
+ #"//third_party/angle:commit_id",
+ ]
+ }
+
+ configs += [
+ "//content:content_implementation",
+ "//content:libjingle_stub_config", # TODO(GYP) remove when libjingle is ready.
+ "//content:webrtc_stub_config", # TODO(GYP) remove when webrtc is ready.
]
if (toolkit_views) {
@@ -79,25 +117,21 @@
if (is_win) {
sources += [
- "power_profiles/power_data_provider_ia_win.cc",
- "power_profiles/power_data_provider_ia_win.h",
+ "power_profiler/power_data_provider_ia_win.cc",
+ "power_profiler/power_data_provider_ia_win.h",
]
deps += [ "//third_party/power_gadget" ]
} else {
sources += [ "power_profiler/power_data_provider_dummy.cc" ]
+ sources -= [ "renderer_host/web_input_event_aurawin.cc" ]
}
if (!is_win && !is_mac && (!is_linux || !use_udev)) {
- sources += [ "browser/gamepad/gamepad_platform_data_fetcher.cc" ]
- }
-
- if (is_ios) {
- # TODO(GYP) lots of inclusions and exclusions for iOS.
+ sources += [ "gamepad/gamepad_platform_data_fetcher.cc" ]
}
if (enable_printing != 0) {
- #TODO(GYP)
- #deps += [ "//printing" ]
+ deps += [ "//printing" ]
}
# TODO(GYP)
@@ -106,88 +140,60 @@
# '../third_party/WebKit/public/blink.gyp:blink',
# ],
# }],
-# ['OS!="mac" and OS!="ios"', {
-# 'dependencies': [
-# '../sandbox/sandbox.gyp:sandbox',
-# ],
-# }],
-# ['OS!="android" and OS!="ios"', {
-# 'dependencies': [
-# 'browser/tracing/tracing_resources.gyp:tracing_resources',
-# ],
-# }],
-# ['OS!="ios"', {
-# 'dependencies': [
-# '../third_party/libyuv/libyuv.gyp:libyuv',
-# ],
-# }],
-# ['enable_webrtc==1', {
-# 'dependencies': [
-# '../jingle/jingle.gyp:jingle_glue',
-# ],
-# 'sources': [
-# 'browser/renderer_host/media/peer_connection_tracker_host.cc',
-# 'browser/renderer_host/media/peer_connection_tracker_host.h',
-# 'browser/renderer_host/media/webrtc_identity_service_host.cc',
-# 'browser/renderer_host/media/webrtc_identity_service_host.h',
-# 'browser/renderer_host/p2p/socket_host.cc',
-# 'browser/renderer_host/p2p/socket_host.h',
-# 'browser/renderer_host/p2p/socket_host_tcp.cc',
-# 'browser/renderer_host/p2p/socket_host_tcp.h',
-# 'browser/renderer_host/p2p/socket_host_tcp_server.cc',
-# 'browser/renderer_host/p2p/socket_host_tcp_server.h',
-# 'browser/renderer_host/p2p/socket_host_throttler.cc',
-# 'browser/renderer_host/p2p/socket_host_throttler.h',
-# 'browser/renderer_host/p2p/socket_host_udp.cc',
-# 'browser/renderer_host/p2p/socket_host_udp.h',
-# 'browser/renderer_host/p2p/socket_dispatcher_host.cc',
-# 'browser/renderer_host/p2p/socket_dispatcher_host.h',
-# ],
-# }],
-# ['enable_webrtc==1 and OS=="linux"', {
-# 'dependencies': [
-# '../third_party/libjingle/libjingle.gyp:libjingle_webrtc',
-# ],
-# }],
-# ['enable_webrtc==1 and (OS=="linux" or OS=="mac" or OS=="win")', {
-# 'sources': [
-# 'browser/media/capture/desktop_capture_device.cc',
-# 'browser/media/capture/desktop_capture_device.h',
-# 'browser/media/capture/desktop_capture_device_aura.cc',
-# 'browser/media/capture/desktop_capture_device_aura.h',
-# 'browser/media/capture/desktop_capture_device_uma_types.cc',
-# 'browser/media/capture/desktop_capture_device_uma_types.h',
-# ],
-# 'dependencies': [
-# '../third_party/webrtc/modules/modules.gyp:desktop_capture',
-# ],
-# 'defines': [
-# 'ENABLE_SCREEN_CAPTURE=1',
-# ],
-# }],
-# ['OS=="win"', {
-# 'dependencies': [
-# # For accessibility
-# '../third_party/iaccessible2/iaccessible2.gyp:iaccessible2',
-# '../third_party/isimpledom/isimpledom.gyp:isimpledom',
-# ],
-# 'sources/': [
-# ['exclude', '^browser/device_sensors/data_fetcher_shared_memory_default.cc$'],
-# ],
-# 'defines': [
-# # This prevents the inclusion of atlhost.h which paired
-# # with the windows 8 sdk it does the wrong thing.
-# '__ATLHOST_H__',
-# ],
-# 'link_settings': {
-# 'libraries': [
-# '-lcomctl32.lib',
-# '-ldinput8.lib',
-# '-ldwmapi.lib',
-# '-ldxguid.lib',
-# '-lsensorsapi.lib',
-# '-lportabledeviceguids.lib',
-# ],
+ if (!is_mac && !is_ios) {
+ deps += [ "//sandbox" ]
+ }
+ if (!is_android && !is_ios) {
+ deps += [ "//content/browser/tracing:resources" ]
+ }
+
+ if (enable_webrtc) {
+ sources += rebase_path(content_browser_gypi_values.webrtc_browser_sources,
+ ".", "//content")
+ # TODO(GYP)
+ #deps += [ "//jingle:glue" ]
+ if (is_linux) {
+ # TODO(GYP)
+ #deps += [ "//third_party/libjingle:libjingle_webrtc" ]
+ }
+ if (is_linux || is_mac || is_win) {
+ sources += [
+ "media/capture/desktop_capture_device.cc",
+ "media/capture/desktop_capture_device.h",
+ "media/capture/desktop_capture_device_aura.cc",
+ "media/capture/desktop_capture_device_aura.h",
+ "media/capture/desktop_capture_device_uma_types.cc",
+ "media/capture/desktop_capture_device_uma_types.h",
+ ]
+ defines += [ "ENABLE_SCREEN_CAPTURE=1" ]
+ # TODO(GYP)
+ #deps += [ "//third_party/webrtc/modules:desktop_capture" ]
+ }
+ }
+
+ if (is_win) {
+ sources -= [
+ "device_sensors/data_fetcher_shared_memory_default.cc",
+ "geolocation/empty_wifi_data_provider.cc",
+ ]
+ defines += [
+ # This prevents the inclusion of atlhost.h which paired
+ # with the windows 8 sdk it does the wrong thing.
+ "__ATLHOST_H__",
+ ]
+ deps += [
+ "//third_party/iaccessible2",
+ "//third_party/isimpledom",
+ ]
+ libs += [
+ "comctl32.lib",
+ "dinput8.lib",
+ "dwmapi.lib",
+ "dxguid.lib",
+ "sensorsapi.lib",
+ "portabledeviceguids.lib",
+ ]
+ # TODI(GYP)
# 'msvs_settings': {
# 'VCLinkerTool': {
# 'DelayLoadDLLs': [
@@ -195,187 +201,170 @@
# 'user32.dll',
# 'dwmapi.dll',
# ],
-# },
-# },
-# },
-# }],
-# ['OS=="linux"', {
-# 'dependencies': [
-# '../sandbox/sandbox.gyp:libc_urandom_override',
-# ],
-# }],
-# ['use_udev == 1', {
-# 'dependencies': [
-# '../build/linux/system.gyp:udev',
-# ],
-# }, {
-# 'sources!': [
-# 'browser/device_monitor_udev.cc',
-# 'browser/device_monitor_udev.h',
-# 'browser/gamepad/gamepad_platform_data_fetcher_linux.cc',
-# 'browser/udev_linux.cc',
-# 'browser/udev_linux.h',
-# ],
-# }],
-# ['OS=="linux" and use_aura==1', {
-# 'dependencies': [
-# '../build/linux/system.gyp:fontconfig',
-# ],
-# }],
-# ['use_x11==1', {
-# 'dependencies': [
-# '../build/linux/system.gyp:x11',
-# ],
-# }],
-# ['use_pango==1', {
-# 'dependencies': [
-# '../build/linux/system.gyp:pangocairo',
-# ],
-# 'sources!': [
-# 'browser/renderer_host/pepper/pepper_truetype_font_list_ozone.cc',
-# ],
-# }],
-# ['OS=="android"', {
-# 'dependencies': [
-# '../media/media.gyp:media',
-# 'content.gyp:content_jni_headers',
-# ],
-# 'link_settings': {
-# 'libraries': [
-# '-ljnigraphics',
-# ],
-# },
-# 'sources/': [
-# ['exclude', '^browser/battery_status/battery_status_manager_default.cc$'],
-# ['exclude', '^browser/device_sensors/data_fetcher_shared_memory_default.cc$'],
-# ['exclude', '^browser/geolocation/network_location_provider\\.(cc|h)$'],
-# ['exclude', '^browser/geolocation/network_location_request\\.(cc|h)$'],
-# ['exclude', '^browser/tracing/tracing_ui'],
-# ['exclude', '^browser/speech/'],
-# ['include', '^browser/speech/speech_recognition_dispatcher_host\\.(cc|h)$'],
-# ['include', '^browser/speech/speech_recognition_manager_impl\\.(cc|h)$'],
-# ['include', '^browser/speech/speech_recognizer\\.h$'],
-# ['include', '^browser/speech/speech_recognizer_impl_android\\.(cc|h)$'],
-# ],
-# 'sources!': [
-# 'browser/browser_ipc_logging.cc',
-# 'browser/font_list_async.cc',
-# 'browser/geolocation/device_data_provider.cc',
-# 'browser/geolocation/empty_device_data_provider.cc',
-# 'browser/geolocation/wifi_data_provider_common.cc',
-# 'browser/renderer_host/native_web_keyboard_event.cc',
-# ]
-# }, { # OS!="android"
-# 'sources/': [
-# ['exclude', '^browser/renderer_host/java/'],
-# ['exclude', '^browser/speech/speech_recognizer_impl_android\\.(cc|h)'],
-# ],
-# }],
-# ['OS=="mac"', {
-# 'sources/': [
-# ['exclude', '^browser/device_sensors/data_fetcher_shared_memory_default.cc$'],
-# ],
-# 'sources!': [
-# 'browser/geolocation/empty_wifi_data_provider.cc',
-# ],
-# 'dependencies': [
-# '../third_party/mozilla/mozilla.gyp:mozilla',
-# '../third_party/sudden_motion_sensor/sudden_motion_sensor.gyp:sudden_motion_sensor',
-# ],
-# 'link_settings': {
-# 'libraries': [
-# '$(SDKROOT)/usr/lib/libbsm.dylib',
-# ],
-# },
-# }],
-# ['chromeos==1', {
-# 'dependencies': [
-# '../build/linux/system.gyp:dbus',
-# '../chromeos/chromeos.gyp:power_manager_proto',
-# ],
-# 'sources!': [
-# 'browser/geolocation/wifi_data_provider_linux.cc',
-# 'browser/power_save_blocker_ozone.cc',
-# 'browser/power_save_blocker_x11.cc',
-# ],
-# }],
-# ['os_bsd==1', {
-# 'sources/': [
-# ['exclude', '^browser/gamepad/gamepad_platform_data_fetcher_linux\\.cc$'],
-# ],
-# }],
-# ['use_aura==1', {
-# 'dependencies': [
-# '../ui/aura/aura.gyp:aura',
-# '../ui/strings/ui_strings.gyp:ui_strings',
-# ],
-# }, {
-# 'sources/': [
-# ['exclude', '^browser/renderer_host/render_widget_host_view_aura.cc'],
-# ['exclude', '^browser/renderer_host/render_widget_host_view_aura.h'],
-# ['exclude', '^browser/web_contents/touch_editable_impl_aura.cc'],
-# ['exclude', '^browser/web_contents/touch_editable_impl_aura.h'],
-# ['exclude', '^browser/renderer_host/ui_events_helper.cc'],
-# ['exclude', '^browser/renderer_host/ui_events_helper.h'],
-# ['exclude', '^browser/context_factory.cc'],
-# ['exclude', '^public/browser/context_factory.h'],
-# ],
-# }],
-# ['use_aura==1 or OS=="mac"', {
-# 'dependencies': [
-# '../ui/compositor/compositor.gyp:compositor',
-# ],
-# }, {
-# 'sources/': [
-# ['exclude', '^browser/compositor/'],
-# ]
-# }],
-# ['enable_plugins==1', {
-# 'dependencies': [
-# '../ppapi/ppapi_internal.gyp:ppapi_ipc',
-# '../ppapi/ppapi_internal.gyp:ppapi_shared',
-# ],
-# }, { # enable_plugins==0
-# 'sources!': [
-# 'browser/pepper_flash_settings_helper_impl.cc',
-# 'browser/pepper_flash_settings_helper_impl.h',
-# 'browser/plugin_data_remover_impl.cc',
-# 'browser/plugin_data_remover_impl.h',
-# 'browser/plugin_loader_posix.cc',
-# 'browser/plugin_loader_posix.h',
-# 'browser/plugin_process_host.cc',
-# 'browser/plugin_process_host.h',
-# 'browser/plugin_service_impl.cc',
-# 'browser/plugin_service_impl.h',
-# 'browser/ppapi_plugin_process_host.cc',
-# 'public/browser/plugin_service.h',
-# ],
-# 'sources/': [
-# ['exclude', '^browser/renderer_host/pepper/'],
-# ],
-# }],
-# ['input_speech==1', {
-# 'dependencies': [
-# '../third_party/flac/flac.gyp:libflac',
-# '../third_party/speex/speex.gyp:libspeex',
-# ],
-# }],
-# ['OS == "win"', {
-# 'sources!': [
-# 'browser/geolocation/empty_wifi_data_provider.cc',
-# ],
-# }],
-# ['OS == "linux" and use_dbus==1', {
-# 'sources!': [
-# 'browser/geolocation/empty_wifi_data_provider.cc',
-# ],
-# 'dependencies': [
-# '../build/linux/system.gyp:dbus',
-# '../dbus/dbus.gyp:dbus',
-# ],
-# }, { # OS != "linux" or use_dbus==0
-# 'sources!': [
-# 'browser/geolocation/wifi_data_provider_linux.cc',
-# ],
-# }],
+ }
+
+ if (is_linux) {
+ deps += [ "//sandbox/linux:libc_urandom_override" ]
+ }
+
+ if (use_udev) {
+ configs += [ "//build/config/linux:udev" ]
+ } else {
+ # Remove udev-specific sources.
+ sources -= [
+ "device_monitor_udev.cc",
+ "device_monitor_udev.h",
+ ]
+ if (is_linux) {
+ # Already filtered out on non-Linux.
+ sources -= [
+ "gamepad/gamepad_platform_data_fetcher_linux.cc",
+ "udev_linux.cc",
+ "udev_linux.h",
+ ]
+ }
+ }
+
+ if (enable_plugins) {
+ sources += rebase_path(content_browser_gypi_values.plugin_browser_sources,
+ ".", "//content")
+ deps += [
+ "//ppapi:ppapi_ipc",
+ "//ppapi:ppapi_shared",
+ ]
+ if (!use_ozone || use_pango) {
+ sources -= [ "renderer_host/pepper/pepper_truetype_font_list_ozone.cc" ]
+ }
+ }
+
+ if (is_linux && use_aura) {
+ configs += [ "//build/config/linux:fontconfig" ]
+ }
+
+ if (use_x11) {
+ configs += [ "//build/config/linux:x11" ]
+ } else {
+ sources -= [
+ "power_save_blocker_x11.cc",
+ "renderer_host/web_input_event_aurax11.cc",
+ ]
+ }
+
+ if (use_pango) {
+ configs += [ "//build/config/linux:pangocairo" ]
+ }
+
+ if (is_android) {
+ sources += rebase_path(content_browser_gypi_values.android_browser_sources,
+ ".", "//content")
+ sources -= [
+ "battery_status/battery_status_manager_default.cc",
+ "browser_ipc_logging.cc",
+ "device_sensors/data_fetcher_shared_memory_default.cc",
+ "font_list_async.cc",
+ "geolocation/device_data_provider.cc",
+ "geolocation/empty_device_data_provider.cc",
+ "geolocation/network_location_provider.cc",
+ "geolocation/network_location_provider.h",
+ "geolocation/network_location_request.cc",
+ "geolocation/network_location_request.h",
+ "geolocation/wifi_data_provider_common.cc",
+ "renderer_host/native_web_keyboard_event.cc",
+ "tracing/tracing_ui.cc",
+ "tracing/tracing_ui.h",
+
+ # Android skips most, but not all, of the speech code.
+ "speech/audio_buffer.cc",
+ "speech/audio_buffer.h",
+ "speech/audio_encoder.cc",
+ "speech/audio_encoder.h",
+ "speech/chunked_byte_buffer.cc",
+ "speech/chunked_byte_buffer.h",
+ "speech/endpointer/endpointer.cc",
+ "speech/endpointer/endpointer.h",
+ "speech/endpointer/energy_endpointer.cc",
+ "speech/endpointer/energy_endpointer.h",
+ "speech/endpointer/energy_endpointer_params.cc",
+ "speech/endpointer/energy_endpointer_params.h",
+ "speech/google_one_shot_remote_engine.cc",
+ "speech/google_one_shot_remote_engine.h",
+ "speech/google_streaming_remote_engine.cc",
+ "speech/google_streaming_remote_engine.h",
+ "speech/speech_recognition_engine.cc",
+ "speech/speech_recognition_engine.h",
+ "speech/speech_recognizer_impl.cc",
+ "speech/speech_recognizer_impl.h",
+ ]
+ deps += [
+ #"//content:jni_headers", TODO(GYP)
+ #"//media", TODO(GYP)
+ ]
+ libs += [ "jnigraphics" ]
+ }
+
+ if (is_mac) {
+ sources -= [
+ "device_sensors/data_fetcher_shared_memory_default.cc",
+ "geolocation/empty_wifi_data_provider.cc",
+ "geolocation/empty_wifi_data_provider.h",
+ ]
+ libs += [ "bsm" ]
+ }
+
+ if (is_chromeos) {
+ sources -= [
+ "geolocation/wifi_data_provider_linux.cc",
+ "power_save_blocker_ozone.cc",
+ "power_save_blocker_x11.cc",
+ ]
+ deps += [ "//chromeos:power_manager_proto" ]
+ }
+
+ if (use_aura) {
+ deps += [
+ "//ui/aura",
+ "//ui/strings",
+ ]
+ } else { # Not aura.
+ sources -= [
+ "renderer_host/render_widget_host_view_aura.cc",
+ "renderer_host/render_widget_host_view_aura.h",
+ "web_contents/touch_editable_impl_aura.cc",
+ "web_contents/touch_editable_impl_aura.h",
+ "renderer_host/ui_events_helper.cc",
+ "renderer_host/ui_events_helper.h",
+ ]
+ }
+
+ if (use_aura || is_mac) {
+ sources += rebase_path(
+ content_browser_gypi_values.compositor_browser_sources,
+ ".", "//content")
+ if (!use_x11) {
+ sources -= [
+ "compositor/software_output_device_x11.cc",
+ "compositor/software_output_device_x11.h",
+ ]
+ }
+ deps += [ "//ui/compositor" ]
+ }
+
+ if (enable_speech_input) {
+ deps += [
+ "//third_party/flac",
+ "//third_party/speex",
+ ]
+ }
+
+ if (is_linux) {
+ if (use_dbus) {
+ sources -= [
+ "geolocation/empty_wifi_data_provider.cc",
+ ]
+ deps += [ "//dbus" ]
+ } else {
+ # This will already have gotten removed for all non-Linux cases.
+ sources -= [ "geolocation/wifi_data_provider_linux.cc" ]
+ }
+ }
}
diff --git a/content/browser/accessibility/accessibility_win_browsertest.cc b/content/browser/accessibility/accessibility_win_browsertest.cc
index b380f96..a11c026 100644
--- a/content/browser/accessibility/accessibility_win_browsertest.cc
+++ b/content/browser/accessibility/accessibility_win_browsertest.cc
@@ -23,19 +23,13 @@
#include "content/test/accessibility_browser_test_utils.h"
#include "third_party/iaccessible2/ia2_api_all.h"
#include "third_party/isimpledom/ISimpleDOMNode.h"
-
-// TODO(dmazzoni): Disabled accessibility tests on Win64. crbug.com/179717
-#if defined(ARCH_CPU_X86_64)
-#define MAYBE(x) DISABLED_##x
-#else
-#define MAYBE(x) x
-#endif
+#include "ui/aura/window.h"
+#include "ui/aura/window_tree_host.h"
namespace content {
namespace {
-
// Helpers --------------------------------------------------------------------
base::win::ScopedComPtr<IAccessible> GetAccessibleFromResultVariant(
@@ -91,7 +85,9 @@
// on the bots, this is really helpful in figuring out why.
for (int i = 0; i < depth; i++)
printf(" ");
- printf("role=%d name=%s\n", V_I4(&role), base::WideToUTF8(name).c_str());
+ printf("role=%s name=%s\n",
+ base::WideToUTF8(IAccessibleRoleToString(V_I4(&role))).c_str(),
+ base::WideToUTF8(name).c_str());
if (expected_role == V_I4(&role) && expected_name == name) {
*found = true;
@@ -158,24 +154,8 @@
// Retrieve the MSAA client accessibility object for the Render Widget Host View
// of the selected tab.
IAccessible* AccessibilityWinBrowserTest::GetRendererAccessible() {
- HWND hwnd_render_widget_host_view =
- shell()->web_contents()->GetRenderWidgetHostView()->GetNativeView();
-
- // Invoke windows screen reader detection by sending the WM_GETOBJECT message
- // with kIdCustom as the LPARAM.
- const int32 kIdCustom = 1;
- SendMessage(
- hwnd_render_widget_host_view, WM_GETOBJECT, OBJID_CLIENT, kIdCustom);
-
- IAccessible* accessible;
- HRESULT hr = AccessibleObjectFromWindow(
- hwnd_render_widget_host_view, OBJID_CLIENT,
- IID_IAccessible, reinterpret_cast<void**>(&accessible));
-
- EXPECT_EQ(S_OK, hr);
- EXPECT_NE(accessible, reinterpret_cast<IAccessible*>(NULL));
-
- return accessible;
+ content::WebContents* web_contents = shell()->web_contents();
+ return web_contents->GetRenderWidgetHostView()->GetNativeViewAccessible();
}
void AccessibilityWinBrowserTest::ExecuteScript(const std::wstring& script) {
@@ -418,8 +398,8 @@
// Tests ----------------------------------------------------------------------
IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
- MAYBE(TestBusyAccessibilityTree)) {
- NavigateToURL(shell(), GURL(kAboutBlankURL));
+ TestBusyAccessibilityTree) {
+ NavigateToURL(shell(), GURL(url::kAboutBlankURL));
// The initial accessible returned should have state STATE_SYSTEM_BUSY while
// the accessibility tree is being requested from the renderer.
@@ -431,49 +411,6 @@
document1_checker.CheckAccessible(GetRendererAccessible());
}
-// Flaky, http://crbug.com/167320 .
-IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
- DISABLED_TestRendererAccessibilityTree) {
- LoadInitialAccessibilityTreeFromHtml(
- "<html><head><title>Accessibility Win Test</title></head>"
- "<body><input type='button' value='push' /><input type='checkbox' />"
- "</body></html>");
-
- // Check the browser's copy of the renderer accessibility tree.
- AccessibleChecker button_checker(L"push", ROLE_SYSTEM_PUSHBUTTON,
- std::wstring());
- AccessibleChecker checkbox_checker(std::wstring(), ROLE_SYSTEM_CHECKBUTTON,
- std::wstring());
- AccessibleChecker body_checker(std::wstring(), L"body", IA2_ROLE_SECTION,
- std::wstring());
- AccessibleChecker document2_checker(L"Accessibility Win Test",
- ROLE_SYSTEM_DOCUMENT, std::wstring());
- body_checker.AppendExpectedChild(&button_checker);
- body_checker.AppendExpectedChild(&checkbox_checker);
- document2_checker.AppendExpectedChild(&body_checker);
- document2_checker.CheckAccessible(GetRendererAccessible());
-
- // Check that document accessible has a parent accessible.
- base::win::ScopedComPtr<IAccessible> document_accessible(
- GetRendererAccessible());
- ASSERT_NE(document_accessible.get(), reinterpret_cast<IAccessible*>(NULL));
- base::win::ScopedComPtr<IDispatch> parent_dispatch;
- HRESULT hr = document_accessible->get_accParent(parent_dispatch.Receive());
- EXPECT_EQ(S_OK, hr);
- EXPECT_NE(parent_dispatch, reinterpret_cast<IDispatch*>(NULL));
-
- // Navigate to another page.
- NavigateToURL(shell(), GURL(kAboutBlankURL));
-
- // Verify that the IAccessible reference still points to a valid object and
- // that calls to its methods fail since the tree is no longer valid after
- // the page navagation.
- base::win::ScopedBstr name;
- base::win::ScopedVariant childid_self(CHILDID_SELF);
- hr = document_accessible->get_accName(childid_self, name.Receive());
- ASSERT_EQ(E_FAIL, hr);
-}
-
// Periodically failing. See crbug.com/145537
IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
DISABLED_TestNotificationActiveDescendantChanged) {
@@ -529,7 +466,7 @@
}
IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
- MAYBE(TestNotificationCheckedStateChanged)) {
+ TestNotificationCheckedStateChanged) {
LoadInitialAccessibilityTreeFromHtml(
"<body><input type='checkbox' /></body>");
@@ -560,7 +497,7 @@
}
IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
- MAYBE(TestNotificationChildrenChanged)) {
+ TestNotificationChildrenChanged) {
// The role attribute causes the node to be in the accessibility tree.
LoadInitialAccessibilityTreeFromHtml("<body role=group></body>");
@@ -582,13 +519,14 @@
waiter->WaitForNotification();
// Check that the accessibility tree of the browser has been updated.
- AccessibleChecker text_checker(L"new text", ROLE_SYSTEM_TEXT, std::wstring());
+ AccessibleChecker text_checker(
+ L"new text", ROLE_SYSTEM_STATICTEXT, std::wstring());
group_checker.AppendExpectedChild(&text_checker);
document_checker.CheckAccessible(GetRendererAccessible());
}
IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
- MAYBE(TestNotificationChildrenChanged2)) {
+ TestNotificationChildrenChanged2) {
// The role attribute causes the node to be in the accessibility tree.
LoadInitialAccessibilityTreeFromHtml(
"<div role=group style='visibility: hidden'>text</div>");
@@ -607,7 +545,7 @@
waiter->WaitForNotification();
// Check that the accessibility tree of the browser has been updated.
- AccessibleChecker static_text_checker(L"text", ROLE_SYSTEM_TEXT,
+ AccessibleChecker static_text_checker(L"text", ROLE_SYSTEM_STATICTEXT,
std::wstring());
AccessibleChecker group_checker(std::wstring(), ROLE_SYSTEM_GROUPING,
std::wstring());
@@ -617,7 +555,7 @@
}
IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
- MAYBE(TestNotificationFocusChanged)) {
+ TestNotificationFocusChanged) {
// The role attribute causes the node to be in the accessibility tree.
LoadInitialAccessibilityTreeFromHtml("<div role=group tabindex='-1'></div>");
@@ -665,7 +603,7 @@
}
IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
- MAYBE(TestNotificationValueChanged)) {
+ TestNotificationValueChanged) {
LoadInitialAccessibilityTreeFromHtml(
"<body><input type='text' value='old value'/></body>");
@@ -685,7 +623,7 @@
scoped_ptr<AccessibilityNotificationWaiter> waiter(
new AccessibilityNotificationWaiter(
shell(), AccessibilityModeComplete,
- ui::AX_EVENT_VALUE_CHANGE));
+ ui::AX_EVENT_VALUE_CHANGED));
ExecuteScript(L"document.body.children[0].value='new value'");
waiter->WaitForNotification();
@@ -703,16 +641,21 @@
// that wraps the tab contents returns the IAccessible implementation
// provided by RenderWidgetHostViewWin in GetNativeViewAccessible().
IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
- MAYBE(ContainsRendererAccessibilityTree)) {
+ ContainsRendererAccessibilityTree) {
LoadInitialAccessibilityTreeFromHtml(
"<html><head><title>MyDocument</title></head>"
"<body>Content</body></html>");
- // Get the accessibility object for the browser window.
- HWND browser_hwnd = shell()->window();
+ // Get the accessibility object for the window tree host.
+ aura::Window* window = shell()->window();
+ CHECK(window);
+ aura::WindowTreeHost* window_tree_host = window->GetHost();
+ CHECK(window_tree_host);
+ HWND hwnd = window_tree_host->GetAcceleratedWidget();
+ CHECK(hwnd);
base::win::ScopedComPtr<IAccessible> browser_accessible;
HRESULT hr = AccessibleObjectFromWindow(
- browser_hwnd,
+ hwnd,
OBJID_WINDOW,
IID_IAccessible,
reinterpret_cast<void**>(browser_accessible.Receive()));
@@ -724,83 +667,8 @@
ASSERT_EQ(found, true);
}
-// Disabled because of http://crbug.com/144390.
IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
- DISABLED_TestToggleButtonRoleAndStates) {
- AccessibleChecker* button_checker;
- std::string button_html("data:text/html,");
- AccessibleChecker document_checker(std::wstring(), ROLE_SYSTEM_DOCUMENT,
- std::wstring());
- AccessibleChecker body_checker(std::wstring(), L"body", IA2_ROLE_SECTION,
- std::wstring());
- document_checker.AppendExpectedChild(&body_checker);
-
-// Temporary macro
-#define ADD_BUTTON(html, ia2_role, state) \
- button_html += html; \
- button_checker = new AccessibleChecker(L"x", ROLE_SYSTEM_PUSHBUTTON, \
- ia2_role, std::wstring()); \
- button_checker->SetExpectedState(state); \
- body_checker.AppendExpectedChild(button_checker)
-
- // If aria-pressed is 'undefined', empty or not present, use PUSHBUTTON
- // Otherwise use TOGGLE_BUTTON, even if the value is invalid.
- // The spec does this in an attempt future-proof in case new values are added.
- ADD_BUTTON("<span role='button' aria-pressed='false'>x</span>",
- IA2_ROLE_TOGGLE_BUTTON, 0);
- ADD_BUTTON("<span role='button' aria-pressed='true'>x</span>",
- IA2_ROLE_TOGGLE_BUTTON, STATE_SYSTEM_PRESSED);
- ADD_BUTTON("<span role='button' aria-pressed='mixed'>x</span>",
- IA2_ROLE_TOGGLE_BUTTON, STATE_SYSTEM_MIXED);
- ADD_BUTTON("<span role='button' aria-pressed='xyz'>x</span>",
- IA2_ROLE_TOGGLE_BUTTON, 0);
- ADD_BUTTON("<span role='button' aria-pressed=''>x</span>",
- ROLE_SYSTEM_PUSHBUTTON, 0);
- ADD_BUTTON("<span role='button' aria-pressed>x</span>",
- ROLE_SYSTEM_PUSHBUTTON, 0);
- ADD_BUTTON("<span role='button' aria-pressed='undefined'>x</span>",
- ROLE_SYSTEM_PUSHBUTTON, 0);
- ADD_BUTTON("<span role='button'>x</span>", ROLE_SYSTEM_PUSHBUTTON, 0);
- ADD_BUTTON("<input type='button' aria-pressed='true' value='x'/>",
- IA2_ROLE_TOGGLE_BUTTON, STATE_SYSTEM_FOCUSABLE | STATE_SYSTEM_PRESSED);
- ADD_BUTTON("<input type='button' aria-pressed='false' value='x'/>",
- IA2_ROLE_TOGGLE_BUTTON, STATE_SYSTEM_FOCUSABLE);
- ADD_BUTTON("<input type='button' aria-pressed='mixed' value='x'>",
- IA2_ROLE_TOGGLE_BUTTON, STATE_SYSTEM_FOCUSABLE | STATE_SYSTEM_MIXED);
- ADD_BUTTON("<input type='button' aria-pressed='xyz' value='x'/>",
- IA2_ROLE_TOGGLE_BUTTON, STATE_SYSTEM_FOCUSABLE);
- ADD_BUTTON("<input type='button' aria-pressed='' value='x'/>",
- ROLE_SYSTEM_PUSHBUTTON, STATE_SYSTEM_FOCUSABLE);
- ADD_BUTTON("<input type='button' aria-pressed value='x'>",
- ROLE_SYSTEM_PUSHBUTTON, STATE_SYSTEM_FOCUSABLE);
- ADD_BUTTON("<input type='button' aria-pressed='undefined' value='x'>",
- ROLE_SYSTEM_PUSHBUTTON, STATE_SYSTEM_FOCUSABLE);
- ADD_BUTTON("<input type='button' value='x'>",
- ROLE_SYSTEM_PUSHBUTTON, STATE_SYSTEM_FOCUSABLE);
- ADD_BUTTON("<button aria-pressed='true'>x</button>",
- IA2_ROLE_TOGGLE_BUTTON, STATE_SYSTEM_FOCUSABLE | STATE_SYSTEM_PRESSED);
- ADD_BUTTON("<button aria-pressed='false'>x</button>",
- IA2_ROLE_TOGGLE_BUTTON, STATE_SYSTEM_FOCUSABLE);
- ADD_BUTTON("<button aria-pressed='mixed'>x</button>", IA2_ROLE_TOGGLE_BUTTON,
- STATE_SYSTEM_FOCUSABLE | STATE_SYSTEM_MIXED);
- ADD_BUTTON("<button aria-pressed='xyz'>x</button>", IA2_ROLE_TOGGLE_BUTTON,
- STATE_SYSTEM_FOCUSABLE);
- ADD_BUTTON("<button aria-pressed=''>x</button>",
- ROLE_SYSTEM_PUSHBUTTON, STATE_SYSTEM_FOCUSABLE);
- ADD_BUTTON("<button aria-pressed>x</button>",
- ROLE_SYSTEM_PUSHBUTTON, STATE_SYSTEM_FOCUSABLE);
- ADD_BUTTON("<button aria-pressed='undefined'>x</button>",
- ROLE_SYSTEM_PUSHBUTTON, STATE_SYSTEM_FOCUSABLE);
- ADD_BUTTON("<button>x</button>", ROLE_SYSTEM_PUSHBUTTON,
- STATE_SYSTEM_FOCUSABLE);
-#undef ADD_BUTTON // Temporary macro
-
- LoadInitialAccessibilityTreeFromHtml(button_html);
- document_checker.CheckAccessible(GetRendererAccessible());
-}
-
-IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
- MAYBE(SupportsISimpleDOM)) {
+ SupportsISimpleDOM) {
LoadInitialAccessibilityTreeFromHtml(
"<body><input type='checkbox' /></body>");
@@ -864,7 +732,7 @@
EXPECT_EQ(0, num_children);
}
-IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest, MAYBE(TestRoleGroup)) {
+IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest, TestRoleGroup) {
LoadInitialAccessibilityTreeFromHtml(
"<fieldset></fieldset><div role=group></div>");
diff --git a/content/browser/accessibility/android_hit_testing_browsertest.cc b/content/browser/accessibility/android_hit_testing_browsertest.cc
index 2f298fc..1070f6e 100644
--- a/content/browser/accessibility/android_hit_testing_browsertest.cc
+++ b/content/browser/accessibility/android_hit_testing_browsertest.cc
@@ -39,7 +39,7 @@
IN_PROC_BROWSER_TEST_F(AndroidHitTestingBrowserTest,
HitTestOutsideDocumentBoundsReturnsRoot) {
- NavigateToURL(shell(), GURL(kAboutBlankURL));
+ NavigateToURL(shell(), GURL(url::kAboutBlankURL));
// Load the page.
AccessibilityNotificationWaiter waiter(
diff --git a/content/browser/accessibility/browser_accessibility_manager_win.cc b/content/browser/accessibility/browser_accessibility_manager_win.cc
index 69c8891..0efdb3c 100644
--- a/content/browser/accessibility/browser_accessibility_manager_win.cc
+++ b/content/browser/accessibility/browser_accessibility_manager_win.cc
@@ -11,6 +11,7 @@
#include "content/browser/accessibility/browser_accessibility_win.h"
#include "content/browser/renderer_host/legacy_render_widget_host_win.h"
#include "content/common/accessibility_messages.h"
+#include "ui/base/win/atl_module.h"
namespace content {
@@ -36,11 +37,15 @@
BrowserAccessibilityDelegate* delegate,
BrowserAccessibilityFactory* factory)
: BrowserAccessibilityManager(initial_tree, delegate, factory),
- parent_hwnd_(accessible_hwnd->GetParent()),
+ parent_hwnd_(NULL),
parent_iaccessible_(parent_iaccessible),
tracked_scroll_object_(NULL),
accessible_hwnd_(accessible_hwnd) {
- accessible_hwnd_->set_browser_accessibility_manager(this);
+ ui::win::CreateATLModuleIfNeeded();
+ if (accessible_hwnd_) {
+ accessible_hwnd_->set_browser_accessibility_manager(this);
+ parent_hwnd_ = accessible_hwnd_->GetParent();
+ }
}
BrowserAccessibilityManagerWin::~BrowserAccessibilityManagerWin() {
@@ -67,10 +72,19 @@
return update;
}
+void BrowserAccessibilityManagerWin::SetAccessibleHWND(
+ LegacyRenderWidgetHostHWND* accessible_hwnd) {
+ accessible_hwnd_ = accessible_hwnd;
+ if (accessible_hwnd_) {
+ accessible_hwnd_->set_browser_accessibility_manager(this);
+ parent_hwnd_ = accessible_hwnd_->GetParent();
+ }
+}
+
void BrowserAccessibilityManagerWin::MaybeCallNotifyWinEvent(DWORD event,
LONG child_id) {
// Don't fire events if this view isn't hooked up to its parent.
- if (!parent_iaccessible())
+ if (!parent_iaccessible() || !parent_hwnd())
return;
// If on Win 7 and complete accessibility is enabled, use the fake child HWND
@@ -125,6 +139,15 @@
if (node->GetRole() == ui::AX_ROLE_INLINE_TEXT_BOX)
return;
+ // NVDA gets confused if we focus the main document element when it hasn't
+ // finished loading and it has no children at all, so suppress that event.
+ if (event_type == ui::AX_EVENT_FOCUS &&
+ node == GetRoot() &&
+ node->PlatformChildCount() == 0 &&
+ !node->GetBoolAttribute(ui::AX_ATTR_DOC_LOADED)) {
+ return;
+ }
+
LONG event_id = EVENT_MIN;
switch (event_type) {
case ui::AX_EVENT_ACTIVEDESCENDANTCHANGED:
@@ -212,6 +235,10 @@
// object and pass it that same id, which we can use to retrieve the
// IAccessible for this node.
LONG child_id = node->ToBrowserAccessibilityWin()->unique_id_win();
+
+ // Always send a focus before a load complete.
+ if (event_type == ui::AX_EVENT_LOAD_COMPLETE)
+ MaybeCallNotifyWinEvent(EVENT_OBJECT_FOCUS, child_id);
MaybeCallNotifyWinEvent(event_id, child_id);
}
diff --git a/content/browser/accessibility/browser_accessibility_manager_win.h b/content/browser/accessibility/browser_accessibility_manager_win.h
index 18260e4..90914db 100644
--- a/content/browser/accessibility/browser_accessibility_manager_win.h
+++ b/content/browser/accessibility/browser_accessibility_manager_win.h
@@ -40,6 +40,8 @@
parent_iaccessible_ = parent_iaccessible;
}
+ void SetAccessibleHWND(LegacyRenderWidgetHostHWND* accessible_hwnd);
+
// Calls NotifyWinEvent if the parent window's IAccessible pointer is known.
void MaybeCallNotifyWinEvent(DWORD event, LONG child_id);
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc
index e98ae71..c5fa358 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -739,6 +739,9 @@
return E_INVALIDARG;
*window_handle = manager()->ToBrowserAccessibilityManagerWin()->parent_hwnd();
+ if (!*window_handle)
+ return E_FAIL;
+
return S_OK;
}
@@ -992,6 +995,8 @@
if (coordinate_type == IA2_COORDTYPE_SCREEN_RELATIVE) {
HWND parent_hwnd =
manager()->ToBrowserAccessibilityManagerWin()->parent_hwnd();
+ if (!parent_hwnd)
+ return E_FAIL;
POINT top_left = {0, 0};
::ClientToScreen(parent_hwnd, &top_left);
*x = GetLocation().x() + top_left.x;
@@ -2820,7 +2825,8 @@
if (id == UIA_ValuePatternId || id == UIA_TextPatternId) {
if (IsEditableText()) {
DVLOG(1) << "Returning UIA text provider";
- base::win::UIATextProvider::CreateTextProvider(true, provider);
+ base::win::UIATextProvider::CreateTextProvider(
+ GetValueText(), true, provider);
return S_OK;
}
}
diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
index d54d0e6..d373f7b 100644
--- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
+++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
@@ -135,7 +135,7 @@
void DumpAccessibilityTreeTest::RunTest(
const base::FilePath::CharType* file_path) {
- NavigateToURL(shell(), GURL(kAboutBlankURL));
+ NavigateToURL(shell(), GURL(url::kAboutBlankURL));
// Setup test paths.
base::FilePath dir_test_data;
diff --git a/content/browser/android/child_process_launcher_android.cc b/content/browser/android/child_process_launcher_android.cc
index 06fa0cb..baac2b0 100644
--- a/content/browser/android/child_process_launcher_android.cc
+++ b/content/browser/android/child_process_launcher_android.cc
@@ -10,7 +10,7 @@
#include "base/memory/scoped_ptr.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/media/android/browser_media_player_manager.h"
-#include "content/browser/media/android/media_web_contents_observer.h"
+#include "content/browser/media/media_web_contents_observer.h"
#include "content/browser/renderer_host/compositor_impl_android.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/public/browser/browser_thread.h"
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 8fdfb8c..2335d0a 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -24,7 +24,7 @@
#include "content/browser/frame_host/navigation_controller_impl.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/geolocation/geolocation_dispatcher_host.h"
-#include "content/browser/media/android/media_web_contents_observer.h"
+#include "content/browser/media/media_web_contents_observer.h"
#include "content/browser/renderer_host/compositor_impl_android.h"
#include "content/browser/renderer_host/input/motion_event_android.h"
#include "content/browser/renderer_host/input/web_input_event_builders_android.h"
@@ -944,7 +944,9 @@
jint pointer_id_0,
jint pointer_id_1,
jfloat touch_major_0,
- jfloat touch_major_1) {
+ jfloat touch_major_1,
+ jfloat raw_pos_x,
+ jfloat raw_pos_y) {
RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid();
// Avoid synthesizing a touch event if it cannot be forwarded.
if (!rwhv)
@@ -965,7 +967,9 @@
pointer_id_0,
pointer_id_1,
touch_major_0,
- touch_major_1);
+ touch_major_1,
+ raw_pos_x,
+ raw_pos_y);
return rwhv->OnTouchEvent(event);
}
@@ -1538,38 +1542,6 @@
RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid();
if (rwhv)
rwhv->UpdateScreenInfo(GetViewAndroid());
-
- // TODO(mlamouri): temporary plumbing for Screen Orientation, this will change
- // in the future. The OnResize IPC message sent from UpdateScreenInfo() will
- // propagate the information.
- blink::WebScreenOrientationType orientation =
- blink::WebScreenOrientationPortraitPrimary;
-
- switch (device_orientation_) {
- case 0:
- orientation = blink::WebScreenOrientationPortraitPrimary;
- break;
- case 90:
- orientation = blink::WebScreenOrientationLandscapePrimary;
- break;
- case -90:
- orientation = blink::WebScreenOrientationLandscapeSecondary;
- break;
- case 180:
- orientation = blink::WebScreenOrientationPortraitSecondary;
- break;
- default:
- NOTREACHED();
- }
-
- ScreenOrientationDispatcherHost* sodh =
- static_cast<RenderProcessHostImpl*>(web_contents_->
- GetRenderProcessHost())->screen_orientation_dispatcher_host();
-
- // sodh can be null if the RenderProcessHost is in the process of being
- // destroyed or not yet initialized.
- if (sodh)
- sodh->OnOrientationChange(orientation);
}
void ContentViewCoreImpl::ExtractSmartClipData(JNIEnv* env,
diff --git a/content/browser/android/content_view_core_impl.h b/content/browser/android/content_view_core_impl.h
index 269ac88..6c003df 100644
--- a/content/browser/android/content_view_core_impl.h
+++ b/content/browser/android/content_view_core_impl.h
@@ -108,7 +108,9 @@
jint pointer_id_0,
jint pointer_id_1,
jfloat touch_major_0,
- jfloat touch_major_1);
+ jfloat touch_major_1,
+ jfloat raw_pos_x,
+ jfloat raw_pos_y);
jboolean SendMouseMoveEvent(JNIEnv* env,
jobject obj,
jlong time_ms,
diff --git a/content/browser/android/edge_effect.cc b/content/browser/android/edge_effect.cc
index a23dff8..94e5b51 100644
--- a/content/browser/android/edge_effect.cc
+++ b/content/browser/android/edge_effect.cc
@@ -133,8 +133,11 @@
float opacity) {
DCHECK(layer);
layer->SetIsDrawable(true);
+ gfx::Size bounds = ComputeBounds(edge, window_size, height);
+ layer->SetTransformOrigin(
+ gfx::Point3F(bounds.width() * 0.5f, bounds.height() * 0.5f, 0));
layer->SetTransform(ComputeTransform(edge, window_size, offset, height));
- layer->SetBounds(ComputeBounds(edge, window_size, height));
+ layer->SetBounds(bounds);
layer->SetOpacity(Clamp(opacity, 0.f, 1.f));
}
diff --git a/content/browser/android/in_process/synchronous_compositor_factory_impl.cc b/content/browser/android/in_process/synchronous_compositor_factory_impl.cc
index c4fdb62..7c5646e 100644
--- a/content/browser/android/in_process/synchronous_compositor_factory_impl.cc
+++ b/content/browser/android/in_process/synchronous_compositor_factory_impl.cc
@@ -55,7 +55,6 @@
}
scoped_ptr<gpu::GLInProcessContext> CreateContext(
- scoped_refptr<gfx::GLSurface> surface,
scoped_refptr<gpu::InProcessCommandBuffer::Service> service,
gpu::GLInProcessContext* share_context) {
const gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu;
@@ -64,20 +63,12 @@
GetDefaultAttribs(), &in_process_attribs);
in_process_attribs.lose_context_when_out_of_memory = 1;
-
- bool is_offscreen = false;
- gfx::Size size(1, 1);
- if (surface) {
- is_offscreen = surface->IsOffscreen();
- size = surface->GetSize();
- }
-
scoped_ptr<gpu::GLInProcessContext> context(
gpu::GLInProcessContext::Create(service,
- surface,
- is_offscreen,
+ NULL /* surface */,
+ false /* is_offscreen */,
gfx::kNullAcceleratedWidget,
- size,
+ gfx::Size(1, 1),
share_context,
false /* share_resources */,
in_process_attribs,
@@ -177,14 +168,13 @@
}
scoped_refptr<cc::ContextProvider> SynchronousCompositorFactoryImpl::
- CreateOnscreenContextProviderForCompositorThread(
- scoped_refptr<gfx::GLSurface> surface) {
+ CreateOnscreenContextProviderForCompositorThread() {
DCHECK(service_);
if (!share_context_.get())
- share_context_ = CreateContext(NULL, service_, NULL);
+ share_context_ = CreateContext(service_, NULL);
return webkit::gpu::ContextProviderInProcess::Create(
- WrapContext(CreateContext(surface, service_, share_context_.get())),
+ WrapContext(CreateContext(service_, share_context_.get())),
"Child-Compositor");
}
@@ -239,7 +229,7 @@
DCHECK(share_context_.get());
video_context_provider_ = new VideoContextProvider(
- CreateContext(NULL, service_, share_context_.get()));
+ CreateContext(service_, share_context_.get()));
}
return video_context_provider_;
}
diff --git a/content/browser/android/in_process/synchronous_compositor_factory_impl.h b/content/browser/android/in_process/synchronous_compositor_factory_impl.h
index c7f1a3b..7fdc910 100644
--- a/content/browser/android/in_process/synchronous_compositor_factory_impl.h
+++ b/content/browser/android/in_process/synchronous_compositor_factory_impl.h
@@ -12,10 +12,6 @@
#include "gpu/command_buffer/service/in_process_command_buffer.h"
#include "webkit/common/gpu/context_provider_web_context.h"
-namespace gfx {
-class GLSurface;
-}
-
namespace gpu {
class GLInProcessContext;
}
@@ -57,8 +53,7 @@
void CompositorReleasedHardwareDraw();
scoped_refptr<cc::ContextProvider>
- CreateOnscreenContextProviderForCompositorThread(
- scoped_refptr<gfx::GLSurface> surface);
+ CreateOnscreenContextProviderForCompositorThread();
gpu::GLInProcessContext* GetShareContext();
private:
diff --git a/content/browser/android/in_process/synchronous_compositor_impl.cc b/content/browser/android/in_process/synchronous_compositor_impl.cc
index 0a0be1c..d7b3eb7 100644
--- a/content/browser/android/in_process/synchronous_compositor_impl.cc
+++ b/content/browser/android/in_process/synchronous_compositor_impl.cc
@@ -89,13 +89,12 @@
g_factory.Get().SetDeferredGpuService(service);
}
-bool SynchronousCompositorImpl::InitializeHwDraw(
- scoped_refptr<gfx::GLSurface> surface) {
+bool SynchronousCompositorImpl::InitializeHwDraw() {
DCHECK(CalledOnValidThread());
DCHECK(output_surface_);
scoped_refptr<cc::ContextProvider> onscreen_context =
- g_factory.Get().CreateOnscreenContextProviderForCompositorThread(surface);
+ g_factory.Get().CreateOnscreenContextProviderForCompositorThread();
bool success = output_surface_->InitializeHwDraw(onscreen_context);
@@ -120,13 +119,12 @@
gfx::Size surface_size,
const gfx::Transform& transform,
gfx::Rect viewport,
- gfx::Rect clip,
- bool stencil_enabled) {
+ gfx::Rect clip) {
DCHECK(CalledOnValidThread());
DCHECK(output_surface_);
- scoped_ptr<cc::CompositorFrame> frame = output_surface_->DemandDrawHw(
- surface_size, transform, viewport, clip, stencil_enabled);
+ scoped_ptr<cc::CompositorFrame> frame =
+ output_surface_->DemandDrawHw(surface_size, transform, viewport, clip);
if (frame.get())
UpdateFrameMetaData(frame->metadata);
return frame.Pass();
@@ -150,15 +148,6 @@
void SynchronousCompositorImpl::UpdateFrameMetaData(
const cc::CompositorFrameMetadata& frame_metadata) {
- if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- BrowserThread::PostTask(
- BrowserThread::UI,
- FROM_HERE,
- base::Bind(&SynchronousCompositorImpl::UpdateFrameMetaData,
- weak_ptr_factory_.GetWeakPtr(),
- frame_metadata));
- return;
- }
RenderWidgetHostViewAndroid* rwhv = static_cast<RenderWidgetHostViewAndroid*>(
contents_->GetRenderWidgetHostView());
if (rwhv)
diff --git a/content/browser/android/in_process/synchronous_compositor_impl.h b/content/browser/android/in_process/synchronous_compositor_impl.h
index 544a533..6ac80cb 100644
--- a/content/browser/android/in_process/synchronous_compositor_impl.h
+++ b/content/browser/android/in_process/synchronous_compositor_impl.h
@@ -48,16 +48,14 @@
// SynchronousCompositor
virtual void SetClient(SynchronousCompositorClient* compositor_client)
OVERRIDE;
- virtual bool InitializeHwDraw(
- scoped_refptr<gfx::GLSurface> surface) OVERRIDE;
+ virtual bool InitializeHwDraw() OVERRIDE;
virtual void ReleaseHwDraw() OVERRIDE;
virtual gpu::GLInProcessContext* GetShareContext() OVERRIDE;
virtual scoped_ptr<cc::CompositorFrame> DemandDrawHw(
gfx::Size surface_size,
const gfx::Transform& transform,
gfx::Rect viewport,
- gfx::Rect clip,
- bool stencil_enabled) OVERRIDE;
+ gfx::Rect clip) OVERRIDE;
virtual bool DemandDrawSw(SkCanvas* canvas) OVERRIDE;
virtual void ReturnResources(
const cc::CompositorFrameAck& frame_ack) OVERRIDE;
diff --git a/content/browser/android/in_process/synchronous_compositor_output_surface.cc b/content/browser/android/in_process/synchronous_compositor_output_surface.cc
index 4590ed3..041de4d 100644
--- a/content/browser/android/in_process/synchronous_compositor_output_surface.cc
+++ b/content/browser/android/in_process/synchronous_compositor_output_surface.cc
@@ -79,10 +79,8 @@
capabilities_.deferred_gl_initialization = true;
capabilities_.draw_and_swap_full_viewport_every_frame = true;
capabilities_.adjust_deadline_for_parent = false;
- if (IsDelegatedRendererEnabled()) {
- capabilities_.delegated_rendering = true;
- capabilities_.max_frames_pending = 1;
- }
+ capabilities_.delegated_rendering = true;
+ capabilities_.max_frames_pending = 1;
// Cannot call out to GetDelegate() here as the output surface is not
// constructed on the correct thread.
@@ -139,10 +137,6 @@
void SynchronousCompositorOutputSurface::SwapBuffers(
cc::CompositorFrame* frame) {
DCHECK(CalledOnValidThread());
- if (!ForcedDrawToSoftwareDevice() && !IsDelegatedRendererEnabled()) {
- DCHECK(context_provider_);
- context_provider_->ContextGL()->ShallowFlushCHROMIUM();
- }
frame_holder_.reset(new cc::CompositorFrame);
frame->AssignTo(frame_holder_.get());
@@ -176,14 +170,12 @@
gfx::Size surface_size,
const gfx::Transform& transform,
gfx::Rect viewport,
- gfx::Rect clip,
- bool stencil_enabled) {
+ gfx::Rect clip) {
DCHECK(CalledOnValidThread());
DCHECK(HasClient());
DCHECK(context_provider_);
surface_size_ = surface_size;
- SetExternalStencilTest(stencil_enabled);
InvokeComposite(transform, viewport, clip, true);
return frame_holder_.Pass();
@@ -205,7 +197,6 @@
surface_size_ = gfx::Size(canvas->getDeviceSize().width(),
canvas->getDeviceSize().height());
- SetExternalStencilTest(false);
InvokeComposite(transform, clip, clip, false);
diff --git a/content/browser/android/in_process/synchronous_compositor_output_surface.h b/content/browser/android/in_process/synchronous_compositor_output_surface.h
index cc1f3be..3a456a4 100644
--- a/content/browser/android/in_process/synchronous_compositor_output_surface.h
+++ b/content/browser/android/in_process/synchronous_compositor_output_surface.h
@@ -68,8 +68,7 @@
scoped_ptr<cc::CompositorFrame> DemandDrawHw(gfx::Size surface_size,
const gfx::Transform& transform,
gfx::Rect viewport,
- gfx::Rect clip,
- bool stencil_enabled);
+ gfx::Rect clip);
void ReturnResources(const cc::CompositorFrameAck& frame_ack);
scoped_ptr<cc::CompositorFrame> DemandDrawSw(SkCanvas* canvas);
void SetMemoryPolicy(const SynchronousCompositorMemoryPolicy& policy);
diff --git a/content/browser/android/surface_texture_peer_browser_impl.cc b/content/browser/android/surface_texture_peer_browser_impl.cc
index 99e2c08..4f61887 100644
--- a/content/browser/android/surface_texture_peer_browser_impl.cc
+++ b/content/browser/android/surface_texture_peer_browser_impl.cc
@@ -6,7 +6,7 @@
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/media/android/browser_media_player_manager.h"
-#include "content/browser/media/android/media_web_contents_observer.h"
+#include "content/browser/media/media_web_contents_observer.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
diff --git a/content/browser/android/ui_resource_provider_impl.cc b/content/browser/android/ui_resource_provider_impl.cc
new file mode 100644
index 0000000..f97975c
--- /dev/null
+++ b/content/browser/android/ui_resource_provider_impl.cc
@@ -0,0 +1,60 @@
+// Copyright 2014 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 "content/browser/android/ui_resource_provider_impl.h"
+
+#include "cc/resources/ui_resource_client.h"
+#include "cc/trees/layer_tree_host.h"
+#include "content/public/browser/android/ui_resource_client_android.h"
+
+namespace content {
+
+UIResourceProviderImpl::UIResourceProviderImpl() : host_(NULL) {
+}
+
+UIResourceProviderImpl::~UIResourceProviderImpl() {
+ SetLayerTreeHost(NULL);
+}
+
+void UIResourceProviderImpl::SetLayerTreeHost(cc::LayerTreeHost* host) {
+ if (host_ == host)
+ return;
+ host_ = host;
+ UIResourcesAreInvalid();
+}
+
+void UIResourceProviderImpl::UIResourcesAreInvalid() {
+ UIResourceClientMap client_map = ui_resource_client_map_;
+ ui_resource_client_map_.clear();
+ for (UIResourceClientMap::iterator iter = client_map.begin();
+ iter != client_map.end();
+ iter++) {
+ iter->second->UIResourceIsInvalid();
+ }
+}
+
+cc::UIResourceId UIResourceProviderImpl::CreateUIResource(
+ UIResourceClientAndroid* client) {
+ if (!host_)
+ return 0;
+ cc::UIResourceId id = host_->CreateUIResource(client);
+ DCHECK(ui_resource_client_map_.find(id) == ui_resource_client_map_.end());
+
+ ui_resource_client_map_[id] = client;
+ return id;
+}
+
+void UIResourceProviderImpl::DeleteUIResource(cc::UIResourceId ui_resource_id) {
+ UIResourceClientMap::iterator iter =
+ ui_resource_client_map_.find(ui_resource_id);
+ DCHECK(iter != ui_resource_client_map_.end());
+
+ ui_resource_client_map_.erase(iter);
+
+ if (!host_)
+ return;
+ host_->DeleteUIResource(ui_resource_id);
+}
+
+} // namespace content
diff --git a/content/browser/android/ui_resource_provider_impl.h b/content/browser/android/ui_resource_provider_impl.h
new file mode 100644
index 0000000..79c2301
--- /dev/null
+++ b/content/browser/android/ui_resource_provider_impl.h
@@ -0,0 +1,46 @@
+// Copyright 2014 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 CONTENT_BROWSER_ANDROID_UI_RESOURCE_PROVIDER_IMPL_H_
+#define CONTENT_BROWSER_ANDROID_UI_RESOURCE_PROVIDER_IMPL_H_
+
+#include "base/containers/hash_tables.h"
+#include "content/public/browser/android/ui_resource_provider.h"
+
+namespace cc {
+class LayerTreeHost;
+}
+
+namespace content {
+
+class UIResourceClientAndroid;
+
+class UIResourceProviderImpl : public UIResourceProvider {
+ public:
+ UIResourceProviderImpl();
+
+ virtual ~UIResourceProviderImpl();
+
+ void SetLayerTreeHost(cc::LayerTreeHost* host);
+
+ void UIResourcesAreInvalid();
+
+ virtual cc::UIResourceId CreateUIResource(
+ UIResourceClientAndroid* client) OVERRIDE;
+
+ virtual void DeleteUIResource(cc::UIResourceId resource_id) OVERRIDE;
+
+ private:
+ typedef base::hash_map<cc::UIResourceId, UIResourceClientAndroid*>
+ UIResourceClientMap;
+ UIResourceClientMap ui_resource_client_map_;
+
+ cc::LayerTreeHost* host_;
+
+ DISALLOW_COPY_AND_ASSIGN(UIResourceProviderImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_ANDROID_UI_RESOURCE_PROVIDER_IMPL_H_
diff --git a/content/browser/android/web_contents_observer_android.cc b/content/browser/android/web_contents_observer_android.cc
index 16ad09f..344a901 100644
--- a/content/browser/android/web_contents_observer_android.cc
+++ b/content/browser/android/web_contents_observer_android.cc
@@ -227,6 +227,17 @@
env, obj.obj(), frame_id, jstring_url.obj(), is_main_frame);
}
+void WebContentsObserverAndroid::DocumentLoadedInFrame(
+ int64 frame_id,
+ RenderViewHost* render_view_host) {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> obj(weak_java_observer_.get(env));
+ if (obj.is_null())
+ return;
+ Java_WebContentsObserverAndroid_documentLoadedInFrame(
+ env, obj.obj(), frame_id);
+}
+
void WebContentsObserverAndroid::NavigationEntryCommitted(
const LoadCommittedDetails& load_details) {
JNIEnv* env = AttachCurrentThread();
diff --git a/content/browser/android/web_contents_observer_android.h b/content/browser/android/web_contents_observer_android.h
index 9d4421f..dbae8c8 100644
--- a/content/browser/android/web_contents_observer_android.h
+++ b/content/browser/android/web_contents_observer_android.h
@@ -74,6 +74,8 @@
const GURL& validated_url,
bool is_main_frame,
RenderViewHost* render_view_host) OVERRIDE;
+ virtual void DocumentLoadedInFrame(int64 frame_id,
+ RenderViewHost* render_view_host) OVERRIDE;
virtual void NavigationEntryCommitted(
const LoadCommittedDetails& load_details) OVERRIDE;
virtual void WebContentsDestroyed() OVERRIDE;
diff --git a/content/browser/appcache/appcache_database_unittest.cc b/content/browser/appcache/appcache_database_unittest.cc
index 6e42296..92fa6a5 100644
--- a/content/browser/appcache/appcache_database_unittest.cc
+++ b/content/browser/appcache/appcache_database_unittest.cc
@@ -19,9 +19,9 @@
using appcache::AppCacheDatabase;
using appcache::AppCacheEntry;
-using appcache::FALLBACK_NAMESPACE;
-using appcache::INTERCEPT_NAMESPACE;
-using appcache::NETWORK_NAMESPACE;
+using appcache::APPCACHE_FALLBACK_NAMESPACE;
+using appcache::APPCACHE_INTERCEPT_NAMESPACE;
+using appcache::APPCACHE_NETWORK_NAMESPACE;
namespace {
@@ -962,7 +962,7 @@
kMockOrigin.Resolve(base::StringPrintf(kTargetUrlFormat, i)));
EXPECT_EQ(i, fallbacks[i].cache_id);
- EXPECT_EQ(FALLBACK_NAMESPACE, fallbacks[i].namespace_.type);
+ EXPECT_EQ(APPCACHE_FALLBACK_NAMESPACE, fallbacks[i].namespace_.type);
EXPECT_EQ(kMockOrigin, fallbacks[i].origin);
EXPECT_EQ(expected_namespace_url, fallbacks[i].namespace_.namespace_url);
EXPECT_EQ(expected_target_url, fallbacks[i].namespace_.target_url);
@@ -1149,7 +1149,7 @@
kMockOrigin.Resolve(base::StringPrintf(kTargetUrlFormat, i)));
statement.BindInt64(0, i);
statement.BindString(1, kMockOrigin.spec().c_str());
- statement.BindInt(2, FALLBACK_NAMESPACE);
+ statement.BindInt(2, APPCACHE_FALLBACK_NAMESPACE);
statement.BindString(3, namespace_url.spec().c_str());
statement.BindString(4, target_url.spec().c_str());
ASSERT_TRUE(statement.Run());
@@ -1202,7 +1202,7 @@
kMockOrigin.Resolve(base::StringPrintf(kWhitelistUrlFormat, i)));
EXPECT_EQ(i, fallbacks[i].cache_id);
- EXPECT_EQ(FALLBACK_NAMESPACE, fallbacks[i].namespace_.type);
+ EXPECT_EQ(APPCACHE_FALLBACK_NAMESPACE, fallbacks[i].namespace_.type);
EXPECT_EQ(kMockOrigin, fallbacks[i].origin);
EXPECT_EQ(expected_namespace_url, fallbacks[i].namespace_.namespace_url);
EXPECT_EQ(expected_target_url, fallbacks[i].namespace_.target_url);
diff --git a/content/browser/appcache/appcache_dispatcher_host.cc b/content/browser/appcache/appcache_dispatcher_host.cc
index 1ac788d..64e46b1 100644
--- a/content/browser/appcache/appcache_dispatcher_host.cc
+++ b/content/browser/appcache/appcache_dispatcher_host.cc
@@ -162,7 +162,7 @@
return;
}
- GetStatusCallback(appcache::UNCACHED, reply_msg);
+ GetStatusCallback(appcache::APPCACHE_STATUS_UNCACHED, reply_msg);
}
void AppCacheDispatcherHost::OnStartUpdate(int host_id,
@@ -205,7 +205,7 @@
}
void AppCacheDispatcherHost::GetStatusCallback(
- appcache::Status status, void* param) {
+ appcache::AppCacheStatus status, void* param) {
IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param);
DCHECK_EQ(pending_reply_msg_.get(), reply_msg);
AppCacheHostMsg_GetStatus::WriteReplyParams(reply_msg, status);
diff --git a/content/browser/appcache/appcache_dispatcher_host.h b/content/browser/appcache/appcache_dispatcher_host.h
index 4ddb236..8bad796 100644
--- a/content/browser/appcache/appcache_dispatcher_host.h
+++ b/content/browser/appcache/appcache_dispatcher_host.h
@@ -55,7 +55,7 @@
void OnGetResourceList(
int host_id,
std::vector<appcache::AppCacheResourceInfo>* resource_infos);
- void GetStatusCallback(appcache::Status status, void* param);
+ void GetStatusCallback(appcache::AppCacheStatus status, void* param);
void StartUpdateCallback(bool result, void* param);
void SwapCacheCallback(bool result, void* param);
diff --git a/content/browser/appcache/appcache_frontend_proxy.cc b/content/browser/appcache/appcache_frontend_proxy.cc
index 826dd84..ea693e9 100644
--- a/content/browser/appcache/appcache_frontend_proxy.cc
+++ b/content/browser/appcache/appcache_frontend_proxy.cc
@@ -18,13 +18,14 @@
}
void AppCacheFrontendProxy::OnStatusChanged(const std::vector<int>& host_ids,
- appcache::Status status) {
+ appcache::AppCacheStatus status) {
sender_->Send(new AppCacheMsg_StatusChanged(host_ids, status));
}
void AppCacheFrontendProxy::OnEventRaised(const std::vector<int>& host_ids,
- appcache::EventID event_id) {
- DCHECK_NE(appcache::PROGRESS_EVENT, event_id); // See OnProgressEventRaised.
+ appcache::AppCacheEventID event_id) {
+ DCHECK_NE(appcache::APPCACHE_PROGRESS_EVENT,
+ event_id); // See OnProgressEventRaised.
sender_->Send(new AppCacheMsg_EventRaised(host_ids, event_id));
}
@@ -37,12 +38,12 @@
void AppCacheFrontendProxy::OnErrorEventRaised(
const std::vector<int>& host_ids,
- const appcache::ErrorDetails& details) {
+ const appcache::AppCacheErrorDetails& details) {
sender_->Send(new AppCacheMsg_ErrorEventRaised(host_ids, details));
}
void AppCacheFrontendProxy::OnLogMessage(int host_id,
- appcache::LogLevel log_level,
+ appcache::AppCacheLogLevel log_level,
const std::string& message) {
sender_->Send(new AppCacheMsg_LogMessage(host_id, log_level, message));
}
diff --git a/content/browser/appcache/appcache_frontend_proxy.h b/content/browser/appcache/appcache_frontend_proxy.h
index 9ad5f36..904c8ae 100644
--- a/content/browser/appcache/appcache_frontend_proxy.h
+++ b/content/browser/appcache/appcache_frontend_proxy.h
@@ -22,16 +22,16 @@
virtual void OnCacheSelected(int host_id,
const appcache::AppCacheInfo& info) OVERRIDE;
virtual void OnStatusChanged(const std::vector<int>& host_ids,
- appcache::Status status) OVERRIDE;
+ appcache::AppCacheStatus status) OVERRIDE;
virtual void OnEventRaised(const std::vector<int>& host_ids,
- appcache::EventID event_id) OVERRIDE;
+ appcache::AppCacheEventID event_id) OVERRIDE;
virtual void OnProgressEventRaised(const std::vector<int>& host_ids,
const GURL& url,
int num_total, int num_complete) OVERRIDE;
virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
- const appcache::ErrorDetails& details)
+ const appcache::AppCacheErrorDetails& details)
OVERRIDE;
- virtual void OnLogMessage(int host_id, appcache::LogLevel log_level,
+ virtual void OnLogMessage(int host_id, appcache::AppCacheLogLevel log_level,
const std::string& message) OVERRIDE;
virtual void OnContentBlocked(int host_id,
const GURL& manifest_url) OVERRIDE;
diff --git a/content/browser/appcache/appcache_group_unittest.cc b/content/browser/appcache/appcache_group_unittest.cc
index b1df135..cec20fa 100644
--- a/content/browser/appcache/appcache_group_unittest.cc
+++ b/content/browser/appcache/appcache_group_unittest.cc
@@ -26,7 +26,7 @@
public:
TestAppCacheFrontend()
: last_host_id_(-1), last_cache_id_(-1),
- last_status_(appcache::OBSOLETE) {
+ last_status_(appcache::APPCACHE_STATUS_OBSOLETE) {
}
virtual void OnCacheSelected(
@@ -37,15 +37,15 @@
}
virtual void OnStatusChanged(const std::vector<int>& host_ids,
- appcache::Status status) OVERRIDE {
+ appcache::AppCacheStatus status) OVERRIDE {
}
virtual void OnEventRaised(const std::vector<int>& host_ids,
- appcache::EventID event_id) OVERRIDE {
+ appcache::AppCacheEventID event_id) OVERRIDE {
}
virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
- const appcache::ErrorDetails& details)
+ const appcache::AppCacheErrorDetails& details)
OVERRIDE {}
virtual void OnProgressEventRaised(const std::vector<int>& host_ids,
@@ -53,7 +53,7 @@
int num_total, int num_complete) OVERRIDE {
}
- virtual void OnLogMessage(int host_id, appcache::LogLevel log_level,
+ virtual void OnLogMessage(int host_id, appcache::AppCacheLogLevel log_level,
const std::string& message) OVERRIDE {
}
@@ -63,7 +63,7 @@
int last_host_id_;
int64 last_cache_id_;
- appcache::Status last_status_;
+ appcache::AppCacheStatus last_status_;
};
} // namespace anon
@@ -197,12 +197,12 @@
host1.AssociateCompleteCache(cache1);
EXPECT_EQ(frontend.last_host_id_, host1.host_id());
EXPECT_EQ(frontend.last_cache_id_, cache1->cache_id());
- EXPECT_EQ(frontend.last_status_, appcache::IDLE);
+ EXPECT_EQ(frontend.last_status_, appcache::APPCACHE_STATUS_IDLE);
host2.AssociateCompleteCache(cache1);
EXPECT_EQ(frontend.last_host_id_, host2.host_id());
EXPECT_EQ(frontend.last_cache_id_, cache1->cache_id());
- EXPECT_EQ(frontend.last_status_, appcache::IDLE);
+ EXPECT_EQ(frontend.last_status_, appcache::APPCACHE_STATUS_IDLE);
AppCache* cache2 = new AppCache(service.storage(), 222);
cache2->set_complete(true);
@@ -214,8 +214,8 @@
host1.AssociateNoCache(GURL());
host2.AssociateNoCache(GURL());
EXPECT_EQ(frontend.last_host_id_, host2.host_id());
- EXPECT_EQ(frontend.last_cache_id_, appcache::kNoCacheId);
- EXPECT_EQ(frontend.last_status_, appcache::UNCACHED);
+ EXPECT_EQ(frontend.last_cache_id_, appcache::kAppCacheNoCacheId);
+ EXPECT_EQ(frontend.last_status_, appcache::APPCACHE_STATUS_UNCACHED);
}
TEST_F(AppCacheGroupTest, StartUpdate) {
@@ -233,7 +233,7 @@
group->StartUpdateWithHost(NULL);
EXPECT_EQ(update, group->update_job_);
- // Deleting the update should restore the group to IDLE.
+ // Deleting the update should restore the group to APPCACHE_STATUS_IDLE.
delete update;
EXPECT_TRUE(group->update_job_ == NULL);
EXPECT_EQ(AppCacheGroup::IDLE, group->update_status());
diff --git a/content/browser/appcache/appcache_host_unittest.cc b/content/browser/appcache/appcache_host_unittest.cc
index 1129913..6b9970d 100644
--- a/content/browser/appcache/appcache_host_unittest.cc
+++ b/content/browser/appcache/appcache_host_unittest.cc
@@ -22,13 +22,13 @@
using appcache::AppCacheFrontend;
using appcache::AppCacheGroup;
using appcache::AppCacheHost;
-using appcache::kNoCacheId;
-using appcache::ERROR_EVENT;
-using appcache::OBSOLETE;
-using appcache::OBSOLETE_EVENT;
-using appcache::PROGRESS_EVENT;
-using appcache::Status;
-using appcache::UNCACHED;
+using appcache::kAppCacheNoCacheId;
+using appcache::APPCACHE_ERROR_EVENT;
+using appcache::APPCACHE_STATUS_OBSOLETE;
+using appcache::APPCACHE_OBSOLETE_EVENT;
+using appcache::APPCACHE_PROGRESS_EVENT;
+using appcache::AppCacheStatus;
+using appcache::APPCACHE_STATUS_UNCACHED;
namespace content {
@@ -50,9 +50,9 @@
public:
MockFrontend()
: last_host_id_(-222), last_cache_id_(-222),
- last_status_(appcache::OBSOLETE),
- last_status_changed_(appcache::OBSOLETE),
- last_event_id_(appcache::OBSOLETE_EVENT),
+ last_status_(appcache::APPCACHE_STATUS_OBSOLETE),
+ last_status_changed_(appcache::APPCACHE_STATUS_OBSOLETE),
+ last_event_id_(appcache::APPCACHE_OBSOLETE_EVENT),
content_blocked_(false) {
}
@@ -64,30 +64,30 @@
}
virtual void OnStatusChanged(const std::vector<int>& host_ids,
- appcache::Status status) OVERRIDE {
+ appcache::AppCacheStatus status) OVERRIDE {
last_status_changed_ = status;
}
virtual void OnEventRaised(const std::vector<int>& host_ids,
- appcache::EventID event_id) OVERRIDE {
+ appcache::AppCacheEventID event_id) OVERRIDE {
last_event_id_ = event_id;
}
- virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
- const appcache::ErrorDetails& details)
- OVERRIDE {
- last_event_id_ = ERROR_EVENT;
+ virtual void OnErrorEventRaised(
+ const std::vector<int>& host_ids,
+ const appcache::AppCacheErrorDetails& details) OVERRIDE {
+ last_event_id_ = APPCACHE_ERROR_EVENT;
}
virtual void OnProgressEventRaised(const std::vector<int>& host_ids,
const GURL& url,
int num_total,
int num_complete) OVERRIDE {
- last_event_id_ = PROGRESS_EVENT;
+ last_event_id_ = APPCACHE_PROGRESS_EVENT;
}
virtual void OnLogMessage(int host_id,
- appcache::LogLevel log_level,
+ appcache::AppCacheLogLevel log_level,
const std::string& message) OVERRIDE {
}
@@ -98,9 +98,9 @@
int last_host_id_;
int64 last_cache_id_;
- appcache::Status last_status_;
- appcache::Status last_status_changed_;
- appcache::EventID last_event_id_;
+ appcache::AppCacheStatus last_status_;
+ appcache::AppCacheStatus last_status_changed_;
+ appcache::AppCacheEventID last_event_id_;
bool content_blocked_;
};
@@ -150,7 +150,7 @@
virtual ~MockQuotaManagerProxy() {}
};
- void GetStatusCallback(Status status, void* param) {
+ void GetStatusCallback(AppCacheStatus status, void* param) {
last_status_result_ = status;
last_callback_param_ = param;
}
@@ -176,7 +176,7 @@
appcache::StartUpdateCallback start_update_callback_;
appcache::SwapCacheCallback swap_cache_callback_;
- Status last_status_result_;
+ AppCacheStatus last_status_result_;
bool last_swap_result_;
bool last_start_result_;
void* last_callback_param_;
@@ -193,9 +193,9 @@
// See that the callbacks are delivered immediately
// and respond as if there is no cache selected.
- last_status_result_ = OBSOLETE;
+ last_status_result_ = APPCACHE_STATUS_OBSOLETE;
host.GetStatusWithCallback(get_status_callback_, reinterpret_cast<void*>(1));
- EXPECT_EQ(UNCACHED, last_status_result_);
+ EXPECT_EQ(APPCACHE_STATUS_UNCACHED, last_status_result_);
EXPECT_EQ(reinterpret_cast<void*>(1), last_callback_param_);
last_start_result_ = true;
@@ -218,18 +218,18 @@
// Reset our mock frontend
mock_frontend_.last_cache_id_ = -333;
mock_frontend_.last_host_id_ = -333;
- mock_frontend_.last_status_ = OBSOLETE;
+ mock_frontend_.last_status_ = APPCACHE_STATUS_OBSOLETE;
const GURL kDocAndOriginUrl(GURL("http://whatever/").GetOrigin());
{
AppCacheHost host(1, &mock_frontend_, &service_);
- host.SelectCache(kDocAndOriginUrl, kNoCacheId, GURL());
+ host.SelectCache(kDocAndOriginUrl, kAppCacheNoCacheId, GURL());
EXPECT_EQ(1, mock_quota_proxy->GetInUseCount(kDocAndOriginUrl));
// We should have received an OnCacheSelected msg
EXPECT_EQ(1, mock_frontend_.last_host_id_);
- EXPECT_EQ(kNoCacheId, mock_frontend_.last_cache_id_);
- EXPECT_EQ(UNCACHED, mock_frontend_.last_status_);
+ EXPECT_EQ(kAppCacheNoCacheId, mock_frontend_.last_cache_id_);
+ EXPECT_EQ(APPCACHE_STATUS_UNCACHED, mock_frontend_.last_status_);
// Otherwise, see that it respond as if there is no cache selected.
EXPECT_EQ(1, host.host_id());
@@ -247,7 +247,7 @@
// Reset our mock frontend
mock_frontend_.last_cache_id_ = -333;
mock_frontend_.last_host_id_ = -333;
- mock_frontend_.last_status_ = OBSOLETE;
+ mock_frontend_.last_status_ = APPCACHE_STATUS_OBSOLETE;
// Precondition, a cache with an entry that is not marked as foreign.
const int kCacheId = 22;
@@ -258,10 +258,10 @@
AppCacheHost host(1, &mock_frontend_, &service_);
host.MarkAsForeignEntry(kDocumentURL, kCacheId);
- // We should have received an OnCacheSelected msg for kNoCacheId.
+ // We should have received an OnCacheSelected msg for kAppCacheNoCacheId.
EXPECT_EQ(1, mock_frontend_.last_host_id_);
- EXPECT_EQ(kNoCacheId, mock_frontend_.last_cache_id_);
- EXPECT_EQ(UNCACHED, mock_frontend_.last_status_);
+ EXPECT_EQ(kAppCacheNoCacheId, mock_frontend_.last_cache_id_);
+ EXPECT_EQ(APPCACHE_STATUS_UNCACHED, mock_frontend_.last_status_);
// See that it respond as if there is no cache selected.
EXPECT_EQ(1, host.host_id());
@@ -278,7 +278,7 @@
// Reset our mock frontend
mock_frontend_.last_cache_id_ = -333;
mock_frontend_.last_host_id_ = -333;
- mock_frontend_.last_status_ = OBSOLETE;
+ mock_frontend_.last_status_ = APPCACHE_STATUS_OBSOLETE;
// Precondition, a cache with a fallback entry that is not marked as foreign.
const int kCacheId = 22;
@@ -290,10 +290,10 @@
host.NotifyMainResourceIsNamespaceEntry(kFallbackURL);
host.MarkAsForeignEntry(GURL("http://origin/missing_document"), kCacheId);
- // We should have received an OnCacheSelected msg for kNoCacheId.
+ // We should have received an OnCacheSelected msg for kAppCacheNoCacheId.
EXPECT_EQ(1, mock_frontend_.last_host_id_);
- EXPECT_EQ(kNoCacheId, mock_frontend_.last_cache_id_);
- EXPECT_EQ(UNCACHED, mock_frontend_.last_status_);
+ EXPECT_EQ(kAppCacheNoCacheId, mock_frontend_.last_cache_id_);
+ EXPECT_EQ(APPCACHE_STATUS_UNCACHED, mock_frontend_.last_status_);
// See that the fallback entry was marked as foreign.
EXPECT_TRUE(cache->GetEntry(kFallbackURL)->IsForeign());
@@ -303,7 +303,7 @@
// Reset our mock frontend
mock_frontend_.last_cache_id_ = -333;
mock_frontend_.last_host_id_ = -333;
- mock_frontend_.last_status_ = OBSOLETE;
+ mock_frontend_.last_status_ = APPCACHE_STATUS_OBSOLETE;
AppCacheHost host(1, &mock_frontend_, &service_);
EXPECT_FALSE(host.is_selection_pending());
@@ -316,10 +316,10 @@
EXPECT_TRUE(host.is_selection_pending());
// The callback should not occur until we finish cache selection.
- last_status_result_ = OBSOLETE;
+ last_status_result_ = APPCACHE_STATUS_OBSOLETE;
last_callback_param_ = reinterpret_cast<void*>(-1);
host.GetStatusWithCallback(get_status_callback_, reinterpret_cast<void*>(1));
- EXPECT_EQ(OBSOLETE, last_status_result_);
+ EXPECT_EQ(APPCACHE_STATUS_OBSOLETE, last_status_result_);
EXPECT_EQ(reinterpret_cast<void*>(-1), last_callback_param_);
// Satisfy the load with NULL, a failure.
@@ -328,11 +328,11 @@
// Cache selection should have finished
EXPECT_FALSE(host.is_selection_pending());
EXPECT_EQ(1, mock_frontend_.last_host_id_);
- EXPECT_EQ(kNoCacheId, mock_frontend_.last_cache_id_);
- EXPECT_EQ(UNCACHED, mock_frontend_.last_status_);
+ EXPECT_EQ(kAppCacheNoCacheId, mock_frontend_.last_cache_id_);
+ EXPECT_EQ(APPCACHE_STATUS_UNCACHED, mock_frontend_.last_status_);
// Callback should have fired upon completing the cache load too.
- EXPECT_EQ(UNCACHED, last_status_result_);
+ EXPECT_EQ(APPCACHE_STATUS_UNCACHED, last_status_result_);
EXPECT_EQ(reinterpret_cast<void*>(1), last_callback_param_);
}
@@ -347,10 +347,10 @@
EXPECT_TRUE(host.is_selection_pending());
// The callback should not occur until we finish cache selection.
- last_status_result_ = OBSOLETE;
+ last_status_result_ = APPCACHE_STATUS_OBSOLETE;
last_callback_param_ = reinterpret_cast<void*>(-1);
host.GetStatusWithCallback(get_status_callback_, reinterpret_cast<void*>(1));
- EXPECT_EQ(OBSOLETE, last_status_result_);
+ EXPECT_EQ(APPCACHE_STATUS_OBSOLETE, last_status_result_);
EXPECT_EQ(reinterpret_cast<void*>(-1), last_callback_param_);
// Satisfy the load will NULL, a failure.
@@ -359,11 +359,11 @@
// Cache selection should have finished
EXPECT_FALSE(host.is_selection_pending());
EXPECT_EQ(1, mock_frontend_.last_host_id_);
- EXPECT_EQ(kNoCacheId, mock_frontend_.last_cache_id_);
- EXPECT_EQ(UNCACHED, mock_frontend_.last_status_);
+ EXPECT_EQ(kAppCacheNoCacheId, mock_frontend_.last_cache_id_);
+ EXPECT_EQ(APPCACHE_STATUS_UNCACHED, mock_frontend_.last_status_);
// Callback should have fired upon completing the group load.
- EXPECT_EQ(UNCACHED, last_status_result_);
+ EXPECT_EQ(APPCACHE_STATUS_UNCACHED, last_status_result_);
EXPECT_EQ(reinterpret_cast<void*>(1), last_callback_param_);
}
@@ -387,11 +387,11 @@
host.AssociateCompleteCache(cache1);
EXPECT_FALSE(host.swappable_cache_.get()); // was same as associated cache
- EXPECT_EQ(appcache::IDLE, host.GetStatus());
+ EXPECT_EQ(appcache::APPCACHE_STATUS_IDLE, host.GetStatus());
// verify OnCacheSelected was called
EXPECT_EQ(host.host_id(), mock_frontend_.last_host_id_);
EXPECT_EQ(cache1->cache_id(), mock_frontend_.last_cache_id_);
- EXPECT_EQ(appcache::IDLE, mock_frontend_.last_status_);
+ EXPECT_EQ(appcache::APPCACHE_STATUS_IDLE, mock_frontend_.last_status_);
AppCache* cache2 = new AppCache(service_.storage(), 222);
cache2->set_complete(true);
@@ -459,8 +459,8 @@
// the scriptable interface, the only function available is resource
// loading (see appcache_request_handler_unittests those tests).
EXPECT_EQ(kWorkerHostId, mock_frontend_.last_host_id_);
- EXPECT_EQ(kNoCacheId, mock_frontend_.last_cache_id_);
- EXPECT_EQ(UNCACHED, mock_frontend_.last_status_);
+ EXPECT_EQ(kAppCacheNoCacheId, mock_frontend_.last_cache_id_);
+ EXPECT_EQ(APPCACHE_STATUS_UNCACHED, mock_frontend_.last_status_);
// Simulate the parent being torn down.
backend_impl.UnregisterHost(kParentHostId);
@@ -480,8 +480,8 @@
// Reset our mock frontend
mock_frontend_.last_cache_id_ = -333;
mock_frontend_.last_host_id_ = -333;
- mock_frontend_.last_status_ = OBSOLETE;
- mock_frontend_.last_event_id_ = OBSOLETE_EVENT;
+ mock_frontend_.last_status_ = APPCACHE_STATUS_OBSOLETE;
+ mock_frontend_.last_event_id_ = APPCACHE_OBSOLETE_EVENT;
mock_frontend_.content_blocked_ = false;
const GURL kDocAndOriginUrl(GURL("http://whatever/").GetOrigin());
@@ -489,16 +489,16 @@
{
AppCacheHost host(1, &mock_frontend_, &service_);
host.first_party_url_ = kDocAndOriginUrl;
- host.SelectCache(kDocAndOriginUrl, kNoCacheId, kManifestUrl);
+ host.SelectCache(kDocAndOriginUrl, kAppCacheNoCacheId, kManifestUrl);
EXPECT_EQ(1, mock_quota_proxy->GetInUseCount(kDocAndOriginUrl));
// MockAppCacheService::LoadOrCreateGroup is asynchronous, so we shouldn't
// have received an OnCacheSelected msg yet.
EXPECT_EQ(-333, mock_frontend_.last_host_id_);
EXPECT_EQ(-333, mock_frontend_.last_cache_id_);
- EXPECT_EQ(OBSOLETE, mock_frontend_.last_status_);
+ EXPECT_EQ(APPCACHE_STATUS_OBSOLETE, mock_frontend_.last_status_);
// No error events either
- EXPECT_EQ(OBSOLETE_EVENT, mock_frontend_.last_event_id_);
+ EXPECT_EQ(APPCACHE_OBSOLETE_EVENT, mock_frontend_.last_event_id_);
EXPECT_FALSE(mock_frontend_.content_blocked_);
EXPECT_TRUE(host.is_selection_pending());
@@ -518,8 +518,8 @@
// Reset our mock frontend
mock_frontend_.last_cache_id_ = -333;
mock_frontend_.last_host_id_ = -333;
- mock_frontend_.last_status_ = OBSOLETE;
- mock_frontend_.last_event_id_ = OBSOLETE_EVENT;
+ mock_frontend_.last_status_ = APPCACHE_STATUS_OBSOLETE;
+ mock_frontend_.last_event_id_ = APPCACHE_OBSOLETE_EVENT;
mock_frontend_.content_blocked_ = false;
const GURL kDocAndOriginUrl(GURL("http://whatever/").GetOrigin());
@@ -527,16 +527,16 @@
{
AppCacheHost host(1, &mock_frontend_, &service_);
host.first_party_url_ = kDocAndOriginUrl;
- host.SelectCache(kDocAndOriginUrl, kNoCacheId, kManifestUrl);
+ host.SelectCache(kDocAndOriginUrl, kAppCacheNoCacheId, kManifestUrl);
EXPECT_EQ(1, mock_quota_proxy->GetInUseCount(kDocAndOriginUrl));
// We should have received an OnCacheSelected msg
EXPECT_EQ(1, mock_frontend_.last_host_id_);
- EXPECT_EQ(kNoCacheId, mock_frontend_.last_cache_id_);
- EXPECT_EQ(UNCACHED, mock_frontend_.last_status_);
+ EXPECT_EQ(kAppCacheNoCacheId, mock_frontend_.last_cache_id_);
+ EXPECT_EQ(APPCACHE_STATUS_UNCACHED, mock_frontend_.last_status_);
// Also, an error event was raised
- EXPECT_EQ(ERROR_EVENT, mock_frontend_.last_event_id_);
+ EXPECT_EQ(APPCACHE_ERROR_EVENT, mock_frontend_.last_event_id_);
EXPECT_TRUE(mock_frontend_.content_blocked_);
// Otherwise, see that it respond as if there is no cache selected.
diff --git a/content/browser/appcache/appcache_interceptor.cc b/content/browser/appcache/appcache_interceptor.cc
index 069d2fd..ac7dbc3 100644
--- a/content/browser/appcache/appcache_interceptor.cc
+++ b/content/browser/appcache/appcache_interceptor.cc
@@ -15,8 +15,8 @@
using appcache::AppCacheHost;
using appcache::AppCacheRequestHandler;
using appcache::AppCacheServiceImpl;
-using appcache::kNoCacheId;
-using appcache::kNoHostId;
+using appcache::kAppCacheNoCacheId;
+using appcache::kAppCacheNoHostId;
namespace content {
@@ -39,7 +39,7 @@
void AppCacheInterceptor::SetExtraRequestInfo(
net::URLRequest* request, AppCacheServiceImpl* service, int process_id,
int host_id, ResourceType::Type resource_type) {
- if (!service || (host_id == kNoHostId))
+ if (!service || (host_id == kAppCacheNoHostId))
return;
AppCacheBackendImpl* backend = service->GetBackend(process_id);
@@ -62,7 +62,7 @@
void AppCacheInterceptor::GetExtraResponseInfo(net::URLRequest* request,
int64* cache_id,
GURL* manifest_url) {
- DCHECK(*cache_id == kNoCacheId);
+ DCHECK(*cache_id == kAppCacheNoCacheId);
DCHECK(manifest_url->is_empty());
AppCacheRequestHandler* handler = GetHandler(request);
if (handler)
@@ -85,7 +85,7 @@
AppCacheRequestHandler* handler = GetHandler(request);
if (!handler)
return;
- DCHECK_NE(kNoHostId, new_host_id);
+ DCHECK_NE(kAppCacheNoHostId, new_host_id);
handler->CompleteCrossSiteTransfer(new_process_id,
new_host_id);
}
diff --git a/content/browser/appcache/appcache_request_handler_unittest.cc b/content/browser/appcache/appcache_request_handler_unittest.cc
index 2d2b8ab..df6fb33 100644
--- a/content/browser/appcache/appcache_request_handler_unittest.cc
+++ b/content/browser/appcache/appcache_request_handler_unittest.cc
@@ -36,7 +36,7 @@
using appcache::AppCacheInfo;
using appcache::AppCacheRequestHandler;
using appcache::AppCacheURLRequestJob;
-using appcache::kNoCacheId;
+using appcache::kAppCacheNoCacheId;
namespace content {
@@ -50,14 +50,14 @@
int host_id, const appcache::AppCacheInfo& info) OVERRIDE {}
virtual void OnStatusChanged(const std::vector<int>& host_ids,
- appcache::Status status) OVERRIDE {}
+ appcache::AppCacheStatus status) OVERRIDE {}
virtual void OnEventRaised(const std::vector<int>& host_ids,
- appcache::EventID event_id) OVERRIDE {}
+ appcache::AppCacheEventID event_id) OVERRIDE {}
- virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
- const appcache::ErrorDetails& details)
- OVERRIDE {}
+ virtual void OnErrorEventRaised(
+ const std::vector<int>& host_ids,
+ const appcache::AppCacheErrorDetails& details) OVERRIDE {}
virtual void OnProgressEventRaised(const std::vector<int>& host_ids,
const GURL& url,
@@ -66,7 +66,7 @@
}
virtual void OnLogMessage(int host_id,
- appcache::LogLevel log_level,
+ appcache::AppCacheLogLevel log_level,
const std::string& message) OVERRIDE {
}
@@ -292,10 +292,10 @@
EXPECT_FALSE(job_->is_waiting());
EXPECT_TRUE(job_->is_delivering_network_response());
- int64 cache_id = kNoCacheId;
+ int64 cache_id = kAppCacheNoCacheId;
GURL manifest_url;
handler_->GetExtraResponseInfo(&cache_id, &manifest_url);
- EXPECT_EQ(kNoCacheId, cache_id);
+ EXPECT_EQ(kAppCacheNoCacheId, cache_id);
EXPECT_EQ(GURL(), manifest_url);
EXPECT_EQ(0, handler_->found_group_id_);
@@ -344,7 +344,7 @@
EXPECT_FALSE(job_->is_waiting());
EXPECT_TRUE(job_->is_delivering_appcache_response());
- int64 cache_id = kNoCacheId;
+ int64 cache_id = kAppCacheNoCacheId;
GURL manifest_url;
handler_->GetExtraResponseInfo(&cache_id, &manifest_url);
EXPECT_EQ(1, cache_id);
@@ -429,7 +429,7 @@
EXPECT_TRUE(job_.get());
EXPECT_TRUE(job_->is_delivering_appcache_response());
- int64 cache_id = kNoCacheId;
+ int64 cache_id = kAppCacheNoCacheId;
GURL manifest_url;
handler_->GetExtraResponseInfo(&cache_id, &manifest_url);
EXPECT_EQ(1, cache_id);
diff --git a/content/browser/appcache/appcache_storage_impl_unittest.cc b/content/browser/appcache/appcache_storage_impl_unittest.cc
index 16391d0..4c467a1 100644
--- a/content/browser/appcache/appcache_storage_impl_unittest.cc
+++ b/content/browser/appcache/appcache_storage_impl_unittest.cc
@@ -34,8 +34,8 @@
#include "webkit/browser/appcache/appcache_storage_impl.h"
#include "webkit/browser/quota/quota_manager.h"
-using appcache::FALLBACK_NAMESPACE;
-using appcache::NETWORK_NAMESPACE;
+using appcache::APPCACHE_FALLBACK_NAMESPACE;
+using appcache::APPCACHE_NETWORK_NAMESPACE;
using appcache::AppCacheBackendImpl;
using appcache::AppCacheDatabase;
using appcache::AppCacheEntry;
@@ -48,14 +48,14 @@
using appcache::AppCacheStorageImpl;
using appcache::AppCacheStorageReference;
using appcache::AppCache;
-using appcache::ErrorDetails;
-using appcache::EventID;
-using appcache::kNoCacheId;
-using appcache::kNoResponseId;
-using appcache::INTERCEPT_NAMESPACE;
-using appcache::LogLevel;
+using appcache::AppCacheErrorDetails;
+using appcache::AppCacheEventID;
+using appcache::kAppCacheNoCacheId;
+using appcache::kAppCacheNoResponseId;
+using appcache::APPCACHE_INTERCEPT_NAMESPACE;
+using appcache::AppCacheLogLevel;
using appcache::Namespace;
-using appcache::Status;
+using appcache::AppCacheStatus;
namespace content {
@@ -202,7 +202,7 @@
explicit MockStorageDelegate(AppCacheStorageImplTest* test)
: loaded_cache_id_(0), stored_group_success_(false),
would_exceed_quota_(false), obsoleted_success_(false),
- found_cache_id_(kNoCacheId), test_(test) {
+ found_cache_id_(kAppCacheNoCacheId), test_(test) {
}
virtual void OnCacheLoaded(AppCache* cache, int64 cache_id) OVERRIDE {
@@ -973,9 +973,10 @@
void Verify_FindNoMainResponse() {
EXPECT_EQ(kEntryUrl, delegate()->found_url_);
EXPECT_TRUE(delegate()->found_manifest_url_.is_empty());
- EXPECT_EQ(kNoCacheId, delegate()->found_cache_id_);
- EXPECT_EQ(kNoResponseId, delegate()->found_entry_.response_id());
- EXPECT_EQ(kNoResponseId, delegate()->found_fallback_entry_.response_id());
+ EXPECT_EQ(kAppCacheNoCacheId, delegate()->found_cache_id_);
+ EXPECT_EQ(kAppCacheNoResponseId, delegate()->found_entry_.response_id());
+ EXPECT_EQ(kAppCacheNoResponseId,
+ delegate()->found_fallback_entry_.response_id());
EXPECT_TRUE(delegate()->found_namespace_entry_url_.is_empty());
EXPECT_EQ(0, delegate()->found_entry_.types());
EXPECT_EQ(0, delegate()->found_fallback_entry_.types());
@@ -1053,9 +1054,15 @@
cache_->AddEntry(kEntryUrl, AppCacheEntry(AppCacheEntry::FALLBACK, 1));
cache_->AddEntry(kEntryUrl2, AppCacheEntry(AppCacheEntry::FALLBACK, 2));
cache_->fallback_namespaces_.push_back(
- Namespace(FALLBACK_NAMESPACE, kFallbackNamespace2, kEntryUrl2, false));
+ Namespace(APPCACHE_FALLBACK_NAMESPACE,
+ kFallbackNamespace2,
+ kEntryUrl2,
+ false));
cache_->fallback_namespaces_.push_back(
- Namespace(FALLBACK_NAMESPACE, kFallbackNamespace, kEntryUrl, false));
+ Namespace(APPCACHE_FALLBACK_NAMESPACE,
+ kFallbackNamespace,
+ kEntryUrl,
+ false));
AppCacheDatabase::CacheRecord cache_record;
std::vector<AppCacheDatabase::EntryRecord> entries;
std::vector<AppCacheDatabase::NamespaceRecord> intercepts;
@@ -1125,10 +1132,10 @@
cache_->AddEntry(kEntryUrl, AppCacheEntry(AppCacheEntry::INTERCEPT, 1));
cache_->AddEntry(kEntryUrl2, AppCacheEntry(AppCacheEntry::INTERCEPT, 2));
cache_->intercept_namespaces_.push_back(
- Namespace(INTERCEPT_NAMESPACE, kInterceptNamespace2,
+ Namespace(APPCACHE_INTERCEPT_NAMESPACE, kInterceptNamespace2,
kEntryUrl2, false));
cache_->intercept_namespaces_.push_back(
- Namespace(INTERCEPT_NAMESPACE, kInterceptNamespace,
+ Namespace(APPCACHE_INTERCEPT_NAMESPACE, kInterceptNamespace,
kEntryUrl, false));
AppCacheDatabase::CacheRecord cache_record;
std::vector<AppCacheDatabase::EntryRecord> entries;
@@ -1195,7 +1202,7 @@
MakeCacheAndGroup(kManifestUrl, 2, 1, true);
cache_->AddEntry(kEntryUrl, AppCacheEntry(AppCacheEntry::INTERCEPT, 1));
cache_->intercept_namespaces_.push_back(
- Namespace(INTERCEPT_NAMESPACE, kInterceptPatternNamespace,
+ Namespace(APPCACHE_INTERCEPT_NAMESPACE, kInterceptPatternNamespace,
kEntryUrl, true));
AppCacheDatabase::CacheRecord cache_record;
std::vector<AppCacheDatabase::EntryRecord> entries;
@@ -1238,9 +1245,10 @@
void Verify_FindInterceptPatternMatchNegative() {
EXPECT_EQ(kInterceptPatternTestNegativeUrl, delegate()->found_url_);
EXPECT_TRUE(delegate()->found_manifest_url_.is_empty());
- EXPECT_EQ(kNoCacheId, delegate()->found_cache_id_);
- EXPECT_EQ(kNoResponseId, delegate()->found_entry_.response_id());
- EXPECT_EQ(kNoResponseId, delegate()->found_fallback_entry_.response_id());
+ EXPECT_EQ(kAppCacheNoCacheId, delegate()->found_cache_id_);
+ EXPECT_EQ(kAppCacheNoResponseId, delegate()->found_entry_.response_id());
+ EXPECT_EQ(kAppCacheNoResponseId,
+ delegate()->found_fallback_entry_.response_id());
EXPECT_TRUE(delegate()->found_namespace_entry_url_.is_empty());
EXPECT_EQ(0, delegate()->found_entry_.types());
EXPECT_EQ(0, delegate()->found_fallback_entry_.types());
@@ -1281,7 +1289,7 @@
MakeCacheAndGroup(kManifestUrl, 2, 1, true);
cache_->AddEntry(kEntryUrl, AppCacheEntry(AppCacheEntry::FALLBACK, 1));
cache_->fallback_namespaces_.push_back(
- Namespace(FALLBACK_NAMESPACE, kFallbackPatternNamespace,
+ Namespace(APPCACHE_FALLBACK_NAMESPACE, kFallbackPatternNamespace,
kEntryUrl, true));
AppCacheDatabase::CacheRecord cache_record;
std::vector<AppCacheDatabase::EntryRecord> entries;
@@ -1324,9 +1332,10 @@
void Verify_FindFallbackPatternMatchNegative() {
EXPECT_EQ(kFallbackPatternTestNegativeUrl, delegate()->found_url_);
EXPECT_TRUE(delegate()->found_manifest_url_.is_empty());
- EXPECT_EQ(kNoCacheId, delegate()->found_cache_id_);
- EXPECT_EQ(kNoResponseId, delegate()->found_entry_.response_id());
- EXPECT_EQ(kNoResponseId, delegate()->found_fallback_entry_.response_id());
+ EXPECT_EQ(kAppCacheNoCacheId, delegate()->found_cache_id_);
+ EXPECT_EQ(kAppCacheNoResponseId, delegate()->found_entry_.response_id());
+ EXPECT_EQ(kAppCacheNoResponseId,
+ delegate()->found_fallback_entry_.response_id());
EXPECT_TRUE(delegate()->found_namespace_entry_url_.is_empty());
EXPECT_EQ(0, delegate()->found_entry_.types());
EXPECT_EQ(0, delegate()->found_fallback_entry_.types());
@@ -1411,7 +1420,10 @@
fallback_namespace_record.origin = manifest_url.GetOrigin();
EXPECT_TRUE(database()->InsertNamespace(&fallback_namespace_record));
cache_->fallback_namespaces_.push_back(
- Namespace(FALLBACK_NAMESPACE, kFallbackNamespace, kEntryUrl2, false));
+ Namespace(APPCACHE_FALLBACK_NAMESPACE,
+ kFallbackNamespace,
+ kEntryUrl2,
+ false));
}
void Verify_FindMainResponseWithMultipleHits() {
@@ -1523,12 +1535,15 @@
AppCacheEntry(AppCacheEntry::EXPLICIT | AppCacheEntry::FOREIGN, 1));
cache_->AddEntry(kEntryUrl2, AppCacheEntry(AppCacheEntry::FALLBACK, 2));
cache_->fallback_namespaces_.push_back(
- Namespace(FALLBACK_NAMESPACE, kFallbackNamespace, kEntryUrl2, false));
+ Namespace(APPCACHE_FALLBACK_NAMESPACE,
+ kFallbackNamespace,
+ kEntryUrl2,
+ false));
cache_->online_whitelist_namespaces_.push_back(
- Namespace(NETWORK_NAMESPACE, kOnlineNamespace,
+ Namespace(APPCACHE_NETWORK_NAMESPACE, kOnlineNamespace,
GURL(), false));
cache_->online_whitelist_namespaces_.push_back(
- Namespace(NETWORK_NAMESPACE, kOnlineNamespaceWithinFallback,
+ Namespace(APPCACHE_NETWORK_NAMESPACE, kOnlineNamespaceWithinFallback,
GURL(), false));
AppCacheDatabase::EntryRecord entry_record;
@@ -1564,10 +1579,11 @@
void Verify_ExclusionNotFound(GURL expected_url, int phase) {
EXPECT_EQ(expected_url, delegate()->found_url_);
EXPECT_TRUE(delegate()->found_manifest_url_.is_empty());
- EXPECT_EQ(kNoCacheId, delegate()->found_cache_id_);
+ EXPECT_EQ(kAppCacheNoCacheId, delegate()->found_cache_id_);
EXPECT_EQ(0, delegate()->found_group_id_);
- EXPECT_EQ(kNoResponseId, delegate()->found_entry_.response_id());
- EXPECT_EQ(kNoResponseId, delegate()->found_fallback_entry_.response_id());
+ EXPECT_EQ(kAppCacheNoResponseId, delegate()->found_entry_.response_id());
+ EXPECT_EQ(kAppCacheNoResponseId,
+ delegate()->found_fallback_entry_.response_id());
EXPECT_TRUE(delegate()->found_namespace_entry_url_.is_empty());
EXPECT_EQ(0, delegate()->found_entry_.types());
EXPECT_EQ(0, delegate()->found_fallback_entry_.types());
@@ -1623,19 +1639,19 @@
virtual void OnCacheSelected(
int host_id, const AppCacheInfo& info) OVERRIDE {}
virtual void OnStatusChanged(const std::vector<int>& host_ids,
- Status status) OVERRIDE {}
+ AppCacheStatus status) OVERRIDE {}
virtual void OnEventRaised(const std::vector<int>& host_ids,
- EventID event_id) OVERRIDE {}
+ AppCacheEventID event_id) OVERRIDE {}
virtual void OnProgressEventRaised(
const std::vector<int>& host_ids,
const GURL& url,
int num_total, int num_complete) OVERRIDE {}
virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
- const ErrorDetails& details)
+ const AppCacheErrorDetails& details)
OVERRIDE {
error_event_was_raised_ = true;
}
- virtual void OnLogMessage(int host_id, LogLevel log_level,
+ virtual void OnLogMessage(int host_id, AppCacheLogLevel log_level,
const std::string& message) OVERRIDE {}
virtual void OnContentBlocked(
int host_id, const GURL& manifest_url) OVERRIDE {}
@@ -1760,7 +1776,7 @@
const GURL kEmptyPageUrl(MockHttpServer::GetMockUrl("empty.html"));
host1->first_party_url_ = kEmptyPageUrl;
host1->SelectCache(kEmptyPageUrl,
- kNoCacheId,
+ kAppCacheNoCacheId,
MockHttpServer::GetMockUrl("manifest"));
} else {
ASSERT_EQ(CORRUPT_CACHE_ON_LOAD_EXISTING, test_case);
diff --git a/content/browser/appcache/appcache_unittest.cc b/content/browser/appcache/appcache_unittest.cc
index 1bdcfba..32c4e89 100644
--- a/content/browser/appcache/appcache_unittest.cc
+++ b/content/browser/appcache/appcache_unittest.cc
@@ -14,18 +14,18 @@
using appcache::AppCacheGroup;
using appcache::AppCacheHost;
using appcache::AppCacheInfo;
-using appcache::ErrorDetails;
-using appcache::EventID;
-using appcache::FALLBACK_NAMESPACE;
-using appcache::INTERCEPT_NAMESPACE;
-using appcache::LogLevel;
+using appcache::AppCacheErrorDetails;
+using appcache::AppCacheEventID;
+using appcache::APPCACHE_FALLBACK_NAMESPACE;
+using appcache::APPCACHE_INTERCEPT_NAMESPACE;
+using appcache::AppCacheLogLevel;
using appcache::Manifest;
using appcache::Namespace;
using appcache::NamespaceVector;
-using appcache::NETWORK_NAMESPACE;
+using appcache::APPCACHE_NETWORK_NAMESPACE;
using appcache::PARSE_MANIFEST_ALLOWING_INTERCEPTS;
using appcache::PARSE_MANIFEST_PER_STANDARD;
-using appcache::Status;
+using appcache::AppCacheStatus;
namespace content {
@@ -36,16 +36,17 @@
virtual void OnCacheSelected(int host_id, const AppCacheInfo& info) OVERRIDE {
}
virtual void OnStatusChanged(const std::vector<int>& host_ids,
- Status status) OVERRIDE {}
+ AppCacheStatus status) OVERRIDE {}
virtual void OnEventRaised(const std::vector<int>& host_ids,
- EventID event_id) OVERRIDE {}
+ AppCacheEventID event_id) OVERRIDE {}
virtual void OnProgressEventRaised(
const std::vector<int>& host_ids,
const GURL& url,
int num_total, int num_complete) OVERRIDE {}
- virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
- const ErrorDetails& details) OVERRIDE {}
- virtual void OnLogMessage(int host_id, LogLevel log_level,
+ virtual void OnErrorEventRaised(
+ const std::vector<int>& host_ids,
+ const AppCacheErrorDetails& details) OVERRIDE {}
+ virtual void OnLogMessage(int host_id, AppCacheLogLevel log_level,
const std::string& message) OVERRIDE {}
virtual void OnContentBlocked(
int host_id, const GURL& manifest_url) OVERRIDE {}
@@ -131,12 +132,12 @@
manifest.explicit_urls.insert("http://one.com");
manifest.explicit_urls.insert("http://two.com");
manifest.fallback_namespaces.push_back(
- Namespace(FALLBACK_NAMESPACE, GURL("http://fb1.com"),
+ Namespace(APPCACHE_FALLBACK_NAMESPACE, GURL("http://fb1.com"),
GURL("http://fbone.com"), true));
manifest.online_whitelist_namespaces.push_back(
- Namespace(NETWORK_NAMESPACE, GURL("http://w1.com"), GURL(), false));
+ Namespace(APPCACHE_NETWORK_NAMESPACE, GURL("http://w1.com"), GURL(), false));
manifest.online_whitelist_namespaces.push_back(
- Namespace(NETWORK_NAMESPACE, GURL("http://w2.com"), GURL(), false));
+ Namespace(APPCACHE_NETWORK_NAMESPACE, GURL("http://w2.com"), GURL(), false));
manifest.online_whitelist_all = true;
cache->InitializeWithManifest(&manifest);
@@ -192,22 +193,23 @@
Manifest manifest;
manifest.online_whitelist_namespaces.push_back(
- Namespace(NETWORK_NAMESPACE, kOnlineNamespaceUrl,
+ Namespace(APPCACHE_NETWORK_NAMESPACE, kOnlineNamespaceUrl,
GURL(), false));
manifest.online_whitelist_namespaces.push_back(
- Namespace(NETWORK_NAMESPACE, kOnlineNamespaceWithinOtherNamespaces,
+ Namespace(APPCACHE_NETWORK_NAMESPACE,
+ kOnlineNamespaceWithinOtherNamespaces,
GURL(), false));
manifest.fallback_namespaces.push_back(
- Namespace(FALLBACK_NAMESPACE, kFallbackNamespaceUrl1,
+ Namespace(APPCACHE_FALLBACK_NAMESPACE, kFallbackNamespaceUrl1,
kFallbackEntryUrl1, false));
manifest.fallback_namespaces.push_back(
- Namespace(FALLBACK_NAMESPACE, kFallbackNamespaceUrl2,
+ Namespace(APPCACHE_FALLBACK_NAMESPACE, kFallbackNamespaceUrl2,
kFallbackEntryUrl2, false));
manifest.intercept_namespaces.push_back(
- Namespace(INTERCEPT_NAMESPACE, kInterceptNamespace,
+ Namespace(APPCACHE_INTERCEPT_NAMESPACE, kInterceptNamespace,
kInterceptNamespaceEntry, false));
manifest.intercept_namespaces.push_back(
- Namespace(INTERCEPT_NAMESPACE, kInterceptNamespaceWithinFallback,
+ Namespace(APPCACHE_INTERCEPT_NAMESPACE, kInterceptNamespaceWithinFallback,
kInterceptNamespaceEntry, false));
// Create a cache with some namespaces and entries.
@@ -383,7 +385,7 @@
const int64 kInterceptResponseId = 1;
Manifest manifest;
manifest.intercept_namespaces.push_back(
- Namespace(INTERCEPT_NAMESPACE, kInterceptPatternNamespace,
+ Namespace(APPCACHE_INTERCEPT_NAMESPACE, kInterceptPatternNamespace,
kInterceptNamespaceEntry, true));
scoped_refptr<AppCache> cache(new AppCache(service.storage(), 1234));
cache->InitializeWithManifest(&manifest);
@@ -454,7 +456,7 @@
const int64 kFallbackResponseId = 1;
Manifest manifest;
manifest.fallback_namespaces.push_back(
- Namespace(FALLBACK_NAMESPACE, kFallbackPatternNamespace,
+ Namespace(APPCACHE_FALLBACK_NAMESPACE, kFallbackPatternNamespace,
kFallbackNamespaceEntry, true));
scoped_refptr<AppCache> cache(new AppCache(service.storage(), 1234));
cache->InitializeWithManifest(&manifest);
@@ -524,7 +526,7 @@
kNetworkNamespaceBase.Resolve("*.hit*"));
Manifest manifest;
manifest.online_whitelist_namespaces.push_back(
- Namespace(NETWORK_NAMESPACE, kNetworkPatternNamespace,
+ Namespace(APPCACHE_NETWORK_NAMESPACE, kNetworkPatternNamespace,
GURL(), true));
manifest.online_whitelist_all = false;
scoped_refptr<AppCache> cache(new AppCache(service.storage(), 1234));
@@ -582,7 +584,8 @@
EXPECT_TRUE(ParseManifest(kManifestUrl, kData.c_str(), kData.length(),
PARSE_MANIFEST_ALLOWING_INTERCEPTS, manifest));
cache->InitializeWithManifest(&manifest);
- EXPECT_EQ(NETWORK_NAMESPACE, cache->online_whitelist_namespaces_[0].type);
+ EXPECT_EQ(APPCACHE_NETWORK_NAMESPACE,
+ cache->online_whitelist_namespaces_[0].type);
EXPECT_TRUE(cache->online_whitelist_namespaces_[0].is_pattern);
EXPECT_EQ(kWhitelistUrl,
cache->online_whitelist_namespaces_[0].namespace_url);
@@ -633,7 +636,8 @@
EXPECT_EQ(kFallbackUrl,
cache->GetFallbackEntryUrl(GURL("http://foo.com/")));
EXPECT_EQ(1 + 2 + 3, cache->cache_size());
- EXPECT_EQ(NETWORK_NAMESPACE, cache->online_whitelist_namespaces_[0].type);
+ EXPECT_EQ(APPCACHE_NETWORK_NAMESPACE,
+ cache->online_whitelist_namespaces_[0].type);
EXPECT_TRUE(cache->online_whitelist_namespaces_[0].is_pattern);
EXPECT_EQ(kWhitelistUrl,
cache->online_whitelist_namespaces_[0].namespace_url);
diff --git a/content/browser/appcache/appcache_update_job_unittest.cc b/content/browser/appcache/appcache_update_job_unittest.cc
index 25ab0d4..bc3957e 100644
--- a/content/browser/appcache/appcache_update_job_unittest.cc
+++ b/content/browser/appcache/appcache_update_job_unittest.cc
@@ -28,22 +28,22 @@
using appcache::AppCacheResponseInfo;
using appcache::AppCacheUpdateJob;
using appcache::AppCacheResponseWriter;
-using appcache::CACHED_EVENT;
-using appcache::CHECKING_EVENT;
-using appcache::DOWNLOADING_EVENT;
-using appcache::ERROR_EVENT;
-using appcache::EventID;
-using appcache::FALLBACK_NAMESPACE;
+using appcache::APPCACHE_CACHED_EVENT;
+using appcache::APPCACHE_CHECKING_EVENT;
+using appcache::APPCACHE_DOWNLOADING_EVENT;
+using appcache::APPCACHE_ERROR_EVENT;
+using appcache::AppCacheEventID;
+using appcache::APPCACHE_FALLBACK_NAMESPACE;
using appcache::HttpResponseInfoIOBuffer;
-using appcache::kNoCacheId;
-using appcache::kNoResponseId;
+using appcache::kAppCacheNoCacheId;
+using appcache::kAppCacheNoResponseId;
using appcache::Namespace;
-using appcache::NETWORK_NAMESPACE;
-using appcache::NO_UPDATE_EVENT;
-using appcache::OBSOLETE_EVENT;
-using appcache::PROGRESS_EVENT;
-using appcache::UPDATE_READY_EVENT;
-using appcache::Status;
+using appcache::APPCACHE_NETWORK_NAMESPACE;
+using appcache::APPCACHE_NO_UPDATE_EVENT;
+using appcache::APPCACHE_OBSOLETE_EVENT;
+using appcache::APPCACHE_PROGRESS_EVENT;
+using appcache::APPCACHE_UPDATE_READY_EVENT;
+using appcache::AppCacheStatus;
namespace content {
class AppCacheUpdateJobTest;
@@ -240,7 +240,7 @@
MockFrontend()
: ignore_progress_events_(false), verify_progress_events_(false),
last_progress_total_(-1), last_progress_complete_(-1),
- start_update_trigger_(CHECKING_EVENT), update_(NULL) {
+ start_update_trigger_(APPCACHE_CHECKING_EVENT), update_(NULL) {
}
virtual void OnCacheSelected(
@@ -248,11 +248,11 @@
}
virtual void OnStatusChanged(const std::vector<int>& host_ids,
- Status status) OVERRIDE {
+ AppCacheStatus status) OVERRIDE {
}
virtual void OnEventRaised(const std::vector<int>& host_ids,
- EventID event_id) OVERRIDE {
+ AppCacheEventID event_id) OVERRIDE {
raised_events_.push_back(RaisedEvent(host_ids, event_id));
// Trigger additional updates if requested.
@@ -268,10 +268,10 @@
}
virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
- const appcache::ErrorDetails& details)
+ const appcache::AppCacheErrorDetails& details)
OVERRIDE {
error_message_ = details.message;
- OnEventRaised(host_ids, ERROR_EVENT);
+ OnEventRaised(host_ids, APPCACHE_ERROR_EVENT);
}
virtual void OnProgressEventRaised(const std::vector<int>& host_ids,
@@ -279,7 +279,7 @@
int num_total,
int num_complete) OVERRIDE {
if (!ignore_progress_events_)
- OnEventRaised(host_ids, PROGRESS_EVENT);
+ OnEventRaised(host_ids, APPCACHE_PROGRESS_EVENT);
if (verify_progress_events_) {
EXPECT_GE(num_total, num_complete);
@@ -306,7 +306,7 @@
}
virtual void OnLogMessage(int host_id,
- appcache::LogLevel log_level,
+ appcache::AppCacheLogLevel log_level,
const std::string& message) OVERRIDE {
}
@@ -314,8 +314,9 @@
const GURL& manifest_url) OVERRIDE {
}
- void AddExpectedEvent(const std::vector<int>& host_ids, EventID event_id) {
- DCHECK(!ignore_progress_events_ || event_id != PROGRESS_EVENT);
+ void AddExpectedEvent(const std::vector<int>& host_ids,
+ AppCacheEventID event_id) {
+ DCHECK(!ignore_progress_events_ || event_id != APPCACHE_PROGRESS_EVENT);
expected_events_.push_back(RaisedEvent(host_ids, event_id));
}
@@ -333,7 +334,7 @@
verify_progress_events_ = verify;
}
- void TriggerAdditionalUpdates(EventID trigger_event,
+ void TriggerAdditionalUpdates(AppCacheEventID trigger_event,
AppCacheUpdateJob* update) {
start_update_trigger_ = trigger_event;
update_ = update;
@@ -344,7 +345,7 @@
}
typedef std::vector<int> HostIds;
- typedef std::pair<HostIds, EventID> RaisedEvent;
+ typedef std::pair<HostIds, AppCacheEventID> RaisedEvent;
typedef std::vector<RaisedEvent> RaisedEvents;
RaisedEvents raised_events_;
std::string error_message_;
@@ -360,7 +361,7 @@
int last_progress_complete_;
// Add ability for frontend to add master entries to an inprogress update.
- EventID start_update_trigger_;
+ AppCacheEventID start_update_trigger_;
AppCacheUpdateJob* update_;
std::vector<AppCacheHost*> update_hosts_;
};
@@ -669,7 +670,7 @@
EXPECT_EQ(expected, events.size());
EXPECT_EQ(expected, events[0].first.size());
EXPECT_EQ(host.host_id(), events[0].first[0]);
- EXPECT_EQ(CHECKING_EVENT, events[0].second);
+ EXPECT_EQ(APPCACHE_CHECKING_EVENT, events[0].second);
// Abort as we're not testing actual URL fetches in this test.
delete update;
@@ -725,14 +726,14 @@
!= host_ids.end());
EXPECT_TRUE(std::find(host_ids.begin(), host_ids.end(), host3.host_id())
!= host_ids.end());
- EXPECT_EQ(CHECKING_EVENT, events[0].second);
+ EXPECT_EQ(APPCACHE_CHECKING_EVENT, events[0].second);
events = mock_frontend2.raised_events_;
expected = 1;
EXPECT_EQ(expected, events.size());
EXPECT_EQ(expected, events[0].first.size()); // 1 host using frontend2
EXPECT_EQ(host2.host_id(), events[0].first[0]);
- EXPECT_EQ(CHECKING_EVENT, events[0].second);
+ EXPECT_EQ(APPCACHE_CHECKING_EVENT, events[0].second);
events = mock_frontend3.raised_events_;
EXPECT_TRUE(events.empty());
@@ -765,7 +766,7 @@
expect_group_obsolete_ = false;
expect_group_has_cache_ = false;
frontend->AddExpectedEvent(MockFrontend::HostIds(1, host->host_id()),
- CHECKING_EVENT);
+ APPCACHE_CHECKING_EVENT);
WaitForUpdateToFinish();
}
@@ -799,11 +800,11 @@
expect_group_has_cache_ = true;
expect_newest_cache_ = cache; // newest cache unaffected by update
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, ERROR_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_ERROR_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
- frontend2->AddExpectedEvent(ids2, ERROR_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_CHECKING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_ERROR_EVENT);
WaitForUpdateToFinish();
}
@@ -833,7 +834,7 @@
expect_group_obsolete_ = false;
expect_group_has_cache_ = false; // redirect is like a failed request
frontend->AddExpectedEvent(MockFrontend::HostIds(1, host->host_id()),
- CHECKING_EVENT);
+ APPCACHE_CHECKING_EVENT);
WaitForUpdateToFinish();
}
@@ -868,10 +869,10 @@
tested_manifest_ = EMPTY_MANIFEST;
tested_manifest_path_override_ = "files/missing-mime-manifest";
MockFrontend::HostIds ids(1, host->host_id());
- frontend->AddExpectedEvent(ids, CHECKING_EVENT);
- frontend->AddExpectedEvent(ids, DOWNLOADING_EVENT);
- frontend->AddExpectedEvent(ids, PROGRESS_EVENT); // final
- frontend->AddExpectedEvent(ids, UPDATE_READY_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_CHECKING_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_DOWNLOADING_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_PROGRESS_EVENT); // final
+ frontend->AddExpectedEvent(ids, APPCACHE_UPDATE_READY_EVENT);
WaitForUpdateToFinish();
}
@@ -904,11 +905,11 @@
expect_group_has_cache_ = true;
expect_newest_cache_ = cache; // newest cache unaffected by update
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, OBSOLETE_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_OBSOLETE_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
- frontend2->AddExpectedEvent(ids2, OBSOLETE_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_CHECKING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_OBSOLETE_EVENT);
WaitForUpdateToFinish();
}
@@ -934,7 +935,7 @@
expect_group_obsolete_ = false;
expect_group_has_cache_ = false;
frontend->AddExpectedEvent(MockFrontend::HostIds(1, host->host_id()),
- CHECKING_EVENT);
+ APPCACHE_CHECKING_EVENT);
WaitForUpdateToFinish();
}
@@ -960,7 +961,7 @@
expect_group_obsolete_ = false;
expect_group_has_cache_ = false; // treated like cache failure
frontend->AddExpectedEvent(MockFrontend::HostIds(1, host->host_id()),
- CHECKING_EVENT);
+ APPCACHE_CHECKING_EVENT);
WaitForUpdateToFinish();
}
@@ -993,11 +994,11 @@
expect_group_has_cache_ = true;
expect_newest_cache_ = cache; // newest cache unaffected by update
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, NO_UPDATE_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_NO_UPDATE_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
- frontend2->AddExpectedEvent(ids2, NO_UPDATE_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_CHECKING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_NO_UPDATE_EVENT);
WaitForUpdateToFinish();
}
@@ -1032,11 +1033,11 @@
expect_group_has_cache_ = true;
expect_newest_cache_ = cache; // newest cache unaffected by update
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, NO_UPDATE_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_NO_UPDATE_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
- frontend2->AddExpectedEvent(ids2, NO_UPDATE_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_CHECKING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_NO_UPDATE_EVENT);
// Seed storage with expected manifest data.
const std::string seed_data(kManifest1Contents);
@@ -1080,8 +1081,8 @@
expect_group_has_cache_ = true;
expect_newest_cache_ = cache; // newest cache unaffected by update
MockFrontend::HostIds id(1, host->host_id());
- frontend->AddExpectedEvent(id, CHECKING_EVENT);
- frontend->AddExpectedEvent(id, ERROR_EVENT);
+ frontend->AddExpectedEvent(id, APPCACHE_CHECKING_EVENT);
+ frontend->AddExpectedEvent(id, APPCACHE_ERROR_EVENT);
frontend->expected_error_message_ =
"Manifest entry not found in existing cache";
WaitForUpdateToFinish();
@@ -1121,7 +1122,7 @@
expect_group_has_cache_ = true;
tested_manifest_ = MANIFEST1;
frontend->AddExpectedEvent(MockFrontend::HostIds(1, host->host_id()),
- CHECKING_EVENT);
+ APPCACHE_CHECKING_EVENT);
WaitForUpdateToFinish();
}
@@ -1149,7 +1150,7 @@
expect_group_has_cache_ = true;
tested_manifest_ = MANIFEST_WITH_INTERCEPT;
frontend->AddExpectedEvent(MockFrontend::HostIds(1, host->host_id()),
- CHECKING_EVENT);
+ APPCACHE_CHECKING_EVENT);
WaitForUpdateToFinish();
}
@@ -1188,19 +1189,19 @@
expect_old_cache_ = cache;
tested_manifest_ = MANIFEST1;
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // final
- frontend1->AddExpectedEvent(ids1, UPDATE_READY_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // final
+ frontend1->AddExpectedEvent(ids1, APPCACHE_UPDATE_READY_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
- frontend2->AddExpectedEvent(ids2, DOWNLOADING_EVENT);
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT);
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT);
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // final
- frontend2->AddExpectedEvent(ids2, UPDATE_READY_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_CHECKING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_DOWNLOADING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT); // final
+ frontend2->AddExpectedEvent(ids2, APPCACHE_UPDATE_READY_EVENT);
// Seed storage with expected manifest data different from manifest1.
const std::string seed_data("different");
@@ -1250,12 +1251,12 @@
response_writer_->response_id()));
tested_manifest_ = MANIFEST1;
MockFrontend::HostIds ids(1, host->host_id());
- frontend->AddExpectedEvent(ids, CHECKING_EVENT);
- frontend->AddExpectedEvent(ids, DOWNLOADING_EVENT);
- frontend->AddExpectedEvent(ids, PROGRESS_EVENT);
- frontend->AddExpectedEvent(ids, PROGRESS_EVENT);
- frontend->AddExpectedEvent(ids, PROGRESS_EVENT); // final
- frontend->AddExpectedEvent(ids, UPDATE_READY_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_CHECKING_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_DOWNLOADING_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_PROGRESS_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_PROGRESS_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_PROGRESS_EVENT); // final
+ frontend->AddExpectedEvent(ids, APPCACHE_UPDATE_READY_EVENT);
// Seed storage with expected http response info for entry. Allow reuse.
const char data[] =
@@ -1309,12 +1310,12 @@
expect_old_cache_ = cache;
tested_manifest_ = MANIFEST1;
MockFrontend::HostIds ids(1, host->host_id());
- frontend->AddExpectedEvent(ids, CHECKING_EVENT);
- frontend->AddExpectedEvent(ids, DOWNLOADING_EVENT);
- frontend->AddExpectedEvent(ids, PROGRESS_EVENT);
- frontend->AddExpectedEvent(ids, PROGRESS_EVENT);
- frontend->AddExpectedEvent(ids, PROGRESS_EVENT); // final
- frontend->AddExpectedEvent(ids, UPDATE_READY_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_CHECKING_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_DOWNLOADING_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_PROGRESS_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_PROGRESS_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_PROGRESS_EVENT); // final
+ frontend->AddExpectedEvent(ids, APPCACHE_UPDATE_READY_EVENT);
// Seed storage with expected http response info for entry. Do NOT
// allow reuse by setting an expires header in the past.
@@ -1369,12 +1370,12 @@
expect_old_cache_ = cache;
tested_manifest_ = MANIFEST1;
MockFrontend::HostIds ids(1, host->host_id());
- frontend->AddExpectedEvent(ids, CHECKING_EVENT);
- frontend->AddExpectedEvent(ids, DOWNLOADING_EVENT);
- frontend->AddExpectedEvent(ids, PROGRESS_EVENT);
- frontend->AddExpectedEvent(ids, PROGRESS_EVENT);
- frontend->AddExpectedEvent(ids, PROGRESS_EVENT); // final
- frontend->AddExpectedEvent(ids, UPDATE_READY_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_CHECKING_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_DOWNLOADING_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_PROGRESS_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_PROGRESS_EVENT);
+ frontend->AddExpectedEvent(ids, APPCACHE_PROGRESS_EVENT); // final
+ frontend->AddExpectedEvent(ids, APPCACHE_UPDATE_READY_EVENT);
// Seed storage with expected http response info for entry: a vary header.
const char data[] =
@@ -1432,19 +1433,19 @@
expect_old_cache_ = cache;
tested_manifest_ = MANIFEST_MERGED_TYPES;
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // explicit1
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // manifest
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // final
- frontend1->AddExpectedEvent(ids1, UPDATE_READY_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // explicit1
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // manifest
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // final
+ frontend1->AddExpectedEvent(ids1, APPCACHE_UPDATE_READY_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
- frontend2->AddExpectedEvent(ids2, DOWNLOADING_EVENT);
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT);
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT);
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // final
- frontend2->AddExpectedEvent(ids2, UPDATE_READY_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_CHECKING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_DOWNLOADING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT); // final
+ frontend2->AddExpectedEvent(ids2, APPCACHE_UPDATE_READY_EVENT);
WaitForUpdateToFinish();
}
@@ -1470,7 +1471,7 @@
expect_group_obsolete_ = false;
expect_group_has_cache_ = false; // 404 explicit url is cache failure
frontend->AddExpectedEvent(MockFrontend::HostIds(1, host->host_id()),
- CHECKING_EVENT);
+ APPCACHE_CHECKING_EVENT);
WaitForUpdateToFinish();
}
@@ -1505,13 +1506,13 @@
expect_group_has_cache_ = true;
expect_newest_cache_ = cache; // newest cache unaffectd by failed update
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend1->AddExpectedEvent(ids1, ERROR_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_ERROR_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
- frontend2->AddExpectedEvent(ids2, DOWNLOADING_EVENT);
- frontend2->AddExpectedEvent(ids2, ERROR_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_CHECKING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_DOWNLOADING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_ERROR_EVENT);
WaitForUpdateToFinish();
}
@@ -1587,27 +1588,27 @@
expect_response_ids_.insert(std::map<GURL, int64>::value_type(
MockHttpServer::GetMockUrl("files/notmodified"), 555)); // copied
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // explicit1
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // fallback1a
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // notfound
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // explicit2
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // servererror
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // notmodified
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // final
- frontend1->AddExpectedEvent(ids1, UPDATE_READY_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // explicit1
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // fallback1a
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // notfound
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // explicit2
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // servererror
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // notmodified
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // final
+ frontend1->AddExpectedEvent(ids1, APPCACHE_UPDATE_READY_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
- frontend2->AddExpectedEvent(ids2, DOWNLOADING_EVENT);
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // explicit1
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // fallback1a
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // notfound
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // explicit2
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // servererror
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // notmodified
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // final
- frontend2->AddExpectedEvent(ids2, UPDATE_READY_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_CHECKING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_DOWNLOADING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT); // explicit1
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT); // fallback1a
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT); // notfound
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT); // explicit2
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT); // servererror
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT); // notmodified
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT); // final
+ frontend2->AddExpectedEvent(ids2, APPCACHE_UPDATE_READY_EVENT);
WaitForUpdateToFinish();
}
@@ -1643,15 +1644,15 @@
expect_old_cache_ = cache;
tested_manifest_ = EMPTY_MANIFEST;
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // final
- frontend1->AddExpectedEvent(ids1, UPDATE_READY_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // final
+ frontend1->AddExpectedEvent(ids1, APPCACHE_UPDATE_READY_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
- frontend2->AddExpectedEvent(ids2, DOWNLOADING_EVENT);
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // final
- frontend2->AddExpectedEvent(ids2, UPDATE_READY_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_CHECKING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_DOWNLOADING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT); // final
+ frontend2->AddExpectedEvent(ids2, APPCACHE_UPDATE_READY_EVENT);
WaitForUpdateToFinish();
}
@@ -1682,11 +1683,11 @@
expect_group_has_cache_ = true;
tested_manifest_ = EMPTY_FILE_MANIFEST;
MockFrontend::HostIds ids1(1, host->host_id());
- frontend->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend->AddExpectedEvent(ids1, PROGRESS_EVENT); // final
- frontend->AddExpectedEvent(ids1, UPDATE_READY_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // final
+ frontend->AddExpectedEvent(ids1, APPCACHE_UPDATE_READY_EVENT);
WaitForUpdateToFinish();
}
@@ -1720,7 +1721,7 @@
expect_group_obsolete_ = false;
expect_group_has_cache_ = false;
frontend->AddExpectedEvent(MockFrontend::HostIds(1, host->host_id()),
- CHECKING_EVENT);
+ APPCACHE_CHECKING_EVENT);
WaitForUpdateToFinish();
}
@@ -1754,7 +1755,7 @@
expect_group_obsolete_ = false;
expect_group_has_cache_ = false;
frontend->AddExpectedEvent(MockFrontend::HostIds(1, host->host_id()),
- CHECKING_EVENT);
+ APPCACHE_CHECKING_EVENT);
WaitForUpdateToFinish();
}
@@ -1789,7 +1790,7 @@
expect_group_obsolete_ = false;
expect_group_has_cache_ = false;
frontend->AddExpectedEvent(MockFrontend::HostIds(1, host->host_id()),
- CHECKING_EVENT);
+ APPCACHE_CHECKING_EVENT);
WaitForUpdateToFinish();
}
@@ -1823,7 +1824,7 @@
expect_group_obsolete_ = false;
expect_group_has_cache_ = true;
frontend->AddExpectedEvent(MockFrontend::HostIds(1, host->host_id()),
- CHECKING_EVENT);
+ APPCACHE_CHECKING_EVENT);
WaitForUpdateToFinish();
}
@@ -1856,7 +1857,7 @@
expect_group_obsolete_ = false;
expect_group_has_cache_ = true;
frontend->AddExpectedEvent(MockFrontend::HostIds(1, host->host_id()),
- CHECKING_EVENT);
+ APPCACHE_CHECKING_EVENT);
WaitForUpdateToFinish();
}
@@ -1885,7 +1886,7 @@
expect_group_obsolete_ = false;
expect_group_has_cache_ = false; // storage failed
frontend->AddExpectedEvent(MockFrontend::HostIds(1, host->host_id()),
- CHECKING_EVENT);
+ APPCACHE_CHECKING_EVENT);
WaitForUpdateToFinish();
}
@@ -1921,17 +1922,17 @@
expect_group_has_cache_ = true;
expect_newest_cache_ = cache; // unchanged
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend1->AddExpectedEvent(ids1, ERROR_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_ERROR_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
- frontend2->AddExpectedEvent(ids2, DOWNLOADING_EVENT);
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT);
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT);
- frontend2->AddExpectedEvent(ids2, ERROR_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_CHECKING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_DOWNLOADING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_ERROR_EVENT);
WaitForUpdateToFinish();
}
@@ -1969,7 +1970,7 @@
AppCacheHost* host = MakeHost(1, frontend);
host->first_party_url_ = kManifestUrl;
host->SelectCache(MockHttpServer::GetMockUrl("files/empty1"),
- kNoCacheId, kManifestUrl);
+ kAppCacheNoCacheId, kManifestUrl);
// Set up checks for when update job finishes.
do_checks_after_update_finished_ = true;
@@ -1979,7 +1980,7 @@
expect_group_has_cache_ = true;
expect_newest_cache_ = cache.get(); // unchanged
MockFrontend::HostIds ids1(1, host->host_id());
- frontend->AddExpectedEvent(ids1, ERROR_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_ERROR_EVENT);
frontend->expected_error_message_ =
"Failed to commit new cache to storage";
@@ -2018,11 +2019,11 @@
expect_group_has_cache_ = true;
expect_newest_cache_ = cache; // newest cache unaffected by update
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, ERROR_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_ERROR_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
- frontend2->AddExpectedEvent(ids2, ERROR_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_CHECKING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_ERROR_EVENT);
WaitForUpdateToFinish();
}
@@ -2049,8 +2050,8 @@
expect_group_obsolete_ = false;
expect_group_has_cache_ = false;
MockFrontend::HostIds ids1(1, host->host_id());
- frontend->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend->AddExpectedEvent(ids1, ERROR_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_ERROR_EVENT);
WaitForUpdateToFinish();
}
@@ -2076,8 +2077,8 @@
expect_group_obsolete_ = false;
expect_group_has_cache_ = false;
MockFrontend::HostIds ids1(1, host->host_id());
- frontend->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend->AddExpectedEvent(ids1, ERROR_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_ERROR_EVENT);
WaitForUpdateToFinish();
}
@@ -2106,8 +2107,8 @@
expect_group_obsolete_ = false;
expect_group_has_cache_ = false;
MockFrontend::HostIds ids1(1, host->host_id());
- frontend->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend->AddExpectedEvent(ids1, ERROR_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_ERROR_EVENT);
WaitForUpdateToFinish();
}
@@ -2136,9 +2137,9 @@
expect_group_obsolete_ = false;
expect_group_has_cache_ = false; // 404 fallback url is cache failure
MockFrontend::HostIds ids1(1, host->host_id());
- frontend->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend->AddExpectedEvent(ids1, ERROR_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_ERROR_EVENT);
WaitForUpdateToFinish();
}
@@ -2174,13 +2175,13 @@
expect_group_obsolete_ = false;
expect_group_has_cache_ = false; // all pending masters failed
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend1->AddExpectedEvent(ids1, ERROR_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_ERROR_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
- frontend2->AddExpectedEvent(ids2, DOWNLOADING_EVENT);
- frontend2->AddExpectedEvent(ids2, ERROR_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_CHECKING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_DOWNLOADING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_ERROR_EVENT);
WaitForUpdateToFinish();
}
@@ -2223,19 +2224,19 @@
expect_old_cache_ = cache;
tested_manifest_ = MANIFEST1;
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // final
- frontend1->AddExpectedEvent(ids1, UPDATE_READY_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // final
+ frontend1->AddExpectedEvent(ids1, APPCACHE_UPDATE_READY_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, DOWNLOADING_EVENT);
- frontend2->AddExpectedEvent(ids2, ERROR_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_DOWNLOADING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_ERROR_EVENT);
MockFrontend::HostIds ids3(1, host3->host_id());
- frontend3->AddExpectedEvent(ids3, CHECKING_EVENT);
- frontend3->AddExpectedEvent(ids3, DOWNLOADING_EVENT);
- frontend3->AddExpectedEvent(ids3, ERROR_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_CHECKING_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_DOWNLOADING_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_ERROR_EVENT);
WaitForUpdateToFinish();
}
@@ -2274,16 +2275,16 @@
MockHttpServer::GetMockUrl("files/explicit2"),
AppCacheEntry(AppCacheEntry::MASTER)));
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend1->AddExpectedEvent(ids1, ERROR_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_ERROR_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
- frontend2->AddExpectedEvent(ids2, DOWNLOADING_EVENT);
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT);
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT);
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // final
- frontend2->AddExpectedEvent(ids2, CACHED_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_CHECKING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_DOWNLOADING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT); // final
+ frontend2->AddExpectedEvent(ids2, APPCACHE_CACHED_EVENT);
WaitForUpdateToFinish();
}
@@ -2328,22 +2329,22 @@
MockHttpServer::GetMockUrl("files/explicit2"),
AppCacheEntry(AppCacheEntry::MASTER)));
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // final
- frontend1->AddExpectedEvent(ids1, UPDATE_READY_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // final
+ frontend1->AddExpectedEvent(ids1, APPCACHE_UPDATE_READY_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, DOWNLOADING_EVENT);
- frontend2->AddExpectedEvent(ids2, ERROR_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_DOWNLOADING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_ERROR_EVENT);
MockFrontend::HostIds ids3(1, host3->host_id());
- frontend3->AddExpectedEvent(ids3, CHECKING_EVENT);
- frontend3->AddExpectedEvent(ids3, DOWNLOADING_EVENT);
- frontend3->AddExpectedEvent(ids3, PROGRESS_EVENT);
- frontend3->AddExpectedEvent(ids3, PROGRESS_EVENT);
- frontend3->AddExpectedEvent(ids3, PROGRESS_EVENT); // final
- frontend3->AddExpectedEvent(ids3, UPDATE_READY_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_CHECKING_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_DOWNLOADING_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_PROGRESS_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_PROGRESS_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_PROGRESS_EVENT); // final
+ frontend3->AddExpectedEvent(ids3, APPCACHE_UPDATE_READY_EVENT);
WaitForUpdateToFinish();
}
@@ -2390,14 +2391,14 @@
expect_non_null_update_time_ = true;
tested_manifest_ = PENDING_MASTER_NO_UPDATE;
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, NO_UPDATE_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_NO_UPDATE_EVENT);
MockFrontend::HostIds ids3(1, host3->host_id());
- frontend2->AddExpectedEvent(ids3, CHECKING_EVENT);
+ frontend2->AddExpectedEvent(ids3, APPCACHE_CHECKING_EVENT);
MockFrontend::HostIds ids2and3;
ids2and3.push_back(host2->host_id());
ids2and3.push_back(host3->host_id());
- frontend2->AddExpectedEvent(ids2and3, NO_UPDATE_EVENT);
+ frontend2->AddExpectedEvent(ids2and3, APPCACHE_NO_UPDATE_EVENT);
WaitForUpdateToFinish();
}
@@ -2440,7 +2441,7 @@
MockFrontend* frontend5 = MakeMockFrontend();
AppCacheHost* host5 = MakeHost(5, frontend5); // no master entry url
- frontend1->TriggerAdditionalUpdates(DOWNLOADING_EVENT, update);
+ frontend1->TriggerAdditionalUpdates(APPCACHE_DOWNLOADING_EVENT, update);
frontend1->AdditionalUpdateHost(host2); // fetch will fail
frontend1->AdditionalUpdateHost(host3); // same as an explicit entry
frontend1->AdditionalUpdateHost(host4); // same as another master entry
@@ -2456,35 +2457,35 @@
MockHttpServer::GetMockUrl("files/explicit2"),
AppCacheEntry(AppCacheEntry::MASTER)));
MockFrontend::HostIds ids1(1, host1->host_id());
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // final
- frontend1->AddExpectedEvent(ids1, CACHED_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // final
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CACHED_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
- frontend2->AddExpectedEvent(ids2, DOWNLOADING_EVENT);
- frontend2->AddExpectedEvent(ids2, ERROR_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_CHECKING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_DOWNLOADING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_ERROR_EVENT);
MockFrontend::HostIds ids3(1, host3->host_id());
- frontend3->AddExpectedEvent(ids3, CHECKING_EVENT);
- frontend3->AddExpectedEvent(ids3, DOWNLOADING_EVENT);
- frontend3->AddExpectedEvent(ids3, PROGRESS_EVENT);
- frontend3->AddExpectedEvent(ids3, PROGRESS_EVENT);
- frontend3->AddExpectedEvent(ids3, PROGRESS_EVENT); // final
- frontend3->AddExpectedEvent(ids3, CACHED_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_CHECKING_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_DOWNLOADING_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_PROGRESS_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_PROGRESS_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_PROGRESS_EVENT); // final
+ frontend3->AddExpectedEvent(ids3, APPCACHE_CACHED_EVENT);
MockFrontend::HostIds ids4(1, host4->host_id());
- frontend4->AddExpectedEvent(ids4, CHECKING_EVENT);
- frontend4->AddExpectedEvent(ids4, DOWNLOADING_EVENT);
- frontend4->AddExpectedEvent(ids4, PROGRESS_EVENT);
- frontend4->AddExpectedEvent(ids4, PROGRESS_EVENT);
- frontend4->AddExpectedEvent(ids4, PROGRESS_EVENT); // final
- frontend4->AddExpectedEvent(ids4, CACHED_EVENT);
+ frontend4->AddExpectedEvent(ids4, APPCACHE_CHECKING_EVENT);
+ frontend4->AddExpectedEvent(ids4, APPCACHE_DOWNLOADING_EVENT);
+ frontend4->AddExpectedEvent(ids4, APPCACHE_PROGRESS_EVENT);
+ frontend4->AddExpectedEvent(ids4, APPCACHE_PROGRESS_EVENT);
+ frontend4->AddExpectedEvent(ids4, APPCACHE_PROGRESS_EVENT); // final
+ frontend4->AddExpectedEvent(ids4, APPCACHE_CACHED_EVENT);
// Host 5 is not associated with cache so no progress/cached events.
MockFrontend::HostIds ids5(1, host5->host_id());
- frontend5->AddExpectedEvent(ids5, CHECKING_EVENT);
- frontend5->AddExpectedEvent(ids5, DOWNLOADING_EVENT);
+ frontend5->AddExpectedEvent(ids5, APPCACHE_CHECKING_EVENT);
+ frontend5->AddExpectedEvent(ids5, APPCACHE_DOWNLOADING_EVENT);
WaitForUpdateToFinish();
}
@@ -2537,7 +2538,7 @@
host6->new_master_entry_url_ =
MockHttpServer::GetMockUrl("files/explicit1");
- frontend2->TriggerAdditionalUpdates(ERROR_EVENT, update);
+ frontend2->TriggerAdditionalUpdates(APPCACHE_ERROR_EVENT, update);
frontend2->AdditionalUpdateHost(host3);
frontend2->AdditionalUpdateHost(NULL); // no host
frontend2->AdditionalUpdateHost(host4); // no master entry url
@@ -2551,21 +2552,21 @@
expect_newest_cache_ = cache; // newest cache unaffected by update
tested_manifest_ = PENDING_MASTER_NO_UPDATE;
MockFrontend::HostIds ids1(1, host1->host_id()); // prior associated host
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, NO_UPDATE_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_NO_UPDATE_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, ERROR_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_ERROR_EVENT);
MockFrontend::HostIds ids3(1, host3->host_id());
- frontend3->AddExpectedEvent(ids3, CHECKING_EVENT);
- frontend3->AddExpectedEvent(ids3, NO_UPDATE_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_CHECKING_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_NO_UPDATE_EVENT);
MockFrontend::HostIds ids4(1, host4->host_id()); // unassociated w/cache
- frontend4->AddExpectedEvent(ids4, CHECKING_EVENT);
+ frontend4->AddExpectedEvent(ids4, APPCACHE_CHECKING_EVENT);
MockFrontend::HostIds ids5(1, host5->host_id());
- frontend5->AddExpectedEvent(ids5, CHECKING_EVENT);
- frontend5->AddExpectedEvent(ids5, NO_UPDATE_EVENT);
+ frontend5->AddExpectedEvent(ids5, APPCACHE_CHECKING_EVENT);
+ frontend5->AddExpectedEvent(ids5, APPCACHE_NO_UPDATE_EVENT);
MockFrontend::HostIds ids6(1, host6->host_id());
- frontend6->AddExpectedEvent(ids6, CHECKING_EVENT);
- frontend6->AddExpectedEvent(ids6, NO_UPDATE_EVENT);
+ frontend6->AddExpectedEvent(ids6, APPCACHE_CHECKING_EVENT);
+ frontend6->AddExpectedEvent(ids6, APPCACHE_NO_UPDATE_EVENT);
WaitForUpdateToFinish();
}
@@ -2608,7 +2609,7 @@
host5->new_master_entry_url_ =
MockHttpServer::GetMockUrl("files/explicit2");
- frontend1->TriggerAdditionalUpdates(PROGRESS_EVENT, update);
+ frontend1->TriggerAdditionalUpdates(APPCACHE_PROGRESS_EVENT, update);
frontend1->AdditionalUpdateHost(host2); // same as entry in manifest
frontend1->AdditionalUpdateHost(NULL); // no host
frontend1->AdditionalUpdateHost(host3); // new master entry
@@ -2624,33 +2625,33 @@
MockHttpServer::GetMockUrl("files/explicit2"),
AppCacheEntry(AppCacheEntry::MASTER)));
MockFrontend::HostIds ids1(1, host1->host_id()); // prior associated host
- frontend1->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend1->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend1->AddExpectedEvent(ids1, PROGRESS_EVENT); // final
- frontend1->AddExpectedEvent(ids1, UPDATE_READY_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend1->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // final
+ frontend1->AddExpectedEvent(ids1, APPCACHE_UPDATE_READY_EVENT);
MockFrontend::HostIds ids2(1, host2->host_id());
- frontend2->AddExpectedEvent(ids2, CHECKING_EVENT);
- frontend2->AddExpectedEvent(ids2, DOWNLOADING_EVENT);
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT);
- frontend2->AddExpectedEvent(ids2, PROGRESS_EVENT); // final
- frontend2->AddExpectedEvent(ids2, UPDATE_READY_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_CHECKING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_DOWNLOADING_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT);
+ frontend2->AddExpectedEvent(ids2, APPCACHE_PROGRESS_EVENT); // final
+ frontend2->AddExpectedEvent(ids2, APPCACHE_UPDATE_READY_EVENT);
MockFrontend::HostIds ids3(1, host3->host_id());
- frontend3->AddExpectedEvent(ids3, CHECKING_EVENT);
- frontend3->AddExpectedEvent(ids3, DOWNLOADING_EVENT);
- frontend3->AddExpectedEvent(ids3, PROGRESS_EVENT);
- frontend3->AddExpectedEvent(ids3, PROGRESS_EVENT); // final
- frontend3->AddExpectedEvent(ids3, UPDATE_READY_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_CHECKING_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_DOWNLOADING_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_PROGRESS_EVENT);
+ frontend3->AddExpectedEvent(ids3, APPCACHE_PROGRESS_EVENT); // final
+ frontend3->AddExpectedEvent(ids3, APPCACHE_UPDATE_READY_EVENT);
MockFrontend::HostIds ids4(1, host4->host_id()); // unassociated w/cache
- frontend4->AddExpectedEvent(ids4, CHECKING_EVENT);
- frontend4->AddExpectedEvent(ids4, DOWNLOADING_EVENT);
+ frontend4->AddExpectedEvent(ids4, APPCACHE_CHECKING_EVENT);
+ frontend4->AddExpectedEvent(ids4, APPCACHE_DOWNLOADING_EVENT);
MockFrontend::HostIds ids5(1, host5->host_id());
- frontend5->AddExpectedEvent(ids5, CHECKING_EVENT);
- frontend5->AddExpectedEvent(ids5, DOWNLOADING_EVENT);
- frontend5->AddExpectedEvent(ids5, PROGRESS_EVENT);
- frontend5->AddExpectedEvent(ids5, PROGRESS_EVENT); // final
- frontend5->AddExpectedEvent(ids5, UPDATE_READY_EVENT);
+ frontend5->AddExpectedEvent(ids5, APPCACHE_CHECKING_EVENT);
+ frontend5->AddExpectedEvent(ids5, APPCACHE_DOWNLOADING_EVENT);
+ frontend5->AddExpectedEvent(ids5, APPCACHE_PROGRESS_EVENT);
+ frontend5->AddExpectedEvent(ids5, APPCACHE_PROGRESS_EVENT); // final
+ frontend5->AddExpectedEvent(ids5, APPCACHE_UPDATE_READY_EVENT);
WaitForUpdateToFinish();
}
@@ -2694,14 +2695,15 @@
expect_extra_entries_.insert(AppCache::EntryMap::value_type(
host->new_master_entry_url_, AppCacheEntry(AppCacheEntry::MASTER)));
MockFrontend::HostIds ids1(1, host->host_id());
- frontend->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend->AddExpectedEvent(ids1, PROGRESS_EVENT); // final
- frontend->AddExpectedEvent(ids1, CACHED_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // final
+ frontend->AddExpectedEvent(ids1, APPCACHE_CACHED_EVENT);
- // Group status will be IDLE so cannot call WaitForUpdateToFinish.
+ // Group status will be APPCACHE_STATUS_IDLE so cannot call
+ // WaitForUpdateToFinish.
group_->AddUpdateObserver(this);
}
@@ -2811,12 +2813,12 @@
expect_old_cache_ = cache;
tested_manifest_ = MANIFEST1;
MockFrontend::HostIds ids1(1, host->host_id());
- frontend->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend->AddExpectedEvent(ids1, PROGRESS_EVENT); // final
- frontend->AddExpectedEvent(ids1, UPDATE_READY_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // final
+ frontend->AddExpectedEvent(ids1, APPCACHE_UPDATE_READY_EVENT);
// Seed storage with expected manifest response info that will cause
// an If-Modified-Since header to be put in the manifest fetch request.
@@ -2874,12 +2876,12 @@
expect_old_cache_ = cache;
tested_manifest_ = MANIFEST1;
MockFrontend::HostIds ids1(1, host->host_id());
- frontend->AddExpectedEvent(ids1, CHECKING_EVENT);
- frontend->AddExpectedEvent(ids1, DOWNLOADING_EVENT);
- frontend->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend->AddExpectedEvent(ids1, PROGRESS_EVENT);
- frontend->AddExpectedEvent(ids1, PROGRESS_EVENT); // final
- frontend->AddExpectedEvent(ids1, UPDATE_READY_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_DOWNLOADING_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT);
+ frontend->AddExpectedEvent(ids1, APPCACHE_PROGRESS_EVENT); // final
+ frontend->AddExpectedEvent(ids1, APPCACHE_UPDATE_READY_EVENT);
// Seed storage with expected manifest response info that will cause
// an If-None-Match header to be put in the manifest fetch request.
@@ -2999,7 +3001,7 @@
expect_group_has_cache_ = true;
tested_manifest_ = NONE;
MockFrontend::HostIds host_ids(1, host->host_id());
- frontend->AddExpectedEvent(host_ids, CHECKING_EVENT);
+ frontend->AddExpectedEvent(host_ids, APPCACHE_CHECKING_EVENT);
WaitForUpdateToFinish();
}
@@ -3027,7 +3029,7 @@
expect_group_has_cache_ = false;
tested_manifest_ = NONE;
MockFrontend::HostIds host_ids(1, host->host_id());
- frontend->AddExpectedEvent(host_ids, CHECKING_EVENT);
+ frontend->AddExpectedEvent(host_ids, APPCACHE_CHECKING_EVENT);
WaitForUpdateToFinish();
}
@@ -3160,7 +3162,7 @@
group_->newest_complete_cache()->entries();
for (AppCache::EntryMap::const_iterator it = entries.begin();
it != entries.end(); ++it) {
- EXPECT_NE(kNoResponseId, it->second.response_id());
+ EXPECT_NE(kAppCacheNoResponseId, it->second.response_id());
// Check that any copied entries have the expected response id
// and that entries that are not copied have a different response id.
@@ -3272,7 +3274,7 @@
ASSERT_EQ(expected, cache->fallback_namespaces_.size());
EXPECT_TRUE(cache->fallback_namespaces_[0] ==
Namespace(
- FALLBACK_NAMESPACE,
+ APPCACHE_FALLBACK_NAMESPACE,
MockHttpServer::GetMockUrl("files/fallback1"),
MockHttpServer::GetMockUrl("files/fallback1a"),
false));
@@ -3300,7 +3302,7 @@
ASSERT_EQ(expected, cache->fallback_namespaces_.size());
EXPECT_TRUE(cache->fallback_namespaces_[0] ==
Namespace(
- FALLBACK_NAMESPACE,
+ APPCACHE_FALLBACK_NAMESPACE,
MockHttpServer::GetMockUrl("files/fallback1"),
MockHttpServer::GetMockUrl("files/explicit1"),
false));
@@ -3308,7 +3310,7 @@
EXPECT_EQ(expected, cache->online_whitelist_namespaces_.size());
EXPECT_TRUE(cache->online_whitelist_namespaces_[0] ==
Namespace(
- NETWORK_NAMESPACE,
+ APPCACHE_NETWORK_NAMESPACE,
MockHttpServer::GetMockUrl("files/online1"),
GURL(), false));
EXPECT_FALSE(cache->online_whitelist_all_);
@@ -3463,7 +3465,7 @@
EXPECT_EQ(expected, events.size());
EXPECT_EQ(expected, events[0].first.size());
EXPECT_EQ(host.host_id(), events[0].first[0]);
- EXPECT_EQ(CHECKING_EVENT, events[0].second);
+ EXPECT_EQ(APPCACHE_CHECKING_EVENT, events[0].second);
EXPECT_EQ(AppCacheGroup::CHECKING, group->update_status());
}
@@ -3492,11 +3494,11 @@
expected = 1;
EXPECT_EQ(expected, events[0].first.size());
EXPECT_EQ(host.host_id(), events[0].first[0]);
- EXPECT_EQ(CHECKING_EVENT, events[0].second);
+ EXPECT_EQ(APPCACHE_CHECKING_EVENT, events[0].second);
EXPECT_EQ(expected, events[1].first.size());
EXPECT_EQ(host.host_id(), events[1].first[0]);
- EXPECT_EQ(appcache::DOWNLOADING_EVENT, events[1].second);
+ EXPECT_EQ(appcache::APPCACHE_DOWNLOADING_EVENT, events[1].second);
EXPECT_EQ(AppCacheGroup::DOWNLOADING, group->update_status());
}
diff --git a/content/browser/appcache/appcache_url_request_job_unittest.cc b/content/browser/appcache/appcache_url_request_job_unittest.cc
index 86748d6..edaa07e 100644
--- a/content/browser/appcache/appcache_url_request_job_unittest.cc
+++ b/content/browser/appcache/appcache_url_request_job_unittest.cc
@@ -32,7 +32,7 @@
using appcache::AppCacheResponseWriter;
using appcache::AppCacheURLRequestJob;
using appcache::HttpResponseInfoIOBuffer;
-using appcache::kNoCacheId;
+using appcache::kAppCacheNoCacheId;
using net::IOBuffer;
using net::WrappedIOBuffer;
@@ -439,7 +439,7 @@
EXPECT_FALSE(job->has_been_started());
EXPECT_FALSE(job->has_been_killed());
EXPECT_EQ(GURL(), job->manifest_url());
- EXPECT_EQ(kNoCacheId, job->cache_id());
+ EXPECT_EQ(kAppCacheNoCacheId, job->cache_id());
EXPECT_FALSE(job->entry().has_response_id());
TestFinished();
diff --git a/content/browser/appcache/manifest_parser_unittest.cc b/content/browser/appcache/manifest_parser_unittest.cc
index 7b88220..8a44376 100644
--- a/content/browser/appcache/manifest_parser_unittest.cc
+++ b/content/browser/appcache/manifest_parser_unittest.cc
@@ -10,9 +10,9 @@
using appcache::Manifest;
using appcache::NamespaceVector;
-using appcache::FALLBACK_NAMESPACE;
-using appcache::INTERCEPT_NAMESPACE;
-using appcache::NETWORK_NAMESPACE;
+using appcache::APPCACHE_FALLBACK_NAMESPACE;
+using appcache::APPCACHE_INTERCEPT_NAMESPACE;
+using appcache::APPCACHE_NETWORK_NAMESPACE;
using appcache::PARSE_MANIFEST_ALLOWING_INTERCEPTS;
using appcache::PARSE_MANIFEST_PER_STANDARD;
@@ -170,7 +170,7 @@
const NamespaceVector& online = manifest.online_whitelist_namespaces;
const size_t kExpected = 6;
ASSERT_EQ(kExpected, online.size());
- EXPECT_EQ(NETWORK_NAMESPACE, online[0].type);
+ EXPECT_EQ(APPCACHE_NETWORK_NAMESPACE, online[0].type);
EXPECT_FALSE(online[0].is_pattern);
EXPECT_TRUE(online[0].target_url.is_empty());
EXPECT_EQ(GURL("http://www.bar.com/relative/one"), online[0].namespace_url);
@@ -216,11 +216,11 @@
const NamespaceVector& fallbacks = manifest.fallback_namespaces;
const size_t kExpected = 5;
ASSERT_EQ(kExpected, fallbacks.size());
- EXPECT_EQ(FALLBACK_NAMESPACE, fallbacks[0].type);
- EXPECT_EQ(FALLBACK_NAMESPACE, fallbacks[1].type);
- EXPECT_EQ(FALLBACK_NAMESPACE, fallbacks[2].type);
- EXPECT_EQ(FALLBACK_NAMESPACE, fallbacks[3].type);
- EXPECT_EQ(FALLBACK_NAMESPACE, fallbacks[4].type);
+ EXPECT_EQ(APPCACHE_FALLBACK_NAMESPACE, fallbacks[0].type);
+ EXPECT_EQ(APPCACHE_FALLBACK_NAMESPACE, fallbacks[1].type);
+ EXPECT_EQ(APPCACHE_FALLBACK_NAMESPACE, fallbacks[2].type);
+ EXPECT_EQ(APPCACHE_FALLBACK_NAMESPACE, fallbacks[3].type);
+ EXPECT_EQ(APPCACHE_FALLBACK_NAMESPACE, fallbacks[4].type);
EXPECT_EQ(GURL("http://glorp.com/relative/one"),
fallbacks[0].namespace_url);
EXPECT_EQ(GURL("http://glorp.com/onefb"),
@@ -267,9 +267,9 @@
const NamespaceVector& fallbacks = manifest.fallback_namespaces;
const size_t kExpected = 3;
ASSERT_EQ(kExpected, fallbacks.size());
- EXPECT_EQ(FALLBACK_NAMESPACE, fallbacks[0].type);
- EXPECT_EQ(FALLBACK_NAMESPACE, fallbacks[1].type);
- EXPECT_EQ(FALLBACK_NAMESPACE, fallbacks[2].type);
+ EXPECT_EQ(APPCACHE_FALLBACK_NAMESPACE, fallbacks[0].type);
+ EXPECT_EQ(APPCACHE_FALLBACK_NAMESPACE, fallbacks[1].type);
+ EXPECT_EQ(APPCACHE_FALLBACK_NAMESPACE, fallbacks[2].type);
EXPECT_EQ(GURL("http://www.portme.com:1234/one"),
fallbacks[0].namespace_url);
EXPECT_EQ(GURL("http://www.portme.com:1234/relative/onefb"),
@@ -311,9 +311,9 @@
const NamespaceVector& intercepts = manifest.intercept_namespaces;
const size_t kExpected = 3;
ASSERT_EQ(kExpected, intercepts.size());
- EXPECT_EQ(INTERCEPT_NAMESPACE, intercepts[0].type);
- EXPECT_EQ(INTERCEPT_NAMESPACE, intercepts[1].type);
- EXPECT_EQ(INTERCEPT_NAMESPACE, intercepts[2].type);
+ EXPECT_EQ(APPCACHE_INTERCEPT_NAMESPACE, intercepts[0].type);
+ EXPECT_EQ(APPCACHE_INTERCEPT_NAMESPACE, intercepts[1].type);
+ EXPECT_EQ(APPCACHE_INTERCEPT_NAMESPACE, intercepts[2].type);
EXPECT_EQ(GURL("http://www.portme.com:1234/one"),
intercepts[0].namespace_url);
EXPECT_EQ(GURL("http://www.portme.com:1234/relative/int1"),
@@ -387,8 +387,8 @@
const NamespaceVector& fallbacks = manifest.fallback_namespaces;
expected = 2;
ASSERT_EQ(expected, fallbacks.size());
- EXPECT_EQ(FALLBACK_NAMESPACE, fallbacks[0].type);
- EXPECT_EQ(FALLBACK_NAMESPACE, fallbacks[1].type);
+ EXPECT_EQ(APPCACHE_FALLBACK_NAMESPACE, fallbacks[0].type);
+ EXPECT_EQ(APPCACHE_FALLBACK_NAMESPACE, fallbacks[1].type);
EXPECT_EQ(GURL("http://combo.com:42/fallback-1"),
fallbacks[0].namespace_url);
EXPECT_EQ(GURL("http://combo.com:42/fallback-1b"),
@@ -483,9 +483,11 @@
EXPECT_EQ(3u, manifest.intercept_namespaces.size());
EXPECT_EQ(2u, manifest.fallback_namespaces.size());
EXPECT_EQ(2u, manifest.online_whitelist_namespaces.size());
- EXPECT_EQ(INTERCEPT_NAMESPACE, manifest.intercept_namespaces[0].type);
- EXPECT_EQ(FALLBACK_NAMESPACE, manifest.fallback_namespaces[0].type);
- EXPECT_EQ(NETWORK_NAMESPACE, manifest.online_whitelist_namespaces[0].type);
+ EXPECT_EQ(APPCACHE_INTERCEPT_NAMESPACE,
+ manifest.intercept_namespaces[0].type);
+ EXPECT_EQ(APPCACHE_FALLBACK_NAMESPACE, manifest.fallback_namespaces[0].type);
+ EXPECT_EQ(APPCACHE_NETWORK_NAMESPACE,
+ manifest.online_whitelist_namespaces[0].type);
EXPECT_FALSE(manifest.intercept_namespaces[0].is_pattern);
EXPECT_TRUE(manifest.intercept_namespaces[1].is_pattern);
EXPECT_TRUE(manifest.intercept_namespaces[2].is_pattern);
diff --git a/content/browser/appcache/mock_appcache_storage.cc b/content/browser/appcache/mock_appcache_storage.cc
index e1c5c18..ea9673d 100644
--- a/content/browser/appcache/mock_appcache_storage.cc
+++ b/content/browser/appcache/mock_appcache_storage.cc
@@ -27,10 +27,10 @@
using appcache::AppCacheResponseWriter;
using appcache::AppCacheServiceImpl;
-using appcache::FALLBACK_NAMESPACE;
-using appcache::INTERCEPT_NAMESPACE;
-using appcache::kNoCacheId;
-using appcache::NamespaceType;
+using appcache::APPCACHE_FALLBACK_NAMESPACE;
+using appcache::APPCACHE_INTERCEPT_NAMESPACE;
+using appcache::kAppCacheNoCacheId;
+using appcache::AppCacheNamespaceType;
namespace content {
@@ -40,7 +40,7 @@
simulate_store_group_and_newest_cache_failure_(false),
simulate_find_main_resource_(false),
simulate_find_sub_resource_(false),
- simulated_found_cache_id_(kNoCacheId),
+ simulated_found_cache_id_(kAppCacheNoCacheId),
simulated_found_group_id_(0),
simulated_found_network_namespace_(false),
weak_factory_(this) {
@@ -254,11 +254,11 @@
bool is_cache_in_use;
FoundCandidate()
- : cache_id(kNoCacheId), group_id(0), is_cache_in_use(false) {}
+ : cache_id(kAppCacheNoCacheId), group_id(0), is_cache_in_use(false) {}
};
void MaybeTakeNewNamespaceEntry(
- NamespaceType namespace_type,
+ AppCacheNamespaceType namespace_type,
const AppCacheEntry &entry,
const GURL& namespace_url,
bool cache_is_in_use,
@@ -289,7 +289,7 @@
}
if (take_new_entry) {
- if (namespace_type == FALLBACK_NAMESPACE) {
+ if (namespace_type == APPCACHE_FALLBACK_NAMESPACE) {
best_candidate->namespace_entry_url =
cache->GetFallbackEntryUrl(namespace_url);
} else {
@@ -383,14 +383,14 @@
} else if (found_entry.has_response_id() &&
!found_intercept_namespace.is_empty()) {
MaybeTakeNewNamespaceEntry(
- INTERCEPT_NAMESPACE,
+ APPCACHE_INTERCEPT_NAMESPACE,
found_entry, found_intercept_namespace, is_in_use,
&found_candidate, &found_intercept_candidate_namespace,
cache, group);
} else {
DCHECK(found_fallback_entry.has_response_id());
MaybeTakeNewNamespaceEntry(
- FALLBACK_NAMESPACE,
+ APPCACHE_FALLBACK_NAMESPACE,
found_fallback_entry, found_fallback_namespace, is_in_use,
&found_fallback_candidate, &found_fallback_candidate_namespace,
cache, group);
@@ -420,7 +420,8 @@
// Didn't find anything.
delegate_ref->delegate->OnMainResponseFound(
- url, AppCacheEntry(), GURL(), AppCacheEntry(), kNoCacheId, 0, GURL());
+ url, AppCacheEntry(), GURL(), AppCacheEntry(), kAppCacheNoCacheId, 0,
+ GURL());
}
void MockAppCacheStorage::ProcessMakeGroupObsolete(
diff --git a/content/browser/appcache/mock_appcache_storage.h b/content/browser/appcache/mock_appcache_storage.h
index a9e9582..5d31748 100644
--- a/content/browser/appcache/mock_appcache_storage.h
+++ b/content/browser/appcache/mock_appcache_storage.h
@@ -29,7 +29,7 @@
using appcache::AppCacheResponseWriter;
using appcache::AppCacheServiceImpl;
using appcache::AppCacheStorage;
-using appcache::kNoCacheId;
+using appcache::kAppCacheNoCacheId;
namespace content {
FORWARD_DECLARE_TEST(AppCacheServiceImplTest, DeleteAppCachesForOrigin);
@@ -188,7 +188,7 @@
simulate_find_sub_resource_ = true;
simulated_found_entry_ = entry;
simulated_found_fallback_entry_ = fallback_entry;
- simulated_found_cache_id_ = kNoCacheId; // N/A to sub resource loads
+ simulated_found_cache_id_ = kAppCacheNoCacheId; // N/A to sub resource loads
simulated_found_manifest_url_ = GURL(); // N/A to sub resource loads
simulated_found_group_id_ = 0; // N/A to sub resource loads
simulated_found_network_namespace_ = network_namespace;
diff --git a/content/browser/appcache/mock_appcache_storage_unittest.cc b/content/browser/appcache/mock_appcache_storage_unittest.cc
index e3e6df0..f1c9149 100644
--- a/content/browser/appcache/mock_appcache_storage_unittest.cc
+++ b/content/browser/appcache/mock_appcache_storage_unittest.cc
@@ -14,13 +14,13 @@
using appcache::AppCacheEntry;
using appcache::AppCacheGroup;
using appcache::AppCacheStorage;
-using appcache::FALLBACK_NAMESPACE;
-using appcache::INTERCEPT_NAMESPACE;
-using appcache::kNoCacheId;
-using appcache::kNoResponseId;
+using appcache::APPCACHE_FALLBACK_NAMESPACE;
+using appcache::APPCACHE_INTERCEPT_NAMESPACE;
+using appcache::kAppCacheNoCacheId;
+using appcache::kAppCacheNoResponseId;
using appcache::Manifest;
using appcache::Namespace;
-using appcache::NETWORK_NAMESPACE;
+using appcache::APPCACHE_NETWORK_NAMESPACE;
namespace content {
@@ -30,7 +30,7 @@
public:
explicit MockStorageDelegate()
: loaded_cache_id_(0), stored_group_success_(false),
- obsoleted_success_(false), found_cache_id_(kNoCacheId) {
+ obsoleted_success_(false), found_cache_id_(kAppCacheNoCacheId) {
}
virtual void OnCacheLoaded(AppCache* cache, int64 cache_id) OVERRIDE {
@@ -420,9 +420,10 @@
base::RunLoop().RunUntilIdle(); // Do async task execution.
EXPECT_EQ(url, delegate.found_url_);
EXPECT_TRUE(delegate.found_manifest_url_.is_empty());
- EXPECT_EQ(kNoCacheId, delegate.found_cache_id_);
- EXPECT_EQ(kNoResponseId, delegate.found_entry_.response_id());
- EXPECT_EQ(kNoResponseId, delegate.found_fallback_entry_.response_id());
+ EXPECT_EQ(kAppCacheNoCacheId, delegate.found_cache_id_);
+ EXPECT_EQ(kAppCacheNoResponseId, delegate.found_entry_.response_id());
+ EXPECT_EQ(kAppCacheNoResponseId,
+ delegate.found_fallback_entry_.response_id());
EXPECT_TRUE(delegate.found_fallback_url_.is_empty());
EXPECT_EQ(0, delegate.found_entry_.types());
EXPECT_EQ(0, delegate.found_fallback_entry_.types());
@@ -482,10 +483,10 @@
Manifest manifest;
manifest.fallback_namespaces.push_back(
- Namespace(FALLBACK_NAMESPACE, kFallbackNamespaceUrl1,
+ Namespace(APPCACHE_FALLBACK_NAMESPACE, kFallbackNamespaceUrl1,
kFallbackEntryUrl1, false));
manifest.fallback_namespaces.push_back(
- Namespace(FALLBACK_NAMESPACE, kFallbackNamespaceUrl2,
+ Namespace(APPCACHE_FALLBACK_NAMESPACE, kFallbackNamespaceUrl2,
kFallbackEntryUrl2, false));
scoped_refptr<AppCache> cache(new AppCache(service.storage(), kCacheId));
@@ -594,7 +595,7 @@
Manifest manifest;
manifest.online_whitelist_namespaces.push_back(
- Namespace(NETWORK_NAMESPACE, kOnlineNamespaceUrl,
+ Namespace(APPCACHE_NETWORK_NAMESPACE, kOnlineNamespaceUrl,
GURL(), false));
scoped_refptr<AppCache> cache(new AppCache(service.storage(), kCacheId));
cache->InitializeWithManifest(&manifest);
@@ -618,9 +619,10 @@
base::RunLoop().RunUntilIdle(); // Do async task execution.
EXPECT_EQ(kEntryUrl, delegate.found_url_);
EXPECT_TRUE(delegate.found_manifest_url_.is_empty());
- EXPECT_EQ(kNoCacheId, delegate.found_cache_id_);
- EXPECT_EQ(kNoResponseId, delegate.found_entry_.response_id());
- EXPECT_EQ(kNoResponseId, delegate.found_fallback_entry_.response_id());
+ EXPECT_EQ(kAppCacheNoCacheId, delegate.found_cache_id_);
+ EXPECT_EQ(kAppCacheNoResponseId, delegate.found_entry_.response_id());
+ EXPECT_EQ(kAppCacheNoResponseId,
+ delegate.found_fallback_entry_.response_id());
EXPECT_TRUE(delegate.found_fallback_url_.is_empty());
EXPECT_EQ(0, delegate.found_entry_.types());
EXPECT_EQ(0, delegate.found_fallback_entry_.types());
@@ -632,9 +634,10 @@
base::RunLoop().RunUntilIdle(); // Do async task execution.
EXPECT_EQ(kOnlineNamespaceUrl, delegate.found_url_);
EXPECT_TRUE(delegate.found_manifest_url_.is_empty());
- EXPECT_EQ(kNoCacheId, delegate.found_cache_id_);
- EXPECT_EQ(kNoResponseId, delegate.found_entry_.response_id());
- EXPECT_EQ(kNoResponseId, delegate.found_fallback_entry_.response_id());
+ EXPECT_EQ(kAppCacheNoCacheId, delegate.found_cache_id_);
+ EXPECT_EQ(kAppCacheNoResponseId, delegate.found_entry_.response_id());
+ EXPECT_EQ(kAppCacheNoResponseId,
+ delegate.found_fallback_entry_.response_id());
EXPECT_TRUE(delegate.found_fallback_url_.is_empty());
EXPECT_EQ(0, delegate.found_entry_.types());
EXPECT_EQ(0, delegate.found_fallback_entry_.types());
diff --git a/content/browser/battery_status/battery_status_browsertest.cc b/content/browser/battery_status/battery_status_browsertest.cc
new file mode 100644
index 0000000..7687831
--- /dev/null
+++ b/content/browser/battery_status/battery_status_browsertest.cc
@@ -0,0 +1,167 @@
+// Copyright 2014 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 "base/command_line.h"
+#include "base/synchronization/waitable_event.h"
+#include "content/browser/battery_status/battery_status_manager.h"
+#include "content/browser/battery_status/battery_status_service.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/common/content_switches.h"
+#include "content/public/test/content_browser_test.h"
+#include "content/public/test/content_browser_test_utils.h"
+#include "content/public/test/test_navigation_observer.h"
+#include "content/public/test/test_utils.h"
+#include "content/shell/browser/shell.h"
+
+namespace content {
+
+namespace {
+
+class FakeBatteryManager : public BatteryStatusManager {
+ public:
+ explicit FakeBatteryManager(
+ const BatteryStatusService::BatteryUpdateCallback& callback)
+ : battery_status_available_(true),
+ started_(false) {
+ callback_ = callback;
+ }
+ virtual ~FakeBatteryManager() { }
+
+ // Methods from BatteryStatusManager.
+ virtual bool StartListeningBatteryChange() OVERRIDE {
+ started_ = true;
+ if (battery_status_available_)
+ InvokeUpdateCallback();
+ return battery_status_available_;
+ }
+
+ virtual void StopListeningBatteryChange() OVERRIDE { }
+
+ void InvokeUpdateCallback() {
+ callback_.Run(status_);
+ }
+
+ void set_battery_status(const blink::WebBatteryStatus& status) {
+ status_ = status;
+ }
+
+ void set_battery_status_available(bool value) {
+ battery_status_available_ = value;
+ }
+
+ bool started() {
+ return started_;
+ }
+
+ private:
+ bool battery_status_available_;
+ bool started_;
+ blink::WebBatteryStatus status_;
+
+ DISALLOW_COPY_AND_ASSIGN(FakeBatteryManager);
+};
+
+class BatteryStatusBrowserTest : public ContentBrowserTest {
+ public:
+ BatteryStatusBrowserTest()
+ : battery_manager_(0),
+ battery_service_(0),
+ io_loop_finished_event_(false, false) {
+ }
+
+ virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
+ command_line->AppendSwitch(
+ switches::kEnableExperimentalWebPlatformFeatures);
+ }
+
+ virtual void SetUpOnMainThread() OVERRIDE {
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ base::Bind(&BatteryStatusBrowserTest::SetUpOnIOThread, this));
+ io_loop_finished_event_.Wait();
+ }
+
+ void SetUpOnIOThread() {
+ battery_service_ = BatteryStatusService::GetInstance();
+ battery_manager_ = new FakeBatteryManager(
+ battery_service_->GetUpdateCallbackForTesting());
+ battery_service_->SetBatteryManagerForTesting(battery_manager_);
+ io_loop_finished_event_.Signal();
+ }
+
+ virtual void TearDown() OVERRIDE {
+ battery_service_->SetBatteryManagerForTesting(0);
+ }
+
+ FakeBatteryManager* battery_manager() {
+ return battery_manager_;
+ }
+
+ private:
+ FakeBatteryManager* battery_manager_;
+ BatteryStatusService* battery_service_;
+ base::WaitableEvent io_loop_finished_event_;
+
+ DISALLOW_COPY_AND_ASSIGN(BatteryStatusBrowserTest);
+};
+
+IN_PROC_BROWSER_TEST_F(BatteryStatusBrowserTest, BatteryManagerDefaultValues) {
+ // Set the fake battery manager to return false on start. From JavaScript
+ // request a promise for the battery status information and once it resolves
+ // check the default values and navigate to #pass.
+ battery_manager()->set_battery_status_available(false);
+ GURL test_url = GetTestUrl(
+ "battery_status", "battery_status_default_test.html");
+ NavigateToURLBlockUntilNavigationsComplete(shell(), test_url, 2);
+ EXPECT_EQ("pass", shell()->web_contents()->GetLastCommittedURL().ref());
+ EXPECT_TRUE(battery_manager()->started());
+}
+
+IN_PROC_BROWSER_TEST_F(BatteryStatusBrowserTest, BatteryManagerResolvePromise) {
+ // Set the fake battery manager to return predefined battery status values.
+ // From JavaScript request a promise for the battery status information and
+ // once it resolves check the values and navigate to #pass.
+ blink::WebBatteryStatus status;
+ status.charging = true;
+ status.chargingTime = 100;
+ status.dischargingTime = std::numeric_limits<double>::infinity();
+ status.level = 0.5;
+ battery_manager()->set_battery_status(status);
+
+ GURL test_url = GetTestUrl(
+ "battery_status", "battery_status_promise_resolution_test.html");
+ NavigateToURLBlockUntilNavigationsComplete(shell(), test_url, 2);
+ EXPECT_EQ("pass", shell()->web_contents()->GetLastCommittedURL().ref());
+ EXPECT_TRUE(battery_manager()->started());
+}
+
+IN_PROC_BROWSER_TEST_F(BatteryStatusBrowserTest,
+ BatteryManagerWithEventListener) {
+ // Set the fake battery manager to return default battery status values.
+ // From JavaScript request a promise for the battery status information.
+ // Once it resolves add an event listener for battery level change. Set
+ // battery level to 0.6 and invoke update. Check that the event listener
+ // is invoked with the correct value for level and navigate to #pass.
+ blink::WebBatteryStatus status;
+ battery_manager()->set_battery_status(status);
+
+ TestNavigationObserver same_tab_observer(shell()->web_contents(), 2);
+ GURL test_url = GetTestUrl(
+ "battery_status", "battery_status_event_listener_test.html");
+ shell()->LoadURL(test_url);
+ same_tab_observer.Wait();
+ EXPECT_EQ("resolved", shell()->web_contents()->GetLastCommittedURL().ref());
+
+ TestNavigationObserver same_tab_observer2(shell()->web_contents(), 1);
+ status.level = 0.6;
+ battery_manager()->set_battery_status(status);
+ battery_manager()->InvokeUpdateCallback();
+ same_tab_observer2.Wait();
+ EXPECT_EQ("pass", shell()->web_contents()->GetLastCommittedURL().ref());
+ EXPECT_TRUE(battery_manager()->started());
+}
+
+} // namespace
+
+} // namespace content
diff --git a/content/browser/battery_status/battery_status_manager_android.cc b/content/browser/battery_status/battery_status_manager_android.cc
index 9d90fc4..a8438b8 100644
--- a/content/browser/battery_status/battery_status_manager_android.cc
+++ b/content/browser/battery_status/battery_status_manager_android.cc
@@ -5,6 +5,7 @@
#include "content/browser/battery_status/battery_status_manager.h"
#include "base/android/jni_android.h"
+#include "base/metrics/histogram.h"
#include "jni/BatteryStatusManager_jni.h"
using base::android::AttachCurrentThread;
@@ -41,9 +42,10 @@
}
bool BatteryStatusManager::StartListeningBatteryChange() {
- return Java_BatteryStatusManager_start(
- AttachCurrentThread(), j_manager_.obj(),
- reinterpret_cast<intptr_t>(this));
+ bool result = Java_BatteryStatusManager_start(AttachCurrentThread(),
+ j_manager_.obj(), reinterpret_cast<intptr_t>(this));
+ UMA_HISTOGRAM_BOOLEAN("BatteryStatus.StartAndroid", result);
+ return result;
}
void BatteryStatusManager::StopListeningBatteryChange() {
diff --git a/content/browser/battery_status/battery_status_service.cc b/content/browser/battery_status/battery_status_service.cc
index dc4c690..21d59d3 100644
--- a/content/browser/battery_status/battery_status_service.cc
+++ b/content/browser/battery_status/battery_status_service.cc
@@ -11,10 +11,10 @@
namespace content {
BatteryStatusService::BatteryStatusService()
- : status_updated_(false),
+ : update_callback_(base::Bind(&BatteryStatusService::UpdateBatteryStatus,
+ base::Unretained(this))),
+ status_updated_(false),
is_shutdown_(false) {
- update_callback_ = base::Bind(&BatteryStatusService::UpdateBatteryStatus,
- base::Unretained(this));
callback_list_.set_removal_callback(
base::Bind(&BatteryStatusService::ConsumersChanged,
base::Unretained(this)));
@@ -36,8 +36,13 @@
if (!battery_fetcher_)
battery_fetcher_.reset(new BatteryStatusManager(update_callback_));
- if (callback_list_.empty())
- battery_fetcher_->StartListeningBatteryChange();
+ if (callback_list_.empty()) {
+ bool success = battery_fetcher_->StartListeningBatteryChange();
+ if (!success) {
+ // Make sure the promise resolves with the default values in Blink.
+ callback.Run(blink::WebBatteryStatus());
+ }
+ }
if (status_updated_) {
// Send recent status to the new callback if already available.
@@ -80,7 +85,7 @@
void BatteryStatusService::Shutdown() {
if (!callback_list_.empty())
- battery_fetcher_->StopListeningBatteryChange();
+ battery_fetcher_->StopListeningBatteryChange();
battery_fetcher_.reset();
is_shutdown_ = true;
}
diff --git a/content/browser/bootstrap_sandbox_mac.cc b/content/browser/bootstrap_sandbox_mac.cc
new file mode 100644
index 0000000..c0bb6f8
--- /dev/null
+++ b/content/browser/bootstrap_sandbox_mac.cc
@@ -0,0 +1,96 @@
+// Copyright 2014 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 "content/browser/bootstrap_sandbox_mac.h"
+
+#include "base/logging.h"
+#include "base/mac/mac_util.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/singleton.h"
+#include "content/common/sandbox_init_mac.h"
+#include "content/public/browser/browser_child_process_observer.h"
+#include "content/public/browser/child_process_data.h"
+#include "content/public/common/sandbox_type_mac.h"
+#include "sandbox/mac/bootstrap_sandbox.h"
+
+namespace content {
+
+namespace {
+
+// This class is responsible for creating the BootstrapSandbox global
+// singleton, as well as registering all associated policies with it.
+class BootstrapSandboxPolicy : public BrowserChildProcessObserver {
+ public:
+ static BootstrapSandboxPolicy* GetInstance();
+
+ sandbox::BootstrapSandbox* sandbox() const {
+ return sandbox_.get();
+ }
+
+ // BrowserChildProcessObserver:
+ virtual void BrowserChildProcessHostDisconnected(
+ const ChildProcessData& data) OVERRIDE;
+ virtual void BrowserChildProcessCrashed(
+ const ChildProcessData& data) OVERRIDE;
+
+ private:
+ friend struct DefaultSingletonTraits<BootstrapSandboxPolicy>;
+ BootstrapSandboxPolicy();
+ virtual ~BootstrapSandboxPolicy();
+
+ void RegisterSandboxPolicies();
+ void RegisterNPAPIPolicy();
+
+ scoped_ptr<sandbox::BootstrapSandbox> sandbox_;
+};
+
+BootstrapSandboxPolicy* BootstrapSandboxPolicy::GetInstance() {
+ return Singleton<BootstrapSandboxPolicy>::get();
+}
+
+void BootstrapSandboxPolicy::BrowserChildProcessHostDisconnected(
+ const ChildProcessData& data) {
+ sandbox()->ChildDied(data.handle);
+}
+
+void BootstrapSandboxPolicy::BrowserChildProcessCrashed(
+ const ChildProcessData& data) {
+ sandbox()->ChildDied(data.handle);
+}
+
+BootstrapSandboxPolicy::BootstrapSandboxPolicy()
+ : sandbox_(sandbox::BootstrapSandbox::Create()) {
+ CHECK(sandbox_.get());
+ BrowserChildProcessObserver::Add(this);
+ RegisterSandboxPolicies();
+}
+
+BootstrapSandboxPolicy::~BootstrapSandboxPolicy() {
+ BrowserChildProcessObserver::Remove(this);
+}
+
+void BootstrapSandboxPolicy::RegisterSandboxPolicies() {
+ RegisterNPAPIPolicy();
+}
+
+void BootstrapSandboxPolicy::RegisterNPAPIPolicy() {
+ sandbox::BootstrapSandboxPolicy policy;
+ policy.default_rule = sandbox::Rule(sandbox::POLICY_ALLOW);
+ policy.rules[kBootstrapPortNameForNPAPIPlugins] =
+ sandbox::Rule(sandbox_->real_bootstrap_port());
+ sandbox_->RegisterSandboxPolicy(SANDBOX_TYPE_NPAPI, policy);
+}
+
+} // namespace
+
+bool ShouldEnableBootstrapSandbox() {
+ return base::mac::IsOSMountainLionOrEarlier() ||
+ base::mac::IsOSMavericks();
+}
+
+sandbox::BootstrapSandbox* GetBootstrapSandbox() {
+ return BootstrapSandboxPolicy::GetInstance()->sandbox();
+}
+
+} // namespace content
diff --git a/content/browser/bootstrap_sandbox_mac.h b/content/browser/bootstrap_sandbox_mac.h
new file mode 100644
index 0000000..ffb6a61
--- /dev/null
+++ b/content/browser/bootstrap_sandbox_mac.h
@@ -0,0 +1,25 @@
+// Copyright 2014 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 CONTENT_BROWSER_BOOTSTRAP_SANDBOX_MAC_H_
+#define CONTENT_BROWSER_BOOTSTRAP_SANDBOX_MAC_H_
+
+namespace sandbox {
+class BootstrapSandbox;
+}
+
+namespace content {
+
+// Whether or not the bootstrap sandbox should be enabled.
+bool ShouldEnableBootstrapSandbox();
+
+// Returns the singleton instance of the BootstrapSandox. The returned object
+// is thread-safe.
+// On the first call to this function, the sandbox will be created and all
+// the policies will be registered with it.
+sandbox::BootstrapSandbox* GetBootstrapSandbox();
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_BOOTSTRAP_SANDBOX_MAC_H_
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 6aef220..05b679a 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -85,6 +85,7 @@
#endif
#if defined(OS_MACOSX) && !defined(OS_IOS)
+#include "content/browser/bootstrap_sandbox_mac.h"
#include "content/browser/theme_helper_mac.h"
#endif
@@ -518,7 +519,6 @@
}
int BrowserMainLoop::PreCreateThreads() {
-
if (parts_) {
TRACE_EVENT0("startup",
"BrowserMainLoop::CreateThreads:PreCreateThreads");
@@ -679,7 +679,6 @@
}
TRACE_EVENT_END0("startup", "BrowserMainLoop::CreateThreads:start");
-
}
created_threads_ = true;
return result_code_;
@@ -1038,7 +1037,13 @@
#if defined(OS_MACOSX)
ThemeHelperMac::GetInstance();
-#endif
+ if (ShouldEnableBootstrapSandbox()) {
+ TRACE_EVENT0("startup",
+ "BrowserMainLoop::BrowserThreadsStarted:BootstrapSandbox");
+ CHECK(GetBootstrapSandbox());
+ }
+#endif // defined(OS_MACOSX)
+
#endif // !defined(OS_IOS)
return result_code_;
@@ -1053,12 +1058,6 @@
// (Need to add InitializeToolkit stage to BrowserParts).
// See also GTK setup in EarlyInitialization, above, and associated comments.
-#if defined(TOOLKIT_GTK)
- // It is important for this to happen before the first run dialog, as it
- // styles the dialog as well.
- gfx::InitRCStyles();
-#endif
-
#if defined(OS_WIN)
// Init common control sex.
INITCOMMONCONTROLSEX config;
diff --git a/content/browser/browser_main_runner.cc b/content/browser/browser_main_runner.cc
index 16309de..c41fc95 100644
--- a/content/browser/browser_main_runner.cc
+++ b/content/browser/browser_main_runner.cc
@@ -149,7 +149,12 @@
#if defined(OS_WIN)
ole_initializer_.reset(NULL);
#endif
-
+ #if defined(OS_ANDROID)
+ // Forcefully terminates the RunLoop inside MessagePumpForUI, ensuring
+ // proper shutdown for content_browsertests. Shutdown() is not used by
+ // the actual browser.
+ base::MessageLoop::current()->QuitNow();
+ #endif
main_loop_.reset(NULL);
notification_service_.reset(NULL);
diff --git a/content/browser/browser_plugin/browser_plugin_embedder.cc b/content/browser/browser_plugin/browser_plugin_embedder.cc
index b14359c..42f8f95 100644
--- a/content/browser/browser_plugin/browser_plugin_embedder.cc
+++ b/content/browser/browser_plugin/browser_plugin_embedder.cc
@@ -83,8 +83,6 @@
bool BrowserPluginEmbedder::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(BrowserPluginEmbedder, message)
- IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_AllocateInstanceID,
- OnAllocateInstanceID)
IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Attach, OnAttach)
IPC_MESSAGE_HANDLER_GENERIC(DragHostMsg_UpdateDragCursor,
OnUpdateDragCursor(&handled));
@@ -117,12 +115,6 @@
*handled = (guest_dragging_over_.get() != NULL);
}
-void BrowserPluginEmbedder::OnAllocateInstanceID(int request_id) {
- int instance_id = GetBrowserPluginGuestManager()->GetNextInstanceID();
- Send(new BrowserPluginMsg_AllocateInstanceID_ACK(
- routing_id(), request_id, instance_id));
-}
-
void BrowserPluginEmbedder::OnGuestCallback(
int instance_id,
const BrowserPluginHostMsg_Attach_Params& params,
@@ -131,6 +123,19 @@
BrowserPluginGuest* guest = guest_web_contents ?
static_cast<WebContentsImpl*>(guest_web_contents)->
GetBrowserPluginGuest() : NULL;
+ if (!guest) {
+ scoped_ptr<base::DictionaryValue> copy_extra_params(
+ extra_params->DeepCopy());
+ guest_web_contents = GetBrowserPluginGuestManager()->CreateGuest(
+ GetWebContents()->GetSiteInstance(),
+ instance_id,
+ copy_extra_params.Pass());
+ guest = guest_web_contents
+ ? static_cast<WebContentsImpl*>(guest_web_contents)
+ ->GetBrowserPluginGuest()
+ : NULL;
+ }
+
if (guest) {
// There is an implicit order expectation here:
// 1. The content embedder is made aware of the attachment.
@@ -142,25 +147,6 @@
GetWebContents(),
*extra_params);
guest->Attach(GetWebContents(), params, *extra_params);
- return;
- }
-
- scoped_ptr<base::DictionaryValue> copy_extra_params(extra_params->DeepCopy());
- guest_web_contents = GetBrowserPluginGuestManager()->CreateGuest(
- GetWebContents()->GetSiteInstance(),
- instance_id,
- params.storage_partition_id,
- params.persist_storage,
- copy_extra_params.Pass());
- guest = guest_web_contents ?
- static_cast<WebContentsImpl*>(guest_web_contents)->
- GetBrowserPluginGuest() : NULL;
- if (guest) {
- GetContentClient()->browser()->GuestWebContentsAttached(
- guest->GetWebContents(),
- GetWebContents(),
- *extra_params);
- guest->Initialize(params, GetWebContents());
}
}
diff --git a/content/browser/browser_plugin/browser_plugin_embedder.h b/content/browser/browser_plugin/browser_plugin_embedder.h
index eb7b0ff..3c35bef 100644
--- a/content/browser/browser_plugin/browser_plugin_embedder.h
+++ b/content/browser/browser_plugin/browser_plugin_embedder.h
@@ -88,7 +88,6 @@
// Message handlers.
- void OnAllocateInstanceID(int request_id);
void OnAttach(int instance_id,
const BrowserPluginHostMsg_Attach_Params& params,
const base::DictionaryValue& extra_params);
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 929871e..6f590e9 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -136,12 +136,11 @@
IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ImeSetComposition,
OnImeSetComposition)
IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_LockMouse_ACK, OnLockMouseAck)
- IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_NavigateGuest, OnNavigateGuest)
IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginDestroyed, OnPluginDestroyed)
IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ReclaimCompositorResources,
OnReclaimCompositorResources)
IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ResizeGuest, OnResizeGuest)
- IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetAutoSize, OnSetSize)
+ IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetAutoSize, OnSetAutoSize)
IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetEditCommandsForNextKeyEvent,
OnSetEditCommandsForNextKeyEvent)
IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetFocus, OnSetFocus)
@@ -157,11 +156,13 @@
void BrowserPluginGuest::Initialize(
const BrowserPluginHostMsg_Attach_Params& params,
- WebContentsImpl* embedder_web_contents) {
+ WebContentsImpl* embedder_web_contents,
+ const base::DictionaryValue& extra_params) {
focused_ = params.focused;
guest_visible_ = params.visible;
guest_opaque_ = params.opaque;
- guest_window_rect_ = params.resize_guest_params.view_rect;
+ guest_window_rect_ = gfx::Rect(params.origin,
+ params.resize_guest_params.view_size);
auto_size_enabled_ = params.auto_size_params.enable;
max_auto_size_ = params.auto_size_params.max_size;
@@ -199,7 +200,8 @@
embedder_web_contents_observer_.reset(new EmbedderWebContentsObserver(this));
- OnSetSize(instance_id_, params.auto_size_params, params.resize_guest_params);
+ OnSetAutoSize(
+ instance_id_, params.auto_size_params, params.resize_guest_params);
// Create a swapped out RenderView for the guest in the embedder render
// process, so that the embedder can access the guest's window object.
@@ -210,12 +212,6 @@
new BrowserPluginMsg_GuestContentWindowReady(instance_id_,
guest_routing_id));
- if (!params.src.empty()) {
- // params.src will be validated in BrowserPluginGuest::OnNavigateGuest.
- OnNavigateGuest(instance_id_, params.src);
- has_render_view_ = true;
- }
-
WebPreferences prefs = GetWebContents()->GetWebkitPrefs();
prefs.navigate_on_drag_drop = false;
GetWebContents()->GetRenderViewHost()->UpdateWebkitPreferences(prefs);
@@ -228,26 +224,16 @@
guest_rvh->SetInputMethodActive(true);
}
- // Inform the embedder of the guest's information.
- // We pull the partition information from the site's URL, which is of the form
- // guest://site/{persist}?{partition_name}.
- const GURL& site_url = GetWebContents()->GetSiteInstance()->GetSiteURL();
- BrowserPluginMsg_Attach_ACK_Params ack_params;
- ack_params.storage_partition_id = site_url.query();
- ack_params.persist_storage =
- site_url.path().find("persist") != std::string::npos;
- SendMessageToEmbedder(
- new BrowserPluginMsg_Attach_ACK(instance_id_, ack_params));
+ // Inform the embedder of the guest's attachment.
+ SendMessageToEmbedder(new BrowserPluginMsg_Attach_ACK(instance_id_));
- if (delegate_)
- delegate_->DidAttach();
+ if (delegate_) {
+ delegate_->DidAttach(extra_params);
+ has_render_view_ = true;
+ }
}
BrowserPluginGuest::~BrowserPluginGuest() {
- while (!pending_messages_.empty()) {
- delete pending_messages_.front();
- pending_messages_.pop();
- }
}
// static
@@ -360,7 +346,7 @@
// As a result, we must save all these IPCs until attachment and then
// forward them so that the embedder gets a chance to see and process
// the load events.
- pending_messages_.push(msg);
+ pending_messages_.push_back(linked_ptr<IPC::Message>(msg));
return;
}
msg->set_routing_id(embedder_web_contents_->GetRoutingID());
@@ -384,9 +370,9 @@
return;
while (!pending_messages_.empty()) {
- IPC::Message* message = pending_messages_.front();
- pending_messages_.pop();
- SendMessageToEmbedder(message);
+ linked_ptr<IPC::Message> message_ptr = pending_messages_.front();
+ pending_messages_.pop_front();
+ SendMessageToEmbedder(message_ptr.release());
}
}
@@ -448,7 +434,6 @@
case BrowserPluginHostMsg_ImeConfirmComposition::ID:
case BrowserPluginHostMsg_ImeSetComposition::ID:
case BrowserPluginHostMsg_LockMouse_ACK::ID:
- case BrowserPluginHostMsg_NavigateGuest::ID:
case BrowserPluginHostMsg_PluginDestroyed::ID:
case BrowserPluginHostMsg_ReclaimCompositorResources::ID:
case BrowserPluginHostMsg_ResizeGuest::ID:
@@ -480,8 +465,8 @@
#endif
IPC_MESSAGE_HANDLER(ViewHostMsg_ShowWidget, OnShowWidget)
IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus)
- IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputTypeChanged,
- OnTextInputTypeChanged)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged,
+ OnTextInputStateChanged)
IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition,
OnImeCancelComposition)
#if defined(OS_MACOSX) || defined(USE_AURA)
@@ -497,16 +482,11 @@
void BrowserPluginGuest::Attach(
WebContentsImpl* embedder_web_contents,
- BrowserPluginHostMsg_Attach_Params params,
+ const BrowserPluginHostMsg_Attach_Params& params,
const base::DictionaryValue& extra_params) {
if (attached())
return;
- // Clear parameters that get inherited from the opener.
- params.storage_partition_id.clear();
- params.persist_storage = false;
- params.src.clear();
-
// If a RenderView has already been created for this new window, then we need
// to initialize the browser-side state now so that the RenderFrameHostManager
// does not create a new RenderView on navigation.
@@ -518,7 +498,7 @@
new_view->CreateViewForWidget(web_contents()->GetRenderViewHost());
}
- Initialize(params, embedder_web_contents);
+ Initialize(params, embedder_web_contents, extra_params);
SendQueuedMessages();
@@ -691,13 +671,6 @@
mouse_locked_ = true;
}
-void BrowserPluginGuest::OnNavigateGuest(int instance_id,
- const std::string& src) {
- if (!delegate_)
- return;
- delegate_->NavigateGuest(src);
-}
-
void BrowserPluginGuest::OnPluginDestroyed(int instance_id) {
Destroy();
}
@@ -724,16 +697,16 @@
// When autosize is turned off and as a result there is a layout change, we
// send a sizechanged event.
if (!auto_size_enabled_ && last_seen_auto_size_enabled_ &&
- !params.view_rect.size().IsEmpty() && delegate_) {
- delegate_->SizeChanged(last_seen_view_size_, params.view_rect.size());
+ !params.view_size.IsEmpty() && delegate_) {
+ delegate_->SizeChanged(last_seen_view_size_, params.view_size);
last_seen_auto_size_enabled_ = false;
}
// Just resize the WebContents and repaint if needed.
- full_size_ = params.view_rect.size();
- if (!params.view_rect.size().IsEmpty())
- GetWebContents()->GetView()->SizeContents(params.view_rect.size());
+ full_size_ = params.view_size;
+ if (!params.view_size.IsEmpty())
+ GetWebContents()->GetView()->SizeContents(params.view_size);
if (params.repaint)
- Send(new ViewMsg_Repaint(routing_id(), params.view_rect.size()));
+ Send(new ViewMsg_Repaint(routing_id(), params.view_size));
}
void BrowserPluginGuest::OnSetFocus(int instance_id, bool focused) {
@@ -746,12 +719,15 @@
RenderWidgetHostViewBase* rwhv = static_cast<RenderWidgetHostViewBase*>(
web_contents()->GetRenderWidgetHostView());
if (rwhv) {
- rwhv->TextInputTypeChanged(last_text_input_type_, last_input_mode_,
- last_can_compose_inline_);
+ ViewHostMsg_TextInputState_Params params;
+ params.type = last_text_input_type_;
+ params.mode = last_input_mode_;
+ params.can_compose_inline = last_can_compose_inline_;
+ rwhv->TextInputStateChanged(params);
}
}
-void BrowserPluginGuest::OnSetSize(
+void BrowserPluginGuest::OnSetAutoSize(
int instance_id,
const BrowserPluginHostMsg_AutoSize_Params& auto_size_params,
const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params) {
@@ -777,7 +753,7 @@
Send(new ViewMsg_Repaint(routing_id(), max_auto_size_));
} else if (!auto_size_enabled_ && old_auto_size_enabled) {
GetWebContents()->GetRenderViewHost()->DisableAutoResize(
- resize_guest_params.view_rect.size());
+ resize_guest_params.view_size);
}
OnResizeGuest(instance_id_, resize_guest_params);
}
@@ -898,17 +874,15 @@
new BrowserPluginMsg_UpdateRect(instance_id(), relay_params));
}
-void BrowserPluginGuest::OnTextInputTypeChanged(ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline) {
+void BrowserPluginGuest::OnTextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params) {
// Save the state of text input so we can restore it on focus.
- last_text_input_type_ = type;
- last_input_mode_ = input_mode;
- last_can_compose_inline_ = can_compose_inline;
+ last_text_input_type_ = params.type;
+ last_input_mode_ = params.mode;
+ last_can_compose_inline_ = params.can_compose_inline;
static_cast<RenderWidgetHostViewBase*>(
- web_contents()->GetRenderWidgetHostView())->TextInputTypeChanged(
- type, input_mode, can_compose_inline);
+ web_contents()->GetRenderWidgetHostView())->TextInputStateChanged(params);
}
void BrowserPluginGuest::OnImeCancelComposition() {
diff --git a/content/browser/browser_plugin/browser_plugin_guest.h b/content/browser/browser_plugin/browser_plugin_guest.h
index 3114129..9c82e15 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.h
+++ b/content/browser/browser_plugin/browser_plugin_guest.h
@@ -22,6 +22,7 @@
#include <queue>
#include "base/compiler_specific.h"
+#include "base/memory/linked_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/values.h"
#include "content/common/edit_command.h"
@@ -45,6 +46,7 @@
#if defined(OS_MACOSX)
struct ViewHostMsg_ShowPopup_Params;
#endif
+struct ViewHostMsg_TextInputState_Params;
struct ViewHostMsg_UpdateRect_Params;
namespace blink {
@@ -118,9 +120,6 @@
bool OnMessageReceivedFromEmbedder(const IPC::Message& message);
- void Initialize(const BrowserPluginHostMsg_Attach_Params& params,
- WebContentsImpl* embedder_web_contents);
-
WebContentsImpl* embedder_web_contents() const {
return embedder_web_contents_;
}
@@ -177,7 +176,7 @@
// parameters passed into BrowserPlugin from JavaScript to be forwarded to
// the content embedder.
void Attach(WebContentsImpl* embedder_web_contents,
- BrowserPluginHostMsg_Attach_Params params,
+ const BrowserPluginHostMsg_Attach_Params& params,
const base::DictionaryValue& extra_params);
// Returns whether BrowserPluginGuest is interested in receiving the given
@@ -213,6 +212,10 @@
void WillDestroy();
+ void Initialize(const BrowserPluginHostMsg_Attach_Params& params,
+ WebContentsImpl* embedder_web_contents,
+ const base::DictionaryValue& extra_params);
+
bool InAutoSizeBounds(const gfx::Size& size) const;
// Message handlers for messages from embedder.
@@ -249,7 +252,6 @@
bool last_unlocked_by_target,
bool privileged);
void OnLockMouseAck(int instance_id, bool succeeded);
- void OnNavigateGuest(int instance_id, const std::string& src);
void OnPluginDestroyed(int instance_id);
// Resizes the guest's web contents.
void OnResizeGuest(
@@ -259,7 +261,7 @@
// access it.
void OnSetName(int instance_id, const std::string& name);
// Updates the size state of the guest.
- void OnSetSize(
+ void OnSetAutoSize(
int instance_id,
const BrowserPluginHostMsg_AutoSize_Params& auto_size_params,
const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params);
@@ -287,9 +289,9 @@
void OnUnlockMouseAck(int instance_id);
void OnUpdateGeometry(int instance_id, const gfx::Rect& view_rect);
- void OnTextInputTypeChanged(ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline);
+ void OnTextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params);
+
void OnImeSetComposition(
int instance_id,
const std::string& text,
@@ -378,7 +380,7 @@
// This is a queue of messages that are destined to be sent to the embedder
// once the guest is attached to a particular embedder.
- std::queue<IPC::Message*> pending_messages_;
+ std::deque<linked_ptr<IPC::Message> > pending_messages_;
BrowserPluginGuestDelegate* delegate_;
diff --git a/content/browser/browser_thread_impl.cc b/content/browser/browser_thread_impl.cc
index 7b118d6..d3c416d 100644
--- a/content/browser/browser_thread_impl.cc
+++ b/content/browser/browser_thread_impl.cc
@@ -31,6 +31,57 @@
"Chrome_IOThread", // IO
};
+// An implementation of MessageLoopProxy to be used in conjunction
+// with BrowserThread.
+class BrowserThreadMessageLoopProxy : public base::MessageLoopProxy {
+ public:
+ explicit BrowserThreadMessageLoopProxy(BrowserThread::ID identifier)
+ : id_(identifier) {
+ }
+
+ // MessageLoopProxy implementation.
+ virtual bool PostDelayedTask(
+ const tracked_objects::Location& from_here,
+ const base::Closure& task, base::TimeDelta delay) OVERRIDE {
+ return BrowserThread::PostDelayedTask(id_, from_here, task, delay);
+ }
+
+ virtual bool PostNonNestableDelayedTask(
+ const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeDelta delay) OVERRIDE {
+ return BrowserThread::PostNonNestableDelayedTask(id_, from_here, task,
+ delay);
+ }
+
+ virtual bool RunsTasksOnCurrentThread() const OVERRIDE {
+ return BrowserThread::CurrentlyOn(id_);
+ }
+
+ protected:
+ virtual ~BrowserThreadMessageLoopProxy() {}
+
+ private:
+ BrowserThread::ID id_;
+ DISALLOW_COPY_AND_ASSIGN(BrowserThreadMessageLoopProxy);
+};
+
+// A separate helper is used just for the proxies, in order to avoid needing
+// to initialize the globals to create a proxy.
+struct BrowserThreadProxies {
+ BrowserThreadProxies() {
+ for (int i = 0; i < BrowserThread::ID_COUNT; ++i) {
+ proxies[i] =
+ new BrowserThreadMessageLoopProxy(static_cast<BrowserThread::ID>(i));
+ }
+ }
+
+ scoped_refptr<base::MessageLoopProxy> proxies[BrowserThread::ID_COUNT];
+};
+
+base::LazyInstance<BrowserThreadProxies>::Leaky
+ g_proxies = LAZY_INSTANCE_INITIALIZER;
+
struct BrowserThreadGlobals {
BrowserThreadGlobals()
: blocking_pool(new base::SequencedWorkerPool(3, "BrowserBlocking")) {
@@ -274,41 +325,6 @@
return !!message_loop;
}
-// An implementation of MessageLoopProxy to be used in conjunction
-// with BrowserThread.
-class BrowserThreadMessageLoopProxy : public base::MessageLoopProxy {
- public:
- explicit BrowserThreadMessageLoopProxy(BrowserThread::ID identifier)
- : id_(identifier) {
- }
-
- // MessageLoopProxy implementation.
- virtual bool PostDelayedTask(
- const tracked_objects::Location& from_here,
- const base::Closure& task, base::TimeDelta delay) OVERRIDE {
- return BrowserThread::PostDelayedTask(id_, from_here, task, delay);
- }
-
- virtual bool PostNonNestableDelayedTask(
- const tracked_objects::Location& from_here,
- const base::Closure& task,
- base::TimeDelta delay) OVERRIDE {
- return BrowserThread::PostNonNestableDelayedTask(id_, from_here, task,
- delay);
- }
-
- virtual bool RunsTasksOnCurrentThread() const OVERRIDE {
- return BrowserThread::CurrentlyOn(id_);
- }
-
- protected:
- virtual ~BrowserThreadMessageLoopProxy() {}
-
- private:
- BrowserThread::ID id_;
- DISALLOW_COPY_AND_ASSIGN(BrowserThreadMessageLoopProxy);
-};
-
// static
bool BrowserThread::PostBlockingPoolTask(
const tracked_objects::Location& from_here,
@@ -477,7 +493,7 @@
// static
scoped_refptr<base::MessageLoopProxy>
BrowserThread::GetMessageLoopProxyForThread(ID identifier) {
- return make_scoped_refptr(new BrowserThreadMessageLoopProxy(identifier));
+ return g_proxies.Get().proxies[identifier];
}
// static
diff --git a/content/browser/browser_url_handler_impl.cc b/content/browser/browser_url_handler_impl.cc
index e67b517..1b7050f 100644
--- a/content/browser/browser_url_handler_impl.cc
+++ b/content/browser/browser_url_handler_impl.cc
@@ -50,7 +50,7 @@
}
if (!is_sub_scheme_allowed) {
- *url = GURL(kAboutBlankURL);
+ *url = GURL(url::kAboutBlankURL);
return false;
}
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc
index 3869c68..9ead67b 100644
--- a/content/browser/child_process_launcher.cc
+++ b/content/browser/child_process_launcher.cc
@@ -28,7 +28,9 @@
#include "content/common/sandbox_win.h"
#include "content/public/common/sandbox_init.h"
#elif defined(OS_MACOSX)
+#include "content/browser/bootstrap_sandbox_mac.h"
#include "content/browser/mach_broker_mac.h"
+#include "sandbox/mac/bootstrap_sandbox.h"
#elif defined(OS_ANDROID)
#include "base/android/jni_android.h"
#include "content/browser/android/child_process_launcher_android.h"
@@ -282,11 +284,25 @@
// Make sure the MachBroker is running, and inform it to expect a
// check-in from the new process.
broker->EnsureRunning();
+
+ const int bootstrap_sandbox_policy = delegate->GetSandboxType();
+ if (ShouldEnableBootstrapSandbox() &&
+ bootstrap_sandbox_policy != SANDBOX_TYPE_INVALID) {
+ GetBootstrapSandbox()->PrepareToForkWithPolicy(
+ bootstrap_sandbox_policy);
+ }
#endif // defined(OS_MACOSX)
bool launched = base::LaunchProcess(*cmd_line, options, &handle);
+ if (!launched)
+ handle = base::kNullProcessHandle;
#if defined(OS_MACOSX)
+ if (ShouldEnableBootstrapSandbox() &&
+ bootstrap_sandbox_policy != SANDBOX_TYPE_INVALID) {
+ GetBootstrapSandbox()->FinishedFork(handle);
+ }
+
if (launched)
broker->AddPlaceholderForPid(handle);
@@ -294,9 +310,6 @@
// messasge be processed on the broker's thread.
broker->GetLock().Release();
#endif // defined(OS_MACOSX)
-
- if (!launched)
- handle = base::kNullProcessHandle;
}
#endif // else defined(OS_POSIX)
#if !defined(OS_ANDROID)
diff --git a/content/browser/child_process_security_policy_impl.cc b/content/browser/child_process_security_policy_impl.cc
index 363bca3..68f4e81 100644
--- a/content/browser/child_process_security_policy_impl.cc
+++ b/content/browser/child_process_security_policy_impl.cc
@@ -316,7 +316,7 @@
RegisterWebSafeScheme(url::kFileSystemScheme);
// We know about the following pseudo schemes and treat them specially.
- RegisterPseudoScheme(kAboutScheme);
+ RegisterPseudoScheme(url::kAboutScheme);
RegisterPseudoScheme(url::kJavaScriptScheme);
RegisterPseudoScheme(kViewSourceScheme);
}
@@ -617,7 +617,7 @@
return CanRequestURL(child_id, child_url);
}
- if (LowerCaseEqualsASCII(url.spec(), kAboutBlankURL))
+ if (LowerCaseEqualsASCII(url.spec(), url::kAboutBlankURL))
return true; // Every child process can request <about:blank>.
// URLs like <about:memory> and <about:crash> shouldn't be requestable by
diff --git a/content/browser/child_process_security_policy_unittest.cc b/content/browser/child_process_security_policy_unittest.cc
index f25adfc..97c1889 100644
--- a/content/browser/child_process_security_policy_unittest.cc
+++ b/content/browser/child_process_security_policy_unittest.cc
@@ -138,7 +138,7 @@
ChildProcessSecurityPolicyImpl* p =
ChildProcessSecurityPolicyImpl::GetInstance();
- EXPECT_TRUE(p->IsPseudoScheme(kAboutScheme));
+ EXPECT_TRUE(p->IsPseudoScheme(url::kAboutScheme));
EXPECT_TRUE(p->IsPseudoScheme(url::kJavaScriptScheme));
EXPECT_TRUE(p->IsPseudoScheme(kViewSourceScheme));
diff --git a/content/browser/compositor/browser_compositor_output_surface.cc b/content/browser/compositor/browser_compositor_output_surface.cc
index b1cdd90..40576b2 100644
--- a/content/browser/compositor/browser_compositor_output_surface.cc
+++ b/content/browser/compositor/browser_compositor_output_surface.cc
@@ -70,6 +70,14 @@
return true;
}
+void BrowserCompositorOutputSurface::OnSwapBuffersComplete() {
+ // On Mac, delay acknowledging the swap to the output surface client until
+ // it has been drawn.
+#if !defined(OS_MACOSX)
+ cc::OutputSurface::OnSwapBuffersComplete();
+#endif
+}
+
void BrowserCompositorOutputSurface::OnUpdateVSyncParameters(
base::TimeTicks timebase,
base::TimeDelta interval) {
@@ -90,4 +98,10 @@
reflector_ = reflector;
}
+#if defined(OS_MACOSX)
+void BrowserCompositorOutputSurface::OnSurfaceDisplayed() {
+ cc::OutputSurface::OnSwapBuffersComplete();
+}
+#endif
+
} // namespace content
diff --git a/content/browser/compositor/browser_compositor_output_surface.h b/content/browser/compositor/browser_compositor_output_surface.h
index 5f9378d..e622f41 100644
--- a/content/browser/compositor/browser_compositor_output_surface.h
+++ b/content/browser/compositor/browser_compositor_output_surface.h
@@ -29,6 +29,7 @@
// cc::OutputSurface implementation.
virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE;
+ virtual void OnSwapBuffersComplete() OVERRIDE;
// ui::CompositorOutputSurface::Observer implementation.
virtual void OnUpdateVSyncParameters(base::TimeTicks timebase,
@@ -39,6 +40,10 @@
void SetReflector(ReflectorImpl* reflector);
+#if defined(OS_MACOSX)
+ void OnSurfaceDisplayed();
+#endif
+
protected:
// Constructor used by the accelerated implementation.
BrowserCompositorOutputSurface(
diff --git a/content/browser/compositor/browser_compositor_view_mac.h b/content/browser/compositor/browser_compositor_view_mac.h
index 3b061c2..5d22b87 100644
--- a/content/browser/compositor/browser_compositor_view_mac.h
+++ b/content/browser/compositor/browser_compositor_view_mac.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_VIEW_MAC_H_
#import <Cocoa/Cocoa.h>
+#include <IOSurface/IOSurfaceAPI.h>
#include "base/mac/scoped_nsobject.h"
#include "cc/output/software_frame_data.h"
@@ -17,17 +18,12 @@
namespace content {
class BrowserCompositorViewMacHelper;
-
-class BrowserCompositorViewMacClient {
- public:
- virtual void BrowserCompositorDidDrawFrame() = 0;
-};
-
} // namespace content
// Additions to the NSView interface for compositor frames.
@interface NSView (BrowserCompositorView)
-- (void)gotAcceleratedIOSurfaceFrame:(uint64)surface_handle
+- (void)gotAcceleratedIOSurfaceFrame:(IOSurfaceID)surface_handle
+ withOutputSurfaceID:(int)surface_id
withPixelSize:(gfx::Size)pixel_size
withScaleFactor:(float)scale_factor;
@@ -45,15 +41,14 @@
base::scoped_nsobject<CALayer> background_layer_;
base::scoped_nsobject<CompositingIOSurfaceLayer> accelerated_layer_;
+ int accelerated_layer_output_surface_id_;
base::scoped_nsobject<SoftwareLayer> software_layer_;
- content::BrowserCompositorViewMacClient* client_;
scoped_ptr<content::BrowserCompositorViewMacHelper> helper_;
}
// Initialize to render the content of a specific superview.
-- (id)initWithSuperview:(NSView*)view
- withClient:(content::BrowserCompositorViewMacClient*)client;
+- (id)initWithSuperview:(NSView*)view;
// Re-position the layers to the correct place when this view's superview
// changes size, or when the accelerated or software content changes.
diff --git a/content/browser/compositor/browser_compositor_view_mac.mm b/content/browser/compositor/browser_compositor_view_mac.mm
index 40b5064..0a89e69 100644
--- a/content/browser/compositor/browser_compositor_view_mac.mm
+++ b/content/browser/compositor/browser_compositor_view_mac.mm
@@ -6,6 +6,7 @@
#include "base/debug/trace_event.h"
#include "base/mac/scoped_cftyperef.h"
+#include "content/browser/compositor/gpu_process_transport_factory.h"
#include "content/browser/renderer_host/compositing_iosurface_context_mac.h"
#include "content/browser/renderer_host/compositing_iosurface_mac.h"
#include "content/browser/renderer_host/software_layer_mac.h"
@@ -47,7 +48,8 @@
// compositing should never be called. Log an error if they are.
@implementation NSView (BrowserCompositorView)
-- (void)gotAcceleratedIOSurfaceFrame:(uint64)surface_handle
+- (void)gotAcceleratedIOSurfaceFrame:(IOSurfaceID)surface_handle
+ withOutputSurfaceID:(int)surface_id
withPixelSize:(gfx::Size)pixel_size
withScaleFactor:(float)scale_factor {
DLOG(ERROR) << "-[NSView gotAcceleratedIOSurfaceFrame] called on "
@@ -64,10 +66,9 @@
@implementation BrowserCompositorViewMac : NSView
-- (id)initWithSuperview:(NSView*)view
- withClient:(content::BrowserCompositorViewMacClient*)client {
+- (id)initWithSuperview:(NSView*)view {
if (self = [super init]) {
- client_ = client;
+ accelerated_layer_output_surface_id_ = 0;
helper_.reset(new content::BrowserCompositorViewMacHelper(self));
// Disable the fade-in animation as the layer and view are added.
@@ -141,16 +142,19 @@
- (void)resetClient {
[accelerated_layer_ resetClient];
- client_ = NULL;
}
- (ui::Compositor*)compositor {
return compositor_.get();
}
-- (void)gotAcceleratedIOSurfaceFrame:(uint64)surface_handle
+- (void)gotAcceleratedIOSurfaceFrame:(IOSurfaceID)surface_handle
+ withOutputSurfaceID:(int)surface_id
withPixelSize:(gfx::Size)pixel_size
withScaleFactor:(float)scale_factor {
+ DCHECK(!accelerated_layer_output_surface_id_);
+ accelerated_layer_output_surface_id_ = surface_id;
+
ScopedCAActionDisabler disabler;
// If there is already an accelerated layer, but it has the wrong scale
@@ -241,8 +245,12 @@
}
- (void)layerDidDrawFrame {
- if (client_)
- client_->BrowserCompositorDidDrawFrame();
+ if (!accelerated_layer_output_surface_id_)
+ return;
+
+ content::ImageTransportFactory::GetInstance()->OnSurfaceDisplayed(
+ accelerated_layer_output_surface_id_);
+ accelerated_layer_output_surface_id_ = 0;
}
@end // BrowserCompositorViewMac
diff --git a/content/browser/compositor/delegated_frame_host.cc b/content/browser/compositor/delegated_frame_host.cc
index f0d000d..5db69b7 100644
--- a/content/browser/compositor/delegated_frame_host.cc
+++ b/content/browser/compositor/delegated_frame_host.cc
@@ -124,18 +124,14 @@
// Only ARGB888 and RGB565 supported as of now.
bool format_support = ((config == SkBitmap::kRGB_565_Config) ||
(config == SkBitmap::kARGB_8888_Config));
- if (!format_support) {
- DCHECK(format_support);
- callback.Run(false, SkBitmap());
- return;
- }
+ DCHECK(format_support);
if (!CanCopyToBitmap()) {
callback.Run(false, SkBitmap());
return;
}
- const gfx::Size& dst_size_in_pixel = client_->ConvertViewSizeToPixel(
- dst_size);
+ const gfx::Size& dst_size_in_pixel =
+ client_->ConvertViewSizeToPixel(dst_size);
scoped_ptr<cc::CopyOutputRequest> request =
cc::CopyOutputRequest::CreateRequest(base::Bind(
&DelegatedFrameHost::CopyFromCompositingSurfaceHasResult,
@@ -167,8 +163,6 @@
ImageTransportFactory::GetInstance()->GetGLHelper()) {
subscriber_texture = new OwnedMailbox(helper);
}
- if (subscriber_texture.get())
- active_frame_subscriber_textures_.insert(subscriber_texture.get());
}
scoped_ptr<cc::CopyOutputRequest> request =
@@ -275,7 +269,7 @@
float frame_device_scale_factor,
const std::vector<ui::LatencyInfo>& latency_info) {
RenderWidgetHostImpl* host = client_->GetHost();
- DCHECK_NE(0u, frame_data->render_pass_list.size());
+ DCHECK(!frame_data->render_pass_list.empty());
cc::RenderPass* root_pass = frame_data->render_pass_list.back();
@@ -336,7 +330,7 @@
last_output_surface_id_ = output_surface_id;
}
if (frame_size.IsEmpty()) {
- DCHECK_EQ(0u, frame_data->resource_list.size());
+ DCHECK(frame_data->resource_list.empty());
EvictDelegatedFrame();
} else {
if (!resource_collection_) {
@@ -504,8 +498,6 @@
scoped_ptr<cc::SingleReleaseCallback> release_callback;
result->TakeTexture(&texture_mailbox, &release_callback);
DCHECK(texture_mailbox.IsTexture());
- if (!texture_mailbox.IsTexture())
- return;
ignore_result(scoped_callback_runner.Release());
@@ -537,16 +529,8 @@
return;
}
DCHECK(result->HasBitmap());
- base::ScopedClosureRunner scoped_callback_runner(
- base::Bind(callback, false, SkBitmap()));
-
scoped_ptr<SkBitmap> source = result->TakeBitmap();
DCHECK(source);
- if (!source)
- return;
-
- ignore_result(scoped_callback_runner.Release());
-
SkBitmap bitmap = skia::ImageOperations::Resize(
*source,
skia::ImageOperations::RESIZE_BEST,
@@ -564,13 +548,9 @@
return;
if (!dfh)
return;
- DCHECK_NE(
- dfh->active_frame_subscriber_textures_.count(subscriber_texture.get()),
- 0u);
subscriber_texture->UpdateSyncPoint(sync_point);
- dfh->active_frame_subscriber_textures_.erase(subscriber_texture.get());
if (dfh->frame_subscriber_ && subscriber_texture->texture_id())
dfh->idle_frame_subscriber_textures_.push_back(subscriber_texture);
}
@@ -673,8 +653,6 @@
scoped_ptr<cc::SingleReleaseCallback> release_callback;
result->TakeTexture(&texture_mailbox, &release_callback);
DCHECK(texture_mailbox.IsTexture());
- if (!texture_mailbox.IsTexture())
- return;
gfx::Rect result_rect(result->size());
@@ -751,7 +729,6 @@
void DelegatedFrameHost::OnCompositingStarted(
ui::Compositor* compositor, base::TimeTicks start_time) {
last_draw_ended_ = start_time;
- client_->DelegatedCompositorDidSwapBuffers();
}
void DelegatedFrameHost::OnCompositingEnded(
@@ -759,7 +736,6 @@
}
void DelegatedFrameHost::OnCompositingAborted(ui::Compositor* compositor) {
- client_->DelegatedCompositorAbortedSwapBuffers();
}
void DelegatedFrameHost::OnCompositingLockStateChanged(
@@ -801,15 +777,6 @@
if (resource_collection_.get())
resource_collection_->SetClient(NULL);
- // An OwnedMailbox should not refer to the GLHelper anymore once the DFH is
- // destroyed, as it may then outlive the GLHelper.
- for (std::set<OwnedMailbox*>::iterator it =
- active_frame_subscriber_textures_.begin();
- it != active_frame_subscriber_textures_.end();
- ++it) {
- (*it)->Destroy();
- }
- active_frame_subscriber_textures_.clear();
DCHECK(!vsync_manager_);
}
diff --git a/content/browser/compositor/delegated_frame_host.h b/content/browser/compositor/delegated_frame_host.h
index 7e98fe8..bcbc758 100644
--- a/content/browser/compositor/delegated_frame_host.h
+++ b/content/browser/compositor/delegated_frame_host.h
@@ -42,8 +42,6 @@
virtual ui::Layer* GetLayer() = 0;
virtual RenderWidgetHostImpl* GetHost() = 0;
virtual void SchedulePaintInRect(const gfx::Rect& damage_rect_in_dip) = 0;
- virtual void DelegatedCompositorDidSwapBuffers() = 0;
- virtual void DelegatedCompositorAbortedSwapBuffers() = 0;
virtual bool IsVisible() = 0;
virtual scoped_ptr<ResizeLock> CreateResizeLock(
bool defer_compositor_lock) = 0;
@@ -274,7 +272,6 @@
// Subscriber that listens to frame presentation events.
scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_;
std::vector<scoped_refptr<OwnedMailbox> > idle_frame_subscriber_textures_;
- std::set<OwnedMailbox*> active_frame_subscriber_textures_;
// YUV readback pipeline.
scoped_ptr<content::ReadbackYUVInterface>
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index 1f8b3c0..d268b94 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -274,6 +274,12 @@
// on the |gl_helper_| variable directly. So instead we call reset() on a
// local scoped_ptr.
scoped_ptr<GLHelper> helper = gl_helper_.Pass();
+
+ // If there are any observer left at this point, make sure they clean up
+ // before we destroy the GLHelper.
+ FOR_EACH_OBSERVER(
+ ImageTransportFactoryObserver, observer_list_, OnLostResources());
+
helper.reset();
DCHECK(!gl_helper_) << "Destroying the GLHelper should not cause a new "
"GLHelper to be created.";
@@ -325,6 +331,15 @@
observer_list_.RemoveObserver(observer);
}
+#if defined(OS_MACOSX)
+void GpuProcessTransportFactory::OnSurfaceDisplayed(int surface_id) {
+ BrowserCompositorOutputSurface* surface = output_surface_map_.Lookup(
+ surface_id);
+ if (surface)
+ surface->OnSurfaceDisplayed();
+}
+#endif
+
scoped_refptr<cc::ContextProvider>
GpuProcessTransportFactory::SharedMainThreadContextProvider() {
if (shared_main_thread_contexts_.get())
diff --git a/content/browser/compositor/gpu_process_transport_factory.h b/content/browser/compositor/gpu_process_transport_factory.h
index 0263896..b9c1bee1 100644
--- a/content/browser/compositor/gpu_process_transport_factory.h
+++ b/content/browser/compositor/gpu_process_transport_factory.h
@@ -64,6 +64,9 @@
virtual void AddObserver(ImageTransportFactoryObserver* observer) OVERRIDE;
virtual void RemoveObserver(
ImageTransportFactoryObserver* observer) OVERRIDE;
+#if defined(OS_MACOSX)
+ virtual void OnSurfaceDisplayed(int surface_id) OVERRIDE;
+#endif
private:
struct PerCompositorData;
diff --git a/content/browser/compositor/image_transport_factory.h b/content/browser/compositor/image_transport_factory.h
index 2a421bb..f53c4a7 100644
--- a/content/browser/compositor/image_transport_factory.h
+++ b/content/browser/compositor/image_transport_factory.h
@@ -76,6 +76,10 @@
virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0;
virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0;
+
+#if defined(OS_MACOSX)
+ virtual void OnSurfaceDisplayed(int surface_id) = 0;
+#endif
};
} // namespace content
diff --git a/content/browser/compositor/image_transport_factory_browsertest.cc b/content/browser/compositor/image_transport_factory_browsertest.cc
index d53b1d7..61f1bbf 100644
--- a/content/browser/compositor/image_transport_factory_browsertest.cc
+++ b/content/browser/compositor/image_transport_factory_browsertest.cc
@@ -68,5 +68,43 @@
factory->RemoveObserver(&observer);
}
+class ImageTransportFactoryTearDownBrowserTest : public ContentBrowserTest {
+ public:
+ ImageTransportFactoryTearDownBrowserTest() {}
+
+ virtual void TearDown() {
+ if (mailbox_)
+ EXPECT_TRUE(mailbox_->mailbox().IsZero());
+ ContentBrowserTest::TearDown();
+ }
+
+ protected:
+ scoped_refptr<OwnedMailbox> mailbox_;
+};
+
+// This crashes on Mac. ImageTransportFactory is NULL unless
+// --enable-delegated-renderer is passed, and after that, we'd need to spawn a
+// renderer and get a frame before we create a browser compositor, necessary for
+// the GLHelper to not be NULL.
+// http://crbug.com/335083
+#if defined(OS_MACOSX)
+#define MAYBE_LoseOnTearDown DISABLED_LoseOnTearDown
+#else
+#define MAYBE_LoseOnTearDown LoseOnTearDown
+#endif
+// Checks that upon destruction of the ImageTransportFactory, the observer is
+// called and the created resources are reset.
+IN_PROC_BROWSER_TEST_F(ImageTransportFactoryTearDownBrowserTest,
+ MAYBE_LoseOnTearDown) {
+ // This test doesn't make sense in software compositing mode.
+ if (!GpuDataManager::GetInstance()->CanUseGpuBrowserCompositor())
+ return;
+ ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
+ GLHelper* helper = factory->GetGLHelper();
+ ASSERT_TRUE(helper);
+ mailbox_ = new OwnedMailbox(helper);
+ EXPECT_FALSE(mailbox_->mailbox().IsZero());
+}
+
} // anonymous namespace
} // namespace content
diff --git a/content/browser/compositor/no_transport_image_transport_factory.cc b/content/browser/compositor/no_transport_image_transport_factory.cc
index c6ef3f8..03289c0 100644
--- a/content/browser/compositor/no_transport_image_transport_factory.cc
+++ b/content/browser/compositor/no_transport_image_transport_factory.cc
@@ -15,7 +15,12 @@
scoped_ptr<ui::ContextFactory> context_factory)
: context_factory_(context_factory.Pass()) {}
-NoTransportImageTransportFactory::~NoTransportImageTransportFactory() {}
+NoTransportImageTransportFactory::~NoTransportImageTransportFactory() {
+ scoped_ptr<GLHelper> lost_gl_helper = gl_helper_.Pass();
+ FOR_EACH_OBSERVER(ImageTransportFactoryObserver,
+ observer_list_,
+ OnLostResources());
+}
ui::ContextFactory* NoTransportImageTransportFactory::GetContextFactory() {
return context_factory_.get();
@@ -35,12 +40,14 @@
return gl_helper_.get();
}
-// We don't generate lost context events, so we don't need to keep track of
-// observers
void NoTransportImageTransportFactory::AddObserver(
- ImageTransportFactoryObserver* observer) {}
+ ImageTransportFactoryObserver* observer) {
+ observer_list_.AddObserver(observer);
+}
void NoTransportImageTransportFactory::RemoveObserver(
- ImageTransportFactoryObserver* observer) {}
+ ImageTransportFactoryObserver* observer) {
+ observer_list_.RemoveObserver(observer);
+}
} // namespace content
diff --git a/content/browser/compositor/no_transport_image_transport_factory.h b/content/browser/compositor/no_transport_image_transport_factory.h
index 1111cd1..fd5f6bf 100644
--- a/content/browser/compositor/no_transport_image_transport_factory.h
+++ b/content/browser/compositor/no_transport_image_transport_factory.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_COMPOSITOR_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_
#include "base/memory/scoped_ptr.h"
+#include "base/observer_list.h"
#include "content/browser/compositor/image_transport_factory.h"
namespace cc {
@@ -27,11 +28,15 @@
virtual GLHelper* GetGLHelper() OVERRIDE;
virtual void AddObserver(ImageTransportFactoryObserver* observer) OVERRIDE;
virtual void RemoveObserver(ImageTransportFactoryObserver* observer) OVERRIDE;
+#if defined(OS_MACOSX)
+ virtual void OnSurfaceDisplayed(int surface_id) OVERRIDE {}
+#endif
private:
scoped_ptr<ui::ContextFactory> context_factory_;
scoped_refptr<cc::ContextProvider> context_provider_;
scoped_ptr<GLHelper> gl_helper_;
+ ObserverList<ImageTransportFactoryObserver> observer_list_;
DISALLOW_COPY_AND_ASSIGN(NoTransportImageTransportFactory);
};
diff --git a/content/browser/compositor/surface_display_output_surface.cc b/content/browser/compositor/surface_display_output_surface.cc
index dae3542..46c4ad7 100644
--- a/content/browser/compositor/surface_display_output_surface.cc
+++ b/content/browser/compositor/surface_display_output_surface.cc
@@ -30,8 +30,8 @@
gfx::Size frame_size =
frame->delegated_frame_data->render_pass_list.back()->output_rect.size();
display_->Resize(frame_size);
- int surface_id = display_->CurrentSurfaceID();
- cc::Surface* surface = surface_manager_->GetSurfaceForID(surface_id);
+ cc::SurfaceId surface_id = display_->CurrentSurfaceId();
+ cc::Surface* surface = surface_manager_->GetSurfaceForId(surface_id);
if (!surface)
return;
diff --git a/content/browser/database_util_unittest.cc b/content/browser/database_util_unittest.cc
index 4b11a18..23f0a47 100644
--- a/content/browser/database_util_unittest.cc
+++ b/content/browser/database_util_unittest.cc
@@ -44,14 +44,17 @@
// Test DatabaseUtil::CrackVfsFilePath on various inputs.
TEST(DatabaseUtilTest, CrackVfsFilePathTest) {
- TestVfsFilePath(true, "origin/#", "origin", "", "");
- TestVfsFilePath(true, "origin/#suffix", "origin", "", "suffix");
- TestVfsFilePath(true, "origin/db_name#", "origin", "db_name", "");
- TestVfsFilePath(true, "origin/db_name#suffix", "origin", "db_name", "suffix");
- TestVfsFilePath(false, "origindb_name#");
- TestVfsFilePath(false, "origindb_name#suffix");
- TestVfsFilePath(false, "origin/db_name");
- TestVfsFilePath(false, "origin#db_name/suffix");
+ TestVfsFilePath(true, "http_origin_0/#", "http_origin_0", "", "");
+ TestVfsFilePath(true,
+ "http_origin_0/#suffix", "http_origin_0", "", "suffix");
+ TestVfsFilePath(true,
+ "http_origin_0/db_name#", "http_origin_0", "db_name", "");
+ TestVfsFilePath(true,
+ "http_origin_0/db_name#suffix", "http_origin_0", "db_name", "suffix");
+ TestVfsFilePath(false, "http_origin_0db_name#");
+ TestVfsFilePath(false, "http_origin_0db_name#suffix");
+ TestVfsFilePath(false, "http_origin_0/db_name");
+ TestVfsFilePath(false, "http_origin_0#db_name/suffix");
TestVfsFilePath(false, "/db_name#");
TestVfsFilePath(false, "/db_name#suffix");
}
@@ -65,10 +68,11 @@
TEST(DatabaseUtilTest, IsValidOriginIdentifier) {
TestValidOriginIdentifier(true, "http_bar_0");
- TestValidOriginIdentifier(true, "");
+ TestValidOriginIdentifier(false, "");
TestValidOriginIdentifier(false, "bad..id");
TestValidOriginIdentifier(false, "bad/id");
TestValidOriginIdentifier(false, "bad\\id");
+ TestValidOriginIdentifier(false, "http_bad:0_2");
TestValidOriginIdentifier(false, std::string("bad\0id", 6));
}
diff --git a/content/browser/devtools/devtools_http_handler_impl.cc b/content/browser/devtools/devtools_http_handler_impl.cc
index 113c2e5..bd1be4b 100644
--- a/content/browser/devtools/devtools_http_handler_impl.cc
+++ b/content/browser/devtools/devtools_http_handler_impl.cc
@@ -5,7 +5,6 @@
#include "content/browser/devtools/devtools_http_handler_impl.h"
#include <algorithm>
-#include <sstream>
#include <utility>
#include "base/bind.h"
@@ -15,6 +14,7 @@
#include "base/logging.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/stl_util.h"
+#include "base/strings/string_number_conversions.h"
#include "base/threading/thread.h"
#include "base/values.h"
#include "content/browser/devtools/devtools_browser_target.h"
@@ -486,7 +486,7 @@
GURL url(net::UnescapeURLComponent(
query, net::UnescapeRule::URL_SPECIAL_CHARS));
if (!url.is_valid())
- url = GURL(kAboutBlankURL);
+ url = GURL(url::kAboutBlankURL);
scoped_ptr<DevToolsTarget> target(delegate_->CreateNewTarget(url));
if (!target) {
SendJson(connection_id,
@@ -699,10 +699,8 @@
// so Telemetry can pick it up.
base::FilePath path = active_port_output_directory_.Append(
kDevToolsActivePortFileName);
- std::stringstream port_stream;
- port_stream << endpoint.port();
- std::string s = port_stream.str();
- if (base::WriteFile(path, s.c_str(), s.length()) < 0) {
+ std::string port_string = base::IntToString(endpoint.port());
+ if (base::WriteFile(path, port_string.c_str(), port_string.length()) < 0) {
LOG(ERROR) << "Error writing DevTools active port to file";
}
}
diff --git a/content/browser/devtools/devtools_http_handler_unittest.cc b/content/browser/devtools/devtools_http_handler_unittest.cc
index 77e9361..8871092 100644
--- a/content/browser/devtools/devtools_http_handler_unittest.cc
+++ b/content/browser/devtools/devtools_http_handler_unittest.cc
@@ -2,18 +2,27 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/file_util.h"
+#include "base/files/scoped_temp_dir.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
+#include "base/strings/string_number_conversions.h"
#include "content/browser/browser_thread_impl.h"
#include "content/public/browser/devtools_http_handler.h"
#include "content/public/browser/devtools_http_handler_delegate.h"
#include "content/public/browser/devtools_target.h"
+#include "net/base/ip_endpoint.h"
+#include "net/base/net_errors.h"
#include "net/socket/stream_listen_socket.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
namespace {
+const int kDummyPort = 4321;
+const base::FilePath::CharType kDevToolsActivePortFileName[] =
+ FILE_PATH_LITERAL("DevToolsActivePort");
+
using net::StreamListenSocket;
class DummyListenSocket : public StreamListenSocket,
@@ -32,6 +41,12 @@
protected:
virtual ~DummyListenSocket() {}
virtual void Accept() OVERRIDE {}
+ virtual int GetLocalAddress(net::IPEndPoint* address) OVERRIDE {
+ net::IPAddressNumber number;
+ EXPECT_TRUE(net::ParseIPLiteralToNumber("127.0.0.1", &number));
+ *address = net::IPEndPoint(number, kDummyPort);
+ return net::OK;
+ }
};
class DummyListenSocketFactory : public net::StreamListenSocketFactory {
@@ -116,4 +131,34 @@
run_loop_2.Run();
}
+TEST_F(DevToolsHttpHandlerTest, TestDevToolsActivePort) {
+ base::RunLoop run_loop, run_loop_2;
+ base::ScopedTempDir temp_dir;
+ EXPECT_TRUE(temp_dir.CreateUniqueTempDir());
+ content::DevToolsHttpHandler* devtools_http_handler_ =
+ content::DevToolsHttpHandler::Start(
+ new DummyListenSocketFactory(run_loop.QuitClosure(),
+ run_loop_2.QuitClosure()),
+ std::string(),
+ new DummyDelegate(),
+ temp_dir.path());
+ // Our dummy socket factory will post a quit message once the server will
+ // become ready.
+ run_loop.Run();
+ devtools_http_handler_->Stop();
+ // Make sure the handler actually stops.
+ run_loop_2.Run();
+
+ // Now make sure the DevToolsActivePort was written into the
+ // temporary directory and its contents are as expected.
+ base::FilePath active_port_file = temp_dir.path().Append(
+ kDevToolsActivePortFileName);
+ EXPECT_TRUE(base::PathExists(active_port_file));
+ std::string file_contents;
+ EXPECT_TRUE(base::ReadFileToString(active_port_file, &file_contents));
+ int port = 0;
+ EXPECT_TRUE(base::StringToInt(file_contents, &port));
+ EXPECT_EQ(kDummyPort, port);
+}
+
} // namespace content
diff --git a/content/browser/devtools/ipc_devtools_agent_host.cc b/content/browser/devtools/ipc_devtools_agent_host.cc
index c7cd3c3..294a679 100644
--- a/content/browser/devtools/ipc_devtools_agent_host.cc
+++ b/content/browser/devtools/ipc_devtools_agent_host.cc
@@ -9,7 +9,7 @@
namespace content {
void IPCDevToolsAgentHost::Attach() {
- SendMessageToAgent(new DevToolsAgentMsg_Attach(MSG_ROUTING_NONE));
+ SendMessageToAgent(new DevToolsAgentMsg_Attach(MSG_ROUTING_NONE, GetId()));
OnClientAttached();
}
@@ -26,7 +26,7 @@
void IPCDevToolsAgentHost::InspectElement(int x, int y) {
SendMessageToAgent(new DevToolsAgentMsg_InspectElement(MSG_ROUTING_NONE,
- x, y));
+ GetId(), x, y));
}
IPCDevToolsAgentHost::~IPCDevToolsAgentHost() {
@@ -34,8 +34,7 @@
void IPCDevToolsAgentHost::Reattach(const std::string& saved_agent_state) {
SendMessageToAgent(new DevToolsAgentMsg_Reattach(
- MSG_ROUTING_NONE,
- saved_agent_state));
+ MSG_ROUTING_NONE, GetId(), saved_agent_state));
OnClientAttached();
}
diff --git a/content/browser/devtools/render_view_devtools_agent_host.cc b/content/browser/devtools/render_view_devtools_agent_host.cc
index 7d948d6..2dda237 100644
--- a/content/browser/devtools/render_view_devtools_agent_host.cc
+++ b/content/browser/devtools/render_view_devtools_agent_host.cc
@@ -166,7 +166,8 @@
overrides_handler_(new RendererOverridesHandler(this)),
tracing_handler_(
new DevToolsTracingHandler(DevToolsTracingHandler::Renderer)),
- power_handler_(new DevToolsPowerHandler()) {
+ power_handler_(new DevToolsPowerHandler()),
+ reattaching_(false) {
SetRenderViewHost(rvh);
DevToolsProtocol::Notifier notifier(base::Bind(
&RenderViewDevToolsAgentHost::OnDispatchOnInspectorFrontend,
@@ -230,12 +231,17 @@
if (!render_view_host_)
return;
- ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadRawCookies(
- render_view_host_->GetProcess()->GetID());
+ InnerOnClientAttached();
// TODO(kaznacheev): Move this call back to DevToolsManagerImpl when
// extensions::ProcessManager no longer relies on this notification.
- DevToolsManagerImpl::GetInstance()->NotifyObservers(this, true);
+ if (!reattaching_)
+ DevToolsManagerImpl::GetInstance()->NotifyObservers(this, true);
+}
+
+void RenderViewDevToolsAgentHost::InnerOnClientAttached() {
+ ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadRawCookies(
+ render_view_host_->GetProcess()->GetID());
#if defined(OS_ANDROID)
power_save_blocker_.reset(
@@ -262,6 +268,15 @@
if (!render_view_host_)
return;
+ InnerClientDetachedFromRenderer();
+
+ // TODO(kaznacheev): Move this call back to DevToolsManagerImpl when
+ // extensions::ProcessManager no longer relies on this notification.
+ if (!reattaching_)
+ DevToolsManagerImpl::GetInstance()->NotifyObservers(this, false);
+}
+
+void RenderViewDevToolsAgentHost::InnerClientDetachedFromRenderer() {
bool process_has_agents = false;
RenderProcessHost* render_process_host = render_view_host_->GetProcess();
for (Instances::iterator it = g_instances.Get().begin();
@@ -278,10 +293,6 @@
ChildProcessSecurityPolicyImpl::GetInstance()->RevokeReadRawCookies(
render_process_host->GetID());
}
-
- // TODO(kaznacheev): Move this call back to DevToolsManagerImpl when
- // extensions::ProcessManager no longer relies on this notification.
- DevToolsManagerImpl::GetInstance()->NotifyObservers(this, false);
}
RenderViewDevToolsAgentHost::~RenderViewDevToolsAgentHost() {
@@ -301,8 +312,7 @@
render_view_host_)->render_view_termination_status() ==
base::TERMINATION_STATUS_STILL_RUNNING)
return;
- DisconnectRenderViewHost();
- ConnectRenderViewHost(dest_rvh);
+ ReattachToRenderViewHost(dest_rvh);
}
void RenderViewDevToolsAgentHost::RenderViewHostChanged(
@@ -311,11 +321,19 @@
if (new_host != render_view_host_) {
// AboutToNavigateRenderView was not called for renderer-initiated
// navigation.
- DisconnectRenderViewHost();
- ConnectRenderViewHost(new_host);
+ ReattachToRenderViewHost(new_host);
}
}
+void
+RenderViewDevToolsAgentHost::ReattachToRenderViewHost(RenderViewHost* rvh) {
+ DCHECK(!reattaching_);
+ reattaching_ = true;
+ DisconnectRenderViewHost();
+ ConnectRenderViewHost(rvh);
+ reattaching_ = false;
+}
+
void RenderViewDevToolsAgentHost::RenderViewDeleted(RenderViewHost* rvh) {
if (rvh != render_view_host_)
return;
diff --git a/content/browser/devtools/render_view_devtools_agent_host.h b/content/browser/devtools/render_view_devtools_agent_host.h
index 28e041b..f4e9baf 100644
--- a/content/browser/devtools/render_view_devtools_agent_host.h
+++ b/content/browser/devtools/render_view_devtools_agent_host.h
@@ -78,6 +78,8 @@
const NotificationSource& source,
const NotificationDetails& details) OVERRIDE;
+ void ReattachToRenderViewHost(RenderViewHost* rvh);
+
bool DispatchIPCMessage(const IPC::Message& message);
void SetRenderViewHost(RenderViewHost* rvh);
@@ -91,6 +93,9 @@
void ClientDetachedFromRenderer();
+ void InnerOnClientAttached();
+ void InnerClientDetachedFromRenderer();
+
RenderViewHost* render_view_host_;
scoped_ptr<RendererOverridesHandler> overrides_handler_;
scoped_ptr<DevToolsTracingHandler> tracing_handler_;
@@ -100,6 +105,7 @@
#endif
std::string state_;
NotificationRegistrar registrar_;
+ bool reattaching_;
DISALLOW_COPY_AND_ASSIGN(RenderViewDevToolsAgentHost);
};
diff --git a/content/browser/dom_storage/dom_storage_message_filter.cc b/content/browser/dom_storage/dom_storage_message_filter.cc
index 1ed4dd8..91d72d3 100644
--- a/content/browser/dom_storage/dom_storage_message_filter.cc
+++ b/content/browser/dom_storage/dom_storage_message_filter.cc
@@ -47,7 +47,7 @@
host_.reset();
}
-void DOMStorageMessageFilter::OnFilterAdded(IPC::Channel* channel) {
+void DOMStorageMessageFilter::OnFilterAdded(IPC::Sender* sender) {
context_->task_runner()->PostShutdownBlockingTask(
FROM_HERE,
DOMStorageTaskRunner::PRIMARY_SEQUENCE,
diff --git a/content/browser/dom_storage/dom_storage_message_filter.h b/content/browser/dom_storage/dom_storage_message_filter.h
index dc63c1c..346a8ff 100644
--- a/content/browser/dom_storage/dom_storage_message_filter.h
+++ b/content/browser/dom_storage/dom_storage_message_filter.h
@@ -40,7 +40,7 @@
void UninitializeInSequence();
// BrowserMessageFilter implementation
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
virtual base::TaskRunner* OverrideTaskRunnerForMessage(
const IPC::Message& message) OVERRIDE;
diff --git a/content/browser/download/download_item_factory.h b/content/browser/download/download_item_factory.h
index c5e03f5..d4198cb 100644
--- a/content/browser/download/download_item_factory.h
+++ b/content/browser/download/download_item_factory.h
@@ -44,6 +44,8 @@
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const std::string& mime_type,
+ const std::string& original_mime_type,
const base::Time& start_time,
const base::Time& end_time,
const std::string& etag,
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
index 0fbd270..433ac78 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -113,6 +113,8 @@
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const std::string& mime_type,
+ const std::string& original_mime_type,
const base::Time& start_time,
const base::Time& end_time,
const std::string& etag,
@@ -133,6 +135,8 @@
referrer_url_(referrer_url),
transition_type_(PAGE_TRANSITION_LINK),
has_user_gesture_(false),
+ mime_type_(mime_type),
+ original_mime_type_(original_mime_type),
total_bytes_(total_bytes),
received_bytes_(received_bytes),
bytes_per_sec_(0),
diff --git a/content/browser/download/download_item_impl.h b/content/browser/download/download_item_impl.h
index e660262..34916ff 100644
--- a/content/browser/download/download_item_impl.h
+++ b/content/browser/download/download_item_impl.h
@@ -56,6 +56,8 @@
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const std::string& mime_type,
+ const std::string& original_mime_type,
const base::Time& start_time,
const base::Time& end_time,
const std::string& etag,
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index 4619807..2bd747d 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -169,6 +169,8 @@
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const std::string& mime_type,
+ const std::string& original_mime_type,
const base::Time& start_time,
const base::Time& end_time,
const std::string& etag,
@@ -187,6 +189,8 @@
target_path,
url_chain,
referrer_url,
+ mime_type,
+ original_mime_type,
start_time,
end_time,
etag,
@@ -619,6 +623,8 @@
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const std::string& mime_type,
+ const std::string& original_mime_type,
const base::Time& start_time,
const base::Time& end_time,
const std::string& etag,
@@ -640,6 +646,8 @@
target_path,
url_chain,
referrer_url,
+ mime_type,
+ original_mime_type,
start_time,
end_time,
etag,
diff --git a/content/browser/download/download_manager_impl.h b/content/browser/download/download_manager_impl.h
index 6381417..630c832 100644
--- a/content/browser/download/download_manager_impl.h
+++ b/content/browser/download/download_manager_impl.h
@@ -7,6 +7,7 @@
#include <map>
#include <set>
+#include <string>
#include "base/containers/hash_tables.h"
#include "base/memory/ref_counted.h"
@@ -78,6 +79,8 @@
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const std::string& mime_type,
+ const std::string& original_mime_type,
const base::Time& start_time,
const base::Time& end_time,
const std::string& etag,
diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc
index 091a7f8..66430b4 100644
--- a/content/browser/download/download_manager_impl_unittest.cc
+++ b/content/browser/download/download_manager_impl_unittest.cc
@@ -76,6 +76,8 @@
base::FilePath(),
std::vector<GURL>(),
GURL(),
+ "application/octet-stream",
+ "application/octet-stream",
base::Time(),
base::Time(),
std::string(),
@@ -234,6 +236,8 @@
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const std::string& mime_type,
+ const std::string& original_mime_type,
const base::Time& start_time,
const base::Time& end_time,
const std::string& etag,
@@ -299,6 +303,8 @@
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const std::string& mime_type,
+ const std::string& original_mime_type,
const base::Time& start_time,
const base::Time& end_time,
const std::string& etag,
@@ -406,34 +412,11 @@
MOCK_METHOD2(GetMediaRequestContextForStoragePartition,
net::URLRequestContextGetter*(
const base::FilePath& partition_path, bool in_memory));
- MOCK_METHOD6(RequestMidiSysExPermission,
- void(int render_process_id,
- int render_view_id,
- int bridge_id,
- const GURL& requesting_frame,
- bool user_gesture,
- const MidiSysExPermissionCallback& callback));
- MOCK_METHOD4(CancelMidiSysExPermissionRequest,
- void(int render_process_id,
- int render_view_id,
- int bridge_id,
- const GURL& requesting_frame));
- MOCK_METHOD4(RequestProtectedMediaIdentifierPermission,
- void(int render_process_id,
- int render_view_id,
- const GURL& origin,
- const ProtectedMediaIdentifierPermissionCallback&
- callback));
- MOCK_METHOD3(CancelProtectedMediaIdentifierPermissionRequests,
- void(int render_process_id,
- int render_view_id,
- const GURL& origin));
MOCK_METHOD0(GetResourceContext, ResourceContext*());
MOCK_METHOD0(GetDownloadManagerDelegate, DownloadManagerDelegate*());
- MOCK_METHOD0(GetGeolocationPermissionContext,
- GeolocationPermissionContext* ());
MOCK_METHOD0(GetGuestManager, BrowserPluginGuestManager* ());
MOCK_METHOD0(GetSpecialStoragePolicy, quota::SpecialStoragePolicy*());
+ MOCK_METHOD0(GetPushMessagingService, PushMessagingService*());
};
class MockDownloadManagerObserver : public DownloadManager::Observer {
diff --git a/content/browser/fileapi/file_system_url_unittest.cc b/content/browser/fileapi/file_system_url_unittest.cc
index 2e1fb14..4aa23dd 100644
--- a/content/browser/fileapi/file_system_url_unittest.cc
+++ b/content/browser/fileapi/file_system_url_unittest.cc
@@ -173,6 +173,7 @@
"filesystem:http://chromium.org/isolated/directory/file2",
"filesystem:http://chromium.org/external/directory/file2",
"filesystem:http://chromium.org/test/directory/file3",
+ "filesystem:http://chromium.org/test/plus%2B/space%20/colon%3A",
};
for (size_t i = 0; i < arraysize(kTestURL); ++i) {
diff --git a/content/browser/frame_host/debug_urls.cc b/content/browser/frame_host/debug_urls.cc
index 0542f9e..733f899 100644
--- a/content/browser/frame_host/debug_urls.cc
+++ b/content/browser/frame_host/debug_urls.cc
@@ -6,6 +6,8 @@
#include <vector>
+#include "base/debug/asan_invalid_access.h"
+#include "base/debug/profiler.h"
#include "base/strings/utf_string_conversions.h"
#include "content/browser/gpu/gpu_process_host_ui_shim.h"
#include "content/browser/ppapi_plugin_process_host.h"
@@ -19,6 +21,16 @@
namespace {
+// Define the Asan debug URLs.
+const char kAsanCrashDomain[] = "crash";
+const char kAsanHeapOverflow[] = "/browser-heap-overflow";
+const char kAsanHeapUnderflow[] = "/browser-heap-underflow";
+const char kAsanUseAfterFree[] = "/browser-use-after-free";
+#if defined(SYZYASAN)
+const char kAsanCorruptHeapBlock[] = "/browser-corrupt-heap-block";
+const char kAsanCorruptHeap[] = "/browser-corrupt-heap";
+#endif
+
void HandlePpapiFlashDebugURL(const GURL& url) {
#if defined(ENABLE_PLUGINS)
bool crash = url == GURL(kChromeUIPpapiFlashCrashURL);
@@ -36,6 +48,61 @@
#endif
}
+bool IsAsanDebugURL(const GURL& url) {
+#if defined(SYZYASAN)
+ if (!base::debug::IsBinaryInstrumented())
+ return false;
+#endif
+
+ if (!(url.is_valid() && url.SchemeIs(kChromeUIScheme) &&
+ url.DomainIs(kAsanCrashDomain, sizeof(kAsanCrashDomain) - 1) &&
+ url.has_path())) {
+ return false;
+ }
+
+ if (url.path() == kAsanHeapOverflow || url.path() == kAsanHeapUnderflow ||
+ url.path() == kAsanUseAfterFree) {
+ return true;
+ }
+
+#if defined(SYZYASAN)
+ if (url.path() == kAsanCorruptHeapBlock || url.path() == kAsanCorruptHeap)
+ return true;
+#endif
+
+ return false;
+}
+
+bool HandleAsanDebugURL(const GURL& url) {
+#if defined(SYZYASAN)
+ if (!base::debug::IsBinaryInstrumented())
+ return false;
+
+ if (url.path() == kAsanCorruptHeapBlock) {
+ base::debug::AsanCorruptHeapBlock();
+ return true;
+ } else if (url.path() == kAsanCorruptHeap) {
+ base::debug::AsanCorruptHeap();
+ return true;
+ }
+#endif
+
+#if defined(ADDRESS_SANITIZER) || defined(SYZYASAN)
+ if (url.path() == kAsanHeapOverflow) {
+ base::debug::AsanHeapOverflow();
+ } else if (url.path() == kAsanHeapUnderflow) {
+ base::debug::AsanHeapUnderflow();
+ } else if (url.path() == kAsanUseAfterFree) {
+ base::debug::AsanHeapUseAfterFree();
+ } else {
+ return false;
+ }
+#endif
+
+ return true;
+}
+
+
} // namespace
bool HandleDebugURL(const GURL& url, PageTransition transition) {
@@ -46,6 +113,9 @@
// NOTE: when you add handling of any URLs to this function, also
// update IsDebugURL, below.
+ if (IsAsanDebugURL(url))
+ return HandleAsanDebugURL(url);
+
if (url.host() == kChromeUIBrowserCrashHost) {
// Induce an intentional crash in the browser process.
CHECK(false);
@@ -86,7 +156,7 @@
bool IsDebugURL(const GURL& url) {
// NOTE: when you add any URLs to this list, also update
// HandleDebugURL, above.
- return IsRendererDebugURL(url) ||
+ return IsRendererDebugURL(url) || IsAsanDebugURL(url) ||
(url.is_valid() &&
(url.host() == kChromeUIBrowserCrashHost ||
url == GURL(kChromeUIGpuCleanURL) ||
diff --git a/content/browser/frame_host/navigation_controller_impl_unittest.cc b/content/browser/frame_host/navigation_controller_impl_unittest.cc
index 6bb3d0e..956288c 100644
--- a/content/browser/frame_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc
@@ -541,7 +541,7 @@
GURL("data:text/html,dataurl"));
load_params.load_type = NavigationController::LOAD_TYPE_DATA;
load_params.base_url_for_data_url = GURL("http://foo");
- load_params.virtual_url_for_data_url = GURL(kAboutBlankURL);
+ load_params.virtual_url_for_data_url = GURL(url::kAboutBlankURL);
load_params.override_user_agent = NavigationController::UA_OVERRIDE_FALSE;
controller.LoadURLWithParams(load_params);
@@ -917,7 +917,7 @@
contents()->SetDelegate(delegate.get());
// Without any navigations, the renderer starts at about:blank.
- const GURL kExistingURL(kAboutBlankURL);
+ const GURL kExistingURL(url::kAboutBlankURL);
// Now make a pending new navigation.
const GURL kNewURL("http://eh");
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index ef1f3c1..a6b00f7 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -543,7 +543,7 @@
bool NavigatorImpl::ShouldAssignSiteForURL(const GURL& url) {
// about:blank should not "use up" a new SiteInstance. The SiteInstance can
// still be used for a normal web site.
- if (url == GURL(kAboutBlankURL))
+ if (url == GURL(url::kAboutBlankURL))
return false;
// The embedder will then have the opportunity to determine if the URL
@@ -596,7 +596,7 @@
GetSiteInstance();
if (!GetContentClient()->browser()->ShouldAllowOpenURL(
current_site_instance, url)) {
- dest_url = GURL(kAboutBlankURL);
+ dest_url = GURL(url::kAboutBlankURL);
}
int64 frame_tree_node_id = -1;
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index f883a45..a943460 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -321,6 +321,8 @@
OnShowDesktopNotification)
IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel,
OnCancelDesktopNotification)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_TextSurroundingSelectionResponse,
+ OnTextSurroundingSelectionResponse)
IPC_END_MESSAGE_MAP()
return handled;
@@ -457,7 +459,7 @@
// should be killed.
if (!CanCommitURL(validated_params.url)) {
VLOG(1) << "Blocked URL " << validated_params.url.spec();
- validated_params.url = GURL(kAboutBlankURL);
+ validated_params.url = GURL(url::kAboutBlankURL);
RecordAction(base::UserMetricsAction("CanCommitURL_BlockedAndKilled"));
// Kills the process.
process->ReceivedBadMessage();
@@ -698,6 +700,14 @@
cancel_notification_callbacks_.erase(notification_id);
}
+void RenderFrameHostImpl::OnTextSurroundingSelectionResponse(
+ const base::string16& content,
+ size_t start_offset,
+ size_t end_offset) {
+ render_view_host_->OnTextSurroundingSelectionResponse(
+ content, start_offset, end_offset);
+}
+
void RenderFrameHostImpl::OnDidAccessInitialDocument() {
delegate_->DidAccessInitialDocument();
}
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index ab32d9f..854a14f 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -227,6 +227,9 @@
int notification_id,
const ShowDesktopNotificationHostMsgParams& params);
void OnCancelDesktopNotification(int notification_id);
+ void OnTextSurroundingSelectionResponse(const base::string16& content,
+ size_t start_offset,
+ size_t end_offset);
void OnDidAccessInitialDocument();
void OnDidDisownOpener();
void OnUpdateTitle(int32 page_id,
diff --git a/content/browser/frame_host/render_frame_host_manager_browsertest.cc b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
index 5199ab4..ad2689e 100644
--- a/content/browser/frame_host/render_frame_host_manager_browsertest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
@@ -999,7 +999,7 @@
// renderer.
IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, MAYBE_BackForwardNotStale) {
StartServer();
- NavigateToURL(shell(), GURL(kAboutBlankURL));
+ NavigateToURL(shell(), GURL(url::kAboutBlankURL));
// Visit a page on first site.
NavigateToURL(shell(), test_server()->GetURL("files/title1.html"));
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc
index c68d0a7..d9e32c9 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc
@@ -145,11 +145,8 @@
NOTREACHED();
}
-void RenderWidgetHostViewChildFrame::TextInputTypeChanged(
- ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline) {
- NOTREACHED();
+void RenderWidgetHostViewChildFrame::TextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params) {
}
void RenderWidgetHostViewChildFrame::RenderProcessGone(
@@ -324,10 +321,6 @@
return gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::TEXTURE_TRANSPORT);
}
-void RenderWidgetHostViewChildFrame::SetScrollOffsetPinning(
- bool is_pinned_to_left, bool is_pinned_to_right) {
-}
-
#if defined(OS_WIN)
void RenderWidgetHostViewChildFrame::SetParentNativeViewAccessible(
gfx::NativeViewAccessible accessible_parent) {
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.h b/content/browser/frame_host/render_widget_host_view_child_frame.h
index 3a5c108..e288248 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.h
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.h
@@ -11,6 +11,8 @@
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect.h"
+struct ViewHostMsg_TextInputState_Params;
+
namespace content {
class CrossProcessFrameConnector;
class RenderWidgetHost;
@@ -65,9 +67,8 @@
virtual void Blur() OVERRIDE;
virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE;
virtual void SetIsLoading(bool is_loading) OVERRIDE;
- virtual void TextInputTypeChanged(ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline) OVERRIDE;
+ virtual void TextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params) OVERRIDE;
virtual void ImeCancelComposition() OVERRIDE;
#if defined(OS_MACOSX) || defined(USE_AURA)
virtual void ImeCompositionRangeChanged(
@@ -111,8 +112,6 @@
virtual void GetScreenInfo(blink::WebScreenInfo* results) OVERRIDE;
virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE;
virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
- virtual void SetScrollOffsetPinning(
- bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE;
#if defined(USE_AURA)
virtual void ProcessAckedTouchEvent(
const TouchEventWithLatencyInfo& touch,
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index 55033db..8a02c69 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -287,10 +287,8 @@
platform_view_->SetIsLoading(is_loading);
}
-void RenderWidgetHostViewGuest::TextInputTypeChanged(
- ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline) {
+void RenderWidgetHostViewGuest::TextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params) {
if (!guest_)
return;
@@ -298,7 +296,7 @@
if (!rwhv)
return;
// Forward the information to embedding RWHV.
- rwhv->TextInputTypeChanged(type, input_mode, can_compose_inline);
+ rwhv->TextInputStateChanged(params);
}
void RenderWidgetHostViewGuest::ImeCancelComposition() {
@@ -365,12 +363,6 @@
platform_view_->SetBackgroundOpaque(opaque);
}
-void RenderWidgetHostViewGuest::SetScrollOffsetPinning(
- bool is_pinned_to_left, bool is_pinned_to_right) {
- platform_view_->SetScrollOffsetPinning(
- is_pinned_to_left, is_pinned_to_right);
-}
-
bool RenderWidgetHostViewGuest::LockMouse() {
return platform_view_->LockMouse();
}
diff --git a/content/browser/frame_host/render_widget_host_view_guest.h b/content/browser/frame_host/render_widget_host_view_guest.h
index 1d44b31..6132b4e 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.h
+++ b/content/browser/frame_host/render_widget_host_view_guest.h
@@ -18,6 +18,8 @@
#include "ui/gfx/rect.h"
#include "ui/gfx/vector2d_f.h"
+struct ViewHostMsg_TextInputState_Params;
+
namespace content {
class RenderWidgetHost;
class RenderWidgetHostImpl;
@@ -68,9 +70,8 @@
const std::vector<WebPluginGeometry>& moves) OVERRIDE;
virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE;
virtual void SetIsLoading(bool is_loading) OVERRIDE;
- virtual void TextInputTypeChanged(ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline) OVERRIDE;
+ virtual void TextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params) OVERRIDE;
virtual void ImeCancelComposition() OVERRIDE;
#if defined(OS_MACOSX) || defined(USE_AURA)
virtual void ImeCompositionRangeChanged(
@@ -100,8 +101,6 @@
virtual void OnSwapCompositorFrame(
uint32 output_surface_id,
scoped_ptr<cc::CompositorFrame> frame) OVERRIDE;
- virtual void SetScrollOffsetPinning(
- bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE;
#if defined(USE_AURA)
virtual void ProcessAckedTouchEvent(
const TouchEventWithLatencyInfo& touch,
diff --git a/content/browser/geolocation/geolocation_dispatcher_host.cc b/content/browser/geolocation/geolocation_dispatcher_host.cc
index aec2170..ad1f2fc 100644
--- a/content/browser/geolocation/geolocation_dispatcher_host.cc
+++ b/content/browser/geolocation/geolocation_dispatcher_host.cc
@@ -14,7 +14,7 @@
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/browser_context.h"
-#include "content/public/browser/geolocation_permission_context.h"
+#include "content/public/browser/content_browser_client.h"
#include "content/public/common/geoposition.h"
#include "content/common/geolocation_messages.h"
@@ -64,27 +64,25 @@
GEOPOSITION_ERROR_CODE_COUNT);
}
-void SendGeolocationPermissionResponse(int render_process_id,
- int render_frame_id,
- int bridge_id,
- bool allowed) {
- RenderFrameHost* render_frame_host =
- RenderFrameHost::FromID(render_process_id, render_frame_id);
- if (!render_frame_host)
- return;
- render_frame_host->Send(
- new GeolocationMsg_PermissionSet(render_frame_id, bridge_id, allowed));
+} // namespace
- if (allowed)
- GeolocationProviderImpl::GetInstance()->UserDidOptIntoLocationServices();
+GeolocationDispatcherHost::PendingPermission::PendingPermission(
+ int render_frame_id,
+ int render_process_id,
+ int bridge_id)
+ : render_frame_id(render_frame_id),
+ render_process_id(render_process_id),
+ bridge_id(bridge_id) {
}
-} // namespace
+GeolocationDispatcherHost::PendingPermission::~PendingPermission() {
+}
GeolocationDispatcherHost::GeolocationDispatcherHost(
WebContents* web_contents)
: WebContentsObserver(web_contents),
- paused_(false) {
+ paused_(false),
+ weak_factory_(this) {
// This is initialized by WebContentsImpl. Do not add any non-trivial
// initialization here, defer to OnStartUpdating which is triggered whenever
// a javascript geolocation object is actually initialized.
@@ -142,35 +140,39 @@
int bridge_id,
const GURL& requesting_frame,
bool user_gesture) {
- GeolocationPermissionContext* context =
- web_contents()->GetBrowserContext()->GetGeolocationPermissionContext();
int render_process_id = render_frame_host->GetProcess()->GetID();
int render_frame_id = render_frame_host->GetRoutingID();
- if (context) {
- context->RequestGeolocationPermission(
- web_contents(),
- bridge_id,
- requesting_frame,
- user_gesture,
- base::Bind(&SendGeolocationPermissionResponse,
- render_process_id,
- render_frame_id,
- bridge_id));
- } else {
- SendGeolocationPermissionResponse(
- render_process_id, render_frame_id, bridge_id, true);
- }
+
+ PendingPermission pending_permission(
+ render_frame_id, render_process_id, bridge_id);
+ pending_permissions_.push_back(pending_permission);
+
+ GetContentClient()->browser()->RequestGeolocationPermission(
+ web_contents(),
+ bridge_id,
+ requesting_frame,
+ user_gesture,
+ base::Bind(&GeolocationDispatcherHost::SendGeolocationPermissionResponse,
+ weak_factory_.GetWeakPtr(),
+ render_process_id, render_frame_id, bridge_id),
+ &pending_permissions_.back().cancel);
}
void GeolocationDispatcherHost::OnCancelPermissionRequest(
RenderFrameHost* render_frame_host,
int bridge_id,
const GURL& requesting_frame) {
- GeolocationPermissionContext* context =
- web_contents()->GetBrowserContext()->GetGeolocationPermissionContext();
- if (context) {
- context->CancelGeolocationPermissionRequest(
- web_contents(), bridge_id, requesting_frame);
+ int render_process_id = render_frame_host->GetProcess()->GetID();
+ int render_frame_id = render_frame_host->GetRoutingID();
+ for (size_t i = 0; i < pending_permissions_.size(); ++i) {
+ if (pending_permissions_[i].render_process_id == render_process_id &&
+ pending_permissions_[i].render_frame_id == render_frame_id &&
+ pending_permissions_[i].bridge_id == bridge_id) {
+ if (!pending_permissions_[i].cancel.is_null())
+ pending_permissions_[i].cancel.Run();
+ pending_permissions_.erase(pending_permissions_.begin() + i);
+ return;
+ }
}
}
@@ -223,4 +225,33 @@
high_accuracy);
}
+void GeolocationDispatcherHost::SendGeolocationPermissionResponse(
+ int render_process_id,
+ int render_frame_id,
+ int bridge_id,
+ bool allowed) {
+ for (size_t i = 0; i < pending_permissions_.size(); ++i) {
+ if (pending_permissions_[i].render_process_id == render_process_id &&
+ pending_permissions_[i].render_frame_id == render_frame_id &&
+ pending_permissions_[i].bridge_id == bridge_id) {
+ RenderFrameHost* render_frame_host =
+ RenderFrameHost::FromID(render_process_id, render_frame_id);
+ if (render_frame_host) {
+ render_frame_host->Send(new GeolocationMsg_PermissionSet(
+ render_frame_id, bridge_id, allowed));
+ }
+
+ if (allowed) {
+ GeolocationProviderImpl::GetInstance()->
+ UserDidOptIntoLocationServices();
+ }
+
+ pending_permissions_.erase(pending_permissions_.begin() + i);
+ return;
+ }
+ }
+
+ NOTREACHED();
+}
+
} // namespace content
diff --git a/content/browser/geolocation/geolocation_dispatcher_host.h b/content/browser/geolocation/geolocation_dispatcher_host.h
index 151ed46..e8bda40 100644
--- a/content/browser/geolocation/geolocation_dispatcher_host.h
+++ b/content/browser/geolocation/geolocation_dispatcher_host.h
@@ -6,7 +6,10 @@
#define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_
#include <map>
+#include <vector>
+#include "base/callback_forward.h"
+#include "base/memory/weak_ptr.h"
#include "content/browser/geolocation/geolocation_provider_impl.h"
#include "content/public/browser/web_contents_observer.h"
@@ -14,8 +17,6 @@
namespace content {
-class GeolocationPermissionContext;
-
// GeolocationDispatcherHost is an observer for Geolocation messages.
// It's the complement of GeolocationDispatcher (owned by RenderView).
class GeolocationDispatcherHost : public WebContentsObserver {
@@ -56,15 +57,32 @@
void OnLocationUpdate(const Geoposition& position);
- scoped_refptr<GeolocationPermissionContext> geolocation_permission_context_;
+ void SendGeolocationPermissionResponse(int render_process_id,
+ int render_frame_id,
+ int bridge_id,
+ bool allowed);
// A map from the RenderFrameHosts that have requested geolocation updates to
// the type of accuracy they requested (true = high accuracy).
std::map<RenderFrameHost*, bool> updating_frames_;
bool paused_;
+ struct PendingPermission {
+ PendingPermission(int render_frame_id,
+ int render_process_id,
+ int bridge_id);
+ ~PendingPermission();
+ int render_frame_id;
+ int render_process_id;
+ int bridge_id;
+ base::Closure cancel;
+ };
+ std::vector<PendingPermission> pending_permissions_;
+
scoped_ptr<GeolocationProvider::Subscription> geolocation_subscription_;
+ base::WeakPtrFactory<GeolocationDispatcherHost> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherHost);
};
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc
index 0c43205..01fc786 100644
--- a/content/browser/gpu/browser_gpu_channel_host_factory.cc
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
@@ -208,7 +208,8 @@
BrowserGpuChannelHostFactory::BrowserGpuChannelHostFactory()
: gpu_client_id_(ChildProcessHostImpl::GenerateChildProcessUniqueId()),
shutdown_event_(new base::WaitableEvent(true, false)),
- gpu_host_id_(0) {
+ gpu_host_id_(0),
+ next_create_gpu_memory_buffer_request_id_(0) {
}
BrowserGpuChannelHostFactory::~BrowserGpuChannelHostFactory() {
@@ -469,4 +470,90 @@
filter));
}
+void BrowserGpuChannelHostFactory::CreateGpuMemoryBuffer(
+ const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ unsigned internalformat,
+ unsigned usage,
+ const CreateGpuMemoryBufferCallback& callback) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ uint32 request_id = next_create_gpu_memory_buffer_request_id_++;
+ create_gpu_memory_buffer_requests_[request_id] = callback;
+ GetIOLoopProxy()->PostTask(
+ FROM_HERE,
+ base::Bind(&BrowserGpuChannelHostFactory::CreateGpuMemoryBufferOnIO,
+ base::Unretained(this),
+ handle,
+ size,
+ internalformat,
+ usage,
+ request_id));
+}
+
+void BrowserGpuChannelHostFactory::DestroyGpuMemoryBuffer(
+ const gfx::GpuMemoryBufferHandle& handle,
+ int32 sync_point) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ GetIOLoopProxy()->PostTask(
+ FROM_HERE,
+ base::Bind(&BrowserGpuChannelHostFactory::DestroyGpuMemoryBufferOnIO,
+ base::Unretained(this),
+ handle,
+ sync_point));
+}
+
+void BrowserGpuChannelHostFactory::CreateGpuMemoryBufferOnIO(
+ const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ unsigned internalformat,
+ unsigned usage,
+ uint32 request_id) {
+ GpuProcessHost* host = GpuProcessHost::FromID(gpu_host_id_);
+ if (!host) {
+ GpuMemoryBufferCreatedOnIO(request_id, gfx::GpuMemoryBufferHandle());
+ return;
+ }
+
+ host->CreateGpuMemoryBuffer(
+ handle,
+ size,
+ internalformat,
+ usage,
+ base::Bind(&BrowserGpuChannelHostFactory::GpuMemoryBufferCreatedOnIO,
+ base::Unretained(this),
+ request_id));
+}
+
+void BrowserGpuChannelHostFactory::GpuMemoryBufferCreatedOnIO(
+ uint32 request_id,
+ const gfx::GpuMemoryBufferHandle& handle) {
+ BrowserThread::PostTask(
+ BrowserThread::UI,
+ FROM_HERE,
+ base::Bind(&BrowserGpuChannelHostFactory::OnGpuMemoryBufferCreated,
+ base::Unretained(this),
+ request_id,
+ handle));
+}
+
+void BrowserGpuChannelHostFactory::OnGpuMemoryBufferCreated(
+ uint32 request_id,
+ const gfx::GpuMemoryBufferHandle& handle) {
+ CreateGpuMemoryBufferCallbackMap::iterator iter =
+ create_gpu_memory_buffer_requests_.find(request_id);
+ DCHECK(iter != create_gpu_memory_buffer_requests_.end());
+ iter->second.Run(handle);
+ create_gpu_memory_buffer_requests_.erase(iter);
+}
+
+void BrowserGpuChannelHostFactory::DestroyGpuMemoryBufferOnIO(
+ const gfx::GpuMemoryBufferHandle& handle,
+ int32 sync_point) {
+ GpuProcessHost* host = GpuProcessHost::FromID(gpu_host_id_);
+ if (!host)
+ return;
+
+ host->DestroyGpuMemoryBuffer(handle, sync_point);
+}
+
} // namespace content
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.h b/content/browser/gpu/browser_gpu_channel_host_factory.h
index c2637f0..a442d16 100644
--- a/content/browser/gpu/browser_gpu_channel_host_factory.h
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.h
@@ -10,12 +10,14 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/common/gpu/client/gpu_channel_host.h"
+#include "content/common/gpu/client/gpu_memory_buffer_factory_host.h"
#include "ipc/message_filter.h"
namespace content {
class CONTENT_EXPORT BrowserGpuChannelHostFactory
- : public GpuChannelHostFactory {
+ : public GpuChannelHostFactory,
+ public GpuMemoryBufferFactoryHost {
public:
static void Initialize(bool establish_gpu_channel);
static void Terminate();
@@ -42,6 +44,16 @@
unsigned internalformat,
unsigned usage) OVERRIDE;
+ // GpuMemoryBufferFactoryHost implementation.
+ virtual void CreateGpuMemoryBuffer(
+ const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ unsigned internalformat,
+ unsigned usage,
+ const CreateGpuMemoryBufferCallback& callback) OVERRIDE;
+ virtual void DestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
+ int32 sync_point) OVERRIDE;
+
// Specify a task runner and callback to be used for a set of messages. The
// callback will be set up on the current GpuProcessHost, identified by
// GpuProcessHostId().
@@ -86,6 +98,20 @@
static void AddFilterOnIO(int gpu_host_id,
scoped_refptr<IPC::MessageFilter> filter);
+ void CreateGpuMemoryBufferOnIO(const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ unsigned internalformat,
+ unsigned usage,
+ uint32 request_id);
+ void GpuMemoryBufferCreatedOnIO(
+ uint32 request_id,
+ const gfx::GpuMemoryBufferHandle& handle);
+ void OnGpuMemoryBufferCreated(
+ uint32 request_id,
+ const gfx::GpuMemoryBufferHandle& handle);
+ void DestroyGpuMemoryBufferOnIO(const gfx::GpuMemoryBufferHandle& handle,
+ int32 sync_point);
+
const int gpu_client_id_;
scoped_ptr<base::WaitableEvent> shutdown_event_;
scoped_refptr<GpuChannelHost> gpu_channel_;
@@ -93,6 +119,11 @@
scoped_refptr<EstablishRequest> pending_request_;
std::vector<base::Closure> established_callbacks_;
+ uint32 next_create_gpu_memory_buffer_request_id_;
+ typedef std::map<uint32, CreateGpuMemoryBufferCallback>
+ CreateGpuMemoryBufferCallbackMap;
+ CreateGpuMemoryBufferCallbackMap create_gpu_memory_buffer_requests_;
+
static BrowserGpuChannelHostFactory* instance_;
DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory);
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 423c187..721fa41 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -566,6 +566,8 @@
IPC_MESSAGE_HANDLER(GpuHostMsg_CommandBufferCreated, OnCommandBufferCreated)
IPC_MESSAGE_HANDLER(GpuHostMsg_DestroyCommandBuffer, OnDestroyCommandBuffer)
IPC_MESSAGE_HANDLER(GpuHostMsg_ImageCreated, OnImageCreated)
+ IPC_MESSAGE_HANDLER(GpuHostMsg_GpuMemoryBufferCreated,
+ OnGpuMemoryBufferCreated)
IPC_MESSAGE_HANDLER(GpuHostMsg_DidCreateOffscreenContext,
OnDidCreateOffscreenContext)
IPC_MESSAGE_HANDLER(GpuHostMsg_DidLoseContext, OnDidLoseContext)
@@ -671,6 +673,34 @@
Send(new GpuMsg_DeleteImage(client_id, image_id, sync_point));
}
+void GpuProcessHost::CreateGpuMemoryBuffer(
+ const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ unsigned internalformat,
+ unsigned usage,
+ const CreateGpuMemoryBufferCallback& callback) {
+ TRACE_EVENT0("gpu", "GpuProcessHost::CreateGpuMemoryBuffer");
+
+ DCHECK(CalledOnValidThread());
+
+ if (Send(new GpuMsg_CreateGpuMemoryBuffer(
+ handle, size, internalformat, usage))) {
+ create_gpu_memory_buffer_requests_.push(callback);
+ } else {
+ callback.Run(gfx::GpuMemoryBufferHandle());
+ }
+}
+
+void GpuProcessHost::DestroyGpuMemoryBuffer(
+ const gfx::GpuMemoryBufferHandle& handle,
+ int sync_point) {
+ TRACE_EVENT0("gpu", "GpuProcessHost::DestroyGpuMemoryBuffer");
+
+ DCHECK(CalledOnValidThread());
+
+ Send(new GpuMsg_DestroyGpuMemoryBuffer(handle, sync_point));
+}
+
void GpuProcessHost::OnInitialized(bool result, const gpu::GPUInfo& gpu_info) {
UMA_HISTOGRAM_BOOLEAN("GPU.GPUProcessInitialized", result);
initialized_ = result;
@@ -744,6 +774,19 @@
callback.Run(size);
}
+void GpuProcessHost::OnGpuMemoryBufferCreated(
+ const gfx::GpuMemoryBufferHandle& handle) {
+ TRACE_EVENT0("gpu", "GpuProcessHost::OnGpuMemoryBufferCreated");
+
+ if (create_gpu_memory_buffer_requests_.empty())
+ return;
+
+ CreateGpuMemoryBufferCallback callback =
+ create_gpu_memory_buffer_requests_.front();
+ create_gpu_memory_buffer_requests_.pop();
+ callback.Run(handle);
+}
+
void GpuProcessHost::OnDidCreateOffscreenContext(const GURL& url) {
urls_with_live_offscreen_contexts_.insert(url);
}
diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h
index 17adefc..079b549 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -34,6 +34,10 @@
struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params;
struct GpuHostMsg_AcceleratedSurfaceRelease_Params;
+namespace gfx {
+struct GpuMemoryBufferHandle;
+}
+
namespace IPC {
struct ChannelHandle;
}
@@ -63,6 +67,9 @@
typedef base::Callback<void(const gfx::Size)> CreateImageCallback;
+ typedef base::Callback<void(const gfx::GpuMemoryBufferHandle& handle)>
+ CreateGpuMemoryBufferCallback;
+
static bool gpu_enabled() { return gpu_enabled_; }
// Creates a new GpuProcessHost or gets an existing one, resulting in the
@@ -125,6 +132,14 @@
// Tells the GPU process to delete image.
void DeleteImage(int client_id, int image_id, int sync_point);
+ void CreateGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ unsigned internalformat,
+ unsigned usage,
+ const CreateGpuMemoryBufferCallback& callback);
+ void DestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
+ int sync_point);
+
// What kind of GPU process, e.g. sandboxed or unsandboxed.
GpuProcessKind kind();
@@ -159,6 +174,7 @@
void OnCommandBufferCreated(bool succeeded);
void OnDestroyCommandBuffer(int32 surface_id);
void OnImageCreated(const gfx::Size size);
+ void OnGpuMemoryBufferCreated(const gfx::GpuMemoryBufferHandle& handle);
void OnDidCreateOffscreenContext(const GURL& url);
void OnDidLoseContext(bool offscreen,
gpu::error::ContextLostReason reason,
@@ -196,6 +212,8 @@
// The pending create image requests we need to reply to.
std::queue<CreateImageCallback> create_image_requests_;
+ // The pending create gpu memory buffer requests we need to reply to.
+ std::queue<CreateGpuMemoryBufferCallback> create_gpu_memory_buffer_requests_;
// Qeueud messages to send when the process launches.
std::queue<IPC::Message*> queued_messages_;
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc
index 0ef8439..54c1626 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.cc
+++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
@@ -7,7 +7,6 @@
#include <algorithm>
#include "base/bind.h"
-#include "base/command_line.h"
#include "base/debug/trace_event.h"
#include "base/id_map.h"
#include "base/lazy_instance.h"
@@ -20,7 +19,6 @@
#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "content/common/gpu/gpu_messages.h"
#include "content/public/browser/browser_thread.h"
-#include "ui/gl/gl_switches.h"
namespace content {
diff --git a/content/browser/histogram_controller.cc b/content/browser/histogram_controller.cc
index 240de25..3b11c32 100644
--- a/content/browser/histogram_controller.cc
+++ b/content/browser/histogram_controller.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/metrics/histogram.h"
+#include "base/process/process_handle.h"
#include "content/browser/histogram_subscriber.h"
#include "content/common/child_process_messages.h"
#include "content/public/browser/browser_child_process_host_iterator.h"
@@ -72,7 +73,8 @@
int pending_processes = 0;
for (BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) {
- int type = iter.GetData().process_type;
+ const ChildProcessData& data = iter.GetData();
+ int type = data.process_type;
if (type != PROCESS_TYPE_PLUGIN &&
type != PROCESS_TYPE_GPU &&
type != PROCESS_TYPE_PPAPI_PLUGIN &&
@@ -80,6 +82,13 @@
continue;
}
+ // In some cases, there may be no child process of the given type (for
+ // example, the GPU process may not exist and there may instead just be a
+ // GPU thread in the browser process). If that's the case, then the process
+ // handle will be base::kNullProcessHandle and we shouldn't ask it for data.
+ if (data.handle == base::kNullProcessHandle)
+ continue;
+
++pending_processes;
if (!iter.Send(new ChildProcessMsg_GetChildHistogramData(sequence_number)))
--pending_processes;
diff --git a/content/browser/host_zoom_map_impl.cc b/content/browser/host_zoom_map_impl.cc
index a0a68da..1b5f7a2 100644
--- a/content/browser/host_zoom_map_impl.cc
+++ b/content/browser/host_zoom_map_impl.cc
@@ -27,6 +27,27 @@
namespace content {
+namespace {
+
+std::string GetHostFromProcessView(int render_process_id, int render_view_id) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ RenderViewHost* render_view_host =
+ RenderViewHost::FromID(render_process_id, render_view_id);
+ if (!render_view_host)
+ return std::string();
+
+ WebContents* web_contents = WebContents::FromRenderViewHost(render_view_host);
+
+ NavigationEntry* entry =
+ web_contents->GetController().GetLastCommittedEntry();
+ if (!entry)
+ return std::string();
+
+ return net::GetHostOrSpecFromURL(entry->GetURL());
+}
+
+} // namespace
+
HostZoomMap* HostZoomMap::GetForBrowserContext(BrowserContext* context) {
HostZoomMapImpl* rv = static_cast<HostZoomMapImpl*>(
context->GetUserData(kHostZoomMapKeyName));
@@ -87,6 +108,22 @@
return (i == host_zoom_levels_.end()) ? default_zoom_level_ : i->second;
}
+bool HostZoomMapImpl::HasZoomLevel(const std::string& scheme,
+ const std::string& host) const {
+ base::AutoLock auto_lock(lock_);
+
+ SchemeHostZoomLevels::const_iterator scheme_iterator(
+ scheme_host_zoom_levels_.find(scheme));
+
+ const HostZoomLevels& zoom_levels =
+ (scheme_iterator != scheme_host_zoom_levels_.end())
+ ? scheme_iterator->second
+ : host_zoom_levels_;
+
+ HostZoomLevels::const_iterator i(zoom_levels.find(host));
+ return i != zoom_levels.end();
+}
+
double HostZoomMapImpl::GetZoomLevelForHostAndScheme(
const std::string& scheme,
const std::string& host) const {
@@ -152,16 +189,9 @@
host_zoom_levels_[host] = level;
}
- // Notify renderers from this browser context.
- for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
- !i.IsAtEnd(); i.Advance()) {
- RenderProcessHost* render_process_host = i.GetCurrentValue();
- if (HostZoomMap::GetForBrowserContext(
- render_process_host->GetBrowserContext()) == this) {
- render_process_host->Send(
- new ViewMsg_SetZoomLevelForCurrentURL(std::string(), host, level));
- }
- }
+ // TODO(wjmaclean) Should we use a GURL here? crbug.com/384486
+ SendZoomLevelChange(std::string(), host, level);
+
HostZoomMap::ZoomLevelChange change;
change.mode = HostZoomMap::ZOOM_CHANGED_FOR_HOST;
change.host = host;
@@ -179,16 +209,7 @@
scheme_host_zoom_levels_[scheme][host] = level;
}
- // Notify renderers from this browser context.
- for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
- !i.IsAtEnd(); i.Advance()) {
- RenderProcessHost* render_process_host = i.GetCurrentValue();
- if (HostZoomMap::GetForBrowserContext(
- render_process_host->GetBrowserContext()) == this) {
- render_process_host->Send(
- new ViewMsg_SetZoomLevelForCurrentURL(scheme, host, level));
- }
- }
+ SendZoomLevelChange(scheme, host, level);
HostZoomMap::ZoomLevelChange change;
change.mode = HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST;
@@ -247,11 +268,14 @@
// WebContentsImpl::GetLastCommittedURL() may give us a virtual url that
// is different than what the render view is using. If the two don't match,
// the attempt to set the zoom will fail.
- GURL url;
NavigationEntry* entry =
web_contents_impl.GetController().GetLastCommittedEntry();
- DCHECK(entry);
- url = entry->GetURL();
+ // Tests may invoke this function with a null entry, but we don't
+ // want to save zoom levels in this case.
+ if (!entry)
+ return;
+
+ GURL url = entry->GetURL();
SetZoomLevelForHost(net::GetHostOrSpecFromURL(url), level);
}
}
@@ -268,45 +292,20 @@
bool HostZoomMapImpl::UsesTemporaryZoomLevel(int render_process_id,
int render_view_id) const {
- TemporaryZoomLevel zoom_level(render_process_id, render_view_id);
+ RenderViewKey key(render_process_id, render_view_id);
base::AutoLock auto_lock(lock_);
- TemporaryZoomLevels::const_iterator it = std::find(
- temporary_zoom_levels_.begin(), temporary_zoom_levels_.end(), zoom_level);
- return it != temporary_zoom_levels_.end();
-}
-
-void HostZoomMapImpl::SetUsesTemporaryZoomLevel(
- int render_process_id,
- int render_view_id,
- bool uses_temporary_zoom_level) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- TemporaryZoomLevel zoom_level(
- render_process_id, render_view_id, default_zoom_level_);
-
- base::AutoLock auto_lock(lock_);
- TemporaryZoomLevels::iterator it = std::find(
- temporary_zoom_levels_.begin(), temporary_zoom_levels_.end(), zoom_level);
- if (uses_temporary_zoom_level) {
- if (it == temporary_zoom_levels_.end())
- temporary_zoom_levels_.push_back(zoom_level);
- } else if (it != temporary_zoom_levels_.end()) {
- temporary_zoom_levels_.erase(it);
- }
+ return ContainsKey(temporary_zoom_levels_, key);
}
double HostZoomMapImpl::GetTemporaryZoomLevel(int render_process_id,
int render_view_id) const {
base::AutoLock auto_lock(lock_);
- for (size_t i = 0; i < temporary_zoom_levels_.size(); ++i) {
- if (temporary_zoom_levels_[i].render_process_id == render_process_id &&
- temporary_zoom_levels_[i].render_view_id == render_view_id) {
- return temporary_zoom_levels_[i].zoom_level;
- }
- }
+ RenderViewKey key(render_process_id, render_view_id);
+ if (!ContainsKey(temporary_zoom_levels_, key))
+ return 0;
- return 0;
+ return temporary_zoom_levels_.find(key)->second;
}
void HostZoomMapImpl::SetTemporaryZoomLevel(int render_process_id,
@@ -315,28 +314,18 @@
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
{
+ RenderViewKey key(render_process_id, render_view_id);
base::AutoLock auto_lock(lock_);
- size_t i;
- for (i = 0; i < temporary_zoom_levels_.size(); ++i) {
- if (temporary_zoom_levels_[i].render_process_id == render_process_id &&
- temporary_zoom_levels_[i].render_view_id == render_view_id) {
- if (level) {
- temporary_zoom_levels_[i].zoom_level = level;
- } else {
- temporary_zoom_levels_.erase(temporary_zoom_levels_.begin() + i);
- }
- break;
- }
- }
-
- if (level && i == temporary_zoom_levels_.size()) {
- TemporaryZoomLevel temp(render_process_id, render_view_id, level);
- temporary_zoom_levels_.push_back(temp);
- }
+ temporary_zoom_levels_[key] = level;
}
+ RenderViewHost* host =
+ RenderViewHost::FromID(render_process_id, render_view_id);
+ host->Send(new ViewMsg_SetZoomLevelForView(render_view_id, true, level));
+
HostZoomMap::ZoomLevelChange change;
change.mode = HostZoomMap::ZOOM_CHANGED_TEMPORARY_ZOOM;
+ change.host = GetHostFromProcessView(render_process_id, render_view_id);
change.zoom_level = level;
zoom_level_changed_callbacks_.Notify(change);
@@ -347,18 +336,10 @@
const NotificationDetails& details) {
switch (type) {
case NOTIFICATION_RENDER_VIEW_HOST_WILL_CLOSE_RENDER_VIEW: {
- base::AutoLock auto_lock(lock_);
int render_view_id = Source<RenderViewHost>(source)->GetRoutingID();
int render_process_id =
Source<RenderViewHost>(source)->GetProcess()->GetID();
-
- for (size_t i = 0; i < temporary_zoom_levels_.size(); ++i) {
- if (temporary_zoom_levels_[i].render_process_id == render_process_id &&
- temporary_zoom_levels_[i].render_view_id == render_view_id) {
- temporary_zoom_levels_.erase(temporary_zoom_levels_.begin() + i);
- break;
- }
- }
+ ClearTemporaryZoomLevel(render_process_id, render_view_id);
break;
}
default:
@@ -366,28 +347,42 @@
}
}
+void HostZoomMapImpl::ClearTemporaryZoomLevel(int render_process_id,
+ int render_view_id) {
+ {
+ base::AutoLock auto_lock(lock_);
+ RenderViewKey key(render_process_id, render_view_id);
+ TemporaryZoomLevels::iterator it = temporary_zoom_levels_.find(key);
+ if (it == temporary_zoom_levels_.end())
+ return;
+ temporary_zoom_levels_.erase(it);
+ }
+ RenderViewHost* host =
+ RenderViewHost::FromID(render_process_id, render_view_id);
+ DCHECK(host);
+ // Send a new zoom level, host-specific if one exists.
+ host->Send(new ViewMsg_SetZoomLevelForView(
+ render_view_id,
+ false,
+ GetZoomLevelForHost(
+ GetHostFromProcessView(render_process_id, render_view_id))));
+}
+
+void HostZoomMapImpl::SendZoomLevelChange(const std::string& scheme,
+ const std::string& host,
+ double level) {
+ for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
+ !i.IsAtEnd(); i.Advance()) {
+ RenderProcessHost* render_process_host = i.GetCurrentValue();
+ if (HostZoomMap::GetForBrowserContext(
+ render_process_host->GetBrowserContext()) == this) {
+ render_process_host->Send(
+ new ViewMsg_SetZoomLevelForCurrentURL(scheme, host, level));
+ }
+ }
+}
+
HostZoomMapImpl::~HostZoomMapImpl() {
}
-HostZoomMapImpl::TemporaryZoomLevel::TemporaryZoomLevel(int process_id,
- int view_id,
- double level)
- : render_process_id(process_id),
- render_view_id(view_id),
- zoom_level(level) {
-}
-
-HostZoomMapImpl::TemporaryZoomLevel::TemporaryZoomLevel(int process_id,
- int view_id)
- : render_process_id(process_id),
- render_view_id(view_id),
- zoom_level(0.0) {
-}
-
-bool HostZoomMapImpl::TemporaryZoomLevel::operator==(
- const TemporaryZoomLevel& other) const {
- return other.render_process_id == render_process_id &&
- other.render_view_id == render_view_id;
-}
-
} // namespace content
diff --git a/content/browser/host_zoom_map_impl.h b/content/browser/host_zoom_map_impl.h
index 0ad4fec..821fa0e 100644
--- a/content/browser/host_zoom_map_impl.h
+++ b/content/browser/host_zoom_map_impl.h
@@ -35,6 +35,9 @@
virtual double GetZoomLevelForHostAndScheme(
const std::string& scheme,
const std::string& host) const OVERRIDE;
+ // TODO(wjmaclean) Should we use a GURL here? crbug.com/384486
+ virtual bool HasZoomLevel(const std::string& scheme,
+ const std::string& host) const OVERRIDE;
virtual ZoomLevelVector GetAllZoomLevels() const OVERRIDE;
virtual void SetZoomLevelForHost(
const std::string& host,
@@ -43,6 +46,14 @@
const std::string& scheme,
const std::string& host,
double level) OVERRIDE;
+ virtual bool UsesTemporaryZoomLevel(int render_process_id,
+ int render_view_id) const OVERRIDE;
+ virtual void SetTemporaryZoomLevel(int render_process_id,
+ int render_view_id,
+ double level) OVERRIDE;
+
+ virtual void ClearTemporaryZoomLevel(int render_process_id,
+ int render_view_id) OVERRIDE;
virtual double GetDefaultZoomLevel() const OVERRIDE;
virtual void SetDefaultZoomLevel(double level) OVERRIDE;
virtual scoped_ptr<Subscription> AddZoomLevelChangedCallback(
@@ -66,17 +77,6 @@
double level,
const std::string& host);
- // Returns whether the view manages its zoom level independently of other tabs
- // displaying content from the same host.
- bool UsesTemporaryZoomLevel(int render_process_id, int render_view_id) const;
-
- // Sets whether the view manages its zoom level independently of other tabs
- // displaying content from the same host, based on whether
- // |uses_temporary_zoom_level| is true.
- void SetUsesTemporaryZoomLevel(int render_process_id,
- int render_view_id,
- bool uses_temporary_zoom_level);
-
// Returns the temporary zoom level that's only valid for the lifetime of
// the given WebContents (i.e. isn't saved and doesn't affect other
// WebContentses) if it exists, the default zoom level otherwise.
@@ -85,14 +85,6 @@
double GetTemporaryZoomLevel(int render_process_id,
int render_view_id) const;
- // Sets the temporary zoom level that's only valid for the lifetime of this
- // WebContents.
- //
- // This should only be called on the UI thread.
- void SetTemporaryZoomLevel(int render_process_id,
- int render_view_id,
- double level);
-
// NotificationObserver implementation.
virtual void Observe(int type,
const NotificationSource& source,
@@ -102,20 +94,30 @@
typedef std::map<std::string, double> HostZoomLevels;
typedef std::map<std::string, HostZoomLevels> SchemeHostZoomLevels;
- struct TemporaryZoomLevel {
- TemporaryZoomLevel(int process_id, int view_id, double level);
- TemporaryZoomLevel(int process_id, int view_id);
- bool operator==(const TemporaryZoomLevel& other) const;
-
+ struct RenderViewKey {
int render_process_id;
int render_view_id;
- double zoom_level;
+ RenderViewKey(int render_process_id, int render_view_id)
+ : render_process_id(render_process_id),
+ render_view_id(render_view_id) {}
+ bool operator<(const RenderViewKey& other) const {
+ return render_process_id < other.render_process_id ||
+ ((render_process_id == other.render_process_id) &&
+ (render_view_id < other.render_view_id));
+ }
};
- typedef std::vector<TemporaryZoomLevel> TemporaryZoomLevels;
+ typedef std::map<RenderViewKey, double> TemporaryZoomLevels;
double GetZoomLevelForHost(const std::string& host) const;
+ // Notifies the renderers from this browser context to change the zoom level
+ // for the specified host and scheme.
+ // TODO(wjmaclean) Should we use a GURL here? crbug.com/384486
+ void SendZoomLevelChange(const std::string& scheme,
+ const std::string& host,
+ double level);
+
// Callbacks called when zoom level changes.
base::CallbackList<void(const ZoomLevelChange&)>
zoom_level_changed_callbacks_;
diff --git a/content/browser/indexed_db/OWNERS b/content/browser/indexed_db/OWNERS
index b106dad..d68c26c 100644
--- a/content/browser/indexed_db/OWNERS
+++ b/content/browser/indexed_db/OWNERS
@@ -1,4 +1,5 @@
dgrogan@chromium.org
michaeln@chromium.org
jsbell@chromium.org
-alecflett@chromium.org
+ericu@chromium.org
+cmumford@chromium.org
diff --git a/content/browser/indexed_db/indexed_db_active_blob_registry.h b/content/browser/indexed_db/indexed_db_active_blob_registry.h
index dffdda3..92380e1 100644
--- a/content/browser/indexed_db/indexed_db_active_blob_registry.h
+++ b/content/browser/indexed_db/indexed_db_active_blob_registry.h
@@ -20,7 +20,7 @@
class CONTENT_EXPORT IndexedDBActiveBlobRegistry {
public:
- IndexedDBActiveBlobRegistry(IndexedDBBackingStore* backing_store);
+ explicit IndexedDBActiveBlobRegistry(IndexedDBBackingStore* backing_store);
~IndexedDBActiveBlobRegistry();
// Most methods of this class, and the closure returned by
diff --git a/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc b/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc
index 5c42b6a..c8f8475 100644
--- a/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc
@@ -49,6 +49,8 @@
private:
std::set<GURL> origins_;
bool duplicate_calls_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockIDBFactory);
};
class MockIDBBackingStore : public IndexedDBFakeBackingStore {
@@ -79,6 +81,8 @@
private:
KeyPairSet unused_blobs_;
bool duplicate_calls_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockIDBBackingStore);
};
// Base class for our test fixtures.
diff --git a/content/browser/indexed_db/indexed_db_backing_store.cc b/content/browser/indexed_db/indexed_db_backing_store.cc
index 6e943a5..f19e2e8 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store.cc
@@ -16,6 +16,7 @@
#include "base/strings/utf_string_conversions.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/indexed_db/indexed_db_blob_info.h"
+#include "content/browser/indexed_db/indexed_db_class_factory.h"
#include "content/browser/indexed_db/indexed_db_database_error.h"
#include "content/browser/indexed_db/indexed_db_leveldb_coding.h"
#include "content/browser/indexed_db/indexed_db_metadata.h"
@@ -162,8 +163,8 @@
// Use to signal conditions that usually indicate developer error, but
// could be caused by data corruption. A macro is used instead of an
// inline function so that the assert and log report the line number.
-// TODO: Improve test coverage so that all error conditions are "tested" and
-// then delete this macro.
+// TODO(cmumford): Improve test coverage so that all error conditions are
+// "tested" and then delete this macro.
#define REPORT_ERROR_UNTESTED(type, location) \
do { \
LOG(ERROR) << "IndexedDB " type " Error: " #location; \
@@ -353,7 +354,7 @@
const std::string data_version_key = DataVersionKey::Encode();
scoped_refptr<LevelDBTransaction> transaction =
- new LevelDBTransaction(db_.get());
+ IndexedDBClassFactory::Get()->CreateLevelDBTransaction(db_.get());
int64 db_schema_version = 0;
int64 db_data_version = 0;
@@ -485,6 +486,7 @@
class DefaultLevelDBFactory : public LevelDBFactory {
public:
+ DefaultLevelDBFactory() {}
virtual leveldb::Status OpenLevelDB(const base::FilePath& file_name,
const LevelDBComparator* comparator,
scoped_ptr<LevelDBDatabase>* db,
@@ -495,6 +497,9 @@
OVERRIDE {
return LevelDBDatabase::Destroy(file_name);
}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DefaultLevelDBFactory);
};
static bool GetBlobKeyGeneratorCurrentNumber(
@@ -860,7 +865,6 @@
bool IndexedDBBackingStore::ReadCorruptionInfo(const base::FilePath& path_base,
const GURL& origin_url,
std::string& message) {
-
const base::FilePath info_path =
path_base.Append(ComputeCorruptionFileName(origin_url));
@@ -1273,7 +1277,7 @@
int64 int_version,
int64* row_id) {
scoped_refptr<LevelDBTransaction> transaction =
- new LevelDBTransaction(db_.get());
+ IndexedDBClassFactory::Get()->CreateLevelDBTransaction(db_.get());
leveldb::Status s = GetNewDatabaseId(transaction.get(), row_id);
if (!s.ok())
@@ -1880,11 +1884,13 @@
v.append(value.bits);
leveldb_transaction->Put(object_store_data_key, &v);
- transaction->PutBlobInfo(database_id,
- object_store_id,
- object_store_data_key,
- &value.blob_info,
- handles);
+ s = transaction->PutBlobInfoIfNeeded(database_id,
+ object_store_id,
+ object_store_data_key,
+ &value.blob_info,
+ handles);
+ if (!s.ok())
+ return s;
DCHECK(!handles->size());
const std::string exists_entry_key =
@@ -1933,8 +1939,10 @@
const std::string object_store_data_key = ObjectStoreDataKey::Encode(
database_id, object_store_id, record_identifier.primary_key());
leveldb_transaction->Remove(object_store_data_key);
- transaction->PutBlobInfo(
+ leveldb::Status s = transaction->PutBlobInfoIfNeeded(
database_id, object_store_id, object_store_data_key, NULL, NULL);
+ if (!s.ok())
+ return s;
const std::string exists_entry_key = ExistsEntryKey::Encode(
database_id, object_store_id, record_identifier.primary_key());
@@ -2224,15 +2232,17 @@
scoped_refptr<IndexedDBBackingStore::BlobWriteCallback> callback_;
scoped_ptr<FileWriterDelegate> delegate_;
bool aborted_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChainedBlobWriterImpl);
};
class LocalWriteClosure : public FileWriterDelegate::DelegateWriteCallback,
public base::RefCounted<LocalWriteClosure> {
public:
LocalWriteClosure(IndexedDBBackingStore::Transaction::ChainedBlobWriter*
- chained_blob_writer_,
+ chained_blob_writer,
base::TaskRunner* task_runner)
- : chained_blob_writer_(chained_blob_writer_),
+ : chained_blob_writer_(chained_blob_writer),
task_runner_(task_runner),
bytes_written_(-1) {}
@@ -2242,8 +2252,8 @@
if (write_status == FileWriterDelegate::SUCCESS_IO_PENDING)
return; // We don't care about progress events.
if (rv == base::File::FILE_OK) {
- DCHECK(bytes >= 0);
- DCHECK(write_status == FileWriterDelegate::SUCCESS_COMPLETED);
+ DCHECK_GE(bytes, 0);
+ DCHECK_EQ(write_status, FileWriterDelegate::SUCCESS_COMPLETED);
bytes_written_ = bytes;
} else {
DCHECK(write_status == FileWriterDelegate::ERROR_WRITE_STARTED ||
@@ -2289,6 +2299,8 @@
IndexedDBBackingStore::Transaction::ChainedBlobWriter* chained_blob_writer_;
base::TaskRunner* task_runner_;
int64 bytes_written_;
+
+ DISALLOW_COPY_AND_ASSIGN(LocalWriteClosure);
};
bool IndexedDBBackingStore::WriteBlobFile(
@@ -2345,7 +2357,7 @@
bool all_blobs = blob_key == DatabaseMetaDataKey::kAllBlobsKey;
DCHECK(all_blobs || DatabaseMetaDataKey::IsValidBlobKey(blob_key));
scoped_refptr<LevelDBTransaction> transaction =
- new LevelDBTransaction(db_.get());
+ IndexedDBClassFactory::Get()->CreateLevelDBTransaction(db_.get());
std::string live_blob_key = LiveBlobJournalKey::Encode();
BlobJournalType live_blob_journal;
@@ -2552,7 +2564,7 @@
leveldb::Status IndexedDBBackingStore::CleanUpBlobJournal(
const std::string& level_db_key) {
scoped_refptr<LevelDBTransaction> journal_transaction =
- new LevelDBTransaction(db_.get());
+ IndexedDBClassFactory::Get()->CreateLevelDBTransaction(db_.get());
BlobJournalType journal;
leveldb::Status s =
GetBlobJournal(level_db_key, journal_transaction.get(), &journal);
@@ -3213,6 +3225,8 @@
private:
explicit ObjectStoreKeyCursorImpl(const ObjectStoreKeyCursorImpl* other)
: IndexedDBBackingStore::Cursor(other) {}
+
+ DISALLOW_COPY_AND_ASSIGN(ObjectStoreKeyCursorImpl);
};
bool ObjectStoreKeyCursorImpl::LoadCurrentRow() {
@@ -3275,6 +3289,8 @@
current_value_(other->current_value_) {}
IndexedDBValue current_value_;
+
+ DISALLOW_COPY_AND_ASSIGN(ObjectStoreCursorImpl);
};
bool ObjectStoreCursorImpl::LoadCurrentRow() {
@@ -3359,6 +3375,8 @@
primary_key_(new IndexedDBKey(*other->primary_key_)) {}
scoped_ptr<IndexedDBKey> primary_key_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexKeyCursorImpl);
};
bool IndexKeyCursorImpl::LoadCurrentRow() {
@@ -3473,6 +3491,8 @@
scoped_ptr<IndexedDBKey> primary_key_;
IndexedDBValue current_value_;
std::string primary_leveldb_key_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexCursorImpl);
};
bool IndexCursorImpl::LoadCurrentRow() {
@@ -3809,7 +3829,8 @@
void IndexedDBBackingStore::Transaction::Begin() {
IDB_TRACE("IndexedDBBackingStore::Transaction::Begin");
DCHECK(!transaction_.get());
- transaction_ = new LevelDBTransaction(backing_store_->db_.get());
+ transaction_ = IndexedDBClassFactory::Get()->CreateLevelDBTransaction(
+ backing_store_->db_.get());
// If incognito, this snapshots blobs just as the above transaction_
// constructor snapshots the leveldb.
@@ -3836,7 +3857,8 @@
if (iter != blob_change_map_.end()) {
// Create LevelDBTransaction for the name generator seed and add-journal.
scoped_refptr<LevelDBTransaction> pre_transaction =
- new LevelDBTransaction(backing_store_->db_.get());
+ IndexedDBClassFactory::Get()->CreateLevelDBTransaction(
+ backing_store_->db_.get());
BlobJournalType journal;
for (; iter != blob_change_map_.end(); ++iter) {
std::vector<IndexedDBBlobInfo>::iterator info_iter;
@@ -4053,6 +4075,8 @@
IndexedDBBackingStore::Transaction* transaction_;
scoped_refptr<BlobWriteCallback> callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(BlobWriteCallbackWrapper);
};
void IndexedDBBackingStore::Transaction::WriteNewBlobs(
@@ -4127,6 +4151,37 @@
return record.Pass();
}
+leveldb::Status IndexedDBBackingStore::Transaction::PutBlobInfoIfNeeded(
+ int64 database_id,
+ int64 object_store_id,
+ const std::string& object_store_data_key,
+ std::vector<IndexedDBBlobInfo>* blob_info,
+ ScopedVector<webkit_blob::BlobDataHandle>* handles) {
+ if (!blob_info || blob_info->empty()) {
+ blob_change_map_.erase(object_store_data_key);
+ incognito_blob_map_.erase(object_store_data_key);
+
+ BlobEntryKey blob_entry_key;
+ StringPiece leveldb_key_piece(object_store_data_key);
+ if (!BlobEntryKey::FromObjectStoreDataKey(&leveldb_key_piece,
+ &blob_entry_key)) {
+ NOTREACHED();
+ return InternalInconsistencyStatus();
+ }
+ std::string value;
+ bool found = false;
+ leveldb::Status s =
+ transaction()->Get(blob_entry_key.Encode(), &value, &found);
+ if (!s.ok())
+ return s;
+ if (!found)
+ return leveldb::Status::OK();
+ }
+ PutBlobInfo(
+ database_id, object_store_id, object_store_data_key, blob_info, handles);
+ return leveldb::Status::OK();
+}
+
// This is storing an info, even if empty, even if the previous key had no blob
// info that we know of. It duplicates a bunch of information stored in the
// leveldb transaction, but only w.r.t. the user keys altered--we don't keep the
diff --git a/content/browser/indexed_db/indexed_db_backing_store.h b/content/browser/indexed_db/indexed_db_backing_store.h
index febcd70..7931f76 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.h
+++ b/content/browser/indexed_db/indexed_db_backing_store.h
@@ -5,8 +5,10 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_
+#include <map>
#include <set>
#include <string>
+#include <utility>
#include <vector>
#include "base/basictypes.h"
@@ -175,6 +177,7 @@
class BlobWriteCallback : public base::RefCounted<BlobWriteCallback> {
public:
virtual void Run(bool succeeded) = 0;
+
protected:
virtual ~BlobWriteCallback() {}
friend class base::RefCounted<BlobWriteCallback>;
@@ -333,6 +336,9 @@
scoped_ptr<LevelDBIterator> iterator_;
scoped_ptr<IndexedDBKey> current_key_;
IndexedDBBackingStore::RecordIdentifier record_identifier_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Cursor);
};
virtual scoped_ptr<Cursor> OpenObjectStoreKeyCursor(
@@ -403,6 +409,12 @@
backing_store_ = NULL;
transaction_ = NULL;
}
+ leveldb::Status PutBlobInfoIfNeeded(
+ int64 database_id,
+ int64 object_store_id,
+ const std::string& object_store_data_key,
+ std::vector<IndexedDBBlobInfo>*,
+ ScopedVector<webkit_blob::BlobDataHandle>* handles);
void PutBlobInfo(int64 database_id,
int64 object_store_id,
const std::string& object_store_data_key,
@@ -459,6 +471,7 @@
virtual ~ChainedBlobWriter() {}
friend class base::RefCounted<ChainedBlobWriter>;
};
+
class ChainedBlobWriterImpl;
typedef std::vector<WriteDescriptor> WriteDescriptorVec;
@@ -562,6 +575,8 @@
// will hold a reference to this backing store.
IndexedDBActiveBlobRegistry active_blob_registry_;
base::OneShotTimer<IndexedDBBackingStore> close_timer_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStore);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
index bdbf077..76d6d5f 100644
--- a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
@@ -40,6 +40,7 @@
class DefaultLevelDBFactory : public LevelDBFactory {
public:
+ DefaultLevelDBFactory() {}
virtual leveldb::Status OpenLevelDB(const base::FilePath& file_name,
const LevelDBComparator* comparator,
scoped_ptr<LevelDBDatabase>* db,
@@ -50,6 +51,9 @@
const base::FilePath& file_name) OVERRIDE {
return LevelDBDatabase::Destroy(file_name);
}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DefaultLevelDBFactory);
};
class TestableIndexedDBBackingStore : public IndexedDBBackingStore {
@@ -160,11 +164,13 @@
int64 database_id_;
std::vector<Transaction::WriteDescriptor> writes_;
std::vector<int64> removals_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestableIndexedDBBackingStore);
};
class TestIDBFactory : public IndexedDBFactory {
public:
- TestIDBFactory(IndexedDBContextImpl* idb_context)
+ explicit TestIDBFactory(IndexedDBContextImpl* idb_context)
: IndexedDBFactory(idb_context) {}
scoped_refptr<TestableIndexedDBBackingStore> OpenBackingStoreForTest(
@@ -204,6 +210,9 @@
&leveldb_factory,
context()->TaskRunner());
}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TestIDBFactory);
};
class IndexedDBBackingStoreTest : public testing::Test {
@@ -343,6 +352,9 @@
protected:
virtual ~TestCallback() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TestCallback);
};
TEST_F(IndexedDBBackingStoreTest, PutGetConsistency) {
diff --git a/content/browser/indexed_db/indexed_db_blob_info.h b/content/browser/indexed_db/indexed_db_blob_info.h
index 55ddfbc..a2ac991 100644
--- a/content/browser/indexed_db/indexed_db_blob_info.h
+++ b/content/browser/indexed_db/indexed_db_blob_info.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BLOB_INFO_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BLOB_INFO_H_
+#include <string>
+
#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/time/time.h"
diff --git a/content/browser/indexed_db/indexed_db_browsertest.cc b/content/browser/indexed_db/indexed_db_browsertest.cc
index 98da8c0..0d62a13 100644
--- a/content/browser/indexed_db/indexed_db_browsertest.cc
+++ b/content/browser/indexed_db/indexed_db_browsertest.cc
@@ -125,6 +125,7 @@
base::MessageLoop::current()->RunUntilIdle();
return disk_usage_;
}
+
private:
virtual void DidGetDiskUsage(int64 bytes) {
EXPECT_GT(bytes, 0);
@@ -132,6 +133,8 @@
}
int64 disk_usage_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBBrowserTest);
};
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CursorTest) {
@@ -208,10 +211,15 @@
class IndexedDBBrowserTestWithLowQuota : public IndexedDBBrowserTest {
public:
+ IndexedDBBrowserTestWithLowQuota() {}
+
virtual void SetUpOnMainThread() OVERRIDE {
const int kInitialQuotaKilobytes = 5000;
SetQuota(kInitialQuotaKilobytes);
}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBBrowserTestWithLowQuota);
};
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithLowQuota, QuotaTest) {
@@ -220,9 +228,14 @@
class IndexedDBBrowserTestWithGCExposed : public IndexedDBBrowserTest {
public:
+ IndexedDBBrowserTestWithGCExposed() {}
+
virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc");
}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBBrowserTestWithGCExposed);
};
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithGCExposed,
@@ -250,6 +263,7 @@
class IndexedDBBrowserTestWithPreexistingLevelDB : public IndexedDBBrowserTest {
public:
+ IndexedDBBrowserTestWithPreexistingLevelDB() {}
virtual void SetUpOnMainThread() OVERRIDE {
scoped_refptr<IndexedDBContextImpl> context = GetContext();
context->TaskRunner()->PostTask(
@@ -264,6 +278,8 @@
virtual std::string EnclosingLevelDBDir() = 0;
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBBrowserTestWithPreexistingLevelDB);
};
class IndexedDBBrowserTestWithVersion0Schema : public
@@ -569,7 +585,7 @@
// Start on a different URL to force a new renderer process.
Shell* new_shell = CreateBrowser();
- NavigateToURL(new_shell, GURL(kAboutBlankURL));
+ NavigateToURL(new_shell, GURL(url::kAboutBlankURL));
NavigateAndWaitForTitle(new_shell, "version_change_blocked.html", "#tab2",
"setVersion(3) blocked");
diff --git a/content/browser/indexed_db/indexed_db_callbacks.cc b/content/browser/indexed_db/indexed_db_callbacks.cc
index 74c2558..74a76fd 100644
--- a/content/browser/indexed_db/indexed_db_callbacks.cc
+++ b/content/browser/indexed_db/indexed_db_callbacks.cc
@@ -249,16 +249,14 @@
static void BlobLookupForCursorPrefetch(
IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params* params,
scoped_refptr<IndexedDBDispatcherHost> dispatcher_host,
- const std::vector<IndexedDBValue>& values,
- std::vector<std::vector<IndexedDBMsg_BlobOrFileInfo> >*
- blob_or_file_infos) {
+ const std::vector<IndexedDBValue>& values) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- DCHECK_EQ(values.size(), blob_or_file_infos->size());
+ DCHECK_EQ(values.size(), params->blob_or_file_infos.size());
std::vector<IndexedDBValue>::const_iterator value_iter;
std::vector<std::vector<IndexedDBMsg_BlobOrFileInfo> >::iterator blob_iter;
- for (value_iter = values.begin(), blob_iter = blob_or_file_infos->begin();
- value_iter != values.end();
+ for (value_iter = values.begin(), blob_iter =
+ params->blob_or_file_infos.begin(); value_iter != values.end();
++value_iter, ++blob_iter) {
if (!CreateAllBlobs(value_iter->blob_info, &*blob_iter, dispatcher_host))
return;
@@ -453,8 +451,7 @@
base::Bind(BlobLookupForCursorPrefetch,
base::Owned(params.release()),
dispatcher_host_,
- values,
- base::Unretained(¶ms->blob_or_file_infos)));
+ values));
} else {
dispatcher_host_->Send(
new IndexedDBMsg_CallbacksSuccessCursorPrefetch(*params.get()));
diff --git a/content/browser/indexed_db/indexed_db_callbacks.h b/content/browser/indexed_db/indexed_db_callbacks.h
index 1bf5c11..8041fb8 100644
--- a/content/browser/indexed_db/indexed_db_callbacks.h
+++ b/content/browser/indexed_db/indexed_db_callbacks.h
@@ -132,6 +132,8 @@
// Stored in OnDataLoss, merged with OnUpgradeNeeded response.
blink::WebIDBDataLoss data_loss_;
std::string data_loss_message_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_class_factory.cc b/content/browser/indexed_db/indexed_db_class_factory.cc
new file mode 100644
index 0000000..a2a1336
--- /dev/null
+++ b/content/browser/indexed_db/indexed_db_class_factory.cc
@@ -0,0 +1,30 @@
+// Copyright 2014 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 "content/browser/indexed_db/indexed_db_class_factory.h"
+#include "content/browser/indexed_db/leveldb/leveldb_transaction.h"
+
+namespace content {
+
+static IndexedDBClassFactory::GetterCallback* s_factory_getter;
+static ::base::LazyInstance<IndexedDBClassFactory>::Leaky s_factory =
+ LAZY_INSTANCE_INITIALIZER;
+
+void IndexedDBClassFactory::SetIndexedDBClassFactoryGetter(GetterCallback* cb) {
+ s_factory_getter = cb;
+}
+
+IndexedDBClassFactory* IndexedDBClassFactory::Get() {
+ if (s_factory_getter)
+ return (*s_factory_getter)();
+ else
+ return s_factory.Pointer();
+}
+
+LevelDBTransaction* IndexedDBClassFactory::CreateLevelDBTransaction(
+ LevelDBDatabase* db) {
+ return new LevelDBTransaction(db);
+}
+
+} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_class_factory.h b/content/browser/indexed_db/indexed_db_class_factory.h
new file mode 100644
index 0000000..eb3c656
--- /dev/null
+++ b/content/browser/indexed_db/indexed_db_class_factory.h
@@ -0,0 +1,36 @@
+// Copyright 2014 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 CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CLASS_FACTORY_H_
+#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CLASS_FACTORY_H_
+
+#include "base/lazy_instance.h"
+#include "content/common/content_export.h"
+
+namespace content {
+
+class LevelDBDatabase;
+class LevelDBTransaction;
+
+// Use this factory to create some IndexedDB objects. Exists solely to
+// facilitate tests which sometimes need to inject mock objects into the system.
+class CONTENT_EXPORT IndexedDBClassFactory {
+ public:
+ typedef IndexedDBClassFactory* GetterCallback();
+
+ static IndexedDBClassFactory* Get();
+
+ static void SetIndexedDBClassFactoryGetter(GetterCallback* cb);
+
+ virtual LevelDBTransaction* CreateLevelDBTransaction(LevelDBDatabase* db);
+
+ protected:
+ IndexedDBClassFactory() {}
+ virtual ~IndexedDBClassFactory() {}
+ friend struct base::DefaultLazyInstanceTraits<IndexedDBClassFactory>;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CLASS_FACTORY_H_
diff --git a/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc b/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc
index d19a0b8..49d0436 100644
--- a/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc
@@ -37,6 +37,7 @@
class BustedLevelDBDatabase : public LevelDBDatabase {
public:
+ BustedLevelDBDatabase() {}
static scoped_ptr<LevelDBDatabase> Open(
const base::FilePath& file_name,
const LevelDBComparator* /*comparator*/) {
@@ -48,6 +49,9 @@
const LevelDBSnapshot* = 0) OVERRIDE {
return leveldb::Status::IOError("It's busted!");
}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BustedLevelDBDatabase);
};
class MockLevelDBFactory : public LevelDBFactory {
@@ -71,6 +75,9 @@
private:
bool destroy_called_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockLevelDBFactory);
};
TEST(IndexedDBIOErrorTest, CleanUpTest) {
@@ -131,6 +138,8 @@
T error_;
bool expect_destroy_;
bool destroy_called_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockErrorLevelDBFactory);
};
TEST(IndexedDBNonRecoverableIOErrorTest, NuancedCleanupTest) {
diff --git a/content/browser/indexed_db/indexed_db_connection.cc b/content/browser/indexed_db/indexed_db_connection.cc
index 811398953..0669e14 100644
--- a/content/browser/indexed_db/indexed_db_connection.cc
+++ b/content/browser/indexed_db/indexed_db_connection.cc
@@ -34,4 +34,4 @@
return database_.get() != NULL;
}
-} // namespace blink
+} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_connection.h b/content/browser/indexed_db/indexed_db_connection.h
index e4ed928..95d1f2e 100644
--- a/content/browser/indexed_db/indexed_db_connection.h
+++ b/content/browser/indexed_db/indexed_db_connection.h
@@ -34,6 +34,8 @@
// The callbacks_ member is cleared when the connection is closed.
// May be NULL in unit tests.
scoped_refptr<IndexedDBDatabaseCallbacks> callbacks_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBConnection);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_context_impl.cc b/content/browser/indexed_db/indexed_db_context_impl.cc
index 14d8e4d..c2bd0af 100644
--- a/content/browser/indexed_db/indexed_db_context_impl.cc
+++ b/content/browser/indexed_db/indexed_db_context_impl.cc
@@ -5,6 +5,7 @@
#include "content/browser/indexed_db/indexed_db_context_impl.h"
#include <algorithm>
+#include <utility>
#include "base/bind.h"
#include "base/command_line.h"
@@ -197,7 +198,6 @@
for (IndexedDBFactory::OriginDBMapIterator it = range.first;
it != range.second;
++it) {
-
const IndexedDBDatabase* db = it->second;
scoped_ptr<base::DictionaryValue> db_info(new base::DictionaryValue());
@@ -217,7 +217,6 @@
transactions.begin();
trans_it != transactions.end();
++trans_it) {
-
const IndexedDBTransaction* transaction = *trans_it;
scoped_ptr<base::DictionaryValue> transaction_info(
new base::DictionaryValue());
diff --git a/content/browser/indexed_db/indexed_db_context_impl.h b/content/browser/indexed_db/indexed_db_context_impl.h
index 31ebc21..b3ec985 100644
--- a/content/browser/indexed_db/indexed_db_context_impl.h
+++ b/content/browser/indexed_db/indexed_db_context_impl.h
@@ -7,6 +7,7 @@
#include <map>
#include <set>
+#include <string>
#include <vector>
#include "base/compiler_specific.h"
diff --git a/content/browser/indexed_db/indexed_db_cursor.cc b/content/browser/indexed_db/indexed_db_cursor.cc
index 9caf29d..7715a99 100644
--- a/content/browser/indexed_db/indexed_db_cursor.cc
+++ b/content/browser/indexed_db/indexed_db_cursor.cc
@@ -4,6 +4,8 @@
#include "content/browser/indexed_db/indexed_db_cursor.h"
+#include <vector>
+
#include "base/bind.h"
#include "base/logging.h"
#include "content/browser/indexed_db/indexed_db_callbacks.h"
diff --git a/content/browser/indexed_db/indexed_db_cursor.h b/content/browser/indexed_db/indexed_db_cursor.h
index 4c1ec0c..7c1491a 100644
--- a/content/browser/indexed_db/indexed_db_cursor.h
+++ b/content/browser/indexed_db/indexed_db_cursor.h
@@ -69,6 +69,8 @@
scoped_ptr<IndexedDBBackingStore::Cursor> saved_cursor_;
bool closed_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBCursor);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_database.cc b/content/browser/indexed_db/indexed_db_database.cc
index 5ba4e48..cc0738b 100644
--- a/content/browser/indexed_db/indexed_db_database.cc
+++ b/content/browser/indexed_db/indexed_db_database.cc
@@ -267,7 +267,7 @@
const base::string16& name,
const IndexedDBKeyPath& key_path,
bool auto_increment) {
- IDB_TRACE("IndexedDBDatabase::CreateObjectStore");
+ IDB_TRACE1("IndexedDBDatabase::CreateObjectStore", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (!transaction)
return;
@@ -316,7 +316,7 @@
void IndexedDBDatabase::DeleteObjectStore(int64 transaction_id,
int64 object_store_id) {
- IDB_TRACE("IndexedDBDatabase::DeleteObjectStore");
+ IDB_TRACE1("IndexedDBDatabase::DeleteObjectStore", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (!transaction)
return;
@@ -338,7 +338,7 @@
const IndexedDBKeyPath& key_path,
bool unique,
bool multi_entry) {
- IDB_TRACE("IndexedDBDatabase::CreateIndex");
+ IDB_TRACE1("IndexedDBDatabase::CreateIndex", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (!transaction)
return;
@@ -380,7 +380,9 @@
int64 object_store_id,
int64 index_id,
IndexedDBTransaction* transaction) {
- IDB_TRACE("IndexedDBDatabase::CreateIndexAbortOperation");
+ IDB_TRACE1("IndexedDBDatabase::CreateIndexAbortOperation",
+ "txn.id",
+ transaction->id());
DCHECK(!transaction);
RemoveIndex(object_store_id, index_id);
}
@@ -388,7 +390,7 @@
void IndexedDBDatabase::DeleteIndex(int64 transaction_id,
int64 object_store_id,
int64 index_id) {
- IDB_TRACE("IndexedDBDatabase::DeleteIndex");
+ IDB_TRACE1("IndexedDBDatabase::DeleteIndex", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (!transaction)
return;
@@ -408,7 +410,8 @@
int64 object_store_id,
int64 index_id,
IndexedDBTransaction* transaction) {
- IDB_TRACE("IndexedDBDatabase::DeleteIndexOperation");
+ IDB_TRACE1(
+ "IndexedDBDatabase::DeleteIndexOperation", "txn.id", transaction->id());
const IndexedDBIndexMetadata index_metadata =
metadata_.object_stores[object_store_id].indexes[index_id];
@@ -443,8 +446,10 @@
int64 object_store_id,
const IndexedDBIndexMetadata& index_metadata,
IndexedDBTransaction* transaction) {
- IDB_TRACE("IndexedDBDatabase::DeleteIndexAbortOperation");
DCHECK(!transaction);
+ IDB_TRACE1("IndexedDBDatabase::DeleteIndexAbortOperation",
+ "txn.id",
+ transaction->id());
AddIndex(object_store_id, index_metadata, IndexedDBIndexMetadata::kInvalidId);
}
@@ -461,7 +466,7 @@
void IndexedDBDatabase::Abort(int64 transaction_id) {
// If the transaction is unknown, then it has already been aborted by the
// backend before this call so it is safe to ignore it.
- IDB_TRACE("IndexedDBDatabase::Abort");
+ IDB_TRACE1("IndexedDBDatabase::Abort", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (transaction)
transaction->Abort();
@@ -469,7 +474,7 @@
void IndexedDBDatabase::Abort(int64 transaction_id,
const IndexedDBDatabaseError& error) {
- IDB_TRACE("IndexedDBDatabase::Abort");
+ IDB_TRACE1("IndexedDBDatabase::Abort(error)", "txn.id", transaction_id);
// If the transaction is unknown, then it has already been aborted by the
// backend before this call so it is safe to ignore it.
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
@@ -483,7 +488,7 @@
scoped_ptr<IndexedDBKeyRange> key_range,
bool key_only,
scoped_refptr<IndexedDBCallbacks> callbacks) {
- IDB_TRACE("IndexedDBDatabase::Get");
+ IDB_TRACE1("IndexedDBDatabase::Get", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (!transaction)
return;
@@ -508,7 +513,7 @@
indexed_db::CursorType cursor_type,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* transaction) {
- IDB_TRACE("IndexedDBDatabase::GetOperation");
+ IDB_TRACE1("IndexedDBDatabase::GetOperation", "txn.id", transaction->id());
DCHECK(metadata_.object_stores.find(object_store_id) !=
metadata_.object_stores.end());
@@ -723,7 +728,7 @@
PutMode put_mode,
scoped_refptr<IndexedDBCallbacks> callbacks,
const std::vector<IndexKeys>& index_keys) {
- IDB_TRACE("IndexedDBDatabase::Put");
+ IDB_TRACE1("IndexedDBDatabase::Put", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (!transaction)
return;
@@ -748,7 +753,7 @@
void IndexedDBDatabase::PutOperation(scoped_ptr<PutOperationParams> params,
IndexedDBTransaction* transaction) {
- IDB_TRACE("IndexedDBDatabase::PutOperation");
+ IDB_TRACE1("IndexedDBDatabase::PutOperation", "txn.id", transaction->id());
DCHECK_NE(transaction->mode(), indexed_db::TRANSACTION_READ_ONLY);
bool key_was_generated = false;
@@ -886,7 +891,7 @@
int64 object_store_id,
scoped_ptr<IndexedDBKey> primary_key,
const std::vector<IndexKeys>& index_keys) {
- IDB_TRACE("IndexedDBDatabase::SetIndexKeys");
+ IDB_TRACE1("IndexedDBDatabase::SetIndexKeys", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (!transaction)
return;
@@ -961,7 +966,7 @@
void IndexedDBDatabase::SetIndexesReady(int64 transaction_id,
int64,
const std::vector<int64>& index_ids) {
- IDB_TRACE("IndexedDBDatabase::SetIndexesReady");
+ IDB_TRACE1("IndexedDBDatabase::SetIndexesReady", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (!transaction)
return;
@@ -977,7 +982,9 @@
void IndexedDBDatabase::SetIndexesReadyOperation(
size_t index_count,
IndexedDBTransaction* transaction) {
- IDB_TRACE("IndexedDBDatabase::SetIndexesReadyOperation");
+ IDB_TRACE1("IndexedDBDatabase::SetIndexesReadyOperation",
+ "txn.id",
+ transaction->id());
for (size_t i = 0; i < index_count; ++i)
transaction->DidCompletePreemptiveEvent();
}
@@ -1005,7 +1012,7 @@
bool key_only,
TaskType task_type,
scoped_refptr<IndexedDBCallbacks> callbacks) {
- IDB_TRACE("IndexedDBDatabase::OpenCursor");
+ IDB_TRACE1("IndexedDBDatabase::OpenCursor", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (!transaction)
return;
@@ -1029,7 +1036,8 @@
void IndexedDBDatabase::OpenCursorOperation(
scoped_ptr<OpenCursorOperationParams> params,
IndexedDBTransaction* transaction) {
- IDB_TRACE("IndexedDBDatabase::OpenCursorOperation");
+ IDB_TRACE1(
+ "IndexedDBDatabase::OpenCursorOperation", "txn.id", transaction->id());
// The frontend has begun indexing, so this pauses the transaction
// until the indexing is complete. This can't happen any earlier
@@ -1112,7 +1120,7 @@
int64 index_id,
scoped_ptr<IndexedDBKeyRange> key_range,
scoped_refptr<IndexedDBCallbacks> callbacks) {
- IDB_TRACE("IndexedDBDatabase::Count");
+ IDB_TRACE1("IndexedDBDatabase::Count", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (!transaction)
return;
@@ -1134,7 +1142,7 @@
scoped_ptr<IndexedDBKeyRange> key_range,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* transaction) {
- IDB_TRACE("IndexedDBDatabase::CountOperation");
+ IDB_TRACE1("IndexedDBDatabase::CountOperation", "txn.id", transaction->id());
uint32 count = 0;
scoped_ptr<IndexedDBBackingStore::Cursor> backing_store_cursor;
@@ -1185,7 +1193,7 @@
int64 object_store_id,
scoped_ptr<IndexedDBKeyRange> key_range,
scoped_refptr<IndexedDBCallbacks> callbacks) {
- IDB_TRACE("IndexedDBDatabase::DeleteRange");
+ IDB_TRACE1("IndexedDBDatabase::DeleteRange", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (!transaction)
return;
@@ -1206,7 +1214,8 @@
scoped_ptr<IndexedDBKeyRange> key_range,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* transaction) {
- IDB_TRACE("IndexedDBDatabase::DeleteRangeOperation");
+ IDB_TRACE1(
+ "IndexedDBDatabase::DeleteRangeOperation", "txn.id", transaction->id());
leveldb::Status s =
backing_store_->DeleteRange(transaction->BackingStoreTransaction(),
id(),
@@ -1230,7 +1239,7 @@
void IndexedDBDatabase::Clear(int64 transaction_id,
int64 object_store_id,
scoped_refptr<IndexedDBCallbacks> callbacks) {
- IDB_TRACE("IndexedDBDatabase::Clear");
+ IDB_TRACE1("IndexedDBDatabase::Clear", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (!transaction)
return;
@@ -1247,7 +1256,7 @@
int64 object_store_id,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* transaction) {
- IDB_TRACE("IndexedDBDatabase::ObjectStoreClearOperation");
+ IDB_TRACE1("IndexedDBDatabase::ClearOperation", "txn.id", transaction->id());
leveldb::Status s = backing_store_->ClearObjectStore(
transaction->BackingStoreTransaction(), id(), object_store_id);
if (!s.ok()) {
@@ -1266,7 +1275,9 @@
void IndexedDBDatabase::DeleteObjectStoreOperation(
int64 object_store_id,
IndexedDBTransaction* transaction) {
- IDB_TRACE("IndexedDBDatabase::DeleteObjectStoreOperation");
+ IDB_TRACE1("IndexedDBDatabase::DeleteObjectStoreOperation",
+ "txn.id",
+ transaction->id());
const IndexedDBObjectStoreMetadata object_store_metadata =
metadata_.object_stores[object_store_id];
@@ -1299,7 +1310,8 @@
scoped_refptr<IndexedDBCallbacks> callbacks,
scoped_ptr<IndexedDBConnection> connection,
IndexedDBTransaction* transaction) {
- IDB_TRACE("IndexedDBDatabase::VersionChangeOperation");
+ IDB_TRACE1(
+ "IndexedDBDatabase::VersionChangeOperation", "txn.id", transaction->id());
int64 old_version = metadata_.int_version;
DCHECK_GT(version, old_version);
@@ -1437,8 +1449,7 @@
IndexedDBConnection* connection,
const std::vector<int64>& object_store_ids,
uint16 mode) {
-
- IDB_TRACE("IndexedDBDatabase::CreateTransaction");
+ IDB_TRACE1("IndexedDBDatabase::CreateTransaction", "txn.id", transaction_id);
DCHECK(connections_.count(connection));
DCHECK(transactions_.find(transaction_id) == transactions_.end());
if (transactions_.find(transaction_id) != transactions_.end())
@@ -1725,16 +1736,20 @@
void IndexedDBDatabase::CreateObjectStoreAbortOperation(
int64 object_store_id,
IndexedDBTransaction* transaction) {
- IDB_TRACE("IndexedDBDatabase::CreateObjectStoreAbortOperation");
DCHECK(!transaction);
+ IDB_TRACE1("IndexedDBDatabase::CreateObjectStoreAbortOperation",
+ "txn.id",
+ transaction->id());
RemoveObjectStore(object_store_id);
}
void IndexedDBDatabase::DeleteObjectStoreAbortOperation(
const IndexedDBObjectStoreMetadata& object_store_metadata,
IndexedDBTransaction* transaction) {
- IDB_TRACE("IndexedDBDatabase::DeleteObjectStoreAbortOperation");
DCHECK(!transaction);
+ IDB_TRACE1("IndexedDBDatabase::DeleteObjectStoreAbortOperation",
+ "txn.id",
+ transaction->id());
AddObjectStore(object_store_metadata,
IndexedDBObjectStoreMetadata::kInvalidId);
}
@@ -1743,8 +1758,10 @@
const base::string16& previous_version,
int64 previous_int_version,
IndexedDBTransaction* transaction) {
- IDB_TRACE("IndexedDBDatabase::VersionChangeAbortOperation");
DCHECK(!transaction);
+ IDB_TRACE1("IndexedDBDatabase::VersionChangeAbortOperation",
+ "txn.id",
+ transaction->id());
metadata_.version = previous_version;
metadata_.int_version = previous_int_version;
}
diff --git a/content/browser/indexed_db/indexed_db_database.h b/content/browser/indexed_db/indexed_db_database.h
index c0bd789..63a438a 100644
--- a/content/browser/indexed_db/indexed_db_database.h
+++ b/content/browser/indexed_db/indexed_db_database.h
@@ -290,6 +290,8 @@
typedef list_set<IndexedDBConnection*> ConnectionSet;
ConnectionSet connections_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabase);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_database_callbacks.h b/content/browser/indexed_db/indexed_db_database_callbacks.h
index 0fae780..ad16a04 100644
--- a/content/browser/indexed_db/indexed_db_database_callbacks.h
+++ b/content/browser/indexed_db/indexed_db_database_callbacks.h
@@ -36,6 +36,8 @@
scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_;
int ipc_thread_id_;
int ipc_database_callbacks_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseCallbacks);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_database_error.h b/content/browser/indexed_db/indexed_db_database_error.h
index 84fee94..25b5ea6 100644
--- a/content/browser/indexed_db/indexed_db_database_error.h
+++ b/content/browser/indexed_db/indexed_db_database_error.h
@@ -13,8 +13,7 @@
class IndexedDBDatabaseError {
public:
- IndexedDBDatabaseError(uint16 code)
- : code_(code) {}
+ explicit IndexedDBDatabaseError(uint16 code) : code_(code) {}
IndexedDBDatabaseError(uint16 code, const char* message)
: code_(code), message_(base::ASCIIToUTF16(message)) {}
IndexedDBDatabaseError(uint16 code, const base::string16& message)
@@ -27,6 +26,8 @@
private:
const uint16 code_;
const base::string16 message_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseError);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_database_unittest.cc b/content/browser/indexed_db/indexed_db_database_unittest.cc
index 9f3d029..dcaf823 100644
--- a/content/browser/indexed_db/indexed_db_database_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_database_unittest.cc
@@ -4,6 +4,8 @@
#include "content/browser/indexed_db/indexed_db_database.h"
+#include <set>
+
#include "base/auto_reset.h"
#include "base/logging.h"
#include "base/run_loop.h"
@@ -14,7 +16,6 @@
#include "content/browser/indexed_db/indexed_db_callbacks.h"
#include "content/browser/indexed_db/indexed_db_connection.h"
#include "content/browser/indexed_db/indexed_db_cursor.h"
-#include "content/browser/indexed_db/indexed_db_database.h"
#include "content/browser/indexed_db/indexed_db_factory.h"
#include "content/browser/indexed_db/indexed_db_fake_backing_store.h"
#include "content/browser/indexed_db/indexed_db_transaction.h"
@@ -160,7 +161,7 @@
virtual void OnBlocked(int64 existing_version) OVERRIDE {
blocked_called_ = true;
}
- virtual void OnSuccess(int64) OVERRIDE { success_called_ = true; }
+ virtual void OnSuccess(int64 result) OVERRIDE { success_called_ = true; }
bool blocked_called() const { return blocked_called_; }
bool success_called() const { return success_called_; }
@@ -170,6 +171,8 @@
bool blocked_called_;
bool success_called_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockDeleteCallbacks);
};
TEST(IndexedDBDatabaseTest, PendingDelete) {
@@ -324,6 +327,9 @@
IndexedDBDatabaseOperationAbortTest() {
commit_success_ = leveldb::Status::NotFound("Bummer.");
}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabaseOperationAbortTest);
};
TEST_F(IndexedDBDatabaseOperationAbortTest, CreateObjectStore) {
@@ -403,7 +409,7 @@
RunPostedTasks();
EXPECT_EQ(0ULL, db_->metadata().object_stores.size());
- transaction_->Commit(); // Cleans up the object hierarchy.
+ transaction_->Commit(); // Cleans up the object hierarchy.
}
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.cc b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
index 5ec2b94..b147951 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
@@ -244,7 +244,6 @@
web_metadata.object_stores.begin();
iter != web_metadata.object_stores.end();
++iter) {
-
const content::IndexedDBObjectStoreMetadata& web_store_metadata =
iter->second;
::IndexedDBObjectStoreMetadata idb_store_metadata;
@@ -902,7 +901,7 @@
int32 ipc_cursor_id,
int32 ipc_thread_id,
int32 ipc_callbacks_id,
- unsigned long count) {
+ uint32 count) {
DCHECK(
parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
IndexedDBCursor* idb_cursor =
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.h b/content/browser/indexed_db/indexed_db_dispatcher_host.h
index a69a584..abbdab9 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.h
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_
#include <map>
+#include <string>
#include <vector>
#include "base/basictypes.h"
@@ -149,6 +150,8 @@
private:
IDMap<scoped_refptr<RefCountedType>, IDMapOwnPointer> map_;
+
+ DISALLOW_COPY_AND_ASSIGN(RefIDMap);
};
// Helper templates.
@@ -223,6 +226,9 @@
TransactionIDToSizeMap transaction_size_map_;
TransactionIDToURLMap transaction_url_map_;
TransactionIDToDatabaseIDMap transaction_database_map_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DatabaseDispatcherHost);
};
class CursorDispatcherHost {
@@ -235,7 +241,7 @@
void OnAdvance(int32 ipc_object_store_id,
int32 ipc_thread_id,
int32 ipc_callbacks_id,
- unsigned long count);
+ uint32 count);
void OnContinue(int32 ipc_object_store_id,
int32 ipc_thread_id,
int32 ipc_callbacks_id,
@@ -252,6 +258,9 @@
IndexedDBDispatcherHost* parent_;
RefIDMap<IndexedDBCursor> map_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CursorDispatcherHost);
};
// The getter holds the context until OnChannelConnected() can be called from
diff --git a/content/browser/indexed_db/indexed_db_factory.cc b/content/browser/indexed_db/indexed_db_factory.cc
index dccec5f..3f08d06 100644
--- a/content/browser/indexed_db/indexed_db_factory.cc
+++ b/content/browser/indexed_db/indexed_db_factory.cc
@@ -4,6 +4,8 @@
#include "content/browser/indexed_db/indexed_db_factory.h"
+#include <vector>
+
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
@@ -302,7 +304,6 @@
bool IndexedDBFactory::IsDatabaseOpen(const GURL& origin_url,
const base::string16& name) const {
-
return !!database_map_.count(IndexedDBDatabase::Identifier(origin_url, name));
}
diff --git a/content/browser/indexed_db/indexed_db_factory.h b/content/browser/indexed_db/indexed_db_factory.h
index 20d18c2..c2177de 100644
--- a/content/browser/indexed_db/indexed_db_factory.h
+++ b/content/browser/indexed_db/indexed_db_factory.h
@@ -7,6 +7,8 @@
#include <map>
#include <set>
+#include <string>
+#include <utility>
#include "base/basictypes.h"
#include "base/files/file_path.h"
@@ -143,6 +145,8 @@
std::set<scoped_refptr<IndexedDBBackingStore> > session_only_backing_stores_;
IndexedDBBackingStoreMap backing_stores_with_active_blobs_;
std::set<GURL> backends_opened_since_boot_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBFactory);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_factory_unittest.cc b/content/browser/indexed_db/indexed_db_factory_unittest.cc
index f30f451..975f9bc 100644
--- a/content/browser/indexed_db/indexed_db_factory_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_factory_unittest.cc
@@ -28,7 +28,8 @@
class MockIDBFactory : public IndexedDBFactory {
public:
- MockIDBFactory(IndexedDBContextImpl* context) : IndexedDBFactory(context) {}
+ explicit MockIDBFactory(IndexedDBContextImpl* context)
+ : IndexedDBFactory(context) {}
scoped_refptr<IndexedDBBackingStore> TestOpenBackingStore(
const GURL& origin,
const base::FilePath& data_directory) {
@@ -58,6 +59,8 @@
private:
virtual ~MockIDBFactory() {}
+
+ DISALLOW_COPY_AND_ASSIGN(MockIDBFactory);
};
} // namespace
@@ -196,7 +199,8 @@
class DiskFullFactory : public IndexedDBFactory {
public:
- DiskFullFactory(IndexedDBContextImpl* context) : IndexedDBFactory(context) {}
+ explicit DiskFullFactory(IndexedDBContextImpl* context)
+ : IndexedDBFactory(context) {}
private:
virtual ~DiskFullFactory() {}
@@ -210,6 +214,8 @@
*disk_full = true;
return scoped_refptr<IndexedDBBackingStore>();
}
+
+ DISALLOW_COPY_AND_ASSIGN(DiskFullFactory);
};
class LookingForQuotaErrorMockCallbacks : public IndexedDBCallbacks {
@@ -225,6 +231,8 @@
private:
virtual ~LookingForQuotaErrorMockCallbacks() {}
bool error_called_;
+
+ DISALLOW_COPY_AND_ASSIGN(LookingForQuotaErrorMockCallbacks);
};
TEST_F(IndexedDBFactoryTest, QuotaErrorOnDiskFull) {
@@ -421,6 +429,8 @@
class UpgradeNeededCallbacks : public MockIndexedDBCallbacks {
public:
+ UpgradeNeededCallbacks() {}
+
virtual void OnSuccess(scoped_ptr<IndexedDBConnection> connection,
const IndexedDBDatabaseMetadata& metadata) OVERRIDE {
EXPECT_TRUE(connection_.get());
@@ -436,6 +446,9 @@
protected:
virtual ~UpgradeNeededCallbacks() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UpgradeNeededCallbacks);
};
class ErrorCallbacks : public MockIndexedDBCallbacks {
@@ -450,6 +463,8 @@
private:
virtual ~ErrorCallbacks() {}
bool saw_error_;
+
+ DISALLOW_COPY_AND_ASSIGN(ErrorCallbacks);
};
TEST_F(IndexedDBFactoryTest, DatabaseFailedOpen) {
diff --git a/content/browser/indexed_db/indexed_db_fake_backing_store.h b/content/browser/indexed_db/indexed_db_fake_backing_store.h
index 6f383c1..fef28af 100644
--- a/content/browser/indexed_db/indexed_db_fake_backing_store.h
+++ b/content/browser/indexed_db/indexed_db_fake_backing_store.h
@@ -135,7 +135,7 @@
class FakeTransaction : public IndexedDBBackingStore::Transaction {
public:
- FakeTransaction(leveldb::Status phase_two_result);
+ explicit FakeTransaction(leveldb::Status phase_two_result);
virtual void Begin() OVERRIDE;
virtual leveldb::Status CommitPhaseOne(
scoped_refptr<BlobWriteCallback>) OVERRIDE;
@@ -144,11 +144,15 @@
private:
leveldb::Status result_;
+
+ DISALLOW_COPY_AND_ASSIGN(FakeTransaction);
};
protected:
friend class base::RefCounted<IndexedDBFakeBackingStore>;
virtual ~IndexedDBFakeBackingStore();
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBFakeBackingStore);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_index_writer.h b/content/browser/indexed_db/indexed_db_index_writer.h
index aeadea5..ef4bb16 100644
--- a/content/browser/indexed_db/indexed_db_index_writer.h
+++ b/content/browser/indexed_db/indexed_db_index_writer.h
@@ -56,6 +56,8 @@
const IndexedDBIndexMetadata index_metadata_;
IndexedDBDatabase::IndexKeys index_keys_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexWriter);
};
bool MakeIndexWriters(
diff --git a/content/browser/indexed_db/indexed_db_internals_ui.cc b/content/browser/indexed_db/indexed_db_internals_ui.cc
index e2fd12f..5e181f4 100644
--- a/content/browser/indexed_db/indexed_db_internals_ui.cc
+++ b/content/browser/indexed_db/indexed_db_internals_ui.cc
@@ -263,7 +263,7 @@
"indexeddb.onForcedClose",
base::StringValue(partition_path.value()),
base::StringValue(origin_url.spec()),
- base::FundamentalValue(double(connection_count)));
+ base::FundamentalValue(static_cast<double>(connection_count)));
}
void IndexedDBInternalsUI::OnDownloadDataReady(
@@ -310,6 +310,8 @@
private:
const base::FilePath temp_dir_;
+
+ DISALLOW_COPY_AND_ASSIGN(FileDeleter);
};
void FileDeleter::OnDownloadUpdated(DownloadItem* item) {
@@ -353,7 +355,7 @@
"indexeddb.onOriginDownloadReady",
base::StringValue(partition_path.value()),
base::StringValue(origin_url.spec()),
- base::FundamentalValue(double(connection_count)));
+ base::FundamentalValue(static_cast<double>(connection_count)));
}
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_leveldb_coding.h b/content/browser/indexed_db/indexed_db_leveldb_coding.h
index 50573ee..85bc091 100644
--- a/content/browser/indexed_db/indexed_db_leveldb_coding.h
+++ b/content/browser/indexed_db/indexed_db_leveldb_coding.h
@@ -6,6 +6,8 @@
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_
#include <string>
+#include <utility>
+#include <vector>
#include "base/basictypes.h"
#include "base/logging.h"
diff --git a/content/browser/indexed_db/indexed_db_metadata.h b/content/browser/indexed_db/indexed_db_metadata.h
index 00970a6..68df82e 100644
--- a/content/browser/indexed_db/indexed_db_metadata.h
+++ b/content/browser/indexed_db/indexed_db_metadata.h
@@ -79,6 +79,6 @@
ObjectStoreMap object_stores;
};
-}
+} // namespace content
#endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_METADATA_H_
diff --git a/content/browser/indexed_db/indexed_db_pending_connection.h b/content/browser/indexed_db/indexed_db_pending_connection.h
index c16691e..598bef2 100644
--- a/content/browser/indexed_db/indexed_db_pending_connection.h
+++ b/content/browser/indexed_db/indexed_db_pending_connection.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_INDEXED_DB_PENDING_CONNECTION_H_
-#define CONTENT_BROWSER_INDEXED_DB_PENDING_CONNECTION_H_
+#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_PENDING_CONNECTION_H_
+#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_PENDING_CONNECTION_H_
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
@@ -33,4 +33,4 @@
} // namespace content
-#endif // CONTENT_BROWSER_INDEXED_DB_PENDING_CONNECTION_H_
+#endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_PENDING_CONNECTION_H_
diff --git a/content/browser/indexed_db/indexed_db_tracing.h b/content/browser/indexed_db/indexed_db_tracing.h
index 86ddaa3..b7a5a41 100644
--- a/content/browser/indexed_db/indexed_db_tracing.h
+++ b/content/browser/indexed_db/indexed_db_tracing.h
@@ -7,5 +7,7 @@
#include "base/debug/trace_event.h"
#define IDB_TRACE(a) TRACE_EVENT0("IndexedDB", (a));
+#define IDB_TRACE1(a, arg1_name, arg1_val) \
+ TRACE_EVENT1("IndexedDB", (a), (arg1_name), (arg1_val));
#endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_TRACING_H_
diff --git a/content/browser/indexed_db/indexed_db_transaction.cc b/content/browser/indexed_db/indexed_db_transaction.cc
index 4fb4c24..4de6784 100644
--- a/content/browser/indexed_db/indexed_db_transaction.cc
+++ b/content/browser/indexed_db/indexed_db_transaction.cc
@@ -131,7 +131,7 @@
}
void IndexedDBTransaction::Abort(const IndexedDBDatabaseError& error) {
- IDB_TRACE("IndexedDBTransaction::Abort");
+ IDB_TRACE1("IndexedDBTransaction::Abort", "txn.id", id());
if (state_ == FINISHED)
return;
@@ -209,7 +209,8 @@
class BlobWriteCallbackImpl : public IndexedDBBackingStore::BlobWriteCallback {
public:
- BlobWriteCallbackImpl(scoped_refptr<IndexedDBTransaction> transaction)
+ explicit BlobWriteCallbackImpl(
+ scoped_refptr<IndexedDBTransaction> transaction)
: transaction_(transaction) {}
virtual void Run(bool succeeded) OVERRIDE {
transaction_->BlobWriteComplete(succeeded);
@@ -235,7 +236,7 @@
}
void IndexedDBTransaction::Commit() {
- IDB_TRACE("IndexedDBTransaction::Commit");
+ IDB_TRACE1("IndexedDBTransaction::Commit", "txn.id", id());
// In multiprocess ports, front-end may have requested a commit but
// an abort has already been initiated asynchronously by the
@@ -255,9 +256,9 @@
state_ = COMMITTING;
- if (!used_)
+ if (!used_) {
CommitPhaseTwo();
- else {
+ } else {
scoped_refptr<IndexedDBBackingStore::BlobWriteCallback> callback(
new BlobWriteCallbackImpl(this));
// CommitPhaseOne will call the callback synchronously if there are no blobs
@@ -318,7 +319,7 @@
}
void IndexedDBTransaction::ProcessTaskQueue() {
- IDB_TRACE("IndexedDBTransaction::ProcessTaskQueue");
+ IDB_TRACE1("IndexedDBTransaction::ProcessTaskQueue", "txn.id", id());
// May have been aborted.
if (!should_process_queue_)
diff --git a/content/browser/indexed_db/indexed_db_transaction.h b/content/browser/indexed_db/indexed_db_transaction.h
index a28a9d4..e30422f 100644
--- a/content/browser/indexed_db/indexed_db_transaction.h
+++ b/content/browser/indexed_db/indexed_db_transaction.h
@@ -132,6 +132,8 @@
private:
std::queue<Operation> queue_;
+
+ DISALLOW_COPY_AND_ASSIGN(TaskQueue);
};
class TaskStack {
@@ -145,6 +147,8 @@
private:
std::stack<Operation> stack_;
+
+ DISALLOW_COPY_AND_ASSIGN(TaskStack);
};
TaskQueue task_queue_;
diff --git a/content/browser/indexed_db/indexed_db_transaction_coordinator.h b/content/browser/indexed_db/indexed_db_transaction_coordinator.h
index a483dfb..98db0b3 100644
--- a/content/browser/indexed_db/indexed_db_transaction_coordinator.h
+++ b/content/browser/indexed_db/indexed_db_transaction_coordinator.h
@@ -47,6 +47,8 @@
typedef list_set<scoped_refptr<IndexedDBTransaction> > TransactionSet;
TransactionSet queued_transactions_;
TransactionSet started_transactions_;
+
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBTransactionCoordinator);
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_value.h b/content/browser/indexed_db/indexed_db_value.h
index 9a5385f..d313038 100644
--- a/content/browser/indexed_db/indexed_db_value.h
+++ b/content/browser/indexed_db/indexed_db_value.h
@@ -5,7 +5,10 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_VALUE_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_VALUE_H_
+#include <algorithm>
+#include <string>
#include <vector>
+
#include "content/browser/indexed_db/indexed_db_blob_info.h"
#include "content/common/content_export.h"
diff --git a/content/browser/indexed_db/leveldb/leveldb_database.cc b/content/browser/indexed_db/leveldb/leveldb_database.cc
index 0efbcd1..16f4fc7 100644
--- a/content/browser/indexed_db/leveldb/leveldb_database.cc
+++ b/content/browser/indexed_db/leveldb/leveldb_database.cc
@@ -124,8 +124,10 @@
private:
leveldb::Env* env_;
leveldb::FileLock* lock_;
+
+ DISALLOW_COPY_AND_ASSIGN(LockImpl);
};
-}
+} // namespace
scoped_ptr<LevelDBLock> LevelDBDatabase::LockForTesting(
const base::FilePath& file_name) {
@@ -188,7 +190,7 @@
std::string error_histogram_name(histogram_name);
if (result == leveldb_env::METHOD_AND_PFE) {
- DCHECK(error < 0);
+ DCHECK_LT(error, 0);
error_histogram_name.append(std::string(".PFE.") +
leveldb_env::MethodIDToString(method));
base::LinearHistogram::FactoryGet(
@@ -213,7 +215,7 @@
const std::string& histogram_name,
const leveldb::Status& status) {
int error = leveldb_env::GetCorruptionCode(status);
- DCHECK(error >= 0);
+ DCHECK_GE(error, 0);
std::string corruption_histogram_name(histogram_name);
corruption_histogram_name.append(".Corruption");
const int kNumPatterns = leveldb_env::GetNumCorruptionCodes();
@@ -391,8 +393,10 @@
void CheckStatus();
scoped_ptr<leveldb::Iterator> iterator_;
+
+ DISALLOW_COPY_AND_ASSIGN(IteratorImpl);
};
-}
+} // namespace
IteratorImpl::IteratorImpl(scoped_ptr<leveldb::Iterator> it)
: iterator_(it.Pass()) {}
diff --git a/content/browser/indexed_db/leveldb/leveldb_database.h b/content/browser/indexed_db/leveldb/leveldb_database.h
index e4f6af9..f6bf7be 100644
--- a/content/browser/indexed_db/leveldb/leveldb_database.h
+++ b/content/browser/indexed_db/leveldb/leveldb_database.h
@@ -39,11 +39,17 @@
leveldb::DB* db_;
const leveldb::Snapshot* snapshot_;
+
+ DISALLOW_COPY_AND_ASSIGN(LevelDBSnapshot);
};
class CONTENT_EXPORT LevelDBLock {
-public:
+ public:
+ LevelDBLock() {}
virtual ~LevelDBLock() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(LevelDBLock);
};
class CONTENT_EXPORT LevelDBDatabase {
diff --git a/content/browser/indexed_db/leveldb/leveldb_transaction.h b/content/browser/indexed_db/leveldb/leveldb_transaction.h
index 1102651..ed8b1ca 100644
--- a/content/browser/indexed_db/leveldb/leveldb_transaction.h
+++ b/content/browser/indexed_db/leveldb/leveldb_transaction.h
@@ -9,6 +9,7 @@
#include <set>
#include <string>
+#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_piece.h"
@@ -23,7 +24,6 @@
class CONTENT_EXPORT LevelDBTransaction
: public base::RefCounted<LevelDBTransaction> {
public:
- explicit LevelDBTransaction(LevelDBDatabase* db);
void Put(const base::StringPiece& key, std::string* value);
void Remove(const base::StringPiece& key);
@@ -37,7 +37,12 @@
private:
virtual ~LevelDBTransaction();
+ explicit LevelDBTransaction(LevelDBDatabase* db);
+ friend class IndexedDBClassFactory;
friend class base::RefCounted<LevelDBTransaction>;
+ FRIEND_TEST_ALL_PREFIXES(LevelDBDatabaseTest, Transaction);
+ FRIEND_TEST_ALL_PREFIXES(LevelDBDatabaseTest, TransactionCommitTest);
+ FRIEND_TEST_ALL_PREFIXES(LevelDBDatabaseTest, TransactionIterator);
struct Record {
Record();
@@ -80,6 +85,8 @@
explicit DataIterator(LevelDBTransaction* transaction);
DataType* data_;
DataType::iterator iterator_;
+
+ DISALLOW_COPY_AND_ASSIGN(DataIterator);
};
class TransactionIterator : public LevelDBIterator {
@@ -118,6 +125,8 @@
};
Direction direction_;
mutable bool data_changed_;
+
+ DISALLOW_COPY_AND_ASSIGN(TransactionIterator);
};
void Set(const base::StringPiece& key, std::string* value, bool deleted);
@@ -133,6 +142,8 @@
DataType data_;
bool finished_;
std::set<TransactionIterator*> iterators_;
+
+ DISALLOW_COPY_AND_ASSIGN(LevelDBTransaction);
};
// Reads go straight to the database, ignoring any writes cached in
@@ -155,6 +166,8 @@
LevelDBDatabase* db_;
scoped_ptr<LevelDBWriteBatch> write_batch_;
bool finished_;
+
+ DISALLOW_COPY_AND_ASSIGN(LevelDBDirectTransaction);
};
} // namespace content
diff --git a/content/browser/indexed_db/leveldb/leveldb_unittest.cc b/content/browser/indexed_db/leveldb/leveldb_unittest.cc
index ad06693..83fdd59 100644
--- a/content/browser/indexed_db/leveldb/leveldb_unittest.cc
+++ b/content/browser/indexed_db/leveldb/leveldb_unittest.cc
@@ -33,6 +33,8 @@
virtual const char* Name() const OVERRIDE { return "temp_comparator"; }
};
+} // namespace
+
TEST(LevelDBDatabaseTest, CorruptionTest) {
base::ScopedTempDir temp_directory;
ASSERT_TRUE(temp_directory.CreateUniqueTempDir());
@@ -262,6 +264,4 @@
EXPECT_TRUE(status.ok());
}
-} // namespace
-
} // namespace content
diff --git a/content/browser/indexed_db/mock_indexed_db_callbacks.cc b/content/browser/indexed_db/mock_indexed_db_callbacks.cc
index 2ab3ca5..62afee8 100644
--- a/content/browser/indexed_db/mock_indexed_db_callbacks.cc
+++ b/content/browser/indexed_db/mock_indexed_db_callbacks.cc
@@ -19,7 +19,8 @@
void MockIndexedDBCallbacks::OnSuccess() {}
-void MockIndexedDBCallbacks::OnSuccess(int64) {}
+void MockIndexedDBCallbacks::OnSuccess(int64 result) {
+}
void MockIndexedDBCallbacks::OnSuccess(const std::vector<base::string16>&) {}
diff --git a/content/browser/indexed_db/mock_indexed_db_callbacks.h b/content/browser/indexed_db/mock_indexed_db_callbacks.h
index 0b99c05..fecfd1a 100644
--- a/content/browser/indexed_db/mock_indexed_db_callbacks.h
+++ b/content/browser/indexed_db/mock_indexed_db_callbacks.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CALLBACKS_H_
#define CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CALLBACKS_H_
+#include <vector>
+
#include "content/browser/indexed_db/indexed_db_callbacks.h"
#include "content/browser/indexed_db/indexed_db_connection.h"
@@ -13,11 +15,11 @@
class MockIndexedDBCallbacks : public IndexedDBCallbacks {
public:
MockIndexedDBCallbacks();
- MockIndexedDBCallbacks(bool expect_connection);
+ explicit MockIndexedDBCallbacks(bool expect_connection);
virtual void OnSuccess() OVERRIDE;
- virtual void OnSuccess(int64) OVERRIDE;
- virtual void OnSuccess(const std::vector<base::string16>&) OVERRIDE;
+ virtual void OnSuccess(int64 result) OVERRIDE;
+ virtual void OnSuccess(const std::vector<base::string16>& result) OVERRIDE;
virtual void OnSuccess(const IndexedDBKey& key) OVERRIDE;
virtual void OnSuccess(scoped_ptr<IndexedDBConnection> connection,
const IndexedDBDatabaseMetadata& metadata) OVERRIDE;
diff --git a/content/browser/loader/buffered_resource_handler.cc b/content/browser/loader/buffered_resource_handler.cc
index e8ea684..f609cbf 100644
--- a/content/browser/loader/buffered_resource_handler.cc
+++ b/content/browser/loader/buffered_resource_handler.cc
@@ -15,6 +15,7 @@
#include "content/browser/loader/certificate_resource_handler.h"
#include "content/browser/loader/resource_dispatcher_host_impl.h"
#include "content/browser/loader/resource_request_info_impl.h"
+#include "content/browser/loader/stream_resource_handler.h"
#include "content/browser/plugin_service_impl.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/download_item.h"
@@ -305,7 +306,7 @@
info->set_is_download(true);
scoped_ptr<ResourceHandler> handler(
new CertificateResourceHandler(request()));
- return UseAlternateNextHandler(handler.Pass());
+ return UseAlternateNextHandler(handler.Pass(), std::string());
}
if (!info->allow_download())
@@ -316,10 +317,12 @@
if (net::IsSupportedMimeType(mime_type))
return true;
+ std::string payload;
scoped_ptr<ResourceHandler> handler(
- host_->MaybeInterceptAsStream(request(), response_.get()));
- if (handler)
- return UseAlternateNextHandler(handler.Pass());
+ host_->MaybeInterceptAsStream(request(), response_.get(), &payload));
+ if (handler) {
+ return UseAlternateNextHandler(handler.Pass(), payload);
+ }
#if defined(ENABLE_PLUGINS)
bool stale;
@@ -348,11 +351,12 @@
content::DownloadItem::kInvalidId,
scoped_ptr<DownloadSaveInfo>(new DownloadSaveInfo()),
DownloadUrlParameters::OnStartedCallback()));
- return UseAlternateNextHandler(handler.Pass());
+ return UseAlternateNextHandler(handler.Pass(), std::string());
}
bool BufferedResourceHandler::UseAlternateNextHandler(
- scoped_ptr<ResourceHandler> new_handler) {
+ scoped_ptr<ResourceHandler> new_handler,
+ const std::string& payload_for_old_handler) {
if (response_->head.headers.get() && // Can be NULL if FTP.
response_->head.headers->response_code() / 100 != 2) {
// The response code indicates that this is an error page, but we don't
@@ -373,10 +377,29 @@
// which does so is CrossSiteResourceHandler. Cross-site transitions should
// not trigger when switching handlers.
DCHECK(!defer_ignored);
- net::URLRequestStatus status(net::URLRequestStatus::CANCELED,
- net::ERR_ABORTED);
- next_handler_->OnResponseCompleted(status, std::string(), &defer_ignored);
- DCHECK(!defer_ignored);
+ if (payload_for_old_handler.empty()) {
+ net::URLRequestStatus status(net::URLRequestStatus::CANCELED,
+ net::ERR_ABORTED);
+ next_handler_->OnResponseCompleted(status, std::string(), &defer_ignored);
+ DCHECK(!defer_ignored);
+ } else {
+ scoped_refptr<net::IOBuffer> buf;
+ int size = 0;
+
+ next_handler_->OnWillRead(&buf, &size, payload_for_old_handler.length());
+ CHECK_GE(size, static_cast<int>(payload_for_old_handler.length()));
+
+ memcpy(buf->data(), payload_for_old_handler.c_str(),
+ payload_for_old_handler.length());
+
+ next_handler_->OnReadCompleted(payload_for_old_handler.length(),
+ &defer_ignored);
+ DCHECK(!defer_ignored);
+
+ net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0);
+ next_handler_->OnResponseCompleted(status, std::string(), &defer_ignored);
+ DCHECK(!defer_ignored);
+ }
// This is handled entirely within the new ResourceHandler, so just reset the
// original ResourceHandler.
diff --git a/content/browser/loader/buffered_resource_handler.h b/content/browser/loader/buffered_resource_handler.h
index a6ddff1..0b6d698 100644
--- a/content/browser/loader/buffered_resource_handler.h
+++ b/content/browser/loader/buffered_resource_handler.h
@@ -54,7 +54,8 @@
bool ShouldSniffContent();
bool DetermineMimeType();
bool SelectNextHandler(bool* defer);
- bool UseAlternateNextHandler(scoped_ptr<ResourceHandler> handler);
+ bool UseAlternateNextHandler(scoped_ptr<ResourceHandler> handler,
+ const std::string& payload_for_old_handler);
bool ReplayReadCompleted(bool* defer);
void CallReplayReadCompleted();
diff --git a/content/browser/loader/resource_dispatcher_host_browsertest.cc b/content/browser/loader/resource_dispatcher_host_browsertest.cc
index 9836d04..0858bd6 100644
--- a/content/browser/loader/resource_dispatcher_host_browsertest.cc
+++ b/content/browser/loader/resource_dispatcher_host_browsertest.cc
@@ -248,7 +248,7 @@
// Navigate to a cross-site page that loads immediately without making a
// network request. The unload event should still be run.
- NavigateToURL(shell(), GURL(kAboutBlankURL));
+ NavigateToURL(shell(), GURL(url::kAboutBlankURL));
// Check that the cookie was set.
EXPECT_EQ("onunloadCookie=foo", GetCookies(url));
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 86d5e5f..09644d6 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -608,18 +608,17 @@
scoped_ptr<ResourceHandler>
ResourceDispatcherHostImpl::MaybeInterceptAsStream(net::URLRequest* request,
- ResourceResponse* response) {
+ ResourceResponse* response,
+ std::string* payload) {
ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(request);
const std::string& mime_type = response->head.mime_type;
GURL origin;
- std::string target_id;
if (!delegate_ ||
- !delegate_->ShouldInterceptResourceAsStream(info->GetContext(),
- request->url(),
+ !delegate_->ShouldInterceptResourceAsStream(request,
mime_type,
&origin,
- &target_id)) {
+ payload)) {
return scoped_ptr<ResourceHandler>();
}
@@ -633,15 +632,11 @@
info->set_is_stream(true);
delegate_->OnStreamCreated(
- info->GetContext(),
- info->GetChildID(),
- info->GetRouteID(),
- target_id,
+ request,
handler->stream()->CreateHandle(
request->url(),
mime_type,
- response->head.headers),
- request->GetExpectedContentSize());
+ response->head.headers));
return handler.PassAs<ResourceHandler>();
}
diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h
index 185fb0b..3cc7b4f 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.h
+++ b/content/browser/loader/resource_dispatcher_host_impl.h
@@ -210,10 +210,13 @@
const DownloadUrlParameters::OnStartedCallback& started_cb);
// Must be called after the ResourceRequestInfo has been created
- // and associated with the request.
+ // and associated with the request. If |payload| is set to a non-empty value,
+ // the value will be sent to the old resource handler instead of cancelling
+ // it, except on HTTP errors.
scoped_ptr<ResourceHandler> MaybeInterceptAsStream(
net::URLRequest* request,
- ResourceResponse* response);
+ ResourceResponse* response,
+ std::string* payload);
void ClearSSLClientAuthHandlerForRequest(net::URLRequest* request);
diff --git a/content/browser/loader/resource_dispatcher_host_unittest.cc b/content/browser/loader/resource_dispatcher_host_unittest.cc
index 0610a75..a815032 100644
--- a/content/browser/loader/resource_dispatcher_host_unittest.cc
+++ b/content/browser/loader/resource_dispatcher_host_unittest.cc
@@ -139,7 +139,7 @@
request.origin_pid = 0;
request.resource_type = type;
request.request_context = 0;
- request.appcache_host_id = appcache::kNoHostId;
+ request.appcache_host_id = appcache::kAppCacheNoHostId;
request.download_to_file = false;
request.is_main_frame = true;
request.parent_is_main_frame = false;
diff --git a/content/browser/media/OWNERS b/content/browser/media/OWNERS
index 5bcffbc..b1afdbb 100644
--- a/content/browser/media/OWNERS
+++ b/content/browser/media/OWNERS
@@ -1,7 +1,6 @@
acolwell@chromium.org
dalecurtis@chromium.org
ddorwin@chromium.org
-fischman@chromium.org
perkj@chromium.org
scherkus@chromium.org
shadi@chromium.org
diff --git a/content/browser/media/android/browser_media_player_manager.cc b/content/browser/media/android/browser_media_player_manager.cc
index a4c5e0a..e2d6676 100644
--- a/content/browser/media/android/browser_media_player_manager.cc
+++ b/content/browser/media/android/browser_media_player_manager.cc
@@ -6,13 +6,11 @@
#include "base/android/scoped_java_ref.h"
#include "base/command_line.h"
-#include "base/stl_util.h"
#include "content/browser/android/content_view_core_impl.h"
#include "content/browser/media/android/browser_demuxer_android.h"
#include "content/browser/media/android/media_resource_getter_impl.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/web_contents/web_contents_view_android.h"
-#include "content/common/media/cdm_messages.h"
#include "content/common/media/media_player_messages_android.h"
#include "content/public/browser/android/content_view_core.h"
#include "content/public/browser/android/external_video_surface_container.h"
@@ -28,12 +26,8 @@
#include "content/public/common/content_switches.h"
#include "media/base/android/media_player_bridge.h"
#include "media/base/android/media_source_player.h"
-#include "media/base/browser_cdm.h"
-#include "media/base/browser_cdm_factory.h"
#include "media/base/media_switches.h"
-using media::BrowserCdm;
-using media::MediaKeys;
using media::MediaPlayerAndroid;
using media::MediaPlayerBridge;
using media::MediaPlayerManager;
@@ -45,13 +39,6 @@
// attempting to release inactive media players.
const int kMediaPlayerThreshold = 1;
-// Maximum lengths for various EME API parameters. These are checks to
-// prevent unnecessarily large parameters from being passed around, and the
-// lengths are somewhat arbitrary as the EME spec doesn't specify any limits.
-const size_t kMaxInitDataLength = 64 * 1024; // 64 KB
-const size_t kMaxSessionResponseLength = 64 * 1024; // 64 KB
-const size_t kMaxKeySystemLength = 256;
-
static BrowserMediaPlayerManager::Factory g_factory = NULL;
// static
@@ -72,28 +59,25 @@
}
MediaPlayerAndroid* BrowserMediaPlayerManager::CreateMediaPlayer(
- MediaPlayerHostMsg_Initialize_Type type,
- int player_id,
- const GURL& url,
- const GURL& first_party_for_cookies,
- int demuxer_client_id,
+ const MediaPlayerHostMsg_Initialize_Params& media_player_params,
bool hide_url_log,
MediaPlayerManager* manager,
BrowserDemuxerAndroid* demuxer) {
- switch (type) {
+ switch (media_player_params.type) {
case MEDIA_PLAYER_TYPE_URL: {
const std::string user_agent = GetContentClient()->GetUserAgent();
MediaPlayerBridge* media_player_bridge = new MediaPlayerBridge(
- player_id,
- url,
- first_party_for_cookies,
+ media_player_params.player_id,
+ media_player_params.url,
+ media_player_params.first_party_for_cookies,
user_agent,
hide_url_log,
manager,
base::Bind(&BrowserMediaPlayerManager::OnMediaResourcesRequested,
weak_ptr_factory_.GetWeakPtr()),
base::Bind(&BrowserMediaPlayerManager::OnMediaResourcesReleased,
- weak_ptr_factory_.GetWeakPtr()));
+ weak_ptr_factory_.GetWeakPtr()),
+ media_player_params.frame_url);
BrowserMediaPlayerManager* browser_media_player_manager =
static_cast<BrowserMediaPlayerManager*>(manager);
ContentViewCoreImpl* content_view_core_impl =
@@ -105,8 +89,9 @@
// TODO(qinmin): extract the metadata once the user decided to load
// the page.
browser_media_player_manager->OnMediaMetadataChanged(
- player_id, base::TimeDelta(), 0, 0, false);
- } else if (!content_view_core_impl->ShouldBlockMediaRequest(url)) {
+ media_player_params.player_id, base::TimeDelta(), 0, 0, false);
+ } else if (!content_view_core_impl->ShouldBlockMediaRequest(
+ media_player_params.url)) {
media_player_bridge->Initialize();
}
return media_player_bridge;
@@ -114,13 +99,14 @@
case MEDIA_PLAYER_TYPE_MEDIA_SOURCE: {
return new MediaSourcePlayer(
- player_id,
+ media_player_params.player_id,
manager,
base::Bind(&BrowserMediaPlayerManager::OnMediaResourcesRequested,
weak_ptr_factory_.GetWeakPtr()),
base::Bind(&BrowserMediaPlayerManager::OnMediaResourcesReleased,
weak_ptr_factory_.GetWeakPtr()),
- demuxer->CreateDemuxer(demuxer_client_id));
+ demuxer->CreateDemuxer(media_player_params.demuxer_client_id),
+ media_player_params.frame_url);
}
}
@@ -137,7 +123,12 @@
weak_ptr_factory_(this) {
}
-BrowserMediaPlayerManager::~BrowserMediaPlayerManager() {}
+BrowserMediaPlayerManager::~BrowserMediaPlayerManager() {
+ // During the tear down process, OnDestroyPlayer() may or may not be called
+ // (e.g. the WebContents may be destroyed before the render process). So
+ // we cannot DCHECK(players_.empty()) here. Instead, all media players in
+ // |players_| will be destroyed here because |player_| is a ScopedVector.
+}
void BrowserMediaPlayerManager::FullscreenPlayerPlay() {
MediaPlayerAndroid* player = GetFullscreenPlayer();
@@ -319,20 +310,6 @@
return NULL;
}
-BrowserCdm* BrowserMediaPlayerManager::GetCdm(int cdm_id) {
- CdmMap::const_iterator iter = cdm_map_.find(cdm_id);
- return (iter == cdm_map_.end()) ? NULL : iter->second;
-}
-
-void BrowserMediaPlayerManager::DestroyAllMediaPlayers() {
- players_.clear();
- STLDeleteValues(&cdm_map_);
- if (fullscreen_player_id_ != -1) {
- video_view_.reset();
- fullscreen_player_id_ = -1;
- }
-}
-
void BrowserMediaPlayerManager::RequestFullScreen(int player_id) {
if (fullscreen_player_id_ == player_id)
return;
@@ -342,48 +319,8 @@
OnError(player_id, MediaPlayerAndroid::MEDIA_ERROR_DECODE);
return;
}
-}
-// The following 5 functions are EME MediaKeySession events.
-
-void BrowserMediaPlayerManager::OnSessionCreated(
- int cdm_id,
- uint32 session_id,
- const std::string& web_session_id) {
- Send(new CdmMsg_SessionCreated(
- RoutingID(), cdm_id, session_id, web_session_id));
-}
-
-void BrowserMediaPlayerManager::OnSessionMessage(
- int cdm_id,
- uint32 session_id,
- const std::vector<uint8>& message,
- const GURL& destination_url) {
- GURL verified_gurl = destination_url;
- if (!verified_gurl.is_valid() && !verified_gurl.is_empty()) {
- DLOG(WARNING) << "SessionMessage destination_url is invalid : "
- << destination_url.possibly_invalid_spec();
- verified_gurl = GURL::EmptyGURL(); // Replace invalid destination_url.
- }
-
- Send(new CdmMsg_SessionMessage(
- RoutingID(), cdm_id, session_id, message, verified_gurl));
-}
-
-void BrowserMediaPlayerManager::OnSessionReady(int cdm_id, uint32 session_id) {
- Send(new CdmMsg_SessionReady(RoutingID(), cdm_id, session_id));
-}
-
-void BrowserMediaPlayerManager::OnSessionClosed(int cdm_id, uint32 session_id) {
- Send(new CdmMsg_SessionClosed(RoutingID(), cdm_id, session_id));
-}
-
-void BrowserMediaPlayerManager::OnSessionError(int cdm_id,
- uint32 session_id,
- MediaKeys::KeyError error_code,
- uint32 system_code) {
- Send(new CdmMsg_SessionError(
- RoutingID(), cdm_id, session_id, error_code, system_code));
+ Send(new MediaPlayerMsg_RequestFullscreen(RoutingID(), player_id));
}
#if defined(VIDEO_HOLE)
@@ -482,23 +419,22 @@
}
void BrowserMediaPlayerManager::OnInitialize(
- MediaPlayerHostMsg_Initialize_Type type,
- int player_id,
- const GURL& url,
- const GURL& first_party_for_cookies,
- int demuxer_client_id) {
- DCHECK(type != MEDIA_PLAYER_TYPE_MEDIA_SOURCE || demuxer_client_id > 0)
+ const MediaPlayerHostMsg_Initialize_Params& media_player_params) {
+ DCHECK(media_player_params.type != MEDIA_PLAYER_TYPE_MEDIA_SOURCE ||
+ media_player_params.demuxer_client_id > 0)
<< "Media source players must have positive demuxer client IDs: "
- << demuxer_client_id;
+ << media_player_params.demuxer_client_id;
- RemovePlayer(player_id);
+ RemovePlayer(media_player_params.player_id);
RenderProcessHostImpl* host = static_cast<RenderProcessHostImpl*>(
web_contents()->GetRenderProcessHost());
MediaPlayerAndroid* player = CreateMediaPlayer(
- type, player_id, url, first_party_for_cookies, demuxer_client_id,
+ media_player_params,
+
host->GetBrowserContext()->IsOffTheRecord(), this,
host->browser_demuxer_android());
+
if (!player)
return;
@@ -556,139 +492,6 @@
fullscreen_player_id_ = -1;
}
-void BrowserMediaPlayerManager::OnInitializeCdm(int cdm_id,
- const std::string& key_system,
- const GURL& security_origin) {
- if (key_system.size() > kMaxKeySystemLength) {
- // This failure will be discovered and reported by OnCreateSession()
- // as GetCdm() will return null.
- NOTREACHED() << "Invalid key system: " << key_system;
- return;
- }
-
- AddCdm(cdm_id, key_system, security_origin);
-}
-
-void BrowserMediaPlayerManager::OnCreateSession(
- int cdm_id,
- uint32 session_id,
- CdmHostMsg_CreateSession_ContentType content_type,
- const std::vector<uint8>& init_data) {
- if (init_data.size() > kMaxInitDataLength) {
- LOG(WARNING) << "InitData for ID: " << cdm_id
- << " too long: " << init_data.size();
- OnSessionError(cdm_id, session_id, MediaKeys::kUnknownError, 0);
- return;
- }
-
- // Convert the session content type into a MIME type. "audio" and "video"
- // don't matter, so using "video" for the MIME type.
- // Ref:
- // https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html#dom-createsession
- std::string mime_type;
- switch (content_type) {
- case CREATE_SESSION_TYPE_WEBM:
- mime_type = "video/webm";
- break;
- case CREATE_SESSION_TYPE_MP4:
- mime_type = "video/mp4";
- break;
- default:
- NOTREACHED();
- return;
- }
-
- if (CommandLine::ForCurrentProcess()
- ->HasSwitch(switches::kDisableInfobarForProtectedMediaIdentifier)) {
- CreateSessionIfPermitted(cdm_id, session_id, mime_type, init_data, true);
- return;
- }
-
- BrowserCdm* cdm = GetCdm(cdm_id);
- if (!cdm) {
- DLOG(WARNING) << "No CDM for ID " << cdm_id << " found";
- OnSessionError(cdm_id, session_id, MediaKeys::kUnknownError, 0);
- return;
- }
-
- BrowserContext* context =
- web_contents()->GetRenderProcessHost()->GetBrowserContext();
-
- std::map<int, GURL>::const_iterator iter =
- cdm_security_origin_map_.find(cdm_id);
- if (iter == cdm_security_origin_map_.end()) {
- NOTREACHED();
- OnSessionError(cdm_id, session_id, MediaKeys::kUnknownError, 0);
- return;
- }
-
- context->RequestProtectedMediaIdentifierPermission(
- web_contents()->GetRenderProcessHost()->GetID(),
- web_contents()->GetRenderViewHost()->GetRoutingID(),
- iter->second,
- base::Bind(&BrowserMediaPlayerManager::CreateSessionIfPermitted,
- weak_ptr_factory_.GetWeakPtr(),
- cdm_id,
- session_id,
- mime_type,
- init_data));
-}
-
-void BrowserMediaPlayerManager::OnUpdateSession(
- int cdm_id,
- uint32 session_id,
- const std::vector<uint8>& response) {
- BrowserCdm* cdm = GetCdm(cdm_id);
- if (!cdm) {
- DLOG(WARNING) << "No CDM for ID " << cdm_id << " found";
- OnSessionError(cdm_id, session_id, MediaKeys::kUnknownError, 0);
- return;
- }
-
- if (response.size() > kMaxSessionResponseLength) {
- LOG(WARNING) << "Response for ID " << cdm_id
- << " is too long: " << response.size();
- OnSessionError(cdm_id, session_id, MediaKeys::kUnknownError, 0);
- return;
- }
-
- cdm->UpdateSession(session_id, &response[0], response.size());
-}
-
-void BrowserMediaPlayerManager::OnReleaseSession(int cdm_id,
- uint32 session_id) {
- BrowserCdm* cdm = GetCdm(cdm_id);
- if (!cdm) {
- DLOG(WARNING) << "No CDM for ID " << cdm_id << " found";
- OnSessionError(cdm_id, session_id, MediaKeys::kUnknownError, 0);
- return;
- }
-
- cdm->ReleaseSession(session_id);
-}
-
-void BrowserMediaPlayerManager::OnDestroyCdm(int cdm_id) {
- BrowserCdm* cdm = GetCdm(cdm_id);
- if (!cdm)
- return;
-
- CancelAllPendingSessionCreations(cdm_id);
- RemoveCdm(cdm_id);
-}
-
-void BrowserMediaPlayerManager::CancelAllPendingSessionCreations(int cdm_id) {
- BrowserContext* context =
- web_contents()->GetRenderProcessHost()->GetBrowserContext();
- std::map<int, GURL>::const_iterator iter =
- cdm_security_origin_map_.find(cdm_id);
- if (iter == cdm_security_origin_map_.end())
- return;
- context->CancelProtectedMediaIdentifierPermissionRequests(
- web_contents()->GetRenderProcessHost()->GetID(),
- web_contents()->GetRenderViewHost()->GetRoutingID(),
- iter->second);
-}
-
void BrowserMediaPlayerManager::AddPlayer(MediaPlayerAndroid* player) {
DCHECK(!GetPlayer(player->player_id()));
players_.push_back(player);
@@ -720,60 +523,6 @@
return scoped_ptr<media::MediaPlayerAndroid>(previous_player);
}
-void BrowserMediaPlayerManager::AddCdm(int cdm_id,
- const std::string& key_system,
- const GURL& security_origin) {
- DCHECK(!GetCdm(cdm_id));
- base::WeakPtr<BrowserMediaPlayerManager> weak_this =
- weak_ptr_factory_.GetWeakPtr();
-
- int id = cdm_id;
- scoped_ptr<BrowserCdm> cdm(media::CreateBrowserCdm(
- key_system,
- base::Bind(&BrowserMediaPlayerManager::OnSessionCreated, weak_this, id),
- base::Bind(&BrowserMediaPlayerManager::OnSessionMessage, weak_this, id),
- base::Bind(&BrowserMediaPlayerManager::OnSessionReady, weak_this, id),
- base::Bind(&BrowserMediaPlayerManager::OnSessionClosed, weak_this, id),
- base::Bind(&BrowserMediaPlayerManager::OnSessionError, weak_this, id)));
-
- if (!cdm) {
- // This failure will be discovered and reported by OnCreateSession()
- // as GetCdm() will return null.
- DVLOG(1) << "failed to create CDM.";
- return;
- }
-
- cdm_map_[cdm_id] = cdm.release();
- cdm_security_origin_map_[cdm_id] = security_origin;
-}
-
-void BrowserMediaPlayerManager::RemoveCdm(int cdm_id) {
- // TODO(xhwang): Detach CDM from the player it's set to. In prefixed
- // EME implementation the current code is fine because we always destroy the
- // player before we destroy the DrmBridge. This will not always be the case
- // in unprefixed EME implementation.
- CdmMap::iterator iter = cdm_map_.find(cdm_id);
- if (iter != cdm_map_.end()) {
- delete iter->second;
- cdm_map_.erase(iter);
- }
- cdm_security_origin_map_.erase(cdm_id);
-}
-
-void BrowserMediaPlayerManager::OnSetCdm(int player_id, int cdm_id) {
- MediaPlayerAndroid* player = GetPlayer(player_id);
- BrowserCdm* cdm = GetCdm(cdm_id);
- // Currently we do not support detaching CDM from a player.
- if (!cdm || !player) {
- NOTREACHED() << "Cannot set CDM on the specified player.";
- return;
- }
-
- // TODO(qinmin): add the logic to decide whether we should create the
- // fullscreen surface for EME lv1.
- player->SetCdm(cdm);
-}
-
int BrowserMediaPlayerManager::RoutingID() {
return render_frame_host_->GetRoutingID();
}
@@ -782,28 +531,6 @@
return render_frame_host_->Send(msg);
}
-void BrowserMediaPlayerManager::CreateSessionIfPermitted(
- int cdm_id,
- uint32 session_id,
- const std::string& content_type,
- const std::vector<uint8>& init_data,
- bool permitted) {
- if (!permitted) {
- OnSessionError(cdm_id, session_id, MediaKeys::kUnknownError, 0);
- return;
- }
-
- BrowserCdm* cdm = GetCdm(cdm_id);
- if (!cdm) {
- DLOG(WARNING) << "No CDM for ID: " << cdm_id << " found";
- OnSessionError(cdm_id, session_id, MediaKeys::kUnknownError, 0);
- return;
- }
-
- // This could fail, in which case a SessionError will be fired.
- cdm->CreateSession(session_id, content_type, &init_data[0], init_data.size());
-}
-
void BrowserMediaPlayerManager::ReleaseFullscreenPlayer(
MediaPlayerAndroid* player) {
player->Release();
diff --git a/content/browser/media/android/browser_media_player_manager.h b/content/browser/media/android/browser_media_player_manager.h
index ada9cef..bef4009 100644
--- a/content/browser/media/android/browser_media_player_manager.h
+++ b/content/browser/media/android/browser_media_player_manager.h
@@ -5,11 +5,6 @@
#ifndef CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
#define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
-#include <map>
-#include <set>
-#include <string>
-#include <vector>
-
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
@@ -17,7 +12,6 @@
#include "base/time/time.h"
#include "content/browser/android/content_video_view.h"
#include "content/common/content_export.h"
-#include "content/common/media/cdm_messages_enums.h"
#include "content/common/media/media_player_messages_enums_android.h"
#include "ipc/ipc_message.h"
#include "media/base/android/media_player_android.h"
@@ -26,10 +20,11 @@
#include "url/gurl.h"
namespace media {
-class BrowserCdm;
class DemuxerAndroid;
}
+struct MediaPlayerHostMsg_Initialize_Params;
+
namespace content {
class BrowserDemuxerAndroid;
class ContentViewCoreImpl;
@@ -37,11 +32,11 @@
class RenderFrameHost;
class WebContents;
-// This class manages all the MediaPlayerAndroid and CDM objects.
+// This class manages all the MediaPlayerAndroid objects.
// It receives control operations from the the render process, and forwards
-// them to corresponding MediaPlayerAndroid or CDM object. Callbacks from
-// MediaPlayerAndroid and CDM objects are converted to IPCs and then sent to
-// the render process.
+// them to corresponding MediaPlayerAndroid object. Callbacks from
+// MediaPlayerAndroid objects are converted to IPCs and then sent to the render
+// process.
class CONTENT_EXPORT BrowserMediaPlayerManager
: public media::MediaPlayerManager {
public:
@@ -91,22 +86,7 @@
virtual media::MediaResourceGetter* GetMediaResourceGetter() OVERRIDE;
virtual media::MediaPlayerAndroid* GetFullscreenPlayer() OVERRIDE;
virtual media::MediaPlayerAndroid* GetPlayer(int player_id) OVERRIDE;
- virtual media::BrowserCdm* GetCdm(int cdm_id) OVERRIDE;
- virtual void DestroyAllMediaPlayers() OVERRIDE;
virtual void RequestFullScreen(int player_id) OVERRIDE;
- virtual void OnSessionCreated(int cdm_id,
- uint32 session_id,
- const std::string& web_session_id) OVERRIDE;
- virtual void OnSessionMessage(int cdm_id,
- uint32 session_id,
- const std::vector<uint8>& message,
- const GURL& destination_url) OVERRIDE;
- virtual void OnSessionReady(int cdm_id, uint32 session_id) OVERRIDE;
- virtual void OnSessionClosed(int cdm_id, uint32 session_id) OVERRIDE;
- virtual void OnSessionError(int cdm_id,
- uint32 session_id,
- media::MediaKeys::KeyError error_code,
- uint32 system_code) OVERRIDE;
#if defined(VIDEO_HOLE)
void AttachExternalVideoSurface(int player_id, jobject surface);
@@ -118,11 +98,7 @@
virtual void OnEnterFullscreen(int player_id);
virtual void OnExitFullscreen(int player_id);
virtual void OnInitialize(
- MediaPlayerHostMsg_Initialize_Type type,
- int player_id,
- const GURL& url,
- const GURL& first_party_for_cookies,
- int demuxer_client_id);
+ const MediaPlayerHostMsg_Initialize_Params& media_player_params);
virtual void OnStart(int player_id);
virtual void OnSeek(int player_id, const base::TimeDelta& time);
virtual void OnPause(int player_id, bool is_media_related_action);
@@ -131,19 +107,6 @@
virtual void OnReleaseResources(int player_id);
virtual void OnDestroyPlayer(int player_id);
virtual void ReleaseFullscreenPlayer(media::MediaPlayerAndroid* player);
- void OnInitializeCdm(int cdm_id,
- const std::string& key_system,
- const GURL& frame_url);
- void OnCreateSession(int cdm_id,
- uint32 session_id,
- CdmHostMsg_CreateSession_ContentType content_type,
- const std::vector<uint8>& init_data);
- void OnUpdateSession(int cdm_id,
- uint32 session_id,
- const std::vector<uint8>& response);
- void OnReleaseSession(int cdm_id, uint32 session_id);
- void OnSetCdm(int player_id, int cdm_id);
- void OnDestroyCdm(int cdm_id);
#if defined(VIDEO_HOLE)
void OnNotifyExternalSurface(
int player_id, bool is_request, const gfx::RectF& rect);
@@ -155,9 +118,6 @@
WebContents* web_contents() const { return web_contents_; }
- // Cancels all pending session creations associated with |cdm_id|.
- void CancelAllPendingSessionCreations(int cdm_id);
-
// Adds a given player to the list.
void AddPlayer(media::MediaPlayerAndroid* player);
@@ -171,39 +131,15 @@
int player_id,
media::MediaPlayerAndroid* player);
- // Adds a new CDM identified by |cdm_id| for the given |key_system| and
- // |security_origin|.
- void AddCdm(int cdm_id,
- const std::string& key_system,
- const GURL& security_origin);
-
- // Removes the CDM with the specified id.
- void RemoveCdm(int cdm_id);
-
int RoutingID();
// Helper function to send messages to RenderFrameObserver.
bool Send(IPC::Message* msg);
private:
- // If |permitted| is false, it does nothing but send
- // |CdmMsg_SessionError| IPC message.
- // The primary use case is infobar permission callback, i.e., when infobar
- // can decide user's intention either from interacting with the actual info
- // bar or from the saved preference.
- void CreateSessionIfPermitted(int cdm_id,
- uint32 session_id,
- const std::string& content_type,
- const std::vector<uint8>& init_data,
- bool permitted);
-
// Constructs a MediaPlayerAndroid object.
media::MediaPlayerAndroid* CreateMediaPlayer(
- MediaPlayerHostMsg_Initialize_Type type,
- int player_id,
- const GURL& url,
- const GURL& first_party_for_cookies,
- int demuxer_client_id,
+ const MediaPlayerHostMsg_Initialize_Params& media_player_params,
bool hide_url_log,
media::MediaPlayerManager* manager,
BrowserDemuxerAndroid* demuxer);
@@ -228,13 +164,6 @@
// An array of managed players.
ScopedVector<media::MediaPlayerAndroid> players_;
- // A map from CDM IDs to managed CDMs.
- typedef std::map<int, media::BrowserCdm*> CdmMap;
- CdmMap cdm_map_;
-
- // Map from CDM ID to CDM's security origin.
- std::map<int, GURL> cdm_security_origin_map_;
-
// The fullscreen video view object or NULL if video is not played in
// fullscreen.
scoped_ptr<ContentVideoView> video_view_;
diff --git a/content/browser/media/android/media_web_contents_observer.cc b/content/browser/media/android/media_web_contents_observer.cc
deleted file mode 100644
index 711375c..0000000
--- a/content/browser/media/android/media_web_contents_observer.cc
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright 2014 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 "content/browser/media/android/media_web_contents_observer.h"
-
-#include "base/stl_util.h"
-#include "content/browser/media/android/browser_media_player_manager.h"
-#include "content/common/media/cdm_messages.h"
-#include "content/common/media/media_player_messages_android.h"
-#include "content/public/browser/render_frame_host.h"
-#include "content/public/browser/web_contents.h"
-#include "ipc/ipc_message_macros.h"
-
-namespace content {
-
-MediaWebContentsObserver::MediaWebContentsObserver(
- RenderViewHost* render_view_host)
- : WebContentsObserver(WebContents::FromRenderViewHost(render_view_host)) {
-}
-
-MediaWebContentsObserver::~MediaWebContentsObserver() {
-}
-
-void MediaWebContentsObserver::RenderFrameDeleted(
- RenderFrameHost* render_frame_host) {
- uintptr_t key = reinterpret_cast<uintptr_t>(render_frame_host);
- media_player_managers_.erase(key);
-}
-
-bool MediaWebContentsObserver::OnMessageReceived(
- const IPC::Message& msg,
- RenderFrameHost* render_frame_host) {
- BrowserMediaPlayerManager* player_manager =
- GetMediaPlayerManager(render_frame_host);
- DCHECK(player_manager);
-
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(MediaWebContentsObserver, msg)
- IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_EnterFullscreen,
- player_manager,
- BrowserMediaPlayerManager::OnEnterFullscreen)
- IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_ExitFullscreen,
- player_manager,
- BrowserMediaPlayerManager::OnExitFullscreen)
- IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_Initialize,
- player_manager,
- BrowserMediaPlayerManager::OnInitialize)
- IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_Start,
- player_manager,
- BrowserMediaPlayerManager::OnStart)
- IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_Seek,
- player_manager,
- BrowserMediaPlayerManager::OnSeek)
- IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_Pause,
- player_manager,
- BrowserMediaPlayerManager::OnPause)
- IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_SetVolume,
- player_manager,
- BrowserMediaPlayerManager::OnSetVolume)
- IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_SetPoster,
- player_manager,
- BrowserMediaPlayerManager::OnSetPoster)
- IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_Release,
- player_manager,
- BrowserMediaPlayerManager::OnReleaseResources)
- IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_DestroyMediaPlayer,
- player_manager,
- BrowserMediaPlayerManager::OnDestroyPlayer)
- IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_DestroyAllMediaPlayers,
- player_manager,
- BrowserMediaPlayerManager::DestroyAllMediaPlayers)
- IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_SetCdm,
- player_manager,
- BrowserMediaPlayerManager::OnSetCdm)
- IPC_MESSAGE_FORWARD(CdmHostMsg_InitializeCdm,
- player_manager,
- BrowserMediaPlayerManager::OnInitializeCdm)
- IPC_MESSAGE_FORWARD(CdmHostMsg_CreateSession,
- player_manager,
- BrowserMediaPlayerManager::OnCreateSession)
- IPC_MESSAGE_FORWARD(CdmHostMsg_UpdateSession,
- player_manager,
- BrowserMediaPlayerManager::OnUpdateSession)
- IPC_MESSAGE_FORWARD(CdmHostMsg_ReleaseSession,
- player_manager,
- BrowserMediaPlayerManager::OnReleaseSession)
- IPC_MESSAGE_FORWARD(CdmHostMsg_DestroyCdm,
- player_manager,
- BrowserMediaPlayerManager::OnDestroyCdm)
-#if defined(VIDEO_HOLE)
- IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_NotifyExternalSurface,
- player_manager,
- BrowserMediaPlayerManager::OnNotifyExternalSurface)
-#endif // defined(VIDEO_HOLE)
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
- return handled;
-}
-
-BrowserMediaPlayerManager* MediaWebContentsObserver::GetMediaPlayerManager(
- RenderFrameHost* render_frame_host) {
- uintptr_t key = reinterpret_cast<uintptr_t>(render_frame_host);
- if (!media_player_managers_.contains(key)) {
- media_player_managers_.set(
- key,
- scoped_ptr<BrowserMediaPlayerManager>(
- BrowserMediaPlayerManager::Create(render_frame_host)));
- }
- return media_player_managers_.get(key);
-}
-
-void MediaWebContentsObserver::PauseVideo() {
- for (MediaPlayerManagerMap::iterator iter = media_player_managers_.begin();
- iter != media_player_managers_.end(); ++iter) {
- BrowserMediaPlayerManager* manager = iter->second;
- manager->PauseVideo();
- }
-}
-
-#if defined(VIDEO_HOLE)
-void MediaWebContentsObserver::OnFrameInfoUpdated() {
- for (MediaPlayerManagerMap::iterator iter = media_player_managers_.begin();
- iter != media_player_managers_.end(); ++iter) {
- BrowserMediaPlayerManager* manager = iter->second;
- manager->OnFrameInfoUpdated();
- }
-}
-#endif // defined(VIDEO_HOLE)
-
-} // namespace content
diff --git a/content/browser/media/android/media_web_contents_observer.h b/content/browser/media/android/media_web_contents_observer.h
deleted file mode 100644
index 126bbfb..0000000
--- a/content/browser/media/android/media_web_contents_observer.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2014 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 CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_WEB_CONTENTS_OBSERVER_H_
-#define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_WEB_CONTENTS_OBSERVER_H_
-
-#include "base/compiler_specific.h"
-#include "base/containers/scoped_ptr_hash_map.h"
-#include "content/common/content_export.h"
-#include "content/public/browser/web_contents_observer.h"
-
-namespace content {
-
-class BrowserMediaPlayerManager;
-class RenderViewHost;
-
-// This class manages all RenderFrame based media related managers at the
-// browser side. It receives IPC messages from media RenderFrameObservers and
-// forwards them to the corresponding managers. The managers are responsible
-// for sending IPCs back to the RenderFrameObservers at the render side.
-class CONTENT_EXPORT MediaWebContentsObserver : public WebContentsObserver {
- public:
- explicit MediaWebContentsObserver(RenderViewHost* render_view_host);
- virtual ~MediaWebContentsObserver();
-
- // WebContentsObserver implementations.
- virtual void RenderFrameDeleted(RenderFrameHost* render_frame_host) OVERRIDE;
- virtual bool OnMessageReceived(const IPC::Message& message,
- RenderFrameHost* render_frame_host) OVERRIDE;
-
- // Gets the media player manager associated with |render_frame_host|. Creates
- // a new one if it doesn't exist. The caller doesn't own the returned pointer.
- BrowserMediaPlayerManager* GetMediaPlayerManager(
- RenderFrameHost* render_frame_host);
-
- // Pauses all media player.
- void PauseVideo();
-
-#if defined(VIDEO_HOLE)
- void OnFrameInfoUpdated();
-#endif // defined(VIDEO_HOLE)
-
- private:
- // Map from RenderFrameHost* to BrowserMediaPlayerManager.
- typedef base::ScopedPtrHashMap<uintptr_t, BrowserMediaPlayerManager>
- MediaPlayerManagerMap;
- MediaPlayerManagerMap media_player_managers_;
-
- DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserver);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_WEB_CONTENTS_OBSERVER_H_
diff --git a/content/browser/media/capture/desktop_capture_device.cc b/content/browser/media/capture/desktop_capture_device.cc
index bc4bb46..cf180c9 100644
--- a/content/browser/media/capture/desktop_capture_device.cc
+++ b/content/browser/media/capture/desktop_capture_device.cc
@@ -134,6 +134,10 @@
// True when waiting for |desktop_capturer_| to capture current frame.
bool capture_in_progress_;
+ // True if the first capture call has returned. Used to log the first capture
+ // result.
+ bool first_capture_returned_;
+
// The type of the capturer.
DesktopMediaID::Type capturer_type_;
@@ -152,6 +156,7 @@
desktop_capturer_(capturer.Pass()),
capture_task_posted_(false),
capture_in_progress_(false),
+ first_capture_returned_(false),
capturer_type_(type) {
DCHECK(!task_runner_.get() || !thread_.get());
if (thread_.get())
@@ -194,9 +199,8 @@
DCHECK(task_runner_->RunsTasksOnCurrentThread());
DCHECK(capture_in_progress_);
- static bool first_call = true;
- if (first_call) {
- first_call = false;
+ if (!first_capture_returned_) {
+ first_capture_returned_ = true;
if (capturer_type_ == DesktopMediaID::TYPE_SCREEN) {
IncrementDesktopCaptureCounter(frame ? FIRST_SCREEN_CAPTURE_SUCCEEDED
: FIRST_SCREEN_CAPTURE_FAILED);
diff --git a/content/browser/media/cdm/browser_cdm_manager.cc b/content/browser/media/cdm/browser_cdm_manager.cc
new file mode 100644
index 0000000..a71bfaf
--- /dev/null
+++ b/content/browser/media/cdm/browser_cdm_manager.cc
@@ -0,0 +1,286 @@
+// Copyright 2014 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 "content/browser/media/cdm/browser_cdm_manager.h"
+
+#include "base/command_line.h"
+#include "content/common/media/cdm_messages.h"
+#include "content/public/browser/content_browser_client.h"
+#include "content/public/browser/render_frame_host.h"
+#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/common/content_switches.h"
+#include "media/base/browser_cdm.h"
+#include "media/base/browser_cdm_factory.h"
+#include "media/base/media_switches.h"
+
+namespace content {
+
+using media::BrowserCdm;
+using media::MediaKeys;
+
+// Maximum lengths for various EME API parameters. These are checks to
+// prevent unnecessarily large parameters from being passed around, and the
+// lengths are somewhat arbitrary as the EME spec doesn't specify any limits.
+const size_t kMaxInitDataLength = 64 * 1024; // 64 KB
+const size_t kMaxSessionResponseLength = 64 * 1024; // 64 KB
+const size_t kMaxKeySystemLength = 256;
+
+// static
+BrowserCdmManager* BrowserCdmManager::Create(RenderFrameHost* rfh) {
+ return new BrowserCdmManager(rfh);
+}
+
+BrowserCdmManager::BrowserCdmManager(RenderFrameHost* render_frame_host)
+ : render_frame_host_(render_frame_host),
+ web_contents_(WebContents::FromRenderFrameHost(render_frame_host)),
+ weak_ptr_factory_(this) {
+}
+
+BrowserCdmManager::~BrowserCdmManager() {
+ // During the tear down process, OnDestroyCdm() may or may not be called
+ // (e.g. WebContents may be destroyed before the render process is killed). So
+ // we cannot DCHECK(cdm_map_.empty()) here. Instead, all CDMs in |cdm_map_|
+ // will be destroyed here because they are owned by BrowserCdmManager.
+}
+
+BrowserCdm* BrowserCdmManager::GetCdm(int cdm_id) {
+ return cdm_map_.get(cdm_id);
+}
+
+void BrowserCdmManager::OnSessionCreated(
+ int cdm_id,
+ uint32 session_id,
+ const std::string& web_session_id) {
+ Send(new CdmMsg_SessionCreated(
+ RoutingID(), cdm_id, session_id, web_session_id));
+}
+
+void BrowserCdmManager::OnSessionMessage(
+ int cdm_id,
+ uint32 session_id,
+ const std::vector<uint8>& message,
+ const GURL& destination_url) {
+ GURL verified_gurl = destination_url;
+ if (!verified_gurl.is_valid() && !verified_gurl.is_empty()) {
+ DLOG(WARNING) << "SessionMessage destination_url is invalid : "
+ << destination_url.possibly_invalid_spec();
+ verified_gurl = GURL::EmptyGURL(); // Replace invalid destination_url.
+ }
+
+ Send(new CdmMsg_SessionMessage(
+ RoutingID(), cdm_id, session_id, message, verified_gurl));
+}
+
+void BrowserCdmManager::OnSessionReady(int cdm_id, uint32 session_id) {
+ Send(new CdmMsg_SessionReady(RoutingID(), cdm_id, session_id));
+}
+
+void BrowserCdmManager::OnSessionClosed(int cdm_id, uint32 session_id) {
+ Send(new CdmMsg_SessionClosed(RoutingID(), cdm_id, session_id));
+}
+
+void BrowserCdmManager::OnSessionError(int cdm_id,
+ uint32 session_id,
+ MediaKeys::KeyError error_code,
+ uint32 system_code) {
+ Send(new CdmMsg_SessionError(
+ RoutingID(), cdm_id, session_id, error_code, system_code));
+}
+
+void BrowserCdmManager::OnInitializeCdm(int cdm_id,
+ const std::string& key_system,
+ const GURL& security_origin) {
+ if (key_system.size() > kMaxKeySystemLength) {
+ // This failure will be discovered and reported by OnCreateSession()
+ // as GetCdm() will return null.
+ NOTREACHED() << "Invalid key system: " << key_system;
+ return;
+ }
+
+ AddCdm(cdm_id, key_system, security_origin);
+}
+
+void BrowserCdmManager::OnCreateSession(
+ int cdm_id,
+ uint32 session_id,
+ CdmHostMsg_CreateSession_ContentType content_type,
+ const std::vector<uint8>& init_data) {
+ if (init_data.size() > kMaxInitDataLength) {
+ LOG(WARNING) << "InitData for ID: " << cdm_id
+ << " too long: " << init_data.size();
+ OnSessionError(cdm_id, session_id, MediaKeys::kUnknownError, 0);
+ return;
+ }
+
+ // Convert the session content type into a MIME type. "audio" and "video"
+ // don't matter, so using "video" for the MIME type.
+ // Ref:
+ // https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html#dom-createsession
+ std::string mime_type;
+ switch (content_type) {
+ case CREATE_SESSION_TYPE_WEBM:
+ mime_type = "video/webm";
+ break;
+ case CREATE_SESSION_TYPE_MP4:
+ mime_type = "video/mp4";
+ break;
+ default:
+ NOTREACHED();
+ return;
+ }
+
+#if defined(OS_ANDROID)
+ if (CommandLine::ForCurrentProcess()
+ ->HasSwitch(switches::kDisableInfobarForProtectedMediaIdentifier)) {
+ CreateSessionIfPermitted(cdm_id, session_id, mime_type, init_data, true);
+ return;
+ }
+#endif
+
+ BrowserCdm* cdm = GetCdm(cdm_id);
+ if (!cdm) {
+ DLOG(WARNING) << "No CDM for ID " << cdm_id << " found";
+ OnSessionError(cdm_id, session_id, MediaKeys::kUnknownError, 0);
+ return;
+ }
+
+ std::map<int, GURL>::const_iterator iter =
+ cdm_security_origin_map_.find(cdm_id);
+ if (iter == cdm_security_origin_map_.end()) {
+ NOTREACHED();
+ OnSessionError(cdm_id, session_id, MediaKeys::kUnknownError, 0);
+ return;
+ }
+
+ base::Closure cancel_callback;
+ GetContentClient()->browser()->RequestProtectedMediaIdentifierPermission(
+ web_contents_,
+ iter->second,
+ base::Bind(&BrowserCdmManager::CreateSessionIfPermitted,
+ weak_ptr_factory_.GetWeakPtr(),
+ cdm_id,
+ session_id,
+ mime_type,
+ init_data),
+ &cancel_callback);
+ if (!cancel_callback.is_null())
+ cdm_cancel_permision_map_[cdm_id] = cancel_callback;
+}
+
+void BrowserCdmManager::OnUpdateSession(
+ int cdm_id,
+ uint32 session_id,
+ const std::vector<uint8>& response) {
+ BrowserCdm* cdm = GetCdm(cdm_id);
+ if (!cdm) {
+ DLOG(WARNING) << "No CDM for ID " << cdm_id << " found";
+ OnSessionError(cdm_id, session_id, MediaKeys::kUnknownError, 0);
+ return;
+ }
+
+ if (response.size() > kMaxSessionResponseLength) {
+ LOG(WARNING) << "Response for ID " << cdm_id
+ << " is too long: " << response.size();
+ OnSessionError(cdm_id, session_id, MediaKeys::kUnknownError, 0);
+ return;
+ }
+
+ cdm->UpdateSession(session_id, &response[0], response.size());
+}
+
+void BrowserCdmManager::OnReleaseSession(int cdm_id, uint32 session_id) {
+ BrowserCdm* cdm = GetCdm(cdm_id);
+ if (!cdm) {
+ DLOG(WARNING) << "No CDM for ID " << cdm_id << " found";
+ OnSessionError(cdm_id, session_id, MediaKeys::kUnknownError, 0);
+ return;
+ }
+
+ cdm->ReleaseSession(session_id);
+}
+
+void BrowserCdmManager::OnDestroyCdm(int cdm_id) {
+ BrowserCdm* cdm = GetCdm(cdm_id);
+ if (!cdm)
+ return;
+
+ CancelAllPendingSessionCreations(cdm_id);
+ RemoveCdm(cdm_id);
+}
+
+void BrowserCdmManager::CancelAllPendingSessionCreations(int cdm_id) {
+ if (cdm_cancel_permision_map_.count(cdm_id)) {
+ cdm_cancel_permision_map_[cdm_id].Run();
+ cdm_cancel_permision_map_.erase(cdm_id);
+ }
+}
+
+void BrowserCdmManager::AddCdm(int cdm_id,
+ const std::string& key_system,
+ const GURL& security_origin) {
+ DCHECK(!GetCdm(cdm_id));
+ base::WeakPtr<BrowserCdmManager> weak_this = weak_ptr_factory_.GetWeakPtr();
+ scoped_ptr<BrowserCdm> cdm(media::CreateBrowserCdm(
+ key_system,
+ base::Bind(&BrowserCdmManager::OnSessionCreated, weak_this, cdm_id),
+ base::Bind(&BrowserCdmManager::OnSessionMessage, weak_this, cdm_id),
+ base::Bind(&BrowserCdmManager::OnSessionReady, weak_this, cdm_id),
+ base::Bind(&BrowserCdmManager::OnSessionClosed, weak_this, cdm_id),
+ base::Bind(&BrowserCdmManager::OnSessionError, weak_this, cdm_id)));
+
+ if (!cdm) {
+ // This failure will be discovered and reported by OnCreateSession()
+ // as GetCdm() will return null.
+ DVLOG(1) << "failed to create CDM.";
+ return;
+ }
+
+ cdm_map_.add(cdm_id, cdm.Pass());
+ cdm_security_origin_map_[cdm_id] = security_origin;
+}
+
+void BrowserCdmManager::RemoveCdm(int cdm_id) {
+ // TODO(xhwang): Detach CDM from the player it's set to. In prefixed
+ // EME implementation the current code is fine because we always destroy the
+ // player before we destroy the DrmBridge. This will not always be the case
+ // in unprefixed EME implementation.
+ cdm_map_.erase(cdm_id);
+ cdm_security_origin_map_.erase(cdm_id);
+ cdm_cancel_permision_map_.erase(cdm_id);
+}
+
+int BrowserCdmManager::RoutingID() {
+ return render_frame_host_->GetRoutingID();
+}
+
+bool BrowserCdmManager::Send(IPC::Message* msg) {
+ return render_frame_host_->Send(msg);
+}
+
+void BrowserCdmManager::CreateSessionIfPermitted(
+ int cdm_id,
+ uint32 session_id,
+ const std::string& content_type,
+ const std::vector<uint8>& init_data,
+ bool permitted) {
+ cdm_cancel_permision_map_.erase(cdm_id);
+ if (!permitted) {
+ OnSessionError(cdm_id, session_id, MediaKeys::kUnknownError, 0);
+ return;
+ }
+
+ BrowserCdm* cdm = GetCdm(cdm_id);
+ if (!cdm) {
+ DLOG(WARNING) << "No CDM for ID: " << cdm_id << " found";
+ OnSessionError(cdm_id, session_id, MediaKeys::kUnknownError, 0);
+ return;
+ }
+
+ // This could fail, in which case a SessionError will be fired.
+ cdm->CreateSession(session_id, content_type, &init_data[0], init_data.size());
+}
+
+} // namespace content
diff --git a/content/browser/media/cdm/browser_cdm_manager.h b/content/browser/media/cdm/browser_cdm_manager.h
new file mode 100644
index 0000000..85be4c1
--- /dev/null
+++ b/content/browser/media/cdm/browser_cdm_manager.h
@@ -0,0 +1,128 @@
+// Copyright 2014 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 CONTENT_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_
+#define CONTENT_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_
+
+#include <map>
+#include <string>
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/callback.h"
+#include "base/containers/scoped_ptr_hash_map.h"
+#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
+#include "content/common/media/cdm_messages_enums.h"
+#include "ipc/ipc_message.h"
+// TODO(xhwang): Drop this when KeyError is moved to a common header.
+#include "media/base/media_keys.h"
+#include "url/gurl.h"
+
+namespace media {
+class BrowserCdm;
+}
+
+namespace content {
+
+class RenderFrameHost;
+class WebContents;
+
+// This class manages all CDM objects. It receives control operations from the
+// the render process, and forwards them to corresponding CDM object. Callbacks
+// from CDM objects are converted to IPCs and then sent to the render process.
+class CONTENT_EXPORT BrowserCdmManager {
+ public:
+ // Creates a new BrowserCdmManager for |rfh|.
+ static BrowserCdmManager* Create(RenderFrameHost* rfh);
+
+ ~BrowserCdmManager();
+
+ media::BrowserCdm* GetCdm(int cdm_id);
+
+ // CDM callbacks.
+ void OnSessionCreated(int cdm_id,
+ uint32 session_id,
+ const std::string& web_session_id);
+ void OnSessionMessage(int cdm_id,
+ uint32 session_id,
+ const std::vector<uint8>& message,
+ const GURL& destination_url);
+ void OnSessionReady(int cdm_id, uint32 session_id);
+ void OnSessionClosed(int cdm_id, uint32 session_id);
+ void OnSessionError(int cdm_id,
+ uint32 session_id,
+ media::MediaKeys::KeyError error_code,
+ uint32 system_code);
+
+ // Message handlers.
+ void OnInitializeCdm(int cdm_id,
+ const std::string& key_system,
+ const GURL& frame_url);
+ void OnCreateSession(int cdm_id,
+ uint32 session_id,
+ CdmHostMsg_CreateSession_ContentType content_type,
+ const std::vector<uint8>& init_data);
+ void OnUpdateSession(int cdm_id,
+ uint32 session_id,
+ const std::vector<uint8>& response);
+ void OnReleaseSession(int cdm_id, uint32 session_id);
+ void OnSetCdm(int player_id, int cdm_id);
+ void OnDestroyCdm(int cdm_id);
+
+ private:
+ // Clients must use Create() or subclass constructor.
+ explicit BrowserCdmManager(RenderFrameHost* render_frame_host);
+
+ // Cancels all pending session creations associated with |cdm_id|.
+ void CancelAllPendingSessionCreations(int cdm_id);
+
+ // Adds a new CDM identified by |cdm_id| for the given |key_system| and
+ // |security_origin|.
+ void AddCdm(int cdm_id,
+ const std::string& key_system,
+ const GURL& security_origin);
+
+ // Removes the CDM with the specified id.
+ void RemoveCdm(int cdm_id);
+
+ int RoutingID();
+
+ // Helper function to send messages to RenderFrameObserver.
+ bool Send(IPC::Message* msg);
+
+ // If |permitted| is false, it does nothing but send
+ // |CdmMsg_SessionError| IPC message.
+ // The primary use case is infobar permission callback, i.e., when infobar
+ // can decide user's intention either from interacting with the actual info
+ // bar or from the saved preference.
+ void CreateSessionIfPermitted(int cdm_id,
+ uint32 session_id,
+ const std::string& content_type,
+ const std::vector<uint8>& init_data,
+ bool permitted);
+
+ RenderFrameHost* const render_frame_host_;
+
+ WebContents* const web_contents_;
+
+ // A map from CDM IDs to managed CDMs.
+ typedef base::ScopedPtrHashMap<int, media::BrowserCdm> CdmMap;
+ CdmMap cdm_map_;
+
+ // Map from CDM ID to CDM's security origin.
+ std::map<int, GURL> cdm_security_origin_map_;
+
+ // Map from CDM ID to a callback to cancel the permission request.
+ std::map<int, base::Closure> cdm_cancel_permision_map_;
+
+ // NOTE: Weak pointers must be invalidated before all other member variables.
+ base::WeakPtrFactory<BrowserCdmManager> weak_ptr_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(BrowserCdmManager);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_MEDIA_CDM_BROWSER_CDM_MANAGER_H_
diff --git a/content/browser/media/media_browsertest.cc b/content/browser/media/media_browsertest.cc
index 254a744..bdd7709 100644
--- a/content/browser/media/media_browsertest.cc
+++ b/content/browser/media/media_browsertest.cc
@@ -201,7 +201,7 @@
// Covers tear-down when navigating away as opposed to browser exiting.
IN_PROC_BROWSER_TEST_F(MediaTest, Navigate) {
PlayVideo("bear.ogv", false);
- NavigateToURL(shell(), GURL(kAboutBlankURL));
+ NavigateToURL(shell(), GURL(url::kAboutBlankURL));
EXPECT_FALSE(shell()->web_contents()->IsCrashed());
}
diff --git a/content/browser/media/media_canplaytype_browsertest.cc b/content/browser/media/media_canplaytype_browsertest.cc
index 87d9969..59ce221 100644
--- a/content/browser/media/media_canplaytype_browsertest.cc
+++ b/content/browser/media/media_canplaytype_browsertest.cc
@@ -32,20 +32,11 @@
const char kOggVideoMaybe[] = "maybe";
const char kTheoraProbably[] = "probably";
const char kOpusProbably[] = "probably";
-#if defined(USE_PROPRIETARY_CODECS)
-const char kTheoraAndPropProbably[] = "probably";
-const char kOpusAndPropProbably[] = "probably";
-#else
-const char kTheoraAndPropProbably[] = "";
-const char kOpusAndPropProbably[] = "";
-#endif // USE_PROPRIETARY_CODECS
#else
const char kOggVideoProbably[] = "";
const char kOggVideoMaybe[] = "";
const char kTheoraProbably[] = "";
const char kOpusProbably[] = "";
-const char kTheoraAndPropProbably[] = "maybe";
-const char kOpusAndPropProbably[] = "maybe";
#endif // !OS_ANDROID
namespace content {
@@ -500,562 +491,453 @@
}
IN_PROC_BROWSER_TEST_F(MediaCanPlayTypeTest, CodecSupportTest_mp4) {
- // TODO(amogh.bihani): Change this expectation when bug 53193 is fixed.
- std::string PropAndVP9Probably = "";
-#if defined (OS_ANDROID)
- if (base::android::BuildInfo::GetInstance()->sdk_int() < 19)
- PropAndVP9Probably = "maybe";
- else
- PropAndVP9Probably = "probably";
-#else
-#if defined(USE_PROPRIETARY_CODECS)
- PropAndVP9Probably = "probably";
-#endif // USE_PROPRIETARY_CODECS
-#endif // OS_ANDROID
EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc3\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"mp4a\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1, mp4a\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc3, mp4a\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1, avc3\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"mp4a.40\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1, mp4a.40\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3, mp4a.40\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1, avc3\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1.4D401E\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc3.64001F\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"mp4a.40.2\"'"));
- EXPECT_EQ(kPropProbably,
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1.4D401E\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3.64001F\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"mp4a.40.2\"'"));
+ EXPECT_EQ(kPropMaybe,
CanPlay("'video/mp4; codecs=\"avc1.4D401E, mp4a.40.2\"'"));
- EXPECT_EQ(kPropProbably,
+ EXPECT_EQ(kPropMaybe,
CanPlay("'video/mp4; codecs=\"avc3.64001F, mp4a.40.5\"'"));
- // TODO(amogh.bihani): Change these tests when bug 53193 is fixed.
- // http://crbug.com/53193 ----------------------------------------------------
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1.unknown\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc3.unknown\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"mp4a.unknown\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"avc1.unknown\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"avc3.unknown\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"mp4a.unknown\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1.\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc3.\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"mp4a.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"avc1.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"avc3.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"mp4a\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"mp4a.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"mp4a.40.\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"vp8\"'"));
- EXPECT_EQ(PropAndVP9Probably, CanPlay("'video/mp4; codecs=\"vp9\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"vp8\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"vp9\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"vorbis\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1, vorbis\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc3, vorbis\"'"));
- EXPECT_EQ(kPropProbably,
- CanPlay("'video/mp4; codecs=\"avc1.4D401E, vorbis\"'"));
- EXPECT_EQ(kPropProbably,
- CanPlay("'video/mp4; codecs=\"avc3.64001F, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"avc1, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"avc3, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"avc1.4D401E, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"avc3.64001F, vorbis\"'"));
- EXPECT_EQ(kOpusAndPropProbably, CanPlay("'video/mp4; codecs=\"opus\"'"));
- EXPECT_EQ(kOpusAndPropProbably, CanPlay("'video/mp4; codecs=\"vp8, opus\"'"));
- EXPECT_EQ(kOpusAndPropProbably, CanPlay("'video/mp4; codecs=\"vp9, opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"vp8, opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"vp9, opus\"'"));
- EXPECT_EQ(kTheoraAndPropProbably, CanPlay("'video/mp4; codecs=\"theora\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'video/mp4; codecs=\"theora, vorbis\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'video/mp4; codecs=\"theora, mp4a\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'video/mp4; codecs=\"theora, mp4a.40.2\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'video/mp4; codecs=\"theora, avc1\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'video/mp4; codecs=\"theora, avc3\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'video/mp4; codecs=\"theora, avc1.4D401E\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'video/mp4; codecs=\"theora, avc3.64001F\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"theora\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"theora, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"theora, mp4a\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"theora, mp4a.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"theora, avc1\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"theora, avc3\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"theora, avc1.4D401E\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"theora, avc3.64001F\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"AVC1\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"AVC1.4d401e\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"AVC3\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"AVC3.64001f\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"MP4A\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"MP4A.40.2\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"AVC1, MP4\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"AVC3, MP4\"'"));
- EXPECT_EQ(kPropMaybe,
- CanPlay("'video/mp4; codecs=\", AVC1.4D401E, MP4.40.2\"'"));
- EXPECT_EQ(kPropMaybe,
- CanPlay("'video/mp4; codecs=\", AVC3.64001F, MP4.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"AVC1\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"AVC1.4d401e\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"AVC3\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"AVC3.64001f\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"MP4A\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"MP4A.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"AVC1, MP4\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"AVC3, MP4\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\", AVC1.4D401E, MP4.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\", AVC3.64001F, MP4.40.2\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc2\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc4\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"avc2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"avc4\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1x\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3x\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"mp4ax\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"avc1x\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"avc3x\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"mp4ax\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"unknown\"'"));
- // ---------------------------------------------------------------------------
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"unknown\"'"));
EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"avc1\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"avc3\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"mp4a\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"avc1, mp4a\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"avc3, mp4a\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"avc1, avc3\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"avc1\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"avc3\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"mp4a.40\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"avc1, mp4a.40\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"avc3, mp4a.40\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"avc1, avc3\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"avc1.4D401E\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"avc3.64001F\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"mp4a.40.2\"'"));
- EXPECT_EQ(kPropProbably,
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"avc1.4D401E\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"avc3.64001F\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"mp4a.40.2\"'"));
+ EXPECT_EQ(kPropMaybe,
CanPlay("'video/x-m4v; codecs=\"avc1.4D401E, mp4a.40.2\"'"));
- EXPECT_EQ(kPropProbably,
+ EXPECT_EQ(kPropMaybe,
CanPlay("'video/x-m4v; codecs=\"avc3.64001F, mp4a.40.5\"'"));
- // TODO(amogh.bihani): Change these tests when bug 53193 is fixed.
- // http://crbug.com/53193 ----------------------------------------------------
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"avc1.unknown\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"avc3.unknown\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"mp4a.unknown\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"avc1.unknown\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"avc3.unknown\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"mp4a.unknown\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"avc1.\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"avc3.\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"mp4a.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"avc1.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"avc3.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"mp4a\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"mp4a.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"mp4a.40.\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"vp8\"'"));
- EXPECT_EQ(PropAndVP9Probably, CanPlay("'video/x-m4v; codecs=\"vp9\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"vp8\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"vp9\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"vorbis\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"avc1, vorbis\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'video/x-m4v; codecs=\"avc3, vorbis\"'"));
- EXPECT_EQ(kPropProbably,
- CanPlay("'video/x-m4v; codecs=\"avc1.4D401E, vorbis\"'"));
- EXPECT_EQ(kPropProbably,
- CanPlay("'video/x-m4v; codecs=\"avc3.64001F, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"avc1, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"avc3, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"avc1.4D401E, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"avc3.64001F, vorbis\"'"));
- EXPECT_EQ(kOpusAndPropProbably, CanPlay("'video/x-m4v; codecs=\"opus\"'"));
- EXPECT_EQ(kOpusAndPropProbably,
- CanPlay("'video/x-m4v; codecs=\"vp8, opus\"'"));
- EXPECT_EQ(kOpusAndPropProbably,
- CanPlay("'video/x-m4v; codecs=\"vp9, opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"vp8, opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"vp9, opus\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'video/x-m4v; codecs=\"theora\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'video/x-m4v; codecs=\"theora, vorbis\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'video/x-m4v; codecs=\"theora, mp4a\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'video/x-m4v; codecs=\"theora, mp4a.40.2\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'video/x-m4v; codecs=\"theora, avc1\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'video/x-m4v; codecs=\"theora, avc3\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'video/x-m4v; codecs=\"theora, avc1.4D401E\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'video/x-m4v; codecs=\"theora, avc3.64001F\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"theora\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"theora, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"theora, mp4a\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"theora, mp4a.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"theora, avc1\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"theora, avc3\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"theora, avc1.4D401E\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"theora, avc3.64001F\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"AVC1\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"AVC1.4d401e\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"AVC3\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"AVC3.64001f\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"MP4A\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"MP4A.40.2\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"AVC1, MP4\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"AVC3, MP4\"'"));
- EXPECT_EQ(kPropMaybe,
- CanPlay("'video/x-m4v; codecs=\", AVC1.4D401E, MP4.40.2\"'"));
- EXPECT_EQ(kPropMaybe,
- CanPlay("'video/x-m4v; codecs=\", AVC3.64001F, MP4.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"AVC1\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"AVC1.4d401e\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"AVC3\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"AVC3.64001f\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"MP4A\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"MP4A.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"AVC1, MP4\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"AVC3, MP4\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\", AVC1.4D401E, MP4.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\", AVC3.64001F, MP4.40.2\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"avc2\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"avc4\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"avc2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"avc4\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"avc1x\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"avc3x\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"mp4ax\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"avc1x\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"avc3x\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"mp4ax\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'video/x-m4v; codecs=\"unknown\"'"));
- // ---------------------------------------------------------------------------
+ EXPECT_EQ(kNot, CanPlay("'video/x-m4v; codecs=\"unknown\"'"));
EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"mp4a\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"mp4a.40.2\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4; codecs=\"mp4a.40\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4; codecs=\"mp4a.40.2\"'"));
- // TODO(amogh.bihani): Change these tests when bug 53193 is fixed.
- // http://crbug.com/53193 ----------------------------------------------------
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"avc1\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"avc3\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"avc1, mp4a\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"avc3, mp4a\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc1\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc3\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc1, mp4a.40\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc3, mp4a.40\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"avc1.4D401E\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"avc3.64001F\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc1.4D401E\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc3.64001F\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"avc1.unknown\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"avc3.unknown\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"mp4a.unknown\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc1.unknown\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc3.unknown\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"mp4a.unknown\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"avc1.\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"avc3.\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"mp4a.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc1.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc3.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"mp4a\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"mp4a.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"mp4a.40.\"'"));
- EXPECT_EQ(kPropProbably,
- CanPlay("'audio/mp4; codecs=\"avc1.4D401E, mp4a.40.2\"'"));
- EXPECT_EQ(kPropProbably,
- CanPlay("'audio/mp4; codecs=\"avc3.64001F mp4a.40.2\"'"));
- EXPECT_EQ(kPropProbably,
- CanPlay("'audio/mp4; codecs=\"mp4a, vorbis\"'"));
- EXPECT_EQ(kPropProbably,
- CanPlay("'audio/mp4; codecs=\"mp4a.40.2, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc1.4D401E, mp4a.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc3.64001F mp4a.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"mp4a, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"mp4a.40.2, vorbis\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"vorbis\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"vp8\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"vp8.0\"'"));
- EXPECT_EQ(PropAndVP9Probably, CanPlay("'audio/mp4; codecs=\"vp9\"'"));
- EXPECT_EQ(PropAndVP9Probably, CanPlay("'audio/mp4; codecs=\"vp9.0\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"vp8\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"vp8.0\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"vp9\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"vp9.0\"'"));
- EXPECT_EQ(kOpusAndPropProbably, CanPlay("'audio/mp4; codecs=\"opus\"'"));
- EXPECT_EQ(kOpusAndPropProbably,
- CanPlay("'audio/mp4; codecs=\"mp4a, opus\"'"));
- EXPECT_EQ(kOpusAndPropProbably,
- CanPlay("'audio/mp4; codecs=\"vorbis, opus\"'"));
- EXPECT_EQ(kOpusAndPropProbably, CanPlay("'audio/mp4; codecs=\"vp8, opus\"'"));
- EXPECT_EQ(kOpusAndPropProbably, CanPlay("'audio/mp4; codecs=\"vp9, opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"mp4a, opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"vorbis, opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"vp8, opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"vp9, opus\"'"));
- EXPECT_EQ(kTheoraAndPropProbably, CanPlay("'audio/mp4; codecs=\"theora\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'audio/mp4; codecs=\"theora, vorbis\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'audio/mp4; codecs=\"theora, mp4a\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/mp4; codecs=\"avc1, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"theora\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"theora, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"theora, mp4a\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc1, vorbis\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4; codecs=\"AVC1\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4; codecs=\"AVC1.4d401e\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4; codecs=\"AVC3\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4; codecs=\"AVC3.64001f\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4; codecs=\"MP4A\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4; codecs=\"MP4A.40.2\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4; codecs=\"AVC1, MP4\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4; codecs=\"AVC3, MP4\"'"));
- EXPECT_EQ(kPropMaybe,
- CanPlay("'audio/mp4; codecs=\", AVC1.4D401E, MP4.40.2\"'"));
- EXPECT_EQ(kPropMaybe,
- CanPlay("'audio/mp4; codecs=\", AVC3.64001F, MP4.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"AVC1\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"AVC1.4d401e\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"AVC3\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"AVC3.64001f\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"MP4A\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"MP4A.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"AVC1, MP4\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"AVC3, MP4\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\", AVC1.4D401E, MP4.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\", AVC3.64001F, MP4.40.2\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4; codecs=\"avc2\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4; codecs=\"avc4\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc4\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4; codecs=\"avc1x\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4; codecs=\"avc3x\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4; codecs=\"mp4ax\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc1x\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"avc3x\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"mp4ax\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/mp4; codecs=\"unknown\"'"));
- // ---------------------------------------------------------------------------
+ EXPECT_EQ(kNot, CanPlay("'audio/mp4; codecs=\"unknown\"'"));
EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"mp4a\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"mp4a.40.2\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a; codecs=\"mp4a.40\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a; codecs=\"mp4a.40.2\"'"));
- // TODO(amogh.bihani): Change these tests when bug 53193 is fixed.
- // http://crbug.com/53193 ----------------------------------------------------
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"avc1\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"avc3\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"avc1, mp4a\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"avc3, mp4a\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc1\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc3\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc1, mp4a\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc3, mp4a\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"avc1.4D401E\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"avc3.64001F\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc1.4D401E\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc3.64001F\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"avc1.unknown\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"avc3.unknown\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"mp4a.unknown\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc1.unknown\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc3.unknown\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"mp4a.unknown\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"avc1.\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"avc3.\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"mp4a.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc1.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc3.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"mp4a\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"mp4a.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"mp4a.40.\"'"));
- EXPECT_EQ(kPropProbably,
- CanPlay("'audio/x-m4a; codecs=\"avc1.4D401E, mp4a.40.2\"'"));
- EXPECT_EQ(kPropProbably,
- CanPlay("'audio/x-m4a; codecs=\"avc3.64001F mp4a.40.2\"'"));
- EXPECT_EQ(kPropProbably,
- CanPlay("'audio/x-m4a; codecs=\"mp4a, vorbis\"'"));
- EXPECT_EQ(kPropProbably,
- CanPlay("'audio/x-m4a; codecs=\"mp4a.40.2, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc1.4D401E, mp4a.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc3.64001F mp4a.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"mp4a, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"mp4a.40.2, vorbis\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"vorbis\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"vp8\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"vp8.0\"'"));
- EXPECT_EQ(PropAndVP9Probably, CanPlay("'audio/x-m4a; codecs=\"vp9\"'"));
- EXPECT_EQ(PropAndVP9Probably, CanPlay("'audio/x-m4a; codecs=\"vp9.0\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"vp8\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"vp8.0\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"vp9\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"vp9.0\"'"));
- EXPECT_EQ(kOpusAndPropProbably, CanPlay("'audio/x-m4a; codecs=\"opus\"'"));
- EXPECT_EQ(kOpusAndPropProbably,
- CanPlay("'audio/x-m4a; codecs=\"mp4a, opus\"'"));
- EXPECT_EQ(kOpusAndPropProbably,
- CanPlay("'audio/x-m4a; codecs=\"vorbis, opus\"'"));
- EXPECT_EQ(kOpusAndPropProbably,
- CanPlay("'audio/x-m4a; codecs=\"vp8, opus\"'"));
- EXPECT_EQ(kOpusAndPropProbably,
- CanPlay("'audio/x-m4a; codecs=\"vp9, opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"mp4a, opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"vorbis, opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"vp8, opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"vp9, opus\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'audio/x-m4a; codecs=\"theora\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'audio/x-m4a; codecs=\"theora, vorbis\"'"));
- EXPECT_EQ(kTheoraAndPropProbably,
- CanPlay("'audio/x-m4a; codecs=\"theora, mp4a\"'"));
- EXPECT_EQ(kPropProbably, CanPlay("'audio/x-m4a; codecs=\"avc1, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"theora\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"theora, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"theora, mp4a\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc1, vorbis\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a; codecs=\"AVC1\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a; codecs=\"AVC1.4d401e\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a; codecs=\"AVC3\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a; codecs=\"AVC3.64001f\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a; codecs=\"MP4A\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a; codecs=\"MP4A.40.2\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a; codecs=\"AVC1, MP4\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a; codecs=\"AVC3, MP4\"'"));
- EXPECT_EQ(kPropMaybe,
- CanPlay("'audio/x-m4a; codecs=\", AVC1.4D401E, MP4.40.2\"'"));
- EXPECT_EQ(kPropMaybe,
- CanPlay("'audio/x-m4a; codecs=\", AVC3.64001F, MP4.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"AVC1\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"AVC1.4d401e\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"AVC3\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"AVC3.64001f\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"MP4A\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"MP4A.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"AVC1, MP4\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"AVC3, MP4\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\", AVC1.4D401E, MP4.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\", AVC3.64001F, MP4.40.2\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a; codecs=\"avc2\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a; codecs=\"avc4\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc4\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a; codecs=\"avc1x\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a; codecs=\"avc3x\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a; codecs=\"mp4ax\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc1x\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"avc3x\"'"));
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"mp4ax\"'"));
- EXPECT_EQ(kPropMaybe, CanPlay("'audio/x-m4a; codecs=\"unknown\"'"));
- // ---------------------------------------------------------------------------
+ EXPECT_EQ(kNot, CanPlay("'audio/x-m4a; codecs=\"unknown\"'"));
}
IN_PROC_BROWSER_TEST_F(MediaCanPlayTypeTest, CodecSupportTest_HLS) {
// HLS are supported only on Android IceCreamSandwich and above (API level 14)
- std::string HLSProbably = "";
- std::string HLSMaybe = "";
- std::string HLSAndVP9Probably = "";
+ std::string canPlayHLS = kNot;
#if defined(OS_ANDROID)
- int sdk = base::android::BuildInfo::GetInstance()->sdk_int();
- if (sdk > 13) {
- HLSProbably = "probably";
- HLSMaybe = "maybe";
- if (sdk < 19)
- HLSAndVP9Probably = "maybe";
- else
- HLSAndVP9Probably = "probably";
- }
+ if (base::android::BuildInfo::GetInstance()->sdk_int() > 13)
+ canPlayHLS = kMaybe;
#endif
- EXPECT_EQ(HLSMaybe, CanPlay("'application/x-mpegurl'"));
+ EXPECT_EQ(canPlayHLS, CanPlay("'application/x-mpegurl'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/x-mpegurl; codecs=\"avc1\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/x-mpegurl; codecs=\"avc3\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/x-mpegurl; codecs=\"mp4a\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/x-mpegurl; codecs=\"avc1, mp4a\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/x-mpegurl; codecs=\"avc3, mp4a\"'"));
+ EXPECT_EQ(canPlayHLS, CanPlay("'application/x-mpegurl; codecs=\"avc1\"'"));
+ EXPECT_EQ(canPlayHLS, CanPlay("'application/x-mpegurl; codecs=\"avc3\"'"));
+ EXPECT_EQ(canPlayHLS, CanPlay("'application/x-mpegurl; codecs=\"mp4a.40\"'"));
+ EXPECT_EQ(canPlayHLS,
+ CanPlay("'application/x-mpegurl; codecs=\"avc1, mp4a.40\"'"));
+ EXPECT_EQ(canPlayHLS,
+ CanPlay("'application/x-mpegurl; codecs=\"avc3, mp4a.40\"'"));
- EXPECT_EQ(HLSProbably,
+ EXPECT_EQ(canPlayHLS,
CanPlay("'application/x-mpegurl; codecs=\"avc1.4D401E\"'"));
- EXPECT_EQ(HLSProbably,
+ EXPECT_EQ(canPlayHLS,
CanPlay("'application/x-mpegurl; codecs=\"avc3.64001F\"'"));
- EXPECT_EQ(HLSProbably,
+ EXPECT_EQ(canPlayHLS,
CanPlay("'application/x-mpegurl; codecs=\"mp4a.40.2\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/x-mpegurl; codecs=\"avc1.4D401E, mp4a.40.2\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/x-mpegurl; codecs=\"avc3.64001F, mp4a.40.5\"'"));
+ EXPECT_EQ(canPlayHLS,
+ CanPlay("'application/x-mpegurl; codecs=\"avc1.4D401E, mp4a.40.2\"'"));
+ EXPECT_EQ(canPlayHLS,
+ CanPlay("'application/x-mpegurl; codecs=\"avc3.64001F, mp4a.40.5\"'"));
- // TODO(amogh.bihani): Change these tests when bug 53193 is fixed.
- // http://crbug.com/53193 ----------------------------------------------------
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/x-mpegurl; codecs=\"avc1.unknown\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/x-mpegurl; codecs=\"avc3.unknown\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/x-mpegurl; codecs=\"mp4a.unknown\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"avc1.unknown\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"avc3.unknown\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"mp4a.unknown\"'"));
- EXPECT_EQ(HLSProbably, CanPlay("'application/x-mpegurl; codecs=\"avc1.\"'"));
- EXPECT_EQ(HLSProbably, CanPlay("'application/x-mpegurl; codecs=\"avc3.\"'"));
- EXPECT_EQ(HLSProbably, CanPlay("'application/x-mpegurl; codecs=\"mp4a.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"avc1.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"avc3.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"mp4a\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"mp4a.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"mp4a.40.\"'"));
- EXPECT_EQ(HLSProbably, CanPlay("'application/x-mpegurl; codecs=\"vp8\"'"));
- EXPECT_EQ(HLSAndVP9Probably,
- CanPlay("'application/x-mpegurl; codecs=\"vp9\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/x-mpegurl; codecs=\"vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"vp8\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"vp9\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"vorbis\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/x-mpegurl; codecs=\"avc1, vorbis\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/x-mpegurl; codecs=\"avc3, vorbis\"'"));
- EXPECT_EQ(HLSProbably,
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"avc1, vorbis\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"avc3, vorbis\"'"));
+ EXPECT_EQ(kNot,
CanPlay("'application/x-mpegurl; codecs=\"avc1.4D401E, vorbis\"'"));
- EXPECT_EQ(HLSProbably,
+ EXPECT_EQ(kNot,
CanPlay("'application/x-mpegurl; codecs=\"avc3.64001F, vorbis\"'"));
- EXPECT_EQ(HLSMaybe, CanPlay("'application/x-mpegurl; codecs=\"opus\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\"vp8, opus\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\"vp9, opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"vp8, opus\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"vp9, opus\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\"theora\"'"));
- EXPECT_EQ(HLSMaybe,
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"theora\"'"));
+ EXPECT_EQ(kNot,
CanPlay("'application/x-mpegurl; codecs=\"theora, vorbis\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\"theora, mp4a\"'"));
- EXPECT_EQ(HLSMaybe,
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"theora, mp4a\"'"));
+ EXPECT_EQ(kNot,
CanPlay("'application/x-mpegurl; codecs=\"theora, mp4a.40.2\"'"));
- EXPECT_EQ(HLSMaybe, CanPlay("'application/x-mpegurl; codecs=\"AVC1\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\"AVC1.4d401e\"'"));
- EXPECT_EQ(HLSMaybe, CanPlay("'application/x-mpegurl; codecs=\"AVC3\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\"AVC3.64001f\"'"));
- EXPECT_EQ(HLSMaybe, CanPlay("'application/x-mpegurl; codecs=\"MP4A\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\"MP4A.40.2\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\"AVC1, MP4\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\"AVC3, MP4\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\", AVC1.4D401E, MP4.40.2\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\", AVC3.64001F, MP4.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"AVC1\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"AVC1.4d401e\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"AVC3\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"AVC3.64001f\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"MP4A\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"MP4A.40.2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"AVC1, MP4\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"AVC3, MP4\"'"));
+ EXPECT_EQ(kNot,
+ CanPlay("'application/x-mpegurl; codecs=\", AVC1.4D401E, MP4.40.2\"'"));
+ EXPECT_EQ(kNot,
+ CanPlay("'application/x-mpegurl; codecs=\", AVC3.64001F, MP4.40.2\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\"avc2\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\"avc4\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"avc2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"avc4\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\"avc1x\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\"avc3x\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\"mp4ax\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"avc1x\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"avc3x\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"mp4ax\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/x-mpegurl; codecs=\"unknown\"'"));
- // ---------------------------------------------------------------------------
+ EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"unknown\"'"));
- EXPECT_EQ(HLSMaybe, CanPlay("'application/vnd.apple.mpegurl'"));
+ EXPECT_EQ(canPlayHLS, CanPlay("'application/vnd.apple.mpegurl'"));
- EXPECT_EQ(HLSProbably,
+ EXPECT_EQ(canPlayHLS,
CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1\"'"));
- EXPECT_EQ(HLSProbably,
+ EXPECT_EQ(canPlayHLS,
CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1, mp4a\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3, mp4a\"'"));
+ EXPECT_EQ(canPlayHLS,
+ CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.40\"'"));
+ EXPECT_EQ(canPlayHLS,
+ CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1, mp4a.40\"'"));
+ EXPECT_EQ(canPlayHLS,
+ CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3, mp4a.40\"'"));
- EXPECT_EQ(HLSProbably,
+ EXPECT_EQ(canPlayHLS,
CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1.4D401E\"'"));
- EXPECT_EQ(HLSProbably,
+ EXPECT_EQ(canPlayHLS,
CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3.64001F\"'"));
- EXPECT_EQ(HLSProbably,
+ EXPECT_EQ(canPlayHLS,
CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.40.2\"'"));
- // TODO(amogh.bihani): Change these tests when bug 53193 is fixed.
- // http://crbug.com/53193 ----------------------------------------------------
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1.unknown\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3.unknown\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.unknown\"'"));
+ EXPECT_EQ(kNot,
+ CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1.unknown\"'"));
+ EXPECT_EQ(kNot,
+ CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3.unknown\"'"));
+ EXPECT_EQ(kNot,
+ CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.unknown\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1.\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3.\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3.\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.\"'"));
+ EXPECT_EQ(kNot,
+ CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.40.\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"vp8\"'"));
- EXPECT_EQ(HLSAndVP9Probably,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"vp9\"'"));
- EXPECT_EQ(HLSProbably,
+ EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"vp8\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"vp9\"'"));
+ EXPECT_EQ(kNot,
CanPlay("'application/vnd.apple.mpegurl; codecs=\"vorbis\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1, vorbis\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3, vorbis\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1.4D401E, vorbis\"'"));
- EXPECT_EQ(HLSProbably,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3.64001F, vorbis\"'"));
+ EXPECT_EQ(kNot,
+ CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1, vorbis\"'"));
+ EXPECT_EQ(kNot,
+ CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3, vorbis\"'"));
+ EXPECT_EQ(kNot,
+ CanPlay(
+ "'application/vnd.apple.mpegurl; codecs=\"avc1.4D401E, vorbis\"'"));
+ EXPECT_EQ(kNot,
+ CanPlay(
+ "'application/vnd.apple.mpegurl; codecs=\"avc3.64001F, vorbis\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"opus\"'"));
- EXPECT_EQ(HLSMaybe,
+ EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"opus\"'"));
+ EXPECT_EQ(kNot,
CanPlay("'application/vnd.apple.mpegurl; codecs=\"vp8, opus\"'"));
- EXPECT_EQ(HLSMaybe,
+ EXPECT_EQ(kNot,
CanPlay("'application/vnd.apple.mpegurl; codecs=\"vp9, opus\"'"));
- EXPECT_EQ(HLSMaybe,
+ EXPECT_EQ(kNot,
CanPlay("'application/vnd.apple.mpegurl; codecs=\"theora\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"theora, vorbis\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"theora, mp4a\"'"));
- EXPECT_EQ(HLSMaybe,
+ EXPECT_EQ(kNot,
+ CanPlay("'application/vnd.apple.mpegurl; codecs=\"theora, vorbis\"'"));
+ EXPECT_EQ(kNot,
+ CanPlay("'application/vnd.apple.mpegurl; codecs=\"theora, mp4a\"'"));
+ EXPECT_EQ(kNot,
CanPlay("'application/vnd.apple.mpegurl; codecs=\"theora, mp4a.40.2\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"AVC1\"'"));
- EXPECT_EQ(HLSMaybe,
+ EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"AVC1\"'"));
+ EXPECT_EQ(kNot,
CanPlay("'application/vnd.apple.mpegurl; codecs=\"AVC1.4d401e\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"AVC3\"'"));
- EXPECT_EQ(HLSMaybe,
+ EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"AVC3\"'"));
+ EXPECT_EQ(kNot,
CanPlay("'application/vnd.apple.mpegurl; codecs=\"AVC3.64001f\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"MP4A\"'"));
- EXPECT_EQ(HLSMaybe,
+ EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"MP4A\"'"));
+ EXPECT_EQ(kNot,
CanPlay("'application/vnd.apple.mpegurl; codecs=\"MP4A.40.2\"'"));
- EXPECT_EQ(HLSMaybe,
+ EXPECT_EQ(kNot,
CanPlay("'application/vnd.apple.mpegurl; codecs=\"AVC1, MP4\"'"));
- EXPECT_EQ(HLSMaybe,
+ EXPECT_EQ(kNot,
CanPlay("'application/vnd.apple.mpegurl; codecs=\"AVC3, MP4\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/vnd.apple.mpegurl; "
- "codecs=\", AVC1.4D401E, MP4.40.2\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/vnd.apple.mpegurl; "
- "codecs=\", AVC3.64001F, MP4.40.2\"'"));
+ EXPECT_EQ(kNot,
+ CanPlay(
+ "'application/vnd.apple.mpegurl; "
+ "codecs=\", AVC1.4D401E, MP4.40.2\"'"));
+ EXPECT_EQ(kNot,
+ CanPlay(
+ "'application/vnd.apple.mpegurl; "
+ "codecs=\", AVC3.64001F, MP4.40.2\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc2\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc4\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc2\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc4\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1x\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3x\"'"));
- EXPECT_EQ(HLSMaybe,
- CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4ax\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1x\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3x\"'"));
+ EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4ax\"'"));
- EXPECT_EQ(HLSMaybe,
+ EXPECT_EQ(kNot,
CanPlay("'application/vnd.apple.mpegurl; codecs=\"unknown\"'"));
- // ---------------------------------------------------------------------------
}
} // namespace content
diff --git a/content/browser/media/media_web_contents_observer.cc b/content/browser/media/media_web_contents_observer.cc
new file mode 100644
index 0000000..0214eb5
--- /dev/null
+++ b/content/browser/media/media_web_contents_observer.cc
@@ -0,0 +1,206 @@
+// Copyright 2014 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 "content/browser/media/media_web_contents_observer.h"
+
+#include "base/memory/scoped_ptr.h"
+#include "base/stl_util.h"
+#include "content/browser/media/cdm/browser_cdm_manager.h"
+#include "content/common/media/cdm_messages.h"
+#include "content/public/browser/render_frame_host.h"
+#include "content/public/browser/web_contents.h"
+#include "ipc/ipc_message_macros.h"
+
+#if defined(OS_ANDROID)
+#include "content/browser/media/android/browser_media_player_manager.h"
+#include "content/common/media/media_player_messages_android.h"
+#include "media/base/android/media_player_android.h"
+#endif // defined(OS_ANDROID)
+
+namespace content {
+
+MediaWebContentsObserver::MediaWebContentsObserver(
+ RenderViewHost* render_view_host)
+ : WebContentsObserver(WebContents::FromRenderViewHost(render_view_host)) {
+}
+
+MediaWebContentsObserver::~MediaWebContentsObserver() {
+}
+
+void MediaWebContentsObserver::RenderFrameDeleted(
+ RenderFrameHost* render_frame_host) {
+ uintptr_t key = reinterpret_cast<uintptr_t>(render_frame_host);
+ // Always destroy the media players before CDMs because we do not support
+ // detaching CDMs from media players yet. See http://crbug.com/330324
+#if defined(OS_ANDROID)
+ media_player_managers_.erase(key);
+#endif
+ cdm_managers_.erase(key);
+}
+
+bool MediaWebContentsObserver::OnMessageReceived(
+ const IPC::Message& msg,
+ RenderFrameHost* render_frame_host) {
+#if defined(OS_ANDROID)
+ // Handles MediaPlayer messages first because MediaPlayers messages are much
+ // more frequent than CDM messages.
+ if (OnMediaPlayerMessageReceived(msg, render_frame_host))
+ return true;
+
+ if (OnMediaPlayerSetCdmMessageReceived(msg, render_frame_host))
+ return true;
+#endif // defined(OS_ANDROID)
+
+ if (OnCdmMessageReceived(msg, render_frame_host))
+ return true;
+
+ return false;
+}
+
+bool MediaWebContentsObserver::OnCdmMessageReceived(
+ const IPC::Message& msg,
+ RenderFrameHost* render_frame_host) {
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP(MediaWebContentsObserver, msg)
+ IPC_MESSAGE_FORWARD(CdmHostMsg_InitializeCdm,
+ GetCdmManager(render_frame_host),
+ BrowserCdmManager::OnInitializeCdm)
+ IPC_MESSAGE_FORWARD(CdmHostMsg_CreateSession,
+ GetCdmManager(render_frame_host),
+ BrowserCdmManager::OnCreateSession)
+ IPC_MESSAGE_FORWARD(CdmHostMsg_UpdateSession,
+ GetCdmManager(render_frame_host),
+ BrowserCdmManager::OnUpdateSession)
+ IPC_MESSAGE_FORWARD(CdmHostMsg_ReleaseSession,
+ GetCdmManager(render_frame_host),
+ BrowserCdmManager::OnReleaseSession)
+ IPC_MESSAGE_FORWARD(CdmHostMsg_DestroyCdm,
+ GetCdmManager(render_frame_host),
+ BrowserCdmManager::OnDestroyCdm)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP()
+ return handled;
+}
+
+BrowserCdmManager* MediaWebContentsObserver::GetCdmManager(
+ RenderFrameHost* render_frame_host) {
+ uintptr_t key = reinterpret_cast<uintptr_t>(render_frame_host);
+ if (!cdm_managers_.contains(key)) {
+ cdm_managers_.set(
+ key, make_scoped_ptr(BrowserCdmManager::Create(render_frame_host)));
+ }
+ return cdm_managers_.get(key);
+}
+
+#if defined(OS_ANDROID)
+bool MediaWebContentsObserver::OnMediaPlayerMessageReceived(
+ const IPC::Message& msg,
+ RenderFrameHost* render_frame_host) {
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP(MediaWebContentsObserver, msg)
+ IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_EnterFullscreen,
+ GetMediaPlayerManager(render_frame_host),
+ BrowserMediaPlayerManager::OnEnterFullscreen)
+ IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_ExitFullscreen,
+ GetMediaPlayerManager(render_frame_host),
+ BrowserMediaPlayerManager::OnExitFullscreen)
+ IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_Initialize,
+ GetMediaPlayerManager(render_frame_host),
+ BrowserMediaPlayerManager::OnInitialize)
+ IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_Start,
+ GetMediaPlayerManager(render_frame_host),
+ BrowserMediaPlayerManager::OnStart)
+ IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_Seek,
+ GetMediaPlayerManager(render_frame_host),
+ BrowserMediaPlayerManager::OnSeek)
+ IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_Pause,
+ GetMediaPlayerManager(render_frame_host),
+ BrowserMediaPlayerManager::OnPause)
+ IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_SetVolume,
+ GetMediaPlayerManager(render_frame_host),
+ BrowserMediaPlayerManager::OnSetVolume)
+ IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_SetPoster,
+ GetMediaPlayerManager(render_frame_host),
+ BrowserMediaPlayerManager::OnSetPoster)
+ IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_Release,
+ GetMediaPlayerManager(render_frame_host),
+ BrowserMediaPlayerManager::OnReleaseResources)
+ IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_DestroyMediaPlayer,
+ GetMediaPlayerManager(render_frame_host),
+ BrowserMediaPlayerManager::OnDestroyPlayer)
+#if defined(VIDEO_HOLE)
+ IPC_MESSAGE_FORWARD(MediaPlayerHostMsg_NotifyExternalSurface,
+ GetMediaPlayerManager(render_frame_host),
+ BrowserMediaPlayerManager::OnNotifyExternalSurface)
+#endif // defined(VIDEO_HOLE)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP()
+ return handled;
+}
+
+bool MediaWebContentsObserver::OnMediaPlayerSetCdmMessageReceived(
+ const IPC::Message& msg,
+ RenderFrameHost* render_frame_host) {
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(
+ MediaWebContentsObserver, msg, render_frame_host)
+ IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_SetCdm, OnSetCdm)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP()
+ return handled;
+}
+
+void MediaWebContentsObserver::OnSetCdm(RenderFrameHost* render_frame_host,
+ int player_id,
+ int cdm_id) {
+ media::MediaPlayerAndroid* media_player =
+ GetMediaPlayerManager(render_frame_host)->GetPlayer(player_id);
+ if (!media_player) {
+ NOTREACHED() << "OnSetCdm: MediaPlayer not found for " << player_id;
+ return;
+ }
+
+ media::BrowserCdm* cdm = GetCdmManager(render_frame_host)->GetCdm(cdm_id);
+ if (!cdm) {
+ NOTREACHED() << "OnSetCdm: CDM not found for " << cdm_id;
+ return;
+ }
+
+ // TODO(xhwang): This could possibly fail. In that case we should reject the
+ // promise.
+ media_player->SetCdm(cdm);
+}
+
+BrowserMediaPlayerManager* MediaWebContentsObserver::GetMediaPlayerManager(
+ RenderFrameHost* render_frame_host) {
+ uintptr_t key = reinterpret_cast<uintptr_t>(render_frame_host);
+ if (!media_player_managers_.contains(key)) {
+ media_player_managers_.set(
+ key,
+ make_scoped_ptr(BrowserMediaPlayerManager::Create(render_frame_host)));
+ }
+ return media_player_managers_.get(key);
+}
+
+void MediaWebContentsObserver::PauseVideo() {
+ for (MediaPlayerManagerMap::iterator iter = media_player_managers_.begin();
+ iter != media_player_managers_.end(); ++iter) {
+ BrowserMediaPlayerManager* manager = iter->second;
+ manager->PauseVideo();
+ }
+}
+
+#if defined(VIDEO_HOLE)
+void MediaWebContentsObserver::OnFrameInfoUpdated() {
+ for (MediaPlayerManagerMap::iterator iter = media_player_managers_.begin();
+ iter != media_player_managers_.end(); ++iter) {
+ BrowserMediaPlayerManager* manager = iter->second;
+ manager->OnFrameInfoUpdated();
+ }
+}
+#endif // defined(VIDEO_HOLE)
+
+#endif // defined(OS_ANDROID)
+
+} // namespace content
diff --git a/content/browser/media/media_web_contents_observer.h b/content/browser/media/media_web_contents_observer.h
new file mode 100644
index 0000000..8ed8993
--- /dev/null
+++ b/content/browser/media/media_web_contents_observer.h
@@ -0,0 +1,85 @@
+// Copyright 2014 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 CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_
+#define CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_
+
+#include "base/compiler_specific.h"
+#include "base/containers/scoped_ptr_hash_map.h"
+#include "content/common/content_export.h"
+#include "content/public/browser/web_contents_observer.h"
+
+namespace content {
+
+class BrowserCdmManager;
+#if defined(OS_ANDROID)
+class BrowserMediaPlayerManager;
+#endif // defined(OS_ANDROID)
+class RenderViewHost;
+
+// This class manages all RenderFrame based media related managers at the
+// browser side. It receives IPC messages from media RenderFrameObservers and
+// forwards them to the corresponding managers. The managers are responsible
+// for sending IPCs back to the RenderFrameObservers at the render side.
+class CONTENT_EXPORT MediaWebContentsObserver : public WebContentsObserver {
+ public:
+ explicit MediaWebContentsObserver(RenderViewHost* render_view_host);
+ virtual ~MediaWebContentsObserver();
+
+ // WebContentsObserver implementations.
+ virtual void RenderFrameDeleted(RenderFrameHost* render_frame_host) OVERRIDE;
+ virtual bool OnMessageReceived(const IPC::Message& message,
+ RenderFrameHost* render_frame_host) OVERRIDE;
+
+ // Helper function to handle CDM IPC messages. Returns whether the |message|
+ // is handled in the function.
+ bool OnCdmMessageReceived(const IPC::Message& message,
+ RenderFrameHost* render_frame_host);
+
+ // Gets the CDM manager associated with |render_frame_host|. Creates
+ // a new one if it doesn't exist. The caller doesn't own the returned pointer.
+ BrowserCdmManager* GetCdmManager(RenderFrameHost* render_frame_host);
+
+#if defined(OS_ANDROID)
+ // Helper functions to handle media player IPC messages. Returns whether the
+ // |message| is handled in the function.
+ bool OnMediaPlayerMessageReceived(const IPC::Message& message,
+ RenderFrameHost* render_frame_host);
+ bool OnMediaPlayerSetCdmMessageReceived(const IPC::Message& message,
+ RenderFrameHost* render_frame_host);
+
+ // Gets the media player manager associated with |render_frame_host|. Creates
+ // a new one if it doesn't exist. The caller doesn't own the returned pointer.
+ BrowserMediaPlayerManager* GetMediaPlayerManager(
+ RenderFrameHost* render_frame_host);
+
+ void OnSetCdm(RenderFrameHost* render_frame_host, int player_id, int cdm_id);
+
+ // Pauses all media player.
+ void PauseVideo();
+
+#if defined(VIDEO_HOLE)
+ void OnFrameInfoUpdated();
+#endif // defined(VIDEO_HOLE)
+
+#endif // defined(OS_ANDROID)
+
+ private:
+ // Map from RenderFrameHost* to BrowserCdmManager.
+ typedef base::ScopedPtrHashMap<uintptr_t, BrowserCdmManager> CdmManagerMap;
+ CdmManagerMap cdm_managers_;
+
+#if defined(OS_ANDROID)
+ // Map from RenderFrameHost* to BrowserMediaPlayerManager.
+ typedef base::ScopedPtrHashMap<uintptr_t, BrowserMediaPlayerManager>
+ MediaPlayerManagerMap;
+ MediaPlayerManagerMap media_player_managers_;
+#endif // defined(OS_ANDROID)
+
+ DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserver);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_
diff --git a/content/browser/media/midi_dispatcher_host.cc b/content/browser/media/midi_dispatcher_host.cc
new file mode 100644
index 0000000..9b6faa1
--- /dev/null
+++ b/content/browser/media/midi_dispatcher_host.cc
@@ -0,0 +1,123 @@
+// 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 "content/browser/media/midi_dispatcher_host.h"
+
+#include "base/bind.h"
+#include "content/browser/child_process_security_policy_impl.h"
+#include "content/browser/frame_host/render_frame_host_impl.h"
+#include "content/common/media/midi_messages.h"
+#include "content/public/browser/browser_context.h"
+#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/content_browser_client.h"
+#include "content/public/browser/render_frame_host.h"
+#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/web_contents.h"
+#include "url/gurl.h"
+
+namespace content {
+
+MidiDispatcherHost::PendingPermission::PendingPermission(
+ int render_process_id,
+ int render_frame_id,
+ int bridge_id)
+ : render_process_id(render_process_id),
+ render_frame_id(render_frame_id),
+ bridge_id(bridge_id) {
+}
+
+MidiDispatcherHost::PendingPermission::~PendingPermission() {
+}
+
+MidiDispatcherHost::MidiDispatcherHost(WebContents* web_contents)
+ : WebContentsObserver(web_contents),
+ weak_factory_(this) {
+}
+
+MidiDispatcherHost::~MidiDispatcherHost() {
+}
+
+bool MidiDispatcherHost::OnMessageReceived(const IPC::Message& message,
+ RenderFrameHost* render_frame_host) {
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(MidiDispatcherHost, message,
+ render_frame_host)
+ IPC_MESSAGE_HANDLER(MidiHostMsg_RequestSysExPermission,
+ OnRequestSysExPermission)
+ IPC_MESSAGE_HANDLER(MidiHostMsg_CancelSysExPermissionRequest,
+ OnCancelSysExPermissionRequest)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP()
+ return handled;
+}
+
+void MidiDispatcherHost::OnRequestSysExPermission(
+ RenderFrameHost* render_frame_host,
+ int bridge_id,
+ const GURL& origin,
+ bool user_gesture) {
+ int render_process_id = render_frame_host->GetProcess()->GetID();
+ int render_frame_id = render_frame_host->GetRoutingID();
+
+ PendingPermission pending_permission(
+ render_process_id, render_frame_id, bridge_id);
+ pending_permissions_.push_back(pending_permission);
+
+ GetContentClient()->browser()->RequestMidiSysExPermission(
+ web_contents(),
+ bridge_id,
+ origin,
+ user_gesture,
+ base::Bind(&MidiDispatcherHost::WasSysExPermissionGranted,
+ weak_factory_.GetWeakPtr(),
+ render_process_id, render_frame_id, bridge_id),
+ &pending_permissions_.back().cancel);
+}
+
+void MidiDispatcherHost::OnCancelSysExPermissionRequest(
+ RenderFrameHost* render_frame_host,
+ int bridge_id,
+ const GURL& requesting_frame) {
+ int render_process_id = render_frame_host->GetProcess()->GetID();
+ int render_frame_id = render_frame_host->GetRoutingID();
+
+ for (size_t i = 0; i < pending_permissions_.size(); ++i) {
+ if (pending_permissions_[i].render_process_id == render_process_id &&
+ pending_permissions_[i].render_frame_id == render_frame_id &&
+ pending_permissions_[i].bridge_id == bridge_id) {
+ if (!pending_permissions_[i].cancel.is_null())
+ pending_permissions_[i].cancel.Run();
+ pending_permissions_.erase(pending_permissions_.begin() + i);
+ return;
+ }
+ }
+}
+
+void MidiDispatcherHost::WasSysExPermissionGranted(int render_process_id,
+ int render_frame_id,
+ int bridge_id,
+ bool is_allowed) {
+ for (size_t i = 0; i < pending_permissions_.size(); ++i) {
+ if (pending_permissions_[i].render_process_id == render_process_id &&
+ pending_permissions_[i].render_frame_id == render_frame_id &&
+ pending_permissions_[i].bridge_id == bridge_id) {
+ RenderFrameHost* render_frame_host =
+ RenderFrameHost::FromID(render_process_id, render_frame_id);
+ if (render_frame_host) {
+ render_frame_host->Send(new MidiMsg_SysExPermissionApproved(
+ render_frame_id, bridge_id, is_allowed));
+ }
+
+ if (is_allowed) {
+ ChildProcessSecurityPolicyImpl::GetInstance()->
+ GrantSendMidiSysExMessage(render_process_id);
+ }
+
+ pending_permissions_.erase(pending_permissions_.begin() + i);
+ return;
+ }
+ }
+}
+
+} // namespace content
diff --git a/content/browser/media/midi_dispatcher_host.h b/content/browser/media/midi_dispatcher_host.h
new file mode 100644
index 0000000..87b7b1d
--- /dev/null
+++ b/content/browser/media/midi_dispatcher_host.h
@@ -0,0 +1,60 @@
+// 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 CONTENT_BROWSER_MEDIA_MIDI_DISPATCHER_HOST_H_
+#define CONTENT_BROWSER_MEDIA_MIDI_DISPATCHER_HOST_H_
+
+#include <vector>
+
+#include "base/callback_forward.h"
+#include "base/memory/weak_ptr.h"
+#include "content/public/browser/web_contents_observer.h"
+
+namespace content {
+
+class BrowserContext;
+
+// MidiDispatcherHost handles permissions for using system exclusive messages.
+class MidiDispatcherHost : public WebContentsObserver {
+ public:
+ explicit MidiDispatcherHost(WebContents* web_contents);
+ virtual ~MidiDispatcherHost();
+
+ // WebContentsObserver implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message,
+ RenderFrameHost* render_frame_host) OVERRIDE;
+
+ private:
+ void OnRequestSysExPermission(RenderFrameHost* render_frame_host,
+ int bridge_id,
+ const GURL& origin,
+ bool user_gesture);
+ void OnCancelSysExPermissionRequest(RenderFrameHost* render_frame_host,
+ int bridge_id,
+ const GURL& requesting_frame);
+ void WasSysExPermissionGranted(int render_process_id,
+ int render_frame_id,
+ int bridge_id,
+ bool is_allowed);
+
+ struct PendingPermission {
+ PendingPermission(int render_process_id,
+ int render_frame_id,
+ int bridge_id);
+ ~PendingPermission();
+ int render_process_id;
+ int render_frame_id;
+ int bridge_id;
+ base::Closure cancel;
+ };
+ std::vector<PendingPermission> pending_permissions_;
+
+ base::WeakPtrFactory<MidiDispatcherHost> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(MidiDispatcherHost);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_MEDIA_MIDI_DISPATCHER_HOST_H_
diff --git a/content/browser/renderer_host/media/midi_host.cc b/content/browser/media/midi_host.cc
similarity index 98%
rename from content/browser/renderer_host/media/midi_host.cc
rename to content/browser/media/midi_host.cc
index c55022b..950cf48 100644
--- a/content/browser/renderer_host/media/midi_host.cc
+++ b/content/browser/media/midi_host.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/renderer_host/media/midi_host.h"
+#include "content/browser/media/midi_host.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
diff --git a/content/browser/renderer_host/media/midi_host.h b/content/browser/media/midi_host.h
similarity index 94%
rename from content/browser/renderer_host/media/midi_host.h
rename to content/browser/media/midi_host.h
index 90c061a..8be45d8 100644
--- a/content/browser/renderer_host/media/midi_host.h
+++ b/content/browser/media/midi_host.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MIDI_HOST_H_
-#define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MIDI_HOST_H_
+#ifndef CONTENT_BROWSER_MEDIA_MIDI_HOST_H_
+#define CONTENT_BROWSER_MEDIA_MIDI_HOST_H_
#include <vector>
@@ -97,4 +97,4 @@
} // namespace content
-#endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MIDI_HOST_H_
+#endif // CONTENT_BROWSER_MEDIA_MIDI_HOST_H_
diff --git a/content/browser/renderer_host/media/midi_host_unittest.cc b/content/browser/media/midi_host_unittest.cc
similarity index 97%
rename from content/browser/renderer_host/media/midi_host_unittest.cc
rename to content/browser/media/midi_host_unittest.cc
index fe365dd..e06e4e4 100644
--- a/content/browser/renderer_host/media/midi_host_unittest.cc
+++ b/content/browser/media/midi_host_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/renderer_host/media/midi_host.h"
+#include "content/browser/media/midi_host.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/content/browser/media/webrtc_browsertest.cc b/content/browser/media/webrtc_browsertest.cc
index 9a003a4..f5bb216 100644
--- a/content/browser/media/webrtc_browsertest.cc
+++ b/content/browser/media/webrtc_browsertest.cc
@@ -4,6 +4,7 @@
#include "base/command_line.h"
#include "base/file_util.h"
+#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/threading/platform_thread.h"
#include "base/values.h"
@@ -47,18 +48,6 @@
command_line->AppendSwitch(switches::kDisableAudioTrackProcessing);
}
- virtual void TearDownOnMainThread() OVERRIDE {
-#if defined(OS_ANDROID)
- // TODO(phoglund): this is a ugly workaround to let the IO thread
- // finish its work. The reason we need this on Android is that
- // content_browsertests tearDown logic is broken with respect
- // to threading, which causes the IO thread to compete with the
- // teardown. See http://crbug.com/362852. I also tried with 2
- // seconds, but that isn't enough.
- base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(5));
-#endif
- }
-
// Convenience function since most peerconnection-call.html tests just load
// the page, kick off some javascript and wait for the title to change to OK.
void MakeTypicalPeerConnectionCall(const std::string& javascript) {
@@ -71,6 +60,27 @@
ExecuteJavascriptAndWaitForOk(javascript);
}
+ // Convenience method for making calls that detect if audio os playing (which
+ // has some special prerequisites, such that there needs to be an audio output
+ // device on the executing machine).
+ void MakeAudioDetectingPeerConnectionCall(const std::string& javascript) {
+ if (!media::AudioManager::Get()->HasAudioOutputDevices()) {
+ // Bots with no output devices will force the audio code into a state
+ // where it doesn't manage to set either the low or high latency path.
+ // This test will compute useless values in that case, so skip running on
+ // such bots (see crbug.com/326338).
+ LOG(INFO) << "Missing output devices: skipping test...";
+ return;
+ }
+
+ ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kUseFakeDeviceForMediaStream))
+ << "Must run with fake devices since the test will explicitly look "
+ << "for the fake device signal.";
+
+ MakeTypicalPeerConnectionCall(javascript);
+ }
+
void DisableOpusIfOnAndroid() {
#if defined(OS_ANDROID)
// Always force iSAC 16K on Android for now (Opus is broken).
@@ -169,7 +179,7 @@
IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanForwardRemoteStream) {
#if defined (OS_ANDROID)
// This test fails on Nexus 5 devices.
- // TODO: see http://crbug.com/362437 and http://crbug.com/359389
+ // TODO(henrika): see http://crbug.com/362437 and http://crbug.com/359389
// for details.
CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kDisableWebRtcHWDecoding);
@@ -181,7 +191,7 @@
IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanForwardRemoteStream720p) {
#if defined (OS_ANDROID)
// This test fails on Nexus 5 devices.
- // TODO: see http://crbug.com/362437 and http://crbug.com/359389
+ // TODO(henrika): see http://crbug.com/362437 and http://crbug.com/359389
// for details.
CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kDisableWebRtcHWDecoding);
@@ -231,9 +241,6 @@
#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
// Timing out on ARM linux, see http://crbug.com/240373
#define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall
-#elif defined (OS_ANDROID) || defined(THREAD_SANITIZER)
-// Flaky on TSAN v2 and Android Tests (dbg): http://crbug.com/373637
-#define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall
#else
#define MAYBE_CanSetupLegacyCall CanSetupLegacyCall
#endif
@@ -256,9 +263,6 @@
#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
// Timing out on ARM linux bot: http://crbug.com/238490
#define MAYBE_CallWithDataAndMedia DISABLED_CallWithDataAndMedia
-#elif defined(THREAD_SANITIZER)
-// Flaky on TSAN v2: http://crbug.com/373637
-#define MAYBE_CallWithDataAndMedia DISABLED_CallWithDataAndMedia
#else
#define MAYBE_CallWithDataAndMedia CallWithDataAndMedia
#endif
@@ -327,39 +331,22 @@
}
IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest,
- EstablishAudioVideoCallAndMeasureOutputLevel) {
- if (!media::AudioManager::Get()->HasAudioOutputDevices()) {
- // Bots with no output devices will force the audio code into a different
- // path where it doesn't manage to set either the low or high latency path.
- // This test will compute useless values in that case, so skip running on
- // such bots (see crbug.com/326338).
- LOG(INFO) << "Missing output devices: skipping test...";
- return;
- }
+ EstablishAudioVideoCallAndEnsureAudioIsPlaying) {
+ MakeAudioDetectingPeerConnectionCall(base::StringPrintf(
+ "callAndEnsureAudioIsPlaying(%s, {audio:true, video:true});",
+ kUseLenientAudioChecking));
+}
- ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kUseFakeDeviceForMediaStream))
- << "Must run with fake devices since the test will explicitly look "
- << "for the fake device signal.";
-
- MakeTypicalPeerConnectionCall(base::StringPrintf(
- "callAndEnsureAudioIsPlaying(%s);", kUseLenientAudioChecking));
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest,
+ EstablishAudioOnlyCallAndEnsureAudioIsPlaying) {
+ MakeAudioDetectingPeerConnectionCall(base::StringPrintf(
+ "callAndEnsureAudioIsPlaying(%s, {audio:true});",
+ kUseLenientAudioChecking));
}
IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest,
EstablishAudioVideoCallAndVerifyMutingWorks) {
- if (!media::AudioManager::Get()->HasAudioOutputDevices()) {
- // See comment on EstablishAudioVideoCallAndMeasureOutputLevel.
- LOG(INFO) << "Missing output devices: skipping test...";
- return;
- }
-
- ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kUseFakeDeviceForMediaStream))
- << "Must run with fake devices since the test will explicitly look "
- << "for the fake device signal.";
-
- MakeTypicalPeerConnectionCall(base::StringPrintf(
+ MakeAudioDetectingPeerConnectionCall(base::StringPrintf(
"callAndEnsureAudioTrackMutingWorks(%s);", kUseLenientAudioChecking));
}
@@ -373,18 +360,7 @@
#endif
IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest,
MAYBE_EstablishAudioVideoCallAndVerifyUnmutingWorks) {
- if (!media::AudioManager::Get()->HasAudioOutputDevices()) {
- // See comment on EstablishAudioVideoCallAndMeasureOutputLevel.
- LOG(INFO) << "Missing output devices: skipping test...";
- return;
- }
-
- ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kUseFakeDeviceForMediaStream))
- << "Must run with fake devices since the test will explicitly look "
- << "for the fake device signal.";
-
- MakeTypicalPeerConnectionCall(base::StringPrintf(
+ MakeAudioDetectingPeerConnectionCall(base::StringPrintf(
"callAndEnsureAudioTrackUnmutingWorks(%s);", kUseLenientAudioChecking));
}
@@ -392,6 +368,12 @@
MakeTypicalPeerConnectionCall("callAndEnsureVideoTrackMutingWorks();");
}
+#if defined(OS_WIN)
+#define IntToStringType base::IntToString16
+#else
+#define IntToStringType base::IntToString
+#endif
+
#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
// Timing out on ARM linux bot: http://crbug.com/238490
#define MAYBE_CallWithAecDump DISABLED_CallWithAecDump
@@ -423,6 +405,17 @@
DisableOpusIfOnAndroid();
ExecuteJavascriptAndWaitForOk("call({video: true, audio: true});");
+ // Get the ID for the render process host. There should only be one.
+ RenderProcessHost::iterator it(
+ content::RenderProcessHost::AllHostsIterator());
+ int render_process_host_id = it.GetCurrentValue()->GetID();
+ EXPECT_GE(render_process_host_id, 0);
+
+ // Add file extensions that we expect to be added.
+ static const int kExpectedConsumerId = 0;
+ dump_file = dump_file.AddExtension(IntToStringType(render_process_host_id))
+ .AddExtension(IntToStringType(kExpectedConsumerId));
+
EXPECT_TRUE(base::PathExists(dump_file));
int64 file_size = 0;
EXPECT_TRUE(base::GetFileSize(dump_file, &file_size));
@@ -431,6 +424,9 @@
base::DeleteFile(dump_file, false);
}
+// TODO(grunell): Add test for multiple dumps when re-use of
+// MediaStreamAudioProcessor in AudioCapturer has been removed.
+
#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
// Timing out on ARM linux bot: http://crbug.com/238490
#define MAYBE_CallWithAecDumpEnabledThenDisabled DISABLED_CallWithAecDumpEnabledThenDisabled
diff --git a/content/browser/media/webrtc_getusermedia_browsertest.cc b/content/browser/media/webrtc_getusermedia_browsertest.cc
index 54e64e6..5229881 100644
--- a/content/browser/media/webrtc_getusermedia_browsertest.cc
+++ b/content/browser/media/webrtc_getusermedia_browsertest.cc
@@ -192,19 +192,19 @@
EXPECT_EQ(expected_result, ExecuteJavascriptAndReturnResult(command));
}
- void GetSources(std::vector<std::string>* audio_ids,
- std::vector<std::string>* video_ids) {
+ void GetInputDevices(std::vector<std::string>* audio_ids,
+ std::vector<std::string>* video_ids) {
GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
NavigateToURL(shell(), url);
- std::string sources_as_json = ExecuteJavascriptAndReturnResult(
- "getSources()");
- EXPECT_FALSE(sources_as_json.empty());
+ std::string devices_as_json = ExecuteJavascriptAndReturnResult(
+ "getMediaDevices()");
+ EXPECT_FALSE(devices_as_json.empty());
int error_code;
std::string error_message;
scoped_ptr<base::Value> value(
- base::JSONReader::ReadAndReturnError(sources_as_json,
+ base::JSONReader::ReadAndReturnError(devices_as_json,
base::JSON_ALLOW_TRAILING_COMMAS,
&error_code,
&error_message));
@@ -219,17 +219,19 @@
it != values->end(); ++it) {
const base::DictionaryValue* dict;
std::string kind;
- std::string id;
+ std::string device_id;
ASSERT_TRUE((*it)->GetAsDictionary(&dict));
ASSERT_TRUE(dict->GetString("kind", &kind));
- ASSERT_TRUE(dict->GetString("id", &id));
- ASSERT_FALSE(id.empty());
- EXPECT_TRUE(kind == "audio" || kind == "video");
- if (kind == "audio") {
- audio_ids->push_back(id);
- } else if (kind == "video") {
- video_ids->push_back(id);
+ ASSERT_TRUE(dict->GetString("deviceId", &device_id));
+ ASSERT_FALSE(device_id.empty());
+ EXPECT_TRUE(kind == "audioinput" || kind == "videoinput" ||
+ kind == "audiooutput");
+ if (kind == "audioinput") {
+ audio_ids->push_back(device_id);
+ } else if (kind == "videoinput") {
+ video_ids->push_back(device_id);
}
+ // We ignore audio output.
}
ASSERT_FALSE(audio_ids->empty());
ASSERT_FALSE(video_ids->empty());
@@ -347,7 +349,7 @@
std::vector<std::string> audio_ids;
std::vector<std::string> video_ids;
- GetSources(&audio_ids, &video_ids);
+ GetInputDevices(&audio_ids, &video_ids);
GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
@@ -372,7 +374,7 @@
std::vector<std::string> audio_ids;
std::vector<std::string> video_ids;
- GetSources(&audio_ids, &video_ids);
+ GetInputDevices(&audio_ids, &video_ids);
GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
@@ -405,7 +407,7 @@
std::vector<std::string> audio_ids;
std::vector<std::string> video_ids;
- GetSources(&audio_ids, &video_ids);
+ GetInputDevices(&audio_ids, &video_ids);
GURL url(embedded_test_server()->GetURL("/media/getusermedia.html"));
diff --git a/content/browser/media/webrtc_internals.cc b/content/browser/media/webrtc_internals.cc
index f45f192..892f037 100644
--- a/content/browser/media/webrtc_internals.cc
+++ b/content/browser/media/webrtc_internals.cc
@@ -4,7 +4,6 @@
#include "content/browser/media/webrtc_internals.h"
-#include "base/command_line.h"
#include "base/path_service.h"
#include "content/browser/media/webrtc_internals_ui_observer.h"
#include "content/browser/web_contents/web_contents_view.h"
@@ -14,7 +13,6 @@
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/common/content_switches.h"
using base::ProcessId;
using std::string;
diff --git a/content/browser/net/browser_online_state_observer.cc b/content/browser/net/browser_online_state_observer.cc
index 8d97b1c..76f2bb3 100644
--- a/content/browser/net/browser_online_state_observer.cc
+++ b/content/browser/net/browser_online_state_observer.cc
@@ -19,11 +19,9 @@
void BrowserOnlineStateObserver::OnConnectionTypeChanged(
net::NetworkChangeNotifier::ConnectionType type) {
- bool is_online = !net::NetworkChangeNotifier::IsOffline();
for (RenderProcessHost::iterator it(RenderProcessHost::AllHostsIterator());
!it.IsAtEnd(); it.Advance()) {
- it.GetCurrentValue()->Send(
- new ViewMsg_NetworkStateChanged(is_online, type));
+ it.GetCurrentValue()->Send(new ViewMsg_NetworkTypeChanged(type));
}
}
diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc
index 84415eb..7cb7a0f 100644
--- a/content/browser/plugin_process_host.cc
+++ b/content/browser/plugin_process_host.cc
@@ -41,6 +41,7 @@
#include "net/url_request/url_request_context_getter.h"
#include "ui/base/ui_base_switches.h"
#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/switches.h"
#include "ui/gl/gl_switches.h"
#if defined(OS_MACOSX)
@@ -52,7 +53,6 @@
#if defined(OS_WIN)
#include "base/win/windows_version.h"
#include "content/common/plugin_constants_win.h"
-#include "ui/gfx/switches.h"
#endif
namespace content {
@@ -96,6 +96,13 @@
virtual int GetIpcFd() OVERRIDE {
return ipc_fd_;
}
+
+#if defined(OS_MACOSX)
+ virtual SandboxType GetSandboxType() OVERRIDE {
+ return SANDBOX_TYPE_NPAPI;
+ }
+#endif // OS_MACOSX
+
#endif // OS_WIN
private:
@@ -200,6 +207,7 @@
switches::kPluginStartupDialog,
switches::kTraceStartup,
switches::kUseGL,
+ switches::kForceDeviceScaleFactor,
#if defined(OS_MACOSX)
switches::kDisableCoreAnimationPlugins,
switches::kEnableSandboxLogging,
diff --git a/content/browser/profiler_controller_impl.cc b/content/browser/profiler_controller_impl.cc
index 14c2f38..27c95ed 100644
--- a/content/browser/profiler_controller_impl.cc
+++ b/content/browser/profiler_controller_impl.cc
@@ -5,7 +5,7 @@
#include "content/browser/profiler_controller_impl.h"
#include "base/bind.h"
-#include "base/command_line.h"
+#include "base/process/process_handle.h"
#include "base/tracked_objects.h"
#include "content/common/child_process_messages.h"
#include "content/public/browser/browser_child_process_host_iterator.h"
@@ -13,7 +13,6 @@
#include "content/public/browser/child_process_data.h"
#include "content/public/browser/profiler_subscriber.h"
#include "content/public/browser/render_process_host.h"
-#include "content/public/common/content_switches.h"
namespace content {
@@ -78,12 +77,12 @@
int pending_processes = 0;
for (BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) {
- // Skips requesting profiler data from the "GPU Process" if we are using in
- // process GPU. Those stats should be in the Browser-process's GPU thread.
- if (iter.GetData().process_type == PROCESS_TYPE_GPU &&
- CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessGPU)) {
+ // In some cases, there may be no child process of the given type (for
+ // example, the GPU process may not exist and there may instead just be a
+ // GPU thread in the browser process). If that's the case, then the process
+ // handle will be base::kNullProcessHandle and we shouldn't ask it for data.
+ if (iter.GetData().handle == base::kNullProcessHandle)
continue;
- }
++pending_processes;
if (!iter.Send(new ChildProcessMsg_GetChildProfilerData(sequence_number)))
diff --git a/content/browser/push_messaging_message_filter.cc b/content/browser/push_messaging_message_filter.cc
index e0787a7..451c112 100644
--- a/content/browser/push_messaging_message_filter.cc
+++ b/content/browser/push_messaging_message_filter.cc
@@ -6,13 +6,20 @@
#include <string>
+#include "base/bind.h"
+#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/common/push_messaging_messages.h"
+#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/push_messaging_service.h"
namespace content {
-PushMessagingMessageFilter::PushMessagingMessageFilter()
- : BrowserMessageFilter(PushMessagingMsgStart) {}
+PushMessagingMessageFilter::PushMessagingMessageFilter(int render_process_id)
+ : BrowserMessageFilter(PushMessagingMsgStart),
+ render_process_id_(render_process_id),
+ service_(NULL),
+ weak_factory_(this) {}
PushMessagingMessageFilter::~PushMessagingMessageFilter() {}
@@ -29,28 +36,44 @@
void PushMessagingMessageFilter::OnRegister(int routing_id,
int callbacks_id,
const std::string& sender_id) {
- // TODO(mvanouwerkerk): Really implement, the below simply returns an error.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- GURL endpoint = GURL("https://android.googleapis.com/gcm/send");
+ // TODO(mvanouwerkerk): Validate arguments?
+ // TODO(mvanouwerkerk): A WebContentsObserver could avoid this PostTask
+ // by receiving the IPC on the UI thread.
BrowserThread::PostTask(BrowserThread::UI,
FROM_HERE,
- base::Bind(&PushMessagingMessageFilter::DidRegister,
- this,
+ base::Bind(&PushMessagingMessageFilter::DoRegister,
+ weak_factory_.GetWeakPtr(),
routing_id,
callbacks_id,
- endpoint,
- "",
- true));
+ sender_id));
+}
+void PushMessagingMessageFilter::DoRegister(int routing_id,
+ int callbacks_id,
+ const std::string& sender_id) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ if (!service()) {
+ DidRegister(routing_id, callbacks_id, GURL(), "", false);
+ return;
+ }
+ // TODO(mvanouwerkerk): Pass in a real app ID based on Service Worker ID.
+ std::string app_id = "https://example.com 0";
+ service_->Register(app_id,
+ sender_id,
+ base::Bind(&PushMessagingMessageFilter::DidRegister,
+ weak_factory_.GetWeakPtr(),
+ routing_id,
+ callbacks_id));
}
void PushMessagingMessageFilter::DidRegister(int routing_id,
int callbacks_id,
const GURL& endpoint,
const std::string& registration_id,
- bool error) {
+ bool success) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (!error) {
+ if (success) {
Send(new PushMessagingMsg_RegisterSuccess(routing_id,
callbacks_id,
endpoint,
@@ -60,4 +83,15 @@
}
}
+PushMessagingService* PushMessagingMessageFilter::service() {
+ if (!service_) {
+ RenderProcessHostImpl* host = static_cast<RenderProcessHostImpl*>(
+ RenderProcessHost::FromID(render_process_id_));
+ if (!host)
+ return NULL;
+ service_ = host->GetBrowserContext()->GetPushMessagingService();
+ }
+ return service_;
+}
+
} // namespace content
diff --git a/content/browser/push_messaging_message_filter.h b/content/browser/push_messaging_message_filter.h
index 44efd7f..abc0218 100644
--- a/content/browser/push_messaging_message_filter.h
+++ b/content/browser/push_messaging_message_filter.h
@@ -7,14 +7,17 @@
#include <string>
+#include "base/memory/weak_ptr.h"
#include "content/public/browser/browser_message_filter.h"
#include "url/gurl.h"
namespace content {
+class PushMessagingService;
+
class PushMessagingMessageFilter : public BrowserMessageFilter {
public:
- PushMessagingMessageFilter();
+ explicit PushMessagingMessageFilter(int render_process_id);
private:
virtual ~PushMessagingMessageFilter();
@@ -26,11 +29,22 @@
int callbacks_id,
const std::string& sender_id);
+ void DoRegister(int routing_id,
+ int callbacks_id,
+ const std::string& sender_id);
+
void DidRegister(int routing_id,
int callbacks_id,
const GURL& endpoint,
const std::string& registration_id,
- bool error);
+ bool success);
+
+ PushMessagingService* service();
+
+ int render_process_id_;
+ PushMessagingService* service_; // Not owned.
+
+ base::WeakPtrFactory<PushMessagingMessageFilter> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(PushMessagingMessageFilter);
};
diff --git a/content/browser/renderer_host/compositing_iosurface_context_mac.h b/content/browser/renderer_host/compositing_iosurface_context_mac.h
index 2904178..52a9898 100644
--- a/content/browser/renderer_host/compositing_iosurface_context_mac.h
+++ b/content/browser/renderer_host/compositing_iosurface_context_mac.h
@@ -19,12 +19,6 @@
namespace content {
-enum CoreAnimationStatus {
- CORE_ANIMATION_DISABLED,
- CORE_ANIMATION_ENABLED,
-};
-CoreAnimationStatus GetCoreAnimationStatus();
-
class CompositingIOSurfaceShaderPrograms;
class CompositingIOSurfaceContext
@@ -55,7 +49,6 @@
CompositingIOSurfaceShaderPrograms* shader_program_cache() const {
return shader_program_cache_.get();
}
- NSOpenGLContext* nsgl_context() const;
CGLContextObj cgl_context() const { return cgl_context_; }
bool is_vsync_disabled() const { return is_vsync_disabled_; }
int window_number() const { return window_number_; }
@@ -68,7 +61,6 @@
CompositingIOSurfaceContext(
int window_number,
- NSOpenGLContext* nsgl_context,
base::ScopedTypeRef<CGLContextObj> clg_context_strong,
CGLContextObj clg_context,
bool is_vsync_disabled_,
@@ -76,9 +68,8 @@
virtual ~CompositingIOSurfaceContext();
int window_number_;
- base::scoped_nsobject<NSOpenGLContext> nsgl_context_;
base::ScopedTypeRef<CGLContextObj> cgl_context_strong_;
- // Weak, backed by |nsgl_context_| or |cgl_context_strong_|.
+ // Weak, backed by |cgl_context_strong_|.
CGLContextObj cgl_context_;
bool is_vsync_disabled_;
diff --git a/content/browser/renderer_host/compositing_iosurface_context_mac.mm b/content/browser/renderer_host/compositing_iosurface_context_mac.mm
index fecab50..a66bf50 100644
--- a/content/browser/renderer_host/compositing_iosurface_context_mac.mm
+++ b/content/browser/renderer_host/compositing_iosurface_context_mac.mm
@@ -19,14 +19,6 @@
namespace content {
-CoreAnimationStatus GetCoreAnimationStatus() {
- static CoreAnimationStatus status =
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableCoreAnimation) ?
- CORE_ANIMATION_DISABLED : CORE_ANIMATION_ENABLED;
- return status;
-}
-
// static
scoped_refptr<CompositingIOSurfaceContext>
CompositingIOSurfaceContext::Get(int window_number) {
@@ -42,88 +34,44 @@
static bool is_vsync_disabled =
CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableGpuVsync);
- base::scoped_nsobject<NSOpenGLContext> nsgl_context;
base::ScopedTypeRef<CGLContextObj> cgl_context_strong;
CGLContextObj cgl_context = NULL;
- if (GetCoreAnimationStatus() == CORE_ANIMATION_DISABLED) {
- std::vector<NSOpenGLPixelFormatAttribute> attributes;
- attributes.push_back(NSOpenGLPFADoubleBuffer);
- // We don't need a depth buffer - try setting its size to 0...
- attributes.push_back(NSOpenGLPFADepthSize); attributes.push_back(0);
- if (ui::GpuSwitchingManager::GetInstance()->SupportsDualGpus())
- attributes.push_back(NSOpenGLPFAAllowOfflineRenderers);
- attributes.push_back(0);
+ CGLError error = kCGLNoError;
- base::scoped_nsobject<NSOpenGLPixelFormat> glPixelFormat(
- [[NSOpenGLPixelFormat alloc] initWithAttributes:&attributes.front()]);
- if (!glPixelFormat) {
- LOG(ERROR) << "NSOpenGLPixelFormat initWithAttributes failed";
- return NULL;
- }
-
- // Create all contexts in the same share group so that the textures don't
- // need to be recreated when transitioning contexts.
- NSOpenGLContext* share_context = nil;
- if (!window_map()->empty())
- share_context = window_map()->begin()->second->nsgl_context();
- nsgl_context.reset(
- [[NSOpenGLContext alloc] initWithFormat:glPixelFormat
- shareContext:share_context]);
- if (!nsgl_context) {
- LOG(ERROR) << "NSOpenGLContext initWithFormat failed";
- return NULL;
- }
-
- // Grab the CGL context that the NSGL context is using. Explicitly
- // retain it, so that it is not double-freed by the scoped type.
- cgl_context = reinterpret_cast<CGLContextObj>(
- [nsgl_context CGLContextObj]);
- if (!cgl_context) {
- LOG(ERROR) << "Failed to retrieve CGLContextObj from NSOpenGLContext";
- return NULL;
- }
-
- // Force [nsgl_context flushBuffer] to wait for vsync.
- GLint swapInterval = is_vsync_disabled ? 0 : 1;
- [nsgl_context setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval];
- } else {
- CGLError error = kCGLNoError;
-
- // Create the pixel format object for the context.
- std::vector<CGLPixelFormatAttribute> attribs;
- attribs.push_back(kCGLPFADepthSize);
- attribs.push_back(static_cast<CGLPixelFormatAttribute>(0));
- if (ui::GpuSwitchingManager::GetInstance()->SupportsDualGpus()) {
- attribs.push_back(kCGLPFAAllowOfflineRenderers);
- attribs.push_back(static_cast<CGLPixelFormatAttribute>(1));
- }
- attribs.push_back(static_cast<CGLPixelFormatAttribute>(0));
- GLint number_virtual_screens = 0;
- base::ScopedTypeRef<CGLPixelFormatObj> pixel_format;
- error = CGLChoosePixelFormat(&attribs.front(),
- pixel_format.InitializeInto(),
- &number_virtual_screens);
- if (error != kCGLNoError) {
- LOG(ERROR) << "Failed to create pixel format object.";
- return NULL;
- }
-
- // Create all contexts in the same share group so that the textures don't
- // need to be recreated when transitioning contexts.
- CGLContextObj share_context = NULL;
- if (!window_map()->empty())
- share_context = window_map()->begin()->second->cgl_context();
- error = CGLCreateContext(
- pixel_format, share_context, cgl_context_strong.InitializeInto());
- if (error != kCGLNoError) {
- LOG(ERROR) << "Failed to create context object.";
- return NULL;
- }
- cgl_context = cgl_context_strong;
-
- // Note that VSync is ignored because CoreAnimation will automatically
- // rate limit draws.
+ // Create the pixel format object for the context.
+ std::vector<CGLPixelFormatAttribute> attribs;
+ attribs.push_back(kCGLPFADepthSize);
+ attribs.push_back(static_cast<CGLPixelFormatAttribute>(0));
+ if (ui::GpuSwitchingManager::GetInstance()->SupportsDualGpus()) {
+ attribs.push_back(kCGLPFAAllowOfflineRenderers);
+ attribs.push_back(static_cast<CGLPixelFormatAttribute>(1));
}
+ attribs.push_back(static_cast<CGLPixelFormatAttribute>(0));
+ GLint number_virtual_screens = 0;
+ base::ScopedTypeRef<CGLPixelFormatObj> pixel_format;
+ error = CGLChoosePixelFormat(&attribs.front(),
+ pixel_format.InitializeInto(),
+ &number_virtual_screens);
+ if (error != kCGLNoError) {
+ LOG(ERROR) << "Failed to create pixel format object.";
+ return NULL;
+ }
+
+ // Create all contexts in the same share group so that the textures don't
+ // need to be recreated when transitioning contexts.
+ CGLContextObj share_context = NULL;
+ if (!window_map()->empty())
+ share_context = window_map()->begin()->second->cgl_context();
+ error = CGLCreateContext(
+ pixel_format, share_context, cgl_context_strong.InitializeInto());
+ if (error != kCGLNoError) {
+ LOG(ERROR) << "Failed to create context object.";
+ return NULL;
+ }
+ cgl_context = cgl_context_strong;
+
+ // Note that VSync is ignored because CoreAnimation will automatically
+ // rate limit draws.
// Prepare the shader program cache. Precompile the shader programs
// needed to draw the IO Surface for non-offscreen contexts.
@@ -148,7 +96,6 @@
return new CompositingIOSurfaceContext(
window_number,
- nsgl_context.release(),
cgl_context_strong,
cgl_context,
is_vsync_disabled,
@@ -169,13 +116,11 @@
CompositingIOSurfaceContext::CompositingIOSurfaceContext(
int window_number,
- NSOpenGLContext* nsgl_context,
base::ScopedTypeRef<CGLContextObj> cgl_context_strong,
CGLContextObj cgl_context,
bool is_vsync_disabled,
scoped_ptr<CompositingIOSurfaceShaderPrograms> shader_program_cache)
: window_number_(window_number),
- nsgl_context_(nsgl_context),
cgl_context_strong_(cgl_context_strong),
cgl_context_(cgl_context),
is_vsync_disabled_(is_vsync_disabled),
@@ -205,12 +150,6 @@
}
}
-NSOpenGLContext* CompositingIOSurfaceContext::nsgl_context() const {
- // This should not be called from any CoreAnimation paths.
- CHECK(GetCoreAnimationStatus() == CORE_ANIMATION_DISABLED);
- return nsgl_context_;
-}
-
void CompositingIOSurfaceContext::OnGpuSwitching() {
// Recreate all browser-side GL contexts whenever the GPU switches. If this
// is not done, performance will suffer.
diff --git a/content/browser/renderer_host/compositing_iosurface_layer_mac.mm b/content/browser/renderer_host/compositing_iosurface_layer_mac.mm
index d50fe0a..3d0b44e 100644
--- a/content/browser/renderer_host/compositing_iosurface_layer_mac.mm
+++ b/content/browser/renderer_host/compositing_iosurface_layer_mac.mm
@@ -206,7 +206,7 @@
gfx::ScaleRect(window_rect, 1.f/window_scale_factor));
bool draw_succeeded = iosurface_->DrawIOSurface(
- context_, window_rect, window_scale_factor, false);
+ context_, window_rect, window_scale_factor);
[self ackPendingFrame:draw_succeeded];
needs_display_ = NO;
diff --git a/content/browser/renderer_host/compositing_iosurface_mac.h b/content/browser/renderer_host/compositing_iosurface_mac.h
index d632f52..08c3c74 100644
--- a/content/browser/renderer_host/compositing_iosurface_mac.h
+++ b/content/browser/renderer_host/compositing_iosurface_mac.h
@@ -52,7 +52,7 @@
// Set IOSurface that will be drawn on the next NSView drawRect.
bool SetIOSurfaceWithContextCurrent(
scoped_refptr<CompositingIOSurfaceContext> current_context,
- uint64 io_surface_handle,
+ IOSurfaceID io_surface_handle,
const gfx::Size& size,
float scale_factor) WARN_UNUSED_RESULT;
@@ -66,8 +66,7 @@
bool DrawIOSurface(
scoped_refptr<CompositingIOSurfaceContext> drawing_context,
const gfx::Rect& window_rect,
- float window_scale_factor,
- bool flush_drawable) WARN_UNUSED_RESULT;
+ float window_scale_factor) WARN_UNUSED_RESULT;
// Copy the data of the "live" OpenGL texture referring to this IOSurfaceRef
// into |out|. The copied region is specified with |src_pixel_subrect| and
@@ -218,7 +217,7 @@
const scoped_refptr<CompositingIOSurfaceContext>& current_context,
const gfx::Size pixel_size,
float scale_factor,
- uint64 io_surface_handle) WARN_UNUSED_RESULT;
+ IOSurfaceID io_surface_handle) WARN_UNUSED_RESULT;
void UnrefIOSurfaceWithContextCurrent();
@@ -278,7 +277,7 @@
scoped_refptr<CompositingIOSurfaceContext> offscreen_context_;
// IOSurface data.
- uint64 io_surface_handle_;
+ IOSurfaceID io_surface_handle_;
base::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
// The width and height of the io surface.
diff --git a/content/browser/renderer_host/compositing_iosurface_mac.mm b/content/browser/renderer_host/compositing_iosurface_mac.mm
index 5280fd5..3fd2854 100644
--- a/content/browser/renderer_host/compositing_iosurface_mac.mm
+++ b/content/browser/renderer_host/compositing_iosurface_mac.mm
@@ -262,7 +262,7 @@
bool CompositingIOSurfaceMac::SetIOSurfaceWithContextCurrent(
scoped_refptr<CompositingIOSurfaceContext> current_context,
- uint64 io_surface_handle,
+ IOSurfaceID io_surface_handle,
const gfx::Size& size,
float scale_factor) {
bool result = MapIOSurfaceToTextureWithContextCurrent(
@@ -283,8 +283,7 @@
bool CompositingIOSurfaceMac::DrawIOSurface(
scoped_refptr<CompositingIOSurfaceContext> drawing_context,
const gfx::Rect& window_rect,
- float window_scale_factor,
- bool flush_drawable) {
+ float window_scale_factor) {
DCHECK_EQ(CGLGetCurrentContext(), drawing_context->cgl_context());
bool has_io_surface = HasIOSurface();
@@ -358,27 +357,14 @@
bool workaround_needed =
GpuDataManagerImpl::GetInstance()->IsDriverBugWorkaroundActive(
gpu::FORCE_GL_FINISH_AFTER_COMPOSITING);
- // Note that this is not necessary when not flushing the drawable in Mavericks
- // or later if we are in one of the two following situations:
- // - we are drawing an underlay, and we will call glFinish() when drawing
- // the overlay.
- // - we are using CoreAnimation, where this bug does not manifest.
- if (workaround_needed && !flush_drawable && base::mac::IsOSMavericksOrLater())
- workaround_needed = false;
-
if (workaround_needed) {
TRACE_EVENT0("gpu", "glFinish");
glFinish();
}
- bool result = true;
- if (flush_drawable) {
- TRACE_EVENT0("gpu", "flushBuffer");
- [drawing_context->nsgl_context() flushBuffer];
- }
-
// Check if any of the drawing calls result in an error.
GetAndSaveGLError();
+ bool result = true;
if (gl_error_ != GL_NO_ERROR) {
LOG(ERROR) << "GL error in DrawIOSurface: " << gl_error_;
result = false;
@@ -467,7 +453,7 @@
const scoped_refptr<CompositingIOSurfaceContext>& current_context,
const gfx::Size pixel_size,
float scale_factor,
- uint64 io_surface_handle) {
+ IOSurfaceID io_surface_handle) {
TRACE_EVENT0("browser", "CompositingIOSurfaceMac::MapIOSurfaceToTexture");
if (!io_surface_ || io_surface_handle != io_surface_handle_)
@@ -484,7 +470,7 @@
if (io_surface_ && io_surface_handle == io_surface_handle_)
return true;
- io_surface_.reset(IOSurfaceLookup(static_cast<uint32>(io_surface_handle)));
+ io_surface_.reset(IOSurfaceLookup(io_surface_handle));
// Can fail if IOSurface with that ID was already released by the gpu
// process.
if (!io_surface_) {
@@ -935,8 +921,6 @@
// static
void CompositingIOSurfaceMac::EvictionScheduleDoEvict() {
- if (GetCoreAnimationStatus() == CORE_ANIMATION_DISABLED)
- return;
if (eviction_scheduled_)
return;
if (eviction_queue_.Get().size() <= kMaximumUnevictedSurfaces)
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index f956a2f..6232bcd 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -24,8 +24,6 @@
#include "cc/output/compositor_frame.h"
#include "cc/output/context_provider.h"
#include "cc/output/output_surface.h"
-#include "cc/resources/scoped_ui_resource.h"
-#include "cc/resources/ui_resource_bitmap.h"
#include "cc/trees/layer_tree_host.h"
#include "content/browser/android/child_process_launcher_android.h"
#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
@@ -44,17 +42,12 @@
#include "third_party/skia/include/core/SkMallocPixelRef.h"
#include "ui/base/android/window_android.h"
#include "ui/gfx/android/device_display_info.h"
-#include "ui/gfx/android/java_bitmap.h"
#include "ui/gfx/frame_time.h"
#include "ui/gl/android/surface_texture.h"
#include "ui/gl/android/surface_texture_tracker.h"
#include "webkit/common/gpu/context_provider_in_process.h"
#include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h"
-namespace gfx {
-class JavaBitmap;
-}
-
namespace {
const unsigned int kMaxSwapBuffers = 2U;
@@ -81,46 +74,6 @@
}
};
-class TransientUIResource : public cc::ScopedUIResource {
- public:
- static scoped_ptr<TransientUIResource> Create(
- cc::LayerTreeHost* host,
- const cc::UIResourceBitmap& bitmap) {
- return make_scoped_ptr(new TransientUIResource(host, bitmap));
- }
-
- virtual cc::UIResourceBitmap GetBitmap(cc::UIResourceId uid,
- bool resource_lost) OVERRIDE {
- if (!retrieved_) {
- cc::UIResourceBitmap old_bitmap(bitmap_);
-
- // Return a place holder for all following calls to GetBitmap.
- SkBitmap tiny_bitmap;
- SkCanvas canvas(tiny_bitmap);
- tiny_bitmap.setConfig(
- SkBitmap::kARGB_8888_Config, 1, 1, 0, kOpaque_SkAlphaType);
- tiny_bitmap.allocPixels();
- canvas.drawColor(SK_ColorWHITE);
- tiny_bitmap.setImmutable();
-
- // Release our reference of the true bitmap.
- bitmap_ = cc::UIResourceBitmap(tiny_bitmap);
-
- retrieved_ = true;
- return old_bitmap;
- }
- return bitmap_;
- }
-
- protected:
- TransientUIResource(cc::LayerTreeHost* host,
- const cc::UIResourceBitmap& bitmap)
- : cc::ScopedUIResource(host, bitmap), retrieved_(false) {}
-
- private:
- bool retrieved_;
-};
-
class SurfaceTextureTrackerImpl : public gfx::SurfaceTextureTracker {
public:
SurfaceTextureTrackerImpl() : next_surface_texture_id_(1) {
@@ -383,6 +336,10 @@
ScheduleComposite();
}
+UIResourceProvider& CompositorImpl::GetUIResourceProvider() {
+ return ui_resource_provider_;
+}
+
void CompositorImpl::SetRootLayer(scoped_refptr<cc::Layer> root_layer) {
root_layer_->RemoveAllChildren();
if (root_layer)
@@ -440,9 +397,8 @@
if (!visible) {
if (WillComposite())
CancelComposite();
- ui_resource_map_.clear();
+ ui_resource_provider_.SetLayerTreeHost(NULL);
host_.reset();
- client_->UIResourcesAreInvalid();
} else if (!host_) {
DCHECK(!WillComposite());
needs_composite_ = false;
@@ -471,9 +427,7 @@
host_->SetViewportSize(size_);
host_->set_has_transparent_background(has_transparent_background_);
host_->SetDeviceScaleFactor(device_scale_factor_);
- // Need to recreate the UI resources because a new LayerTreeHost has been
- // created.
- client_->DidLoseUIResources();
+ ui_resource_provider_.SetLayerTreeHost(host_.get());
}
}
@@ -505,63 +459,7 @@
DCHECK(!needs_composite_ || WillComposite());
needs_composite_ = true;
- PostComposite(COMPOSITE_EVENTUALLY);
-}
-
-cc::UIResourceId CompositorImpl::GenerateUIResourceFromUIResourceBitmap(
- const cc::UIResourceBitmap& bitmap,
- bool is_transient) {
- if (!host_)
- return 0;
-
- cc::UIResourceId id = 0;
- scoped_ptr<cc::UIResourceClient> resource;
- if (is_transient) {
- scoped_ptr<TransientUIResource> transient_resource =
- TransientUIResource::Create(host_.get(), bitmap);
- id = transient_resource->id();
- resource = transient_resource.Pass();
- } else {
- scoped_ptr<cc::ScopedUIResource> scoped_resource =
- cc::ScopedUIResource::Create(host_.get(), bitmap);
- id = scoped_resource->id();
- resource = scoped_resource.Pass();
- }
-
- ui_resource_map_.set(id, resource.Pass());
- return id;
-}
-
-cc::UIResourceId CompositorImpl::GenerateUIResource(const SkBitmap& bitmap,
- bool is_transient) {
- return GenerateUIResourceFromUIResourceBitmap(cc::UIResourceBitmap(bitmap),
- is_transient);
-}
-
-cc::UIResourceId CompositorImpl::GenerateCompressedUIResource(
- const gfx::Size& size,
- void* pixels,
- bool is_transient) {
- DCHECK_LT(0, size.width());
- DCHECK_LT(0, size.height());
- DCHECK_EQ(0, size.width() % 4);
- DCHECK_EQ(0, size.height() % 4);
-
- size_t data_size = size.width() * size.height() / 2;
- SkImageInfo info = {size.width(), size.height() / 2, kAlpha_8_SkColorType,
- kPremul_SkAlphaType};
- skia::RefPtr<SkMallocPixelRef> etc1_pixel_ref =
- skia::AdoptRef(SkMallocPixelRef::NewAllocate(info, 0, 0));
- memcpy(etc1_pixel_ref->getAddr(), pixels, data_size);
- etc1_pixel_ref->setImmutable();
- return GenerateUIResourceFromUIResourceBitmap(
- cc::UIResourceBitmap(etc1_pixel_ref, size), is_transient);
-}
-
-void CompositorImpl::DeleteUIResource(cc::UIResourceId resource_id) {
- UIResourceMap::iterator it = ui_resource_map_.find(resource_id);
- if (it != ui_resource_map_.end())
- ui_resource_map_.erase(it);
+ PostComposite(COMPOSITE_IMMEDIATELY);
}
static scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
@@ -633,6 +531,7 @@
void CompositorImpl::OnLostResources() {
client_->DidLoseResources();
+ ui_resource_provider_.UIResourcesAreInvalid();
}
void CompositorImpl::ScheduleComposite() {
diff --git a/content/browser/renderer_host/compositor_impl_android.h b/content/browser/renderer_host/compositor_impl_android.h
index 360df36..61743af 100644
--- a/content/browser/renderer_host/compositor_impl_android.h
+++ b/content/browser/renderer_host/compositor_impl_android.h
@@ -14,6 +14,7 @@
#include "cc/resources/ui_resource_client.h"
#include "cc/trees/layer_tree_host_client.h"
#include "cc/trees/layer_tree_host_single_thread_client.h"
+#include "content/browser/android/ui_resource_provider_impl.h"
#include "content/browser/renderer_host/image_transport_factory_android.h"
#include "content/common/content_export.h"
#include "content/public/browser/android/compositor.h"
@@ -32,6 +33,7 @@
namespace content {
class CompositorClient;
class GraphicsContext;
+class UIResourceProvider;
// -----------------------------------------------------------------------------
// Browser-side compositor that manages a tree of content and UI layers.
@@ -65,13 +67,7 @@
virtual void SetWindowBounds(const gfx::Size& size) OVERRIDE;
virtual void SetHasTransparentBackground(bool flag) OVERRIDE;
virtual void SetNeedsComposite() OVERRIDE;
- virtual cc::UIResourceId GenerateUIResource(const SkBitmap& bitmap,
- bool is_transient) OVERRIDE;
- virtual cc::UIResourceId GenerateCompressedUIResource(const gfx::Size& size,
- void* pixels,
- bool is_transient)
- OVERRIDE;
- virtual void DeleteUIResource(cc::UIResourceId resource_id) OVERRIDE;
+ virtual UIResourceProvider& GetUIResourceProvider() OVERRIDE;
// LayerTreeHostClient implementation.
virtual void WillBeginMainFrame(int frame_id) OVERRIDE {}
@@ -140,6 +136,7 @@
scoped_refptr<cc::Layer> root_layer_;
scoped_ptr<cc::LayerTreeHost> host_;
+ content::UIResourceProviderImpl ui_resource_provider_;
gfx::Size size_;
bool has_transparent_background_;
@@ -150,10 +147,6 @@
CompositorClient* client_;
- typedef base::ScopedPtrHashMap<cc::UIResourceId, cc::UIResourceClient>
- UIResourceMap;
- UIResourceMap ui_resource_map_;
-
gfx::NativeWindow root_window_;
// Used locally to track whether a call to LTH::Composite() did result in
diff --git a/content/browser/renderer_host/input/input_router_config_helper.cc b/content/browser/renderer_host/input/input_router_config_helper.cc
index 7c95b79..31b17cf 100644
--- a/content/browser/renderer_host/input/input_router_config_helper.cc
+++ b/content/browser/renderer_host/input/input_router_config_helper.cc
@@ -10,6 +10,7 @@
#if defined(USE_AURA)
#include "ui/events/gestures/gesture_configuration.h"
+#include "ui/events/gestures/unified_gesture_detector_enabled.h"
#elif defined(OS_ANDROID)
#include "ui/gfx/android/view_configuration.h"
#include "ui/gfx/screen.h"
@@ -52,8 +53,9 @@
config.touchmove_slop_suppression_length_dips =
ui::GestureConfiguration::max_touch_move_in_pixels_for_click();
- // TODO(jdduke): Remove when unified GR enabled, crbug.com/332418.
- config.touchmove_slop_suppression_region_includes_boundary = false;
+
+ config.touchmove_slop_suppression_region_includes_boundary =
+ ui::IsUnifiedGestureDetectorEnabled();
return config;
}
diff --git a/content/browser/renderer_host/input/motion_event_android.cc b/content/browser/renderer_host/input/motion_event_android.cc
index c0f1721..7409955 100644
--- a/content/browser/renderer_host/input/motion_event_android.cc
+++ b/content/browser/renderer_host/input/motion_event_android.cc
@@ -79,7 +79,9 @@
jint pointer_id_0,
jint pointer_id_1,
jfloat touch_major_0_pixels,
- jfloat touch_major_1_pixels)
+ jfloat touch_major_1_pixels,
+ jfloat raw_pos_x_pixels,
+ jfloat raw_pos_y_pixels)
: cached_time_(FromAndroidTime(time_ms)),
cached_action_(FromAndroidAction(android_action)),
cached_pointer_count_(pointer_count),
@@ -99,6 +101,9 @@
cached_pointer_ids_[1] = pointer_id_1;
cached_touch_majors_[0] = ToDips(touch_major_0_pixels);
cached_touch_majors_[1] = ToDips(touch_major_1_pixels);
+ cached_raw_position_offset_ =
+ ToDips(gfx::PointF(raw_pos_x_pixels, raw_pos_y_pixels)) -
+ cached_positions_[0];
}
MotionEventAndroid::MotionEventAndroid(float pix_to_dip,
@@ -128,6 +133,11 @@
cached_touch_majors_[i] = 0.f;
}
}
+
+ cached_raw_position_offset_ =
+ ToDips(gfx::PointF(Java_MotionEvent_getRawX(env, event),
+ Java_MotionEvent_getRawY(env, event))) -
+ cached_positions_[0];
}
MotionEventAndroid::MotionEventAndroid(const MotionEventAndroid& other)
@@ -137,6 +147,7 @@
cached_pointer_count_(other.cached_pointer_count_),
cached_history_size_(other.cached_history_size_),
cached_action_index_(other.cached_action_index_),
+ cached_raw_position_offset_(other.cached_raw_position_offset_),
pix_to_dip_(other.pix_to_dip_),
should_recycle_(true) {
DCHECK(event_.obj());
@@ -160,7 +171,9 @@
return cached_action_;
}
-int MotionEventAndroid::GetActionIndex() const { return cached_action_index_; }
+int MotionEventAndroid::GetActionIndex() const {
+ return cached_action_index_;
+}
size_t MotionEventAndroid::GetPointerCount() const {
return cached_pointer_count_;
@@ -190,6 +203,14 @@
AttachCurrentThread(), event_.obj(), pointer_index));
}
+float MotionEventAndroid::GetRawX(size_t pointer_index) const {
+ return GetX(pointer_index) + cached_raw_position_offset_.x();
+}
+
+float MotionEventAndroid::GetRawY(size_t pointer_index) const {
+ return GetY(pointer_index) + cached_raw_position_offset_.y();
+}
+
float MotionEventAndroid::GetTouchMajor(size_t pointer_index) const {
DCHECK_LT(pointer_index, cached_pointer_count_);
if (pointer_index < MAX_POINTERS_TO_CACHE)
diff --git a/content/browser/renderer_host/input/motion_event_android.h b/content/browser/renderer_host/input/motion_event_android.h
index 2b7f45f..0362b04 100644
--- a/content/browser/renderer_host/input/motion_event_android.h
+++ b/content/browser/renderer_host/input/motion_event_android.h
@@ -37,7 +37,9 @@
jint pointer_id_0,
jint pointer_id_1,
jfloat touch_major_0_pixels,
- jfloat touch_major_1_pixels);
+ jfloat touch_major_1_pixels,
+ jfloat raw_pos_x_pixels,
+ jfloat raw_pos_y_pixels);
virtual ~MotionEventAndroid();
// ui::MotionEvent methods.
@@ -48,21 +50,20 @@
virtual int GetPointerId(size_t pointer_index) const OVERRIDE;
virtual float GetX(size_t pointer_index) const OVERRIDE;
virtual float GetY(size_t pointer_index) const OVERRIDE;
+ virtual float GetRawX(size_t pointer_index) const OVERRIDE;
+ virtual float GetRawY(size_t pointer_index) const OVERRIDE;
virtual float GetTouchMajor(size_t pointer_index) const OVERRIDE;
virtual float GetPressure(size_t pointer_index) const OVERRIDE;
virtual base::TimeTicks GetEventTime() const OVERRIDE;
virtual size_t GetHistorySize() const OVERRIDE;
virtual base::TimeTicks GetHistoricalEventTime(
size_t historical_index) const OVERRIDE;
- virtual float GetHistoricalTouchMajor(
- size_t pointer_index,
- size_t historical_index) const OVERRIDE;
- virtual float GetHistoricalX(
- size_t pointer_index,
- size_t historical_index) const OVERRIDE;
- virtual float GetHistoricalY(
- size_t pointer_index,
- size_t historical_index) const OVERRIDE;
+ virtual float GetHistoricalTouchMajor(size_t pointer_index,
+ size_t historical_index) const OVERRIDE;
+ virtual float GetHistoricalX(size_t pointer_index,
+ size_t historical_index) const OVERRIDE;
+ virtual float GetHistoricalY(size_t pointer_index,
+ size_t historical_index) const OVERRIDE;
virtual scoped_ptr<MotionEvent> Clone() const OVERRIDE;
virtual scoped_ptr<MotionEvent> Cancel() const OVERRIDE;
@@ -108,6 +109,7 @@
gfx::PointF cached_positions_[MAX_POINTERS_TO_CACHE];
int cached_pointer_ids_[MAX_POINTERS_TO_CACHE];
float cached_touch_majors_[MAX_POINTERS_TO_CACHE];
+ gfx::Vector2dF cached_raw_position_offset_;
// Used to convert pixel coordinates from the Java-backed MotionEvent to
// DIP coordinates cached/returned by the MotionEventAndroid.
diff --git a/content/browser/renderer_host/input/motion_event_web.cc b/content/browser/renderer_host/input/motion_event_web.cc
index 31ae995..d1ff8a3 100644
--- a/content/browser/renderer_host/input/motion_event_web.cc
+++ b/content/browser/renderer_host/input/motion_event_web.cc
@@ -90,6 +90,16 @@
return event_.touches[pointer_index].position.y;
}
+float MotionEventWeb::GetRawX(size_t pointer_index) const {
+ DCHECK_LT(pointer_index, GetPointerCount());
+ return event_.touches[pointer_index].screenPosition.x;
+}
+
+float MotionEventWeb::GetRawY(size_t pointer_index) const {
+ DCHECK_LT(pointer_index, GetPointerCount());
+ return event_.touches[pointer_index].screenPosition.y;
+}
+
float MotionEventWeb::GetTouchMajor(size_t pointer_index) const {
DCHECK_LT(pointer_index, GetPointerCount());
// TODO(jdduke): We should be a bit more careful about axes here.
diff --git a/content/browser/renderer_host/input/motion_event_web.h b/content/browser/renderer_host/input/motion_event_web.h
index 2c73a3a..f4ae258 100644
--- a/content/browser/renderer_host/input/motion_event_web.h
+++ b/content/browser/renderer_host/input/motion_event_web.h
@@ -24,6 +24,8 @@
virtual int GetPointerId(size_t pointer_index) const OVERRIDE;
virtual float GetX(size_t pointer_index) const OVERRIDE;
virtual float GetY(size_t pointer_index) const OVERRIDE;
+ virtual float GetRawX(size_t pointer_index) const OVERRIDE;
+ virtual float GetRawY(size_t pointer_index) const OVERRIDE;
virtual float GetTouchMajor(size_t pointer_index) const OVERRIDE;
virtual float GetPressure(size_t pointer_index) const OVERRIDE;
virtual base::TimeTicks GetEventTime() const OVERRIDE;
diff --git a/content/browser/renderer_host/input/touch_action_browsertest.cc b/content/browser/renderer_host/input/touch_action_browsertest.cc
index 1b72608..9d9fb83 100644
--- a/content/browser/renderer_host/input/touch_action_browsertest.cc
+++ b/content/browser/renderer_host/input/touch_action_browsertest.cc
@@ -192,9 +192,12 @@
// Verify that touching a touch-action: none region disables scrolling and
// enables all touch events to be sent.
// Disabled on MacOS because it doesn't support touch input.
-// Flaky on OS_CHROMEOS crbug/376695.
+// Flaky on OS_CHROMEOS http://crbug.com/376695.
+// Also flaky on Linux Tests (TSan v2) http://crbug.com/376668.
#if defined(OS_MACOSX) || defined(OS_CHROMEOS)
#define MAYBE_TouchActionNone DISABLED_TouchActionNone
+#elif defined(THREAD_SANITIZER) && defined(OS_LINUX)
+#define MAYBE_TouchActionNone DISABLED_TouchActionNone
#else
#define MAYBE_TouchActionNone TouchActionNone
#endif
diff --git a/content/browser/renderer_host/input/web_input_event_util.cc b/content/browser/renderer_host/input/web_input_event_util.cc
index 0ddfc01..5994b7f 100644
--- a/content/browser/renderer_host/input/web_input_event_util.cc
+++ b/content/browser/renderer_host/input/web_input_event_util.cc
@@ -186,8 +186,8 @@
static_cast<int>(pointer_index) == event.GetActionIndex());
touch.position.x = event.GetX(pointer_index);
touch.position.y = event.GetY(pointer_index);
- // TODO(joth): Raw event co-ordinates.
- touch.screenPosition = touch.position;
+ touch.screenPosition.x = event.GetRawX(pointer_index);
+ touch.screenPosition.y = event.GetRawY(pointer_index);
touch.radiusX = touch.radiusY = event.GetTouchMajor(pointer_index) * 0.5f;
touch.force = event.GetPressure(pointer_index);
@@ -241,7 +241,7 @@
gesture.timeStampSeconds = (data.time - base::TimeTicks()).InSecondsF();
gesture.sourceDevice = blink::WebGestureDeviceTouchscreen;
- switch (data.type) {
+ switch (data.type()) {
case ui::ET_GESTURE_SHOW_PRESS:
gesture.type = WebInputEvent::GestureShowPress;
gesture.data.showPress.width = data.details.bounding_box_f().width();
diff --git a/content/browser/renderer_host/java/gin_java_bound_object.h b/content/browser/renderer_host/java/gin_java_bound_object.h
new file mode 100644
index 0000000..522a48a
--- /dev/null
+++ b/content/browser/renderer_host/java/gin_java_bound_object.h
@@ -0,0 +1,27 @@
+// Copyright 2014 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 CONTENT_BROWSER_RENDERER_HOST_JAVA_GIN_JAVA_BOUND_OBJECT_H_
+#define CONTENT_BROWSER_RENDERER_HOST_JAVA_GIN_JAVA_BOUND_OBJECT_H_
+
+#include "base/id_map.h"
+#include "base/memory/ref_counted.h"
+
+namespace content {
+
+class GinJavaBoundObject
+ : public base::RefCountedThreadSafe<GinJavaBoundObject> {
+ public:
+ typedef IDMap<scoped_refptr<GinJavaBoundObject>, IDMapOwnPointer> ObjectMap;
+ typedef ObjectMap::KeyType ObjectID;
+
+ private:
+ friend class base::RefCountedThreadSafe<GinJavaBoundObject>;
+ GinJavaBoundObject() {}
+ ~GinJavaBoundObject() {}
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_JAVA_GIN_JAVA_BOUND_OBJECT_H_
diff --git a/content/browser/renderer_host/java/gin_java_method_invocation_helper.cc b/content/browser/renderer_host/java/gin_java_method_invocation_helper.cc
new file mode 100644
index 0000000..5c8abb6
--- /dev/null
+++ b/content/browser/renderer_host/java/gin_java_method_invocation_helper.cc
@@ -0,0 +1,310 @@
+// Copyright 2014 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 "content/browser/renderer_host/java/gin_java_method_invocation_helper.h"
+
+#include <unistd.h>
+
+#include "base/android/event_log.h"
+#include "base/android/jni_android.h"
+#include "base/android/jni_string.h"
+#include "base/float_util.h"
+#include "content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.h"
+#include "content/browser/renderer_host/java/java_method.h"
+#include "content/browser/renderer_host/java/jni_helper.h"
+#include "content/common/android/gin_java_bridge_value.h"
+#include "content/public/browser/browser_thread.h"
+
+using base::android::AttachCurrentThread;
+using base::android::ScopedJavaLocalRef;
+
+namespace content {
+
+namespace {
+
+const char kObjectIsGone[] = "Java object is gone";
+const char kMethodNotFound[] = "Method not found";
+const char kAccessToObjectGetClassIsBlocked[] =
+ "Access to java.lang.Object.getClass is blocked";
+const char kJavaExceptionRaised[] =
+ "Java exception has been raised during method invocation";
+
+// See frameworks/base/core/java/android/webkit/EventLogTags.logtags
+const int kObjectGetClassInvocationAttemptLogTag = 70151;
+
+} // namespace
+
+GinJavaMethodInvocationHelper::GinJavaMethodInvocationHelper(
+ scoped_ptr<ObjectDelegate> object,
+ const std::string& method_name,
+ const base::ListValue& arguments)
+ : object_(object.Pass()),
+ method_name_(method_name),
+ arguments_(arguments.DeepCopy()) {
+}
+
+GinJavaMethodInvocationHelper::~GinJavaMethodInvocationHelper() {}
+
+void GinJavaMethodInvocationHelper::Init(DispatcherDelegate* dispatcher) {
+ // Build on the UI thread a map of object_id -> WeakRef for Java objects from
+ // |arguments_|. Then we can use this map on the background thread without
+ // accessing |dispatcher|.
+ BuildObjectRefsFromListValue(dispatcher, arguments_.get());
+}
+
+// As V8ValueConverter has finite recursion depth when serializing
+// JavaScript values, we don't bother about having a recursion threshold here.
+void GinJavaMethodInvocationHelper::BuildObjectRefsFromListValue(
+ DispatcherDelegate* dispatcher,
+ const base::Value* list_value) {
+ DCHECK(list_value->IsType(base::Value::TYPE_LIST));
+ const base::ListValue* list;
+ list_value->GetAsList(&list);
+ for (base::ListValue::const_iterator iter = list->begin();
+ iter != list->end();
+ ++iter) {
+ if (AppendObjectRef(dispatcher, *iter))
+ continue;
+ if ((*iter)->IsType(base::Value::TYPE_LIST)) {
+ BuildObjectRefsFromListValue(dispatcher, *iter);
+ } else if ((*iter)->IsType(base::Value::TYPE_DICTIONARY)) {
+ BuildObjectRefsFromDictionaryValue(dispatcher, *iter);
+ }
+ }
+}
+
+void GinJavaMethodInvocationHelper::BuildObjectRefsFromDictionaryValue(
+ DispatcherDelegate* dispatcher,
+ const base::Value* dict_value) {
+ DCHECK(dict_value->IsType(base::Value::TYPE_DICTIONARY));
+ const base::DictionaryValue* dict;
+ dict_value->GetAsDictionary(&dict);
+ for (base::DictionaryValue::Iterator iter(*dict);
+ !iter.IsAtEnd();
+ iter.Advance()) {
+ if (AppendObjectRef(dispatcher, &iter.value()))
+ continue;
+ if (iter.value().IsType(base::Value::TYPE_LIST)) {
+ BuildObjectRefsFromListValue(dispatcher, &iter.value());
+ } else if (iter.value().IsType(base::Value::TYPE_DICTIONARY)) {
+ BuildObjectRefsFromDictionaryValue(dispatcher, &iter.value());
+ }
+ }
+}
+
+bool GinJavaMethodInvocationHelper::AppendObjectRef(
+ DispatcherDelegate* dispatcher,
+ const base::Value* raw_value) {
+ if (!GinJavaBridgeValue::ContainsGinJavaBridgeValue(raw_value))
+ return false;
+ scoped_ptr<const GinJavaBridgeValue> value(
+ GinJavaBridgeValue::FromValue(raw_value));
+ if (!value->IsType(GinJavaBridgeValue::TYPE_OBJECT_ID))
+ return false;
+ GinJavaBoundObject::ObjectID object_id;
+ if (value->GetAsObjectID(&object_id)) {
+ ObjectRefs::iterator iter = object_refs_.find(object_id);
+ if (iter == object_refs_.end()) {
+ JavaObjectWeakGlobalRef object_ref(
+ dispatcher->GetObjectWeakRef(object_id));
+ if (!object_ref.is_empty()) {
+ object_refs_.insert(std::make_pair(object_id, object_ref));
+ }
+ }
+ }
+ return true;
+}
+
+void GinJavaMethodInvocationHelper::Invoke() {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> obj(object_->GetLocalRef(env));
+ if (obj.is_null()) {
+ SetInvocationFailure(kObjectIsGone);
+ return;
+ }
+ const JavaMethod* method =
+ object_->FindMethod(method_name_, arguments_->GetSize());
+ if (!method) {
+ SetInvocationFailure(kMethodNotFound);
+ return;
+ }
+
+ if (object_->IsObjectGetClassMethod(method)) {
+ base::android::EventLogWriteInt(kObjectGetClassInvocationAttemptLogTag,
+ getuid());
+ SetInvocationFailure(kAccessToObjectGetClassIsBlocked);
+ return;
+ }
+
+ std::vector<jvalue> parameters(method->num_parameters());
+ for (size_t i = 0; i < method->num_parameters(); ++i) {
+ const base::Value* argument;
+ arguments_->Get(i, &argument);
+ parameters[i] = CoerceJavaScriptValueToJavaValue(
+ env, argument, method->parameter_type(i), true, object_refs_);
+ }
+ InvokeMethod(obj.obj(), method->return_type(), method->id(), ¶meters[0]);
+
+ // Now that we're done with the jvalue, release any local references created
+ // by CoerceJavaScriptValueToJavaValue().
+ for (size_t i = 0; i < method->num_parameters(); ++i) {
+ ReleaseJavaValueIfRequired(env, ¶meters[i], method->parameter_type(i));
+ }
+}
+
+void GinJavaMethodInvocationHelper::SetInvocationFailure(
+ const char* error_message) {
+ holds_primitive_result_ = true;
+ primitive_result_.reset(new base::ListValue());
+ error_message_ = error_message;
+}
+
+void GinJavaMethodInvocationHelper::SetPrimitiveResult(
+ const base::ListValue& result_wrapper) {
+ holds_primitive_result_ = true;
+ primitive_result_.reset(result_wrapper.DeepCopy());
+}
+
+void GinJavaMethodInvocationHelper::SetObjectResult(
+ const base::android::JavaRef<jobject>& object,
+ const base::android::JavaRef<jclass>& safe_annotation_clazz) {
+ holds_primitive_result_ = false;
+ object_result_.Reset(object);
+ safe_annotation_clazz_.Reset(safe_annotation_clazz);
+}
+
+bool GinJavaMethodInvocationHelper::HoldsPrimitiveResult() {
+ return holds_primitive_result_;
+}
+
+const base::ListValue& GinJavaMethodInvocationHelper::GetPrimitiveResult() {
+ return *primitive_result_.get();
+}
+
+const base::android::JavaRef<jobject>&
+GinJavaMethodInvocationHelper::GetObjectResult() {
+ return object_result_;
+}
+
+const base::android::JavaRef<jclass>&
+GinJavaMethodInvocationHelper::GetSafeAnnotationClass() {
+ return safe_annotation_clazz_;
+}
+
+const std::string& GinJavaMethodInvocationHelper::GetErrorMessage() {
+ return error_message_;
+}
+
+void GinJavaMethodInvocationHelper::InvokeMethod(jobject object,
+ const JavaType& return_type,
+ jmethodID id,
+ jvalue* parameters) {
+ JNIEnv* env = AttachCurrentThread();
+ base::ListValue result_wrapper;
+ switch (return_type.type) {
+ case JavaType::TypeBoolean:
+ result_wrapper.AppendBoolean(
+ env->CallBooleanMethodA(object, id, parameters));
+ break;
+ case JavaType::TypeByte:
+ result_wrapper.AppendInteger(
+ env->CallByteMethodA(object, id, parameters));
+ break;
+ case JavaType::TypeChar:
+ result_wrapper.AppendInteger(
+ env->CallCharMethodA(object, id, parameters));
+ break;
+ case JavaType::TypeShort:
+ result_wrapper.AppendInteger(
+ env->CallShortMethodA(object, id, parameters));
+ break;
+ case JavaType::TypeInt:
+ result_wrapper.AppendInteger(
+ env->CallIntMethodA(object, id, parameters));
+ break;
+ case JavaType::TypeLong:
+ result_wrapper.AppendDouble(
+ env->CallLongMethodA(object, id, parameters));
+ break;
+ case JavaType::TypeFloat: {
+ float result = env->CallFloatMethodA(object, id, parameters);
+ if (base::IsFinite(result)) {
+ result_wrapper.AppendDouble(result);
+ } else {
+ result_wrapper.Append(
+ GinJavaBridgeValue::CreateNonFiniteValue(result).release());
+ }
+ break;
+ }
+ case JavaType::TypeDouble: {
+ double result = env->CallDoubleMethodA(object, id, parameters);
+ if (base::IsFinite(result)) {
+ result_wrapper.AppendDouble(result);
+ } else {
+ result_wrapper.Append(
+ GinJavaBridgeValue::CreateNonFiniteValue(result).release());
+ }
+ break;
+ }
+ case JavaType::TypeVoid:
+ env->CallVoidMethodA(object, id, parameters);
+ result_wrapper.Append(
+ GinJavaBridgeValue::CreateUndefinedValue().release());
+ break;
+ case JavaType::TypeArray:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to not call methods that
+ // return arrays. Spec requires calling the method and converting the
+ // result to a JavaScript array.
+ result_wrapper.Append(
+ GinJavaBridgeValue::CreateUndefinedValue().release());
+ break;
+ case JavaType::TypeString: {
+ jstring java_string = static_cast<jstring>(
+ env->CallObjectMethodA(object, id, parameters));
+ // If an exception was raised, we must clear it before calling most JNI
+ // methods. ScopedJavaLocalRef is liable to make such calls, so we test
+ // first.
+ if (base::android::ClearException(env)) {
+ SetInvocationFailure(kJavaExceptionRaised);
+ return;
+ }
+ ScopedJavaLocalRef<jstring> scoped_java_string(env, java_string);
+ if (!scoped_java_string.obj()) {
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to return undefined.
+ // Spec requires returning a null string.
+ result_wrapper.Append(
+ GinJavaBridgeValue::CreateUndefinedValue().release());
+ break;
+ }
+ result_wrapper.AppendString(
+ base::android::ConvertJavaStringToUTF8(scoped_java_string));
+ break;
+ }
+ case JavaType::TypeObject: {
+ // If an exception was raised, we must clear it before calling most JNI
+ // methods. ScopedJavaLocalRef is liable to make such calls, so we test
+ // first.
+ jobject java_object = env->CallObjectMethodA(object, id, parameters);
+ if (base::android::ClearException(env)) {
+ SetInvocationFailure(kJavaExceptionRaised);
+ return;
+ }
+ ScopedJavaLocalRef<jobject> scoped_java_object(env, java_object);
+ if (!scoped_java_object.obj()) {
+ result_wrapper.Append(base::Value::CreateNullValue());
+ break;
+ }
+ SetObjectResult(scoped_java_object, object_->GetSafeAnnotationClass());
+ return;
+ }
+ }
+ // This is for all cases except JavaType::TypeObject.
+ if (!base::android::ClearException(env)) {
+ SetPrimitiveResult(result_wrapper);
+ } else {
+ SetInvocationFailure(kJavaExceptionRaised);
+ }
+}
+
+} // namespace content
diff --git a/content/browser/renderer_host/java/gin_java_method_invocation_helper.h b/content/browser/renderer_host/java/gin_java_method_invocation_helper.h
new file mode 100644
index 0000000..5498fda
--- /dev/null
+++ b/content/browser/renderer_host/java/gin_java_method_invocation_helper.h
@@ -0,0 +1,113 @@
+// Copyright 2014 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 CONTENT_BROWSER_RENDERER_HOST_JAVA_GIN_JAVA_METHOD_INVOCATION_HELPER_H_
+#define CONTENT_BROWSER_RENDERER_HOST_JAVA_GIN_JAVA_METHOD_INVOCATION_HELPER_H_
+
+#include <map>
+
+#include "base/android/jni_weak_ref.h"
+#include "base/android/scoped_java_ref.h"
+#include "base/memory/ref_counted.h"
+#include "base/values.h"
+#include "content/browser/renderer_host/java/gin_java_bound_object.h"
+#include "content/browser/renderer_host/java/java_type.h"
+#include "content/common/content_export.h"
+
+namespace content {
+
+class JavaMethod;
+
+// Instances of this class are created and initialized on the UI thread, do
+// their work on the background thread, and then again examined on the UI
+// thread. They don't work on both threads simultaneously, though.
+class CONTENT_EXPORT GinJavaMethodInvocationHelper
+ : public base::RefCountedThreadSafe<GinJavaMethodInvocationHelper> {
+ public:
+ // DispatcherDelegate is used on the UI thread
+ class DispatcherDelegate {
+ public:
+ DispatcherDelegate() {}
+ virtual ~DispatcherDelegate() {}
+ virtual JavaObjectWeakGlobalRef GetObjectWeakRef(
+ GinJavaBoundObject::ObjectID object_id) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DispatcherDelegate);
+ };
+
+ // ObjectDelegate is used in the background thread
+ class ObjectDelegate {
+ public:
+ ObjectDelegate() {}
+ virtual ~ObjectDelegate() {}
+ virtual base::android::ScopedJavaLocalRef<jobject> GetLocalRef(
+ JNIEnv* env) = 0;
+ virtual const JavaMethod* FindMethod(const std::string& method_name,
+ size_t num_parameters) = 0;
+ virtual bool IsObjectGetClassMethod(const JavaMethod* method) = 0;
+ virtual const base::android::JavaRef<jclass>& GetSafeAnnotationClass() = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ObjectDelegate);
+ };
+
+ GinJavaMethodInvocationHelper(scoped_ptr<ObjectDelegate> object,
+ const std::string& method_name,
+ const base::ListValue& arguments);
+ void Init(DispatcherDelegate* dispatcher);
+
+ // Called on the background thread
+ void Invoke();
+
+ // Called on the UI thread
+ bool HoldsPrimitiveResult();
+ const base::ListValue& GetPrimitiveResult();
+ const base::android::JavaRef<jobject>& GetObjectResult();
+ const base::android::JavaRef<jclass>& GetSafeAnnotationClass();
+ const std::string& GetErrorMessage();
+
+ private:
+ friend class base::RefCountedThreadSafe<GinJavaMethodInvocationHelper>;
+ ~GinJavaMethodInvocationHelper();
+
+ // Called on the UI thread
+ void BuildObjectRefsFromListValue(DispatcherDelegate* dispatcher,
+ const base::Value* list_value);
+ void BuildObjectRefsFromDictionaryValue(DispatcherDelegate* dispatcher,
+ const base::Value* dict_value);
+
+ bool AppendObjectRef(DispatcherDelegate* dispatcher,
+ const base::Value* raw_value);
+
+ // Called on the background thread.
+ void InvokeMethod(jobject object,
+ const JavaType& return_type,
+ jmethodID id,
+ jvalue* parameters);
+ void SetInvocationFailure(const char* error_message);
+ void SetPrimitiveResult(const base::ListValue& result_wrapper);
+ void SetObjectResult(
+ const base::android::JavaRef<jobject>& object,
+ const base::android::JavaRef<jclass>& safe_annotation_clazz);
+
+ typedef std::map<GinJavaBoundObject::ObjectID,
+ JavaObjectWeakGlobalRef> ObjectRefs;
+
+ scoped_ptr<ObjectDelegate> object_;
+ const std::string method_name_;
+ scoped_ptr<base::ListValue> arguments_;
+ ObjectRefs object_refs_;
+ bool holds_primitive_result_;
+ scoped_ptr<base::ListValue> primitive_result_;
+ std::string error_message_;
+ base::android::ScopedJavaGlobalRef<jobject> object_result_;
+ base::android::ScopedJavaGlobalRef<jclass> safe_annotation_clazz_;
+
+ DISALLOW_COPY_AND_ASSIGN(GinJavaMethodInvocationHelper);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_JAVA_GIN_JAVA_METHOD_INVOCATION_HELPER_H_
diff --git a/content/browser/renderer_host/java/gin_java_method_invocation_helper_unittest.cc b/content/browser/renderer_host/java/gin_java_method_invocation_helper_unittest.cc
new file mode 100644
index 0000000..82267d8
--- /dev/null
+++ b/content/browser/renderer_host/java/gin_java_method_invocation_helper_unittest.cc
@@ -0,0 +1,280 @@
+// Copyright 2014 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 "content/browser/renderer_host/java/gin_java_method_invocation_helper.h"
+
+#include "base/android/jni_android.h"
+#include "content/common/android/gin_java_bridge_value.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace content {
+
+namespace {
+
+class NullObjectDelegate
+ : public GinJavaMethodInvocationHelper::ObjectDelegate {
+ public:
+ NullObjectDelegate() {}
+
+ virtual ~NullObjectDelegate() {}
+
+ virtual base::android::ScopedJavaLocalRef<jobject> GetLocalRef(
+ JNIEnv* env) OVERRIDE {
+ return base::android::ScopedJavaLocalRef<jobject>();
+ }
+
+ virtual const JavaMethod* FindMethod(const std::string& method_name,
+ size_t num_parameters) OVERRIDE {
+ return NULL;
+ }
+
+ virtual bool IsObjectGetClassMethod(const JavaMethod* method) OVERRIDE {
+ return false;
+ }
+
+ virtual const base::android::JavaRef<jclass>& GetSafeAnnotationClass()
+ OVERRIDE {
+ return safe_annotation_class_;
+ }
+
+ private:
+ base::android::ScopedJavaLocalRef<jclass> safe_annotation_class_;
+
+ DISALLOW_COPY_AND_ASSIGN(NullObjectDelegate);
+};
+
+class NullDispatcherDelegate
+ : public GinJavaMethodInvocationHelper::DispatcherDelegate {
+ public:
+ NullDispatcherDelegate() {}
+
+ virtual ~NullDispatcherDelegate() {}
+
+ virtual JavaObjectWeakGlobalRef GetObjectWeakRef(
+ GinJavaBoundObject::ObjectID object_id) OVERRIDE {
+ return JavaObjectWeakGlobalRef();
+ }
+
+ DISALLOW_COPY_AND_ASSIGN(NullDispatcherDelegate);
+};
+
+} // namespace
+
+class GinJavaMethodInvocationHelperTest : public testing::Test {
+};
+
+namespace {
+
+class CountingDispatcherDelegate
+ : public GinJavaMethodInvocationHelper::DispatcherDelegate {
+ public:
+ CountingDispatcherDelegate() {}
+
+ virtual ~CountingDispatcherDelegate() {}
+
+ virtual JavaObjectWeakGlobalRef GetObjectWeakRef(
+ GinJavaBoundObject::ObjectID object_id) OVERRIDE {
+ counters_[object_id]++;
+ return JavaObjectWeakGlobalRef();
+ }
+
+ void AssertInvocationsCount(GinJavaBoundObject::ObjectID begin_object_id,
+ GinJavaBoundObject::ObjectID end_object_id) {
+ EXPECT_EQ(end_object_id - begin_object_id,
+ static_cast<int>(counters_.size()));
+ for (GinJavaBoundObject::ObjectID i = begin_object_id;
+ i < end_object_id; ++i) {
+ EXPECT_LT(0, counters_[i]) << "ObjectID: " << i;
+ }
+ }
+
+ private:
+ typedef std::map<GinJavaBoundObject::ObjectID, int> Counters;
+ Counters counters_;
+
+ DISALLOW_COPY_AND_ASSIGN(CountingDispatcherDelegate);
+};
+
+} // namespace
+
+TEST_F(GinJavaMethodInvocationHelperTest, RetrievalOfObjectsNoObjects) {
+ base::ListValue no_objects;
+ for (int i = 0; i < 10; ++i) {
+ no_objects.AppendInteger(i);
+ }
+
+ scoped_refptr<GinJavaMethodInvocationHelper> helper =
+ new GinJavaMethodInvocationHelper(
+ scoped_ptr<GinJavaMethodInvocationHelper::ObjectDelegate>(
+ new NullObjectDelegate()),
+ "foo",
+ no_objects);
+ CountingDispatcherDelegate counter;
+ helper->Init(&counter);
+ counter.AssertInvocationsCount(0, 0);
+}
+
+TEST_F(GinJavaMethodInvocationHelperTest, RetrievalOfObjectsHaveObjects) {
+ base::ListValue objects;
+ objects.AppendInteger(100);
+ objects.Append(GinJavaBridgeValue::CreateObjectIDValue(1).release());
+ base::ListValue* sub_list = new base::ListValue();
+ sub_list->AppendInteger(200);
+ sub_list->Append(GinJavaBridgeValue::CreateObjectIDValue(2).release());
+ objects.Append(sub_list);
+ base::DictionaryValue* sub_dict = new base::DictionaryValue();
+ sub_dict->SetInteger("1", 300);
+ sub_dict->Set("2", GinJavaBridgeValue::CreateObjectIDValue(3).release());
+ objects.Append(sub_dict);
+ base::ListValue* sub_list_with_dict = new base::ListValue();
+ base::DictionaryValue* sub_sub_dict = new base::DictionaryValue();
+ sub_sub_dict->Set("1", GinJavaBridgeValue::CreateObjectIDValue(4).release());
+ sub_list_with_dict->Append(sub_sub_dict);
+ objects.Append(sub_list_with_dict);
+ base::DictionaryValue* sub_dict_with_list = new base::DictionaryValue();
+ base::ListValue* sub_sub_list = new base::ListValue();
+ sub_sub_list->Append(GinJavaBridgeValue::CreateObjectIDValue(5).release());
+ sub_dict_with_list->Set("1", sub_sub_list);
+ objects.Append(sub_dict_with_list);
+
+ scoped_refptr<GinJavaMethodInvocationHelper> helper =
+ new GinJavaMethodInvocationHelper(
+ scoped_ptr<GinJavaMethodInvocationHelper::ObjectDelegate>(
+ new NullObjectDelegate()),
+ "foo",
+ objects);
+ CountingDispatcherDelegate counter;
+ helper->Init(&counter);
+ counter.AssertInvocationsCount(1, 6);
+}
+
+TEST_F(GinJavaMethodInvocationHelperTest, HandleObjectIsGone) {
+ base::ListValue no_objects;
+ scoped_refptr<GinJavaMethodInvocationHelper> helper =
+ new GinJavaMethodInvocationHelper(
+ scoped_ptr<GinJavaMethodInvocationHelper::ObjectDelegate>(
+ new NullObjectDelegate()),
+ "foo",
+ no_objects);
+ NullDispatcherDelegate dispatcher;
+ helper->Init(&dispatcher);
+ EXPECT_TRUE(helper->GetErrorMessage().empty());
+ helper->Invoke();
+ EXPECT_TRUE(helper->HoldsPrimitiveResult());
+ EXPECT_TRUE(helper->GetPrimitiveResult().empty());
+ EXPECT_FALSE(helper->GetErrorMessage().empty());
+}
+
+namespace {
+
+class MethodNotFoundObjectDelegate : public NullObjectDelegate {
+ public:
+ MethodNotFoundObjectDelegate() : find_method_called_(false) {}
+
+ virtual ~MethodNotFoundObjectDelegate() {}
+
+ virtual base::android::ScopedJavaLocalRef<jobject> GetLocalRef(
+ JNIEnv* env) OVERRIDE {
+ return base::android::ScopedJavaLocalRef<jobject>(
+ env, static_cast<jobject>(env->FindClass("java/lang/String")));
+ }
+
+ virtual const JavaMethod* FindMethod(const std::string& method_name,
+ size_t num_parameters) OVERRIDE {
+ find_method_called_ = true;
+ return NULL;
+ }
+
+ bool find_method_called() const { return find_method_called_; }
+
+ protected:
+ bool find_method_called_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MethodNotFoundObjectDelegate);
+};
+
+} // namespace
+
+TEST_F(GinJavaMethodInvocationHelperTest, HandleMethodNotFound) {
+ base::ListValue no_objects;
+ MethodNotFoundObjectDelegate* object_delegate =
+ new MethodNotFoundObjectDelegate();
+ scoped_refptr<GinJavaMethodInvocationHelper> helper =
+ new GinJavaMethodInvocationHelper(
+ scoped_ptr<GinJavaMethodInvocationHelper::ObjectDelegate>(
+ object_delegate),
+ "foo",
+ no_objects);
+ NullDispatcherDelegate dispatcher;
+ helper->Init(&dispatcher);
+ EXPECT_FALSE(object_delegate->find_method_called());
+ EXPECT_TRUE(helper->GetErrorMessage().empty());
+ helper->Invoke();
+ EXPECT_TRUE(object_delegate->find_method_called());
+ EXPECT_TRUE(helper->HoldsPrimitiveResult());
+ EXPECT_TRUE(helper->GetPrimitiveResult().empty());
+ EXPECT_FALSE(helper->GetErrorMessage().empty());
+}
+
+namespace {
+
+class GetClassObjectDelegate : public MethodNotFoundObjectDelegate {
+ public:
+ GetClassObjectDelegate() : get_class_called_(false) {}
+
+ virtual ~GetClassObjectDelegate() {}
+
+ virtual const JavaMethod* FindMethod(const std::string& method_name,
+ size_t num_parameters) OVERRIDE {
+ find_method_called_ = true;
+ return kFakeGetClass;
+ }
+
+ virtual bool IsObjectGetClassMethod(const JavaMethod* method) OVERRIDE {
+ get_class_called_ = true;
+ return kFakeGetClass == method;
+ }
+
+ bool get_class_called() const { return get_class_called_; }
+
+ private:
+ static const JavaMethod* kFakeGetClass;
+ bool get_class_called_;
+
+ DISALLOW_COPY_AND_ASSIGN(GetClassObjectDelegate);
+};
+
+// We don't expect GinJavaMethodInvocationHelper to actually invoke the
+// method, since the point of the test is to verify whether calls to
+// 'getClass' get blocked.
+const JavaMethod* GetClassObjectDelegate::kFakeGetClass =
+ (JavaMethod*)0xdeadbeef;
+
+} // namespace
+
+TEST_F(GinJavaMethodInvocationHelperTest, HandleGetClassInvocation) {
+ base::ListValue no_objects;
+ GetClassObjectDelegate* object_delegate =
+ new GetClassObjectDelegate();
+ scoped_refptr<GinJavaMethodInvocationHelper> helper =
+ new GinJavaMethodInvocationHelper(
+ scoped_ptr<GinJavaMethodInvocationHelper::ObjectDelegate>(
+ object_delegate),
+ "foo",
+ no_objects);
+ NullDispatcherDelegate dispatcher;
+ helper->Init(&dispatcher);
+ EXPECT_FALSE(object_delegate->find_method_called());
+ EXPECT_FALSE(object_delegate->get_class_called());
+ EXPECT_TRUE(helper->GetErrorMessage().empty());
+ helper->Invoke();
+ EXPECT_TRUE(object_delegate->find_method_called());
+ EXPECT_TRUE(object_delegate->get_class_called());
+ EXPECT_TRUE(helper->HoldsPrimitiveResult());
+ EXPECT_TRUE(helper->GetPrimitiveResult().empty());
+ EXPECT_FALSE(helper->GetErrorMessage().empty());
+}
+
+} // namespace content
diff --git a/content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.cc b/content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.cc
new file mode 100644
index 0000000..8f7c29f
--- /dev/null
+++ b/content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.cc
@@ -0,0 +1,705 @@
+// Copyright 2014 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 "content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.h"
+
+#include <unistd.h>
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_string.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/strings/stringprintf.h"
+#include "base/strings/utf_string_conversions.h"
+#include "content/common/android/gin_java_bridge_value.h"
+
+using base::android::ConvertUTF8ToJavaString;
+
+namespace content {
+
+namespace {
+
+const char kJavaLangString[] = "java/lang/String";
+const char kUndefined[] = "undefined";
+
+double RoundDoubleTowardsZero(const double& x) {
+ if (std::isnan(x)) {
+ return 0.0;
+ }
+ return x > 0.0 ? floor(x) : ceil(x);
+}
+
+// Rounds to jlong using Java's type conversion rules.
+jlong RoundDoubleToLong(const double& x) {
+ double intermediate = RoundDoubleTowardsZero(x);
+ // The int64 limits can not be converted exactly to double values, so we
+ // compare to custom constants. kint64max is 2^63 - 1, but the spacing
+ // between double values in the the range 2^62 to 2^63 is 2^10. The cast is
+ // required to silence a spurious gcc warning for integer overflow.
+ const int64 kLimit = (GG_INT64_C(1) << 63) - static_cast<uint64>(1 << 10);
+ DCHECK(kLimit > 0);
+ const double kLargestDoubleLessThanInt64Max = kLimit;
+ const double kSmallestDoubleGreaterThanInt64Min = -kLimit;
+ if (intermediate > kLargestDoubleLessThanInt64Max) {
+ return kint64max;
+ }
+ if (intermediate < kSmallestDoubleGreaterThanInt64Min) {
+ return kint64min;
+ }
+ return static_cast<jlong>(intermediate);
+}
+
+// Rounds to jint using Java's type conversion rules.
+jint RoundDoubleToInt(const double& x) {
+ double intermediate = RoundDoubleTowardsZero(x);
+ // The int32 limits cast exactly to double values.
+ intermediate = std::min(intermediate, static_cast<double>(kint32max));
+ intermediate = std::max(intermediate, static_cast<double>(kint32min));
+ return static_cast<jint>(intermediate);
+}
+
+jvalue CoerceJavaScriptIntegerToJavaValue(JNIEnv* env,
+ const base::Value* value,
+ const JavaType& target_type,
+ bool coerce_to_string) {
+ // See http://jdk6.java.net/plugin2/liveconnect/#JS_NUMBER_VALUES.
+
+ // For conversion to numeric types, we need to replicate Java's type
+ // conversion rules. This requires that for integer values, we simply discard
+ // all but the lowest n buts, where n is the number of bits in the target
+ // type.
+ jvalue result;
+ int int_value;
+ value->GetAsInteger(&int_value);
+ switch (target_type.type) {
+ case JavaType::TypeByte:
+ result.b = static_cast<jbyte>(int_value);
+ break;
+ case JavaType::TypeChar:
+ result.c = static_cast<jchar>(int_value);
+ break;
+ case JavaType::TypeShort:
+ result.s = static_cast<jshort>(int_value);
+ break;
+ case JavaType::TypeInt:
+ result.i = int_value;
+ break;
+ case JavaType::TypeLong:
+ result.j = int_value;
+ break;
+ case JavaType::TypeFloat:
+ result.f = int_value;
+ break;
+ case JavaType::TypeDouble:
+ result.d = int_value;
+ break;
+ case JavaType::TypeObject:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to null. Spec
+ // requires handling object equivalents of primitive types.
+ result.l = NULL;
+ break;
+ case JavaType::TypeString:
+ result.l = coerce_to_string
+ ? ConvertUTF8ToJavaString(
+ env, base::Int64ToString(int_value)).Release()
+ : NULL;
+ break;
+ case JavaType::TypeBoolean:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to false. Spec
+ // requires converting to false for 0 or NaN, true otherwise.
+ result.z = JNI_FALSE;
+ break;
+ case JavaType::TypeArray:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to null. Spec
+ // requires raising a JavaScript exception.
+ result.l = NULL;
+ break;
+ case JavaType::TypeVoid:
+ // Conversion to void must never happen.
+ NOTREACHED();
+ break;
+ }
+ return result;
+}
+
+jvalue CoerceJavaScriptDoubleToJavaValue(JNIEnv* env,
+ double double_value,
+ const JavaType& target_type,
+ bool coerce_to_string) {
+ // See http://jdk6.java.net/plugin2/liveconnect/#JS_NUMBER_VALUES.
+ // For conversion to numeric types, we need to replicate Java's type
+ // conversion rules.
+ jvalue result;
+ switch (target_type.type) {
+ case JavaType::TypeByte:
+ result.b = static_cast<jbyte>(RoundDoubleToInt(double_value));
+ break;
+ case JavaType::TypeChar:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert double to 0.
+ // Spec requires converting doubles similarly to how we convert doubles to
+ // other numeric types.
+ result.c = 0;
+ break;
+ case JavaType::TypeShort:
+ result.s = static_cast<jshort>(RoundDoubleToInt(double_value));
+ break;
+ case JavaType::TypeInt:
+ result.i = RoundDoubleToInt(double_value);
+ break;
+ case JavaType::TypeLong:
+ result.j = RoundDoubleToLong(double_value);
+ break;
+ case JavaType::TypeFloat:
+ result.f = static_cast<jfloat>(double_value);
+ break;
+ case JavaType::TypeDouble:
+ result.d = double_value;
+ break;
+ case JavaType::TypeObject:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to null. Spec
+ // requires handling object equivalents of primitive types.
+ result.l = NULL;
+ break;
+ case JavaType::TypeString:
+ result.l =
+ coerce_to_string
+ ? ConvertUTF8ToJavaString(
+ env, base::StringPrintf("%.6lg", double_value)).Release()
+ : NULL;
+ break;
+ case JavaType::TypeBoolean:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to false. Spec
+ // requires converting to false for 0 or NaN, true otherwise.
+ result.z = JNI_FALSE;
+ break;
+ case JavaType::TypeArray:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to null. Spec
+ // requires raising a JavaScript exception.
+ result.l = NULL;
+ break;
+ case JavaType::TypeVoid:
+ // Conversion to void must never happen.
+ NOTREACHED();
+ break;
+ }
+ return result;
+}
+
+jvalue CoerceJavaScriptBooleanToJavaValue(JNIEnv* env,
+ const base::Value* value,
+ const JavaType& target_type,
+ bool coerce_to_string) {
+ // See http://jdk6.java.net/plugin2/liveconnect/#JS_BOOLEAN_VALUES.
+ bool boolean_value;
+ value->GetAsBoolean(&boolean_value);
+ jvalue result;
+ switch (target_type.type) {
+ case JavaType::TypeBoolean:
+ result.z = boolean_value ? JNI_TRUE : JNI_FALSE;
+ break;
+ case JavaType::TypeObject:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to NULL. Spec
+ // requires handling java.lang.Boolean and java.lang.Object.
+ result.l = NULL;
+ break;
+ case JavaType::TypeString:
+ result.l = coerce_to_string
+ ? ConvertUTF8ToJavaString(
+ env, boolean_value ? "true" : "false").Release()
+ : NULL;
+ break;
+ case JavaType::TypeByte:
+ case JavaType::TypeChar:
+ case JavaType::TypeShort:
+ case JavaType::TypeInt:
+ case JavaType::TypeLong:
+ case JavaType::TypeFloat:
+ case JavaType::TypeDouble: {
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to 0. Spec
+ // requires converting to 0 or 1.
+ jvalue null_value = {0};
+ result = null_value;
+ break;
+ }
+ case JavaType::TypeArray:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to NULL. Spec
+ // requires raising a JavaScript exception.
+ result.l = NULL;
+ break;
+ case JavaType::TypeVoid:
+ // Conversion to void must never happen.
+ NOTREACHED();
+ break;
+ }
+ return result;
+}
+
+jvalue CoerceJavaScriptStringToJavaValue(JNIEnv* env,
+ const base::Value* value,
+ const JavaType& target_type) {
+ // See http://jdk6.java.net/plugin2/liveconnect/#JS_STRING_VALUES.
+ jvalue result;
+ switch (target_type.type) {
+ case JavaType::TypeString: {
+ std::string string_result;
+ value->GetAsString(&string_result);
+ result.l = ConvertUTF8ToJavaString(env, string_result).Release();
+ break;
+ }
+ case JavaType::TypeObject:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to NULL. Spec
+ // requires handling java.lang.Object.
+ result.l = NULL;
+ break;
+ case JavaType::TypeByte:
+ case JavaType::TypeShort:
+ case JavaType::TypeInt:
+ case JavaType::TypeLong:
+ case JavaType::TypeFloat:
+ case JavaType::TypeDouble: {
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to 0. Spec
+ // requires using valueOf() method of corresponding object type.
+ jvalue null_value = {0};
+ result = null_value;
+ break;
+ }
+ case JavaType::TypeChar:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to 0. Spec
+ // requires using java.lang.Short.decode().
+ result.c = 0;
+ break;
+ case JavaType::TypeBoolean:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to false. Spec
+ // requires converting the empty string to false, otherwise true.
+ result.z = JNI_FALSE;
+ break;
+ case JavaType::TypeArray:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to NULL. Spec
+ // requires raising a JavaScript exception.
+ result.l = NULL;
+ break;
+ case JavaType::TypeVoid:
+ // Conversion to void must never happen.
+ NOTREACHED();
+ break;
+ }
+ return result;
+}
+
+// Note that this only handles primitive types and strings.
+jobject CreateJavaArray(JNIEnv* env, const JavaType& type, jsize length) {
+ switch (type.type) {
+ case JavaType::TypeBoolean:
+ return env->NewBooleanArray(length);
+ case JavaType::TypeByte:
+ return env->NewByteArray(length);
+ case JavaType::TypeChar:
+ return env->NewCharArray(length);
+ case JavaType::TypeShort:
+ return env->NewShortArray(length);
+ case JavaType::TypeInt:
+ return env->NewIntArray(length);
+ case JavaType::TypeLong:
+ return env->NewLongArray(length);
+ case JavaType::TypeFloat:
+ return env->NewFloatArray(length);
+ case JavaType::TypeDouble:
+ return env->NewDoubleArray(length);
+ case JavaType::TypeString: {
+ base::android::ScopedJavaLocalRef<jclass> clazz(
+ base::android::GetClass(env, kJavaLangString));
+ return env->NewObjectArray(length, clazz.obj(), NULL);
+ }
+ case JavaType::TypeVoid:
+ // Conversion to void must never happen.
+ case JavaType::TypeArray:
+ case JavaType::TypeObject:
+ // Not handled.
+ NOTREACHED();
+ }
+ return NULL;
+}
+
+// Sets the specified element of the supplied array to the value of the
+// supplied jvalue. Requires that the type of the array matches that of the
+// jvalue. Handles only primitive types and strings. Note that in the case of a
+// string, the array takes a new reference to the string object.
+void SetArrayElement(JNIEnv* env,
+ jobject array,
+ const JavaType& type,
+ jsize index,
+ const jvalue& value) {
+ switch (type.type) {
+ case JavaType::TypeBoolean:
+ env->SetBooleanArrayRegion(static_cast<jbooleanArray>(array), index, 1,
+ &value.z);
+ break;
+ case JavaType::TypeByte:
+ env->SetByteArrayRegion(static_cast<jbyteArray>(array), index, 1,
+ &value.b);
+ break;
+ case JavaType::TypeChar:
+ env->SetCharArrayRegion(static_cast<jcharArray>(array), index, 1,
+ &value.c);
+ break;
+ case JavaType::TypeShort:
+ env->SetShortArrayRegion(static_cast<jshortArray>(array), index, 1,
+ &value.s);
+ break;
+ case JavaType::TypeInt:
+ env->SetIntArrayRegion(static_cast<jintArray>(array), index, 1,
+ &value.i);
+ break;
+ case JavaType::TypeLong:
+ env->SetLongArrayRegion(static_cast<jlongArray>(array), index, 1,
+ &value.j);
+ break;
+ case JavaType::TypeFloat:
+ env->SetFloatArrayRegion(static_cast<jfloatArray>(array), index, 1,
+ &value.f);
+ break;
+ case JavaType::TypeDouble:
+ env->SetDoubleArrayRegion(static_cast<jdoubleArray>(array), index, 1,
+ &value.d);
+ break;
+ case JavaType::TypeString:
+ env->SetObjectArrayElement(static_cast<jobjectArray>(array), index,
+ value.l);
+ break;
+ case JavaType::TypeVoid:
+ // Conversion to void must never happen.
+ case JavaType::TypeArray:
+ case JavaType::TypeObject:
+ // Not handled.
+ NOTREACHED();
+ }
+ base::android::CheckException(env);
+}
+
+jvalue CoerceJavaScriptNullOrUndefinedToJavaValue(JNIEnv* env,
+ const base::Value* value,
+ const JavaType& target_type,
+ bool coerce_to_string) {
+ bool is_undefined = false;
+ scoped_ptr<const GinJavaBridgeValue> gin_value;
+ if (GinJavaBridgeValue::ContainsGinJavaBridgeValue(value)) {
+ gin_value = GinJavaBridgeValue::FromValue(value);
+ if (gin_value->IsType(GinJavaBridgeValue::TYPE_UNDEFINED)) {
+ is_undefined = true;
+ }
+ }
+ jvalue result;
+ switch (target_type.type) {
+ case JavaType::TypeObject:
+ result.l = NULL;
+ break;
+ case JavaType::TypeString:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert undefined to
+ // "undefined". Spec requires converting undefined to NULL.
+ result.l = (coerce_to_string && is_undefined)
+ ? ConvertUTF8ToJavaString(env, kUndefined).Release()
+ : NULL;
+ break;
+ case JavaType::TypeByte:
+ case JavaType::TypeChar:
+ case JavaType::TypeShort:
+ case JavaType::TypeInt:
+ case JavaType::TypeLong:
+ case JavaType::TypeFloat:
+ case JavaType::TypeDouble: {
+ jvalue null_value = {0};
+ result = null_value;
+ break;
+ }
+ case JavaType::TypeBoolean:
+ result.z = JNI_FALSE;
+ break;
+ case JavaType::TypeArray:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to NULL. Spec
+ // requires raising a JavaScript exception.
+ result.l = NULL;
+ break;
+ case JavaType::TypeVoid:
+ // Conversion to void must never happen.
+ NOTREACHED();
+ break;
+ }
+ return result;
+}
+
+jobject CoerceJavaScriptListToArray(JNIEnv* env,
+ const base::Value* value,
+ const JavaType& target_type,
+ const ObjectRefs& object_refs) {
+ DCHECK_EQ(JavaType::TypeArray, target_type.type);
+ const JavaType& target_inner_type = *target_type.inner_type.get();
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to return null for
+ // multi-dimensional arrays. Spec requires handling multi-demensional arrays.
+ if (target_inner_type.type == JavaType::TypeArray) {
+ return NULL;
+ }
+
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to return null for object
+ // arrays. Spec requires handling object arrays.
+ if (target_inner_type.type == JavaType::TypeObject) {
+ return NULL;
+ }
+
+ const base::ListValue* list_value;
+ value->GetAsList(&list_value);
+ // Create the Java array.
+ jsize length = static_cast<jsize>(list_value->GetSize());
+ jobject result = CreateJavaArray(env, target_inner_type, length);
+ if (!result) {
+ return NULL;
+ }
+ scoped_ptr<base::Value> null_value(base::Value::CreateNullValue());
+ for (jsize i = 0; i < length; ++i) {
+ const base::Value* value_element = null_value.get();
+ list_value->Get(i, &value_element);
+ jvalue element = CoerceJavaScriptValueToJavaValue(
+ env, value_element, target_inner_type, false, object_refs);
+ SetArrayElement(env, result, target_inner_type, i, element);
+ // CoerceJavaScriptValueToJavaValue() creates new local references to
+ // strings, objects and arrays. Of these, only strings can occur here.
+ // SetArrayElement() causes the array to take its own reference to the
+ // string, so we can now release the local reference.
+ DCHECK_NE(JavaType::TypeObject, target_inner_type.type);
+ DCHECK_NE(JavaType::TypeArray, target_inner_type.type);
+ ReleaseJavaValueIfRequired(env, &element, target_inner_type);
+ }
+
+ return result;
+}
+
+jobject CoerceJavaScriptDictionaryToArray(JNIEnv* env,
+ const base::Value* value,
+ const JavaType& target_type,
+ const ObjectRefs& object_refs) {
+ DCHECK_EQ(JavaType::TypeArray, target_type.type);
+
+ const JavaType& target_inner_type = *target_type.inner_type.get();
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to return null for
+ // multi-dimensional arrays. Spec requires handling multi-demensional arrays.
+ if (target_inner_type.type == JavaType::TypeArray) {
+ return NULL;
+ }
+
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to return null for object
+ // arrays. Spec requires handling object arrays.
+ if (target_inner_type.type == JavaType::TypeObject) {
+ return NULL;
+ }
+
+ const base::DictionaryValue* dictionary_value;
+ value->GetAsDictionary(&dictionary_value);
+ const base::Value* length_value;
+ // If the object does not have a length property, return null.
+ if (!dictionary_value->Get("length", &length_value)) {
+ return NULL;
+ }
+
+ // If the length property does not have numeric type, or is outside the valid
+ // range for a Java array length, return null.
+ jsize length = -1;
+ if (length_value->IsType(base::Value::TYPE_INTEGER)) {
+ int int_length;
+ length_value->GetAsInteger(&int_length);
+ if (int_length >= 0 && int_length <= kint32max) {
+ length = static_cast<jsize>(int_length);
+ }
+ } else if (length_value->IsType(base::Value::TYPE_DOUBLE)) {
+ double double_length;
+ length_value->GetAsDouble(&double_length);
+ if (double_length >= 0.0 && double_length <= kint32max) {
+ length = static_cast<jsize>(double_length);
+ }
+ }
+ if (length == -1) {
+ return NULL;
+ }
+
+ jobject result = CreateJavaArray(env, target_inner_type, length);
+ if (!result) {
+ return NULL;
+ }
+ scoped_ptr<base::Value> null_value(base::Value::CreateNullValue());
+ for (jsize i = 0; i < length; ++i) {
+ const std::string key(base::IntToString(i));
+ const base::Value* value_element = null_value.get();
+ if (dictionary_value->HasKey(key)) {
+ dictionary_value->Get(key, &value_element);
+ }
+ jvalue element = CoerceJavaScriptValueToJavaValue(
+ env, value_element, target_inner_type, false, object_refs);
+ SetArrayElement(env, result, target_inner_type, i, element);
+ // CoerceJavaScriptValueToJavaValue() creates new local references to
+ // strings, objects and arrays. Of these, only strings can occur here.
+ // SetArrayElement() causes the array to take its own reference to the
+ // string, so we can now release the local reference.
+ DCHECK_NE(JavaType::TypeObject, target_inner_type.type);
+ DCHECK_NE(JavaType::TypeArray, target_inner_type.type);
+ ReleaseJavaValueIfRequired(env, &element, target_inner_type);
+ }
+
+ return result;
+}
+
+jvalue CoerceJavaScriptObjectToJavaValue(JNIEnv* env,
+ const base::Value* value,
+ const JavaType& target_type,
+ bool coerce_to_string,
+ const ObjectRefs& object_refs) {
+ // This covers both JavaScript objects (including arrays) and Java objects.
+ // See http://jdk6.java.net/plugin2/liveconnect/#JS_OTHER_OBJECTS,
+ // http://jdk6.java.net/plugin2/liveconnect/#JS_ARRAY_VALUES and
+ // http://jdk6.java.net/plugin2/liveconnect/#JS_JAVA_OBJECTS
+ jvalue result;
+ switch (target_type.type) {
+ case JavaType::TypeObject: {
+ if (GinJavaBridgeValue::ContainsGinJavaBridgeValue(value)) {
+ scoped_ptr<const GinJavaBridgeValue> gin_value(
+ GinJavaBridgeValue::FromValue(value));
+ DCHECK(gin_value);
+ DCHECK(gin_value->IsType(GinJavaBridgeValue::TYPE_OBJECT_ID));
+ base::android::ScopedJavaLocalRef<jobject> obj;
+ GinJavaBoundObject::ObjectID object_id;
+ if (gin_value->GetAsObjectID(&object_id)) {
+ ObjectRefs::const_iterator iter = object_refs.find(object_id);
+ if (iter != object_refs.end()) {
+ obj.Reset(iter->second.get(env));
+ }
+ }
+ result.l = obj.Release();
+ } else {
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to pass null. Spec
+ // requires converting if the target type is
+ // netscape.javascript.JSObject, otherwise raising a JavaScript
+ // exception.
+ result.l = NULL;
+ }
+ break;
+ }
+ case JavaType::TypeString:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to
+ // "undefined". Spec requires calling toString() on the Java object.
+ result.l = coerce_to_string
+ ? ConvertUTF8ToJavaString(env, kUndefined).Release()
+ : NULL;
+ break;
+ case JavaType::TypeByte:
+ case JavaType::TypeShort:
+ case JavaType::TypeInt:
+ case JavaType::TypeLong:
+ case JavaType::TypeFloat:
+ case JavaType::TypeDouble:
+ case JavaType::TypeChar: {
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to 0. Spec
+ // requires raising a JavaScript exception.
+ jvalue null_value = {0};
+ result = null_value;
+ break;
+ }
+ case JavaType::TypeBoolean:
+ // LIVECONNECT_COMPLIANCE: Existing behavior is to convert to false. Spec
+ // requires raising a JavaScript exception.
+ result.z = JNI_FALSE;
+ break;
+ case JavaType::TypeArray:
+ if (value->IsType(base::Value::TYPE_DICTIONARY)) {
+ result.l = CoerceJavaScriptDictionaryToArray(
+ env, value, target_type, object_refs);
+ } else if (value->IsType(base::Value::TYPE_LIST)) {
+ result.l =
+ CoerceJavaScriptListToArray(env, value, target_type, object_refs);
+ } else {
+ result.l = NULL;
+ }
+ break;
+ case JavaType::TypeVoid:
+ // Conversion to void must never happen.
+ NOTREACHED();
+ break;
+ }
+ return result;
+}
+
+jvalue CoerceGinJavaBridgeValueToJavaValue(JNIEnv* env,
+ const base::Value* value,
+ const JavaType& target_type,
+ bool coerce_to_string,
+ const ObjectRefs& object_refs) {
+ DCHECK(GinJavaBridgeValue::ContainsGinJavaBridgeValue(value));
+ scoped_ptr<const GinJavaBridgeValue> gin_value(
+ GinJavaBridgeValue::FromValue(value));
+ switch (gin_value->GetType()) {
+ case GinJavaBridgeValue::TYPE_UNDEFINED:
+ return CoerceJavaScriptNullOrUndefinedToJavaValue(
+ env, value, target_type, coerce_to_string);
+ case GinJavaBridgeValue::TYPE_NONFINITE: {
+ float float_value;
+ gin_value->GetAsNonFinite(&float_value);
+ return CoerceJavaScriptDoubleToJavaValue(
+ env, float_value, target_type, coerce_to_string);
+ }
+ case GinJavaBridgeValue::TYPE_OBJECT_ID:
+ return CoerceJavaScriptObjectToJavaValue(
+ env, value, target_type, coerce_to_string, object_refs);
+ default:
+ NOTREACHED();
+ }
+ return jvalue();
+}
+
+} // namespace
+
+
+void ReleaseJavaValueIfRequired(JNIEnv* env,
+ jvalue* value,
+ const JavaType& type) {
+ if (type.type == JavaType::TypeString || type.type == JavaType::TypeObject ||
+ type.type == JavaType::TypeArray) {
+ env->DeleteLocalRef(value->l);
+ value->l = NULL;
+ }
+}
+
+jvalue CoerceJavaScriptValueToJavaValue(JNIEnv* env,
+ const base::Value* value,
+ const JavaType& target_type,
+ bool coerce_to_string,
+ const ObjectRefs& object_refs) {
+ // Note that in all these conversions, the relevant field of the jvalue must
+ // always be explicitly set, as jvalue does not initialize its fields.
+
+ switch (value->GetType()) {
+ case base::Value::TYPE_INTEGER:
+ return CoerceJavaScriptIntegerToJavaValue(
+ env, value, target_type, coerce_to_string);
+ case base::Value::TYPE_DOUBLE: {
+ double double_value;
+ value->GetAsDouble(&double_value);
+ return CoerceJavaScriptDoubleToJavaValue(
+ env, double_value, target_type, coerce_to_string);
+ }
+ case base::Value::TYPE_BOOLEAN:
+ return CoerceJavaScriptBooleanToJavaValue(
+ env, value, target_type, coerce_to_string);
+ case base::Value::TYPE_STRING:
+ return CoerceJavaScriptStringToJavaValue(env, value, target_type);
+ case base::Value::TYPE_DICTIONARY:
+ case base::Value::TYPE_LIST:
+ return CoerceJavaScriptObjectToJavaValue(
+ env, value, target_type, coerce_to_string, object_refs);
+ case base::Value::TYPE_NULL:
+ return CoerceJavaScriptNullOrUndefinedToJavaValue(
+ env, value, target_type, coerce_to_string);
+ case base::Value::TYPE_BINARY:
+ return CoerceGinJavaBridgeValueToJavaValue(
+ env, value, target_type, coerce_to_string, object_refs);
+ }
+ NOTREACHED();
+ return jvalue();
+}
+
+} // namespace content
diff --git a/content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.h b/content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.h
new file mode 100644
index 0000000..1df7345
--- /dev/null
+++ b/content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.h
@@ -0,0 +1,33 @@
+// Copyright 2014 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 CONTENT_BROWSER_RENDERER_HOST_JAVA_GIN_JAVA_SCRIPT_TO_JAVA_TYPES_COERCION_H_
+#define CONTENT_BROWSER_RENDERER_HOST_JAVA_GIN_JAVA_SCRIPT_TO_JAVA_TYPES_COERCION_H_
+
+#include <map>
+
+#include "base/android/jni_weak_ref.h"
+#include "base/values.h"
+#include "content/browser/renderer_host/java/gin_java_bound_object.h"
+#include "content/browser/renderer_host/java/java_type.h"
+
+namespace content {
+
+typedef std::map<GinJavaBoundObject::ObjectID, JavaObjectWeakGlobalRef>
+ ObjectRefs;
+
+jvalue CoerceJavaScriptValueToJavaValue(
+ JNIEnv* env,
+ const base::Value* value,
+ const JavaType& target_type,
+ bool coerce_to_string,
+ const ObjectRefs& object_refs);
+
+void ReleaseJavaValueIfRequired(JNIEnv* env,
+ jvalue* value,
+ const JavaType& type);
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_JAVA_GIN_JAVA_SCRIPT_TO_JAVA_TYPES_COERCION_H_
diff --git a/content/browser/renderer_host/java/java_bound_object.cc b/content/browser/renderer_host/java/java_bound_object.cc
index b8a3637..f812c42 100644
--- a/content/browser/renderer_host/java/java_bound_object.cc
+++ b/content/browser/renderer_host/java/java_bound_object.cc
@@ -149,6 +149,7 @@
// return value is simply converted to the corresponding NPAPI type.
bool CallJNIMethod(
jobject object,
+ jclass clazz,
const JavaType& return_type,
jmethodID id,
jvalue* parameters,
@@ -156,39 +157,62 @@
const JavaRef<jclass>& safe_annotation_clazz,
const base::WeakPtr<JavaBridgeDispatcherHostManager>& manager,
bool can_enumerate_methods) {
+ DCHECK(object || clazz);
JNIEnv* env = AttachCurrentThread();
switch (return_type.type) {
case JavaType::TypeBoolean:
- BOOLEAN_TO_NPVARIANT(env->CallBooleanMethodA(object, id, parameters),
- *result);
+ BOOLEAN_TO_NPVARIANT(
+ object ? env->CallBooleanMethodA(object, id, parameters)
+ : env->CallStaticBooleanMethodA(clazz, id, parameters),
+ *result);
break;
case JavaType::TypeByte:
- INT32_TO_NPVARIANT(env->CallByteMethodA(object, id, parameters), *result);
+ INT32_TO_NPVARIANT(
+ object ? env->CallByteMethodA(object, id, parameters)
+ : env->CallStaticByteMethodA(clazz, id, parameters),
+ *result);
break;
case JavaType::TypeChar:
- INT32_TO_NPVARIANT(env->CallCharMethodA(object, id, parameters), *result);
+ INT32_TO_NPVARIANT(
+ object ? env->CallCharMethodA(object, id, parameters)
+ : env->CallStaticCharMethodA(clazz, id, parameters),
+ *result);
break;
case JavaType::TypeShort:
- INT32_TO_NPVARIANT(env->CallShortMethodA(object, id, parameters),
- *result);
+ INT32_TO_NPVARIANT(
+ object ? env->CallShortMethodA(object, id, parameters)
+ : env->CallStaticShortMethodA(clazz, id, parameters),
+ *result);
break;
case JavaType::TypeInt:
- INT32_TO_NPVARIANT(env->CallIntMethodA(object, id, parameters), *result);
+ INT32_TO_NPVARIANT(object
+ ? env->CallIntMethodA(object, id, parameters)
+ : env->CallStaticIntMethodA(clazz, id, parameters),
+ *result);
break;
case JavaType::TypeLong:
- DOUBLE_TO_NPVARIANT(env->CallLongMethodA(object, id, parameters),
- *result);
+ DOUBLE_TO_NPVARIANT(
+ object ? env->CallLongMethodA(object, id, parameters)
+ : env->CallStaticLongMethodA(clazz, id, parameters),
+ *result);
break;
case JavaType::TypeFloat:
- DOUBLE_TO_NPVARIANT(env->CallFloatMethodA(object, id, parameters),
- *result);
+ DOUBLE_TO_NPVARIANT(
+ object ? env->CallFloatMethodA(object, id, parameters)
+ : env->CallStaticFloatMethodA(clazz, id, parameters),
+ *result);
break;
case JavaType::TypeDouble:
- DOUBLE_TO_NPVARIANT(env->CallDoubleMethodA(object, id, parameters),
- *result);
+ DOUBLE_TO_NPVARIANT(
+ object ? env->CallDoubleMethodA(object, id, parameters)
+ : env->CallStaticDoubleMethodA(clazz, id, parameters),
+ *result);
break;
case JavaType::TypeVoid:
- env->CallVoidMethodA(object, id, parameters);
+ if (object)
+ env->CallVoidMethodA(object, id, parameters);
+ else
+ env->CallStaticVoidMethodA(clazz, id, parameters);
VOID_TO_NPVARIANT(*result);
break;
case JavaType::TypeArray:
@@ -199,7 +223,8 @@
break;
case JavaType::TypeString: {
jstring java_string = static_cast<jstring>(
- env->CallObjectMethodA(object, id, parameters));
+ object ? env->CallObjectMethodA(object, id, parameters)
+ : env->CallStaticObjectMethodA(clazz, id, parameters));
// If an exception was raised, we must clear it before calling most JNI
// methods. ScopedJavaLocalRef is liable to make such calls, so we test
// first.
@@ -227,7 +252,9 @@
// If an exception was raised, we must clear it before calling most JNI
// methods. ScopedJavaLocalRef is liable to make such calls, so we test
// first.
- jobject java_object = env->CallObjectMethodA(object, id, parameters);
+ jobject java_object =
+ object ? env->CallObjectMethodA(object, id, parameters)
+ : env->CallStaticObjectMethodA(clazz, id, parameters);
if (base::android::ClearException(env)) {
return false;
}
@@ -893,17 +920,6 @@
return false;
}
- // Coerce
- std::vector<jvalue> parameters(arg_count);
- for (size_t i = 0; i < arg_count; ++i) {
- parameters[i] = CoerceJavaScriptValueToJavaValue(args[i],
- method->parameter_type(i),
- true);
- }
-
- JNIEnv* env = AttachCurrentThread();
- ScopedJavaLocalRef<jobject> obj = java_object_.get(env);
-
// Block access to java.lang.Object.getClass.
// As it is declared to be final, it is sufficient to compare methodIDs.
if (method->id() == object_get_class_method_id_) {
@@ -914,10 +930,27 @@
return false;
}
+ // Coerce
+ std::vector<jvalue> parameters(arg_count);
+ for (size_t i = 0; i < arg_count; ++i) {
+ parameters[i] = CoerceJavaScriptValueToJavaValue(args[i],
+ method->parameter_type(i),
+ true);
+ }
+
+ JNIEnv* env = AttachCurrentThread();
+
+ ScopedJavaLocalRef<jobject> obj;
+ ScopedJavaLocalRef<jclass> cls;
bool ok = false;
- if (!obj.is_null()) {
+ if (method->is_static()) {
+ cls = GetLocalClassRef(env);
+ } else {
+ obj = java_object_.get(env);
+ }
+ if (!obj.is_null() || !cls.is_null()) {
// Call
- ok = CallJNIMethod(obj.obj(), method->return_type(),
+ ok = CallJNIMethod(obj.obj(), cls.obj(), method->return_type(),
method->id(), ¶meters[0], result,
safe_annotation_clazz_,
manager_,
@@ -933,6 +966,22 @@
return ok;
}
+ScopedJavaLocalRef<jclass> JavaBoundObject::GetLocalClassRef(
+ JNIEnv* env) const {
+ if (!object_get_class_method_id_) {
+ object_get_class_method_id_ = GetMethodIDFromClassName(
+ env, kJavaLangObject, kGetClass, kReturningJavaLangClass);
+ }
+
+ ScopedJavaLocalRef<jobject> obj = java_object_.get(env);
+ if (!obj.is_null()) {
+ return ScopedJavaLocalRef<jclass>(env, static_cast<jclass>(
+ env->CallObjectMethod(obj.obj(), object_get_class_method_id_)));
+ } else {
+ return ScopedJavaLocalRef<jclass>();
+ }
+}
+
void JavaBoundObject::EnsureMethodsAreSetUp() const {
if (are_methods_set_up_)
return;
@@ -940,21 +989,11 @@
JNIEnv* env = AttachCurrentThread();
- object_get_class_method_id_ = GetMethodIDFromClassName(
- env,
- kJavaLangObject,
- kGetClass,
- kReturningJavaLangClass);
-
- ScopedJavaLocalRef<jobject> obj = java_object_.get(env);
-
- if (obj.is_null()) {
+ ScopedJavaLocalRef<jclass> clazz = GetLocalClassRef(env);
+ if (clazz.is_null()) {
return;
}
- ScopedJavaLocalRef<jclass> clazz(env, static_cast<jclass>(
- env->CallObjectMethod(obj.obj(), object_get_class_method_id_)));
-
ScopedJavaLocalRef<jobjectArray> methods(env, static_cast<jobjectArray>(
env->CallObjectMethod(clazz.obj(), GetMethodIDFromClassName(
env,
diff --git a/content/browser/renderer_host/java/java_bound_object.h b/content/browser/renderer_host/java/java_bound_object.h
index 68c2821..f29aed6 100644
--- a/content/browser/renderer_host/java/java_bound_object.h
+++ b/content/browser/renderer_host/java/java_bound_object.h
@@ -63,6 +63,7 @@
bool can_enumerate_methods);
void EnsureMethodsAreSetUp() const;
+ base::android::ScopedJavaLocalRef<jclass> GetLocalClassRef(JNIEnv* env) const;
static void ThrowSecurityException(const char* message);
diff --git a/content/browser/renderer_host/java/java_method.cc b/content/browser/renderer_host/java/java_method.cc
index 5a654fe..03bdb2d 100644
--- a/content/browser/renderer_host/java/java_method.cc
+++ b/content/browser/renderer_host/java/java_method.cc
@@ -115,6 +115,11 @@
return num_parameters_;
}
+bool JavaMethod::is_static() const {
+ EnsureTypesAndIDAreSetUp();
+ return is_static_;
+}
+
const JavaType& JavaMethod::parameter_type(size_t index) const {
EnsureTypesAndIDAreSetUp();
return parameter_types_[index];
@@ -212,7 +217,7 @@
kJavaLangReflectMethod,
kGetModifiers,
kReturningInteger));
- bool is_static = env->CallStaticBooleanMethod(
+ is_static_ = env->CallStaticBooleanMethod(
g_java_lang_reflect_modifier_class.Get().obj(),
MethodID::Get<MethodID::TYPE_STATIC>(
env, g_java_lang_reflect_modifier_class.Get().obj(), kIsStatic,
@@ -226,7 +231,7 @@
kJavaLangReflectMethod,
kGetDeclaringClass,
kReturningJavaLangClass))));
- id_ = is_static ?
+ id_ = is_static_ ?
MethodID::Get<MethodID::TYPE_STATIC>(
env, declaring_class.obj(), name_.c_str(), signature.c_str()) :
MethodID::Get<MethodID::TYPE_INSTANCE>(
diff --git a/content/browser/renderer_host/java/java_method.h b/content/browser/renderer_host/java/java_method.h
index 6356f70..1d59bac 100644
--- a/content/browser/renderer_host/java/java_method.h
+++ b/content/browser/renderer_host/java/java_method.h
@@ -23,6 +23,7 @@
const std::string& name() const { return name_; }
size_t num_parameters() const;
+ bool is_static() const;
const JavaType& parameter_type(size_t index) const;
const JavaType& return_type() const;
jmethodID id() const;
@@ -37,6 +38,7 @@
mutable size_t num_parameters_;
mutable std::vector<JavaType> parameter_types_;
mutable JavaType return_type_;
+ mutable bool is_static_;
mutable jmethodID id_;
DISALLOW_IMPLICIT_CONSTRUCTORS(JavaMethod);
diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.cc b/content/browser/renderer_host/legacy_render_widget_host_win.cc
index 84d95ac..2be9ec7 100644
--- a/content/browser/renderer_host/legacy_render_widget_host_win.cc
+++ b/content/browser/renderer_host/legacy_render_widget_host_win.cc
@@ -16,6 +16,7 @@
#include "ui/base/win/internal_constants.h"
#include "ui/base/win/window_event_target.h"
#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/win/dpi.h"
namespace content {
@@ -24,6 +25,9 @@
// accessibility support.
const int kIdScreenReaderHoneyPot = 1;
+// A version of the OBJID_CLIENT constant that works in 64-bit mode too.
+static const LPARAM kObjIdClient = static_cast<ULONG>(OBJID_CLIENT);
+
LegacyRenderWidgetHostHWND::~LegacyRenderWidgetHostHWND() {
::DestroyWindow(hwnd());
}
@@ -79,8 +83,9 @@
}
void LegacyRenderWidgetHostHWND::SetBounds(const gfx::Rect& bounds) {
- ::SetWindowPos(hwnd(), NULL, bounds.x(), bounds.y(), bounds.width(),
- bounds.height(), 0);
+ gfx::Rect bounds_in_pixel = gfx::win::DIPToScreenRect(bounds);
+ ::SetWindowPos(hwnd(), NULL, bounds_in_pixel.x(), bounds_in_pixel.y(),
+ bounds_in_pixel.width(), bounds_in_pixel.height(), 0);
}
void LegacyRenderWidgetHostHWND::OnFinalMessage(HWND hwnd) {
@@ -140,7 +145,7 @@
return static_cast<LRESULT>(0L);
}
- if (OBJID_CLIENT != l_param || !manager_)
+ if (kObjIdClient != l_param || !manager_)
return static_cast<LRESULT>(0L);
base::win::ScopedComPtr<IAccessible> root(
diff --git a/content/browser/renderer_host/media/OWNERS b/content/browser/renderer_host/media/OWNERS
index 0dbe07b..d320594 100644
--- a/content/browser/renderer_host/media/OWNERS
+++ b/content/browser/renderer_host/media/OWNERS
@@ -1,7 +1,6 @@
acolwell@chromium.org
dalecurtis@chromium.org
ddorwin@chromium.org
-fischman@chromium.org
perkj@chromium.org
scherkus@chromium.org
shadi@chromium.org
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.cc b/content/browser/renderer_host/media/audio_input_renderer_host.cc
index baa8a74..e5d4f78 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.cc
@@ -70,7 +70,7 @@
}
void AudioInputRendererHost::OnChannelClosing() {
- // Since the IPC channel is gone, close all requested audio streams.
+ // Since the IPC sender is gone, close all requested audio streams.
DeleteEntries();
}
diff --git a/content/browser/renderer_host/media/audio_renderer_host.cc b/content/browser/renderer_host/media/audio_renderer_host.cc
index 9334d94..7b07fd9 100644
--- a/content/browser/renderer_host/media/audio_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host.cc
@@ -155,7 +155,7 @@
}
void AudioRendererHost::OnChannelClosing() {
- // Since the IPC channel is gone, close all requested audio streams.
+ // Since the IPC sender is gone, close all requested audio streams.
while (!audio_entries_.empty()) {
// Note: OnCloseStream() removes the entries from audio_entries_.
OnCloseStream(audio_entries_.begin()->first);
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
index 36f6794..91fad34 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
@@ -117,7 +117,7 @@
void MediaStreamDispatcherHost::OnChannelClosing() {
DVLOG(1) << "MediaStreamDispatcherHost::OnChannelClosing";
- // Since the IPC channel is gone, close all requesting/requested streams.
+ // Since the IPC sender is gone, close all requesting/requested streams.
media_stream_manager_->CancelAllRequests(render_process_id_);
}
@@ -170,7 +170,8 @@
int render_view_id,
int page_request_id,
MediaStreamType type,
- const GURL& security_origin) {
+ const GURL& security_origin,
+ bool hide_labels_if_no_access) {
DVLOG(1) << "MediaStreamDispatcherHost::OnEnumerateDevices("
<< render_view_id << ", "
<< page_request_id << ", "
@@ -183,10 +184,14 @@
DCHECK(type == MEDIA_DEVICE_AUDIO_CAPTURE ||
type == MEDIA_DEVICE_VIDEO_CAPTURE ||
type == MEDIA_DEVICE_AUDIO_OUTPUT);
- bool have_permission =
- type == MEDIA_DEVICE_AUDIO_CAPTURE || type == MEDIA_DEVICE_AUDIO_OUTPUT ?
- resource_context_->AllowMicAccess(security_origin) :
- resource_context_->AllowCameraAccess(security_origin);
+ bool have_permission = true;
+ if (hide_labels_if_no_access) {
+ bool audio_type = type == MEDIA_DEVICE_AUDIO_CAPTURE ||
+ type == MEDIA_DEVICE_AUDIO_OUTPUT;
+ have_permission = audio_type ?
+ resource_context_->AllowMicAccess(security_origin) :
+ resource_context_->AllowCameraAccess(security_origin);
+ }
media_stream_manager_->EnumerateDevices(
this, render_process_id_, render_view_id, salt_callback_,
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host.h b/content/browser/renderer_host/media/media_stream_dispatcher_host.h
index 90314bc..b599c39 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host.h
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host.h
@@ -79,7 +79,8 @@
void OnEnumerateDevices(int render_view_id,
int page_request_id,
MediaStreamType type,
- const GURL& security_origin);
+ const GURL& security_origin,
+ bool hide_labels_if_no_access);
void OnCancelEnumerateDevices(int render_view_id,
int page_request_id);
@@ -95,7 +96,7 @@
void StoreRequest(int render_view_id,
int page_request_id,
- const std::string& label);;
+ const std::string& label);
bool IsURLAllowed(const GURL& url);
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
index 9e060d4..99c701f 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
@@ -99,10 +99,12 @@
int page_request_id,
MediaStreamType type,
const GURL& security_origin,
+ bool hide_labels_if_no_access,
const base::Closure& quit_closure) {
quit_closures_.push(quit_closure);
MediaStreamDispatcherHost::OnEnumerateDevices(
- render_view_id, page_request_id, type, security_origin);
+ render_view_id, page_request_id, type, security_origin,
+ hide_labels_if_no_access);
}
std::string label_;
@@ -327,10 +329,11 @@
void EnumerateDevicesAndWaitForResult(int render_view_id,
int page_request_id,
- MediaStreamType type) {
+ MediaStreamType type,
+ bool hide_labels_if_no_access) {
base::RunLoop run_loop;
host_->OnEnumerateDevices(render_view_id, page_request_id, type, origin_,
- run_loop.QuitClosure());
+ hide_labels_if_no_access, run_loop.QuitClosure());
run_loop.Run();
ASSERT_FALSE(host_->enumerated_devices_.empty());
EXPECT_FALSE(DoesContainRawIds(host_->enumerated_devices_));
@@ -878,32 +881,52 @@
TEST_F(MediaStreamDispatcherHostTest, EnumerateAudioDevices) {
EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId,
- MEDIA_DEVICE_AUDIO_CAPTURE);
+ MEDIA_DEVICE_AUDIO_CAPTURE, true);
EXPECT_TRUE(DoesContainLabels(host_->enumerated_devices_));
}
TEST_F(MediaStreamDispatcherHostTest, EnumerateVideoDevices) {
EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId,
- MEDIA_DEVICE_VIDEO_CAPTURE);
+ MEDIA_DEVICE_VIDEO_CAPTURE, true);
EXPECT_TRUE(DoesContainLabels(host_->enumerated_devices_));
}
-TEST_F(MediaStreamDispatcherHostTest, EnumerateAudioDevicesNoAccess) {
+TEST_F(MediaStreamDispatcherHostTest, EnumerateAudioDevicesNoAccessHideLabels) {
MockResourceContext* mock_resource_context =
static_cast<MockResourceContext*>(browser_context_.GetResourceContext());
mock_resource_context->set_mic_access(false);
EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId,
- MEDIA_DEVICE_AUDIO_CAPTURE);
+ MEDIA_DEVICE_AUDIO_CAPTURE, true);
EXPECT_TRUE(DoesNotContainLabels(host_->enumerated_devices_));
}
-TEST_F(MediaStreamDispatcherHostTest, EnumerateVideoDevicesNoAccess) {
+TEST_F(MediaStreamDispatcherHostTest, EnumerateVideoDevicesNoAccessHideLabels) {
MockResourceContext* mock_resource_context =
static_cast<MockResourceContext*>(browser_context_.GetResourceContext());
mock_resource_context->set_camera_access(false);
EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId,
- MEDIA_DEVICE_VIDEO_CAPTURE);
+ MEDIA_DEVICE_VIDEO_CAPTURE, true);
EXPECT_TRUE(DoesNotContainLabels(host_->enumerated_devices_));
}
+TEST_F(MediaStreamDispatcherHostTest,
+ EnumerateAudioDevicesNoAccessNoHideLabels) {
+ MockResourceContext* mock_resource_context =
+ static_cast<MockResourceContext*>(browser_context_.GetResourceContext());
+ mock_resource_context->set_mic_access(false);
+ EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId,
+ MEDIA_DEVICE_AUDIO_CAPTURE, false);
+ EXPECT_TRUE(DoesContainLabels(host_->enumerated_devices_));
+}
+
+TEST_F(MediaStreamDispatcherHostTest,
+ EnumerateVideoDevicesNoAccessNoHideLabels) {
+ MockResourceContext* mock_resource_context =
+ static_cast<MockResourceContext*>(browser_context_.GetResourceContext());
+ mock_resource_context->set_camera_access(false);
+ EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId,
+ MEDIA_DEVICE_VIDEO_CAPTURE, false);
+ EXPECT_TRUE(DoesContainLabels(host_->enumerated_devices_));
+}
+
}; // namespace content
diff --git a/content/browser/renderer_host/media/midi_dispatcher_host.cc b/content/browser/renderer_host/media/midi_dispatcher_host.cc
deleted file mode 100644
index f006c14..0000000
--- a/content/browser/renderer_host/media/midi_dispatcher_host.cc
+++ /dev/null
@@ -1,81 +0,0 @@
-// 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 "content/browser/renderer_host/media/midi_dispatcher_host.h"
-
-#include "base/bind.h"
-#include "content/browser/child_process_security_policy_impl.h"
-#include "content/browser/renderer_host/render_view_host_impl.h"
-#include "content/common/media/midi_messages.h"
-#include "content/public/browser/browser_context.h"
-#include "content/public/browser/browser_thread.h"
-#include "url/gurl.h"
-
-namespace content {
-
-MidiDispatcherHost::MidiDispatcherHost(int render_process_id,
- BrowserContext* browser_context)
- : BrowserMessageFilter(MidiMsgStart),
- render_process_id_(render_process_id),
- browser_context_(browser_context) {
-}
-
-MidiDispatcherHost::~MidiDispatcherHost() {
-}
-
-bool MidiDispatcherHost::OnMessageReceived(const IPC::Message& message) {
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(MidiDispatcherHost, message)
- IPC_MESSAGE_HANDLER(MidiHostMsg_RequestSysExPermission,
- OnRequestSysExPermission)
- IPC_MESSAGE_HANDLER(MidiHostMsg_CancelSysExPermissionRequest,
- OnCancelSysExPermissionRequest)
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
- return handled;
-}
-
-void MidiDispatcherHost::OverrideThreadForMessage(
- const IPC::Message& message, BrowserThread::ID* thread) {
- if (IPC_MESSAGE_CLASS(message) == MidiMsgStart)
- *thread = BrowserThread::UI;
-}
-
-void MidiDispatcherHost::OnRequestSysExPermission(int render_view_id,
- int bridge_id,
- const GURL& origin,
- bool user_gesture) {
- DCHECK_CURRENTLY_ON(BrowserThread::UI);
-
- browser_context_->RequestMidiSysExPermission(
- render_process_id_,
- render_view_id,
- bridge_id,
- origin,
- user_gesture,
- base::Bind(&MidiDispatcherHost::WasSysExPermissionGranted,
- base::Unretained(this),
- render_view_id,
- bridge_id));
-}
-
-void MidiDispatcherHost::OnCancelSysExPermissionRequest(
- int render_view_id,
- int bridge_id,
- const GURL& requesting_frame) {
- DCHECK_CURRENTLY_ON(BrowserThread::UI);
- DVLOG(1) << __FUNCTION__ << " " << render_process_id_ << ":" << render_view_id
- << ":" << bridge_id;
- browser_context_->CancelMidiSysExPermissionRequest(
- render_process_id_, render_view_id, bridge_id, requesting_frame);
-}
-void MidiDispatcherHost::WasSysExPermissionGranted(int render_view_id,
- int bridge_id,
- bool success) {
- ChildProcessSecurityPolicyImpl::GetInstance()->GrantSendMidiSysExMessage(
- render_process_id_);
- Send(new MidiMsg_SysExPermissionApproved(render_view_id, bridge_id, success));
-}
-
-} // namespace content
diff --git a/content/browser/renderer_host/media/midi_dispatcher_host.h b/content/browser/renderer_host/media/midi_dispatcher_host.h
deleted file mode 100644
index c623b3d..0000000
--- a/content/browser/renderer_host/media/midi_dispatcher_host.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// 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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_MIDI_DISPATCHER_HOST_H_
-#define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MIDI_DISPATCHER_HOST_H_
-
-#include "content/public/browser/browser_message_filter.h"
-
-class GURL;
-
-namespace content {
-
-class BrowserContext;
-
-// MidiDispatcherHost handles permissions for using system exclusive messages.
-// It works as BrowserMessageFilter to handle IPC messages between
-// MidiDispatcher running as a RenderViewObserver.
-class MidiDispatcherHost : public BrowserMessageFilter {
- public:
- MidiDispatcherHost(int render_process_id, BrowserContext* browser_context);
-
- // BrowserMessageFilter implementation.
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- virtual void OverrideThreadForMessage(
- const IPC::Message& message, BrowserThread::ID* thread) OVERRIDE;
-
- protected:
- virtual ~MidiDispatcherHost();
-
- private:
- void OnRequestSysExPermission(int render_view_id,
- int bridge_id,
- const GURL& origin,
- bool user_gesture);
- void OnCancelSysExPermissionRequest(int render_view_id,
- int bridge_id,
- const GURL& requesting_frame);
- void WasSysExPermissionGranted(int render_view_id,
- int bridge_id,
- bool success);
-
- int render_process_id_;
- BrowserContext* browser_context_;
-
- DISALLOW_COPY_AND_ASSIGN(MidiDispatcherHost);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MIDI_DISPATCHER_HOST_H_
diff --git a/content/browser/renderer_host/media/video_capture_host.cc b/content/browser/renderer_host/media/video_capture_host.cc
index be571bf..a7fdf9d 100644
--- a/content/browser/renderer_host/media/video_capture_host.cc
+++ b/content/browser/renderer_host/media/video_capture_host.cc
@@ -21,7 +21,7 @@
VideoCaptureHost::~VideoCaptureHost() {}
void VideoCaptureHost::OnChannelClosing() {
- // Since the IPC channel is gone, close all requested VideoCaptureDevices.
+ // Since the IPC sender is gone, close all requested VideoCaptureDevices.
for (EntryMap::iterator it = entries_.begin(); it != entries_.end(); ) {
const base::WeakPtr<VideoCaptureController>& controller = it->second;
if (controller) {
diff --git a/content/browser/renderer_host/media/video_capture_host_unittest.cc b/content/browser/renderer_host/media/video_capture_host_unittest.cc
index bc5ed57..6088081 100644
--- a/content/browser/renderer_host/media/video_capture_host_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_host_unittest.cc
@@ -309,7 +309,7 @@
CloseSession();
- // Simulate closing the IPC channel.
+ // Simulate closing the IPC sender.
host_->OnChannelClosing();
// Release the reference to the mock object. The object will be destructed
diff --git a/content/browser/renderer_host/p2p/socket_dispatcher_host.cc b/content/browser/renderer_host/p2p/socket_dispatcher_host.cc
index 002e513..bb8c1fb 100644
--- a/content/browser/renderer_host/p2p/socket_dispatcher_host.cc
+++ b/content/browser/renderer_host/p2p/socket_dispatcher_host.cc
@@ -105,7 +105,7 @@
}
void P2PSocketDispatcherHost::OnChannelClosing() {
- // Since the IPC channel is gone, close pending connections.
+ // Since the IPC sender is gone, close pending connections.
STLDeleteContainerPairSecondPointers(sockets_.begin(), sockets_.end());
sockets_.clear();
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index 780d930..cb16170 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -331,10 +331,10 @@
// This function should be called on the IO thread.
DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(plugin_host_clients_.empty());
+ HostSharedBitmapManager::current()->ProcessRemoved(PeerHandle());
}
void RenderMessageFilter::OnChannelClosing() {
- HostSharedBitmapManager::current()->ProcessRemoved(PeerHandle());
#if defined(ENABLE_PLUGINS)
for (std::set<OpenChannelToNpapiPluginCallback*>::iterator it =
plugin_host_clients_.begin(); it != plugin_host_clients_.end(); ++it) {
@@ -405,12 +405,14 @@
#endif
IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_SwapCompositorFrame,
render_widget_helper_->DidReceiveBackingStoreMsg(message))
+ IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_UpdateRect,
+ render_widget_helper_->DidReceiveBackingStoreMsg(message))
IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_CheckPermission,
OnCheckNotificationPermission)
IPC_MESSAGE_HANDLER(ChildProcessHostMsg_SyncAllocateSharedMemory,
OnAllocateSharedMemory)
- IPC_MESSAGE_HANDLER(ChildProcessHostMsg_SyncAllocateSharedBitmap,
- OnAllocateSharedBitmap)
+ IPC_MESSAGE_HANDLER_DELAY_REPLY(
+ ChildProcessHostMsg_SyncAllocateSharedBitmap, OnAllocateSharedBitmap)
IPC_MESSAGE_HANDLER(ChildProcessHostMsg_AllocatedSharedBitmap,
OnAllocatedSharedBitmap)
IPC_MESSAGE_HANDLER(ChildProcessHostMsg_DeletedSharedBitmap,
@@ -900,12 +902,29 @@
buffer_size, PeerHandle(), handle);
}
-void RenderMessageFilter::OnAllocateSharedBitmap(
+void RenderMessageFilter::AllocateSharedBitmapOnFileThread(
uint32 buffer_size,
const cc::SharedBitmapId& id,
- base::SharedMemoryHandle* handle) {
+ IPC::Message* reply_msg) {
+ base::SharedMemoryHandle handle;
HostSharedBitmapManager::current()->AllocateSharedBitmapForChild(
- PeerHandle(), buffer_size, id, handle);
+ PeerHandle(), buffer_size, id, &handle);
+ ChildProcessHostMsg_SyncAllocateSharedBitmap::WriteReplyParams(reply_msg,
+ handle);
+ Send(reply_msg);
+}
+
+void RenderMessageFilter::OnAllocateSharedBitmap(uint32 buffer_size,
+ const cc::SharedBitmapId& id,
+ IPC::Message* reply_msg) {
+ BrowserThread::PostTask(
+ BrowserThread::FILE_USER_BLOCKING,
+ FROM_HERE,
+ base::Bind(&RenderMessageFilter::AllocateSharedBitmapOnFileThread,
+ this,
+ buffer_size,
+ id,
+ reply_msg));
}
void RenderMessageFilter::OnAllocatedSharedBitmap(
@@ -1154,9 +1173,11 @@
#if defined(OS_WIN)
void RenderMessageFilter::OnPreCacheFontCharacters(const LOGFONT& font,
const base::string16& str) {
- // TODO(scottmg): Move this to FontCacheDispatcher, http://crbug.com/356346.
- if (!ShouldUseDirectWrite())
- return;
+ // TODO(scottmg): pdf/ppapi still require the renderer to be able to precache
+ // GDI fonts (http://crbug.com/383227), even when using DirectWrite.
+ // Eventually this shouldn't be added and should be moved to
+ // FontCacheDispatcher too. http://crbug.com/356346.
+
// First, comments from FontCacheDispatcher::OnPreCacheFont do apply here too.
// Except that for True Type fonts,
// GetTextMetrics will not load the font in memory.
diff --git a/content/browser/renderer_host/render_message_filter.h b/content/browser/renderer_host/render_message_filter.h
index 18f6a2d..95a80ac 100644
--- a/content/browser/renderer_host/render_message_filter.h
+++ b/content/browser/renderer_host/render_message_filter.h
@@ -209,9 +209,12 @@
// in the renderer on POSIX due to the sandbox.
void OnAllocateSharedMemory(uint32 buffer_size,
base::SharedMemoryHandle* handle);
+ void AllocateSharedBitmapOnFileThread(uint32 buffer_size,
+ const cc::SharedBitmapId& id,
+ IPC::Message* reply_msg);
void OnAllocateSharedBitmap(uint32 buffer_size,
const cc::SharedBitmapId& id,
- base::SharedMemoryHandle* handle);
+ IPC::Message* reply_msg);
void OnAllocatedSharedBitmap(size_t buffer_size,
const base::SharedMemoryHandle& handle,
const cc::SharedBitmapId& id);
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 11a629d..efe852b 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -30,6 +30,7 @@
#include "base/path_service.h"
#include "base/rand_util.h"
#include "base/stl_util.h"
+#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/supports_user_data.h"
#include "base/sys_info.h"
@@ -64,6 +65,7 @@
#include "content/browser/loader/resource_scheduler_filter.h"
#include "content/browser/media/capture/audio_mirroring_manager.h"
#include "content/browser/media/media_internals.h"
+#include "content/browser/media/midi_host.h"
#include "content/browser/message_port_message_filter.h"
#include "content/browser/mime_registry_message_filter.h"
#include "content/browser/mojo/mojo_application_host.h"
@@ -80,8 +82,6 @@
#include "content/browser/renderer_host/media/audio_renderer_host.h"
#include "content/browser/renderer_host/media/device_request_message_filter.h"
#include "content/browser/renderer_host/media/media_stream_dispatcher_host.h"
-#include "content/browser/renderer_host/media/midi_dispatcher_host.h"
-#include "content/browser/renderer_host/media/midi_host.h"
#include "content/browser/renderer_host/media/peer_connection_tracker_host.h"
#include "content/browser/renderer_host/media/video_capture_host.h"
#include "content/browser/renderer_host/memory_benchmark_message_filter.h"
@@ -97,7 +97,6 @@
#include "content/browser/renderer_host/text_input_client_message_filter.h"
#include "content/browser/renderer_host/websocket_dispatcher_host.h"
#include "content/browser/resolve_proxy_msg_helper.h"
-#include "content/browser/screen_orientation/screen_orientation_dispatcher_host.h"
#include "content/browser/service_worker/service_worker_context_wrapper.h"
#include "content/browser/service_worker/service_worker_dispatcher_host.h"
#include "content/browser/shared_worker/shared_worker_message_filter.h"
@@ -175,6 +174,7 @@
#include "content/browser/media/webrtc_internals.h"
#include "content/browser/renderer_host/media/media_stream_track_metrics_host.h"
#include "content/browser/renderer_host/media/webrtc_identity_service_host.h"
+#include "content/common/media/aec_dump_messages.h"
#include "content/common/media/media_stream_messages.h"
#endif
@@ -461,7 +461,6 @@
delayed_cleanup_needed_(false),
within_process_died_observer_(false),
power_monitor_broadcaster_(this),
- screen_orientation_dispatcher_host_(NULL),
worker_ref_count_(0),
weak_factory_(this) {
widget_helper_ = new RenderWidgetHelper();
@@ -741,7 +740,6 @@
AddFilter(audio_renderer_host_);
AddFilter(
new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_manager()));
- AddFilter(new MidiDispatcherHost(GetID(), browser_context));
AddFilter(new VideoCaptureHost(media_stream_manager));
AddFilter(new AppCacheDispatcherHost(
storage_partition_impl_->GetAppCacheService(),
@@ -791,8 +789,10 @@
AddFilter(new TextInputClientMessageFilter(GetID()));
#elif defined(OS_WIN)
// The FontCacheDispatcher is required only when we're using GDI rendering.
- if (!ShouldUseDirectWrite())
- channel_->AddFilter(new FontCacheDispatcher());
+ // TODO(scottmg): pdf/ppapi still require the renderer to be able to precache
+ // GDI fonts (http://crbug.com/383227), even when using DirectWrite. This
+ // should eventually be if (!ShouldUseDirectWrite()) guarded.
+ channel_->AddFilter(new FontCacheDispatcher());
#elif defined(OS_ANDROID)
browser_demuxer_android_ = new BrowserDemuxerAndroid();
AddFilter(browser_demuxer_android_);
@@ -884,9 +884,7 @@
AddFilter(new MemoryBenchmarkMessageFilter());
#endif
AddFilter(new VibrationMessageFilter());
- screen_orientation_dispatcher_host_ = new ScreenOrientationDispatcherHost();
- AddFilter(screen_orientation_dispatcher_host_);
- AddFilter(new PushMessagingMessageFilter());
+ AddFilter(new PushMessagingMessageFilter(GetID()));
AddFilter(new BatteryStatusMessageFilter());
}
@@ -1115,7 +1113,6 @@
switches::kDisableTouchAdjustment,
switches::kDisableTouchDragDrop,
switches::kDisableTouchEditing,
- switches::kDisableUniversalAcceleratedOverflowScroll,
switches::kDisableZeroCopy,
switches::kDomAutomationController,
switches::kEnableAcceleratedFixedRootBackground,
@@ -1155,7 +1152,6 @@
switches::kEnableStatsTable,
switches::kEnableStrictSiteIsolation,
switches::kEnableTargetedStyleRecalc,
- switches::kEnableUniversalAcceleratedOverflowScroll,
switches::kEnableTouchDragDrop,
switches::kEnableTouchEditing,
switches::kEnableViewport,
@@ -1167,7 +1163,6 @@
switches::kEnableWebGLImageChromium,
switches::kEnableWebMIDI,
switches::kEnableZeroCopy,
- switches::kForceCompositingMode,
switches::kForceDeviceScaleFactor,
switches::kFullMemoryCrashReport,
switches::kIgnoreResolutionLimitsForAcceleratedVideoDecode,
@@ -1251,7 +1246,7 @@
switches::kEnableSandboxLogging,
#endif
#if defined(OS_WIN)
- switches::kEnableDirectWrite,
+ switches::kDisableDirectWrite,
switches::kEnableHighResolutionTime,
#endif
};
@@ -1375,6 +1370,12 @@
ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer,
OnAllocateGpuMemoryBuffer)
IPC_MESSAGE_HANDLER(ViewHostMsg_Close_ACK, OnCloseACK)
+#if defined(ENABLE_WEBRTC)
+ IPC_MESSAGE_HANDLER(AecDumpMsg_RegisterAecDumpConsumer,
+ OnRegisterAecDumpConsumer)
+ IPC_MESSAGE_HANDLER(AecDumpMsg_UnregisterAecDumpConsumer,
+ OnUnregisterAecDumpConsumer)
+#endif
// Adding single handlers for your service here is fine, but once your
// service needs more than one handler, please extract them into a new
// message filter and add that filter to CreateMessageFilters().
@@ -1505,7 +1506,6 @@
channel_.reset();
gpu_message_filter_ = NULL;
message_port_message_filter_ = NULL;
- screen_orientation_dispatcher_host_ = NULL;
RemoveUserData(kSessionStorageHolderKey);
// Remove ourself from the list of renderer processes so that we can't be
@@ -1546,11 +1546,11 @@
#if defined(ENABLE_WEBRTC)
void RenderProcessHostImpl::EnableAecDump(const base::FilePath& file) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- BrowserThread::PostTaskAndReplyWithResult(
- BrowserThread::FILE, FROM_HERE,
- base::Bind(&CreateAecDumpFileForProcess, file, GetHandle()),
- base::Bind(&RenderProcessHostImpl::SendAecDumpFileToRenderer,
- weak_factory_.GetWeakPtr()));
+ // Enable AEC dump for each registered consumer.
+ for (std::vector<int>::iterator it = aec_dump_consumers_.begin();
+ it != aec_dump_consumers_.end(); ++it) {
+ EnableAecDumpForId(file, *it);
+ }
}
void RenderProcessHostImpl::DisableAecDump() {
@@ -1654,15 +1654,15 @@
// This is because the browser treats navigation to an empty GURL as a
// navigation to the home page. This is often a privileged page
// (chrome://newtab/) which is exactly what we don't want.
- *url = GURL(kAboutBlankURL);
+ *url = GURL(url::kAboutBlankURL);
RecordAction(base::UserMetricsAction("FilterURLTermiate_Invalid"));
return;
}
- if (url->SchemeIs(kAboutScheme)) {
+ if (url->SchemeIs(url::kAboutScheme)) {
// The renderer treats all URLs in the about: scheme as being about:blank.
// Canonicalize about: URLs to about:blank.
- *url = GURL(kAboutBlankURL);
+ *url = GURL(url::kAboutBlankURL);
RecordAction(base::UserMetricsAction("FilterURLTermiate_About"));
}
@@ -1676,7 +1676,7 @@
// URL. This prevents us from storing the blocked URL and becoming confused
// later.
VLOG(1) << "Blocked URL " << url->spec();
- *url = GURL(kAboutBlankURL);
+ *url = GURL(url::kAboutBlankURL);
RecordAction(base::UserMetricsAction("FilterURLTermiate_Blocked"));
}
}
@@ -1919,7 +1919,6 @@
channel_.reset();
gpu_message_filter_ = NULL;
message_port_message_filter_ = NULL;
- screen_orientation_dispatcher_host_ = NULL;
RemoveUserData(kSessionStorageHolderKey);
IDMap<IPC::Listener>::iterator iter(&listeners_);
@@ -1984,11 +1983,6 @@
}
#endif
-scoped_refptr<ScreenOrientationDispatcherHost>
-RenderProcessHostImpl::screen_orientation_dispatcher_host() const {
- return make_scoped_refptr(screen_orientation_dispatcher_host_);
-}
-
void RenderProcessHostImpl::ReleaseOnCloseACK(
RenderProcessHost* host,
const SessionStorageNamespaceMap& sessions,
@@ -2168,15 +2162,78 @@
}
#if defined(ENABLE_WEBRTC)
+void RenderProcessHostImpl::OnRegisterAecDumpConsumer(int id) {
+ BrowserThread::PostTask(
+ BrowserThread::UI,
+ FROM_HERE,
+ base::Bind(
+ &RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread,
+ weak_factory_.GetWeakPtr(),
+ id));
+}
+
+void RenderProcessHostImpl::OnUnregisterAecDumpConsumer(int id) {
+ BrowserThread::PostTask(
+ BrowserThread::UI,
+ FROM_HERE,
+ base::Bind(
+ &RenderProcessHostImpl::UnregisterAecDumpConsumerOnUIThread,
+ weak_factory_.GetWeakPtr(),
+ id));
+}
+
+void RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread(int id) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ aec_dump_consumers_.push_back(id);
+ if (WebRTCInternals::GetInstance()->aec_dump_enabled()) {
+ EnableAecDumpForId(WebRTCInternals::GetInstance()->aec_dump_file_path(),
+ id);
+ }
+}
+
+void RenderProcessHostImpl::UnregisterAecDumpConsumerOnUIThread(int id) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ for (std::vector<int>::iterator it = aec_dump_consumers_.begin();
+ it != aec_dump_consumers_.end(); ++it) {
+ if (*it == id) {
+ aec_dump_consumers_.erase(it);
+ break;
+ }
+ }
+}
+
+#if defined(OS_WIN)
+#define IntToStringType base::IntToString16
+#else
+#define IntToStringType base::IntToString
+#endif
+
+void RenderProcessHostImpl::EnableAecDumpForId(const base::FilePath& file,
+ int id) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ base::FilePath unique_file =
+ file.AddExtension(IntToStringType(GetID()))
+ .AddExtension(IntToStringType(id));
+ BrowserThread::PostTaskAndReplyWithResult(
+ BrowserThread::FILE, FROM_HERE,
+ base::Bind(&CreateAecDumpFileForProcess, unique_file, GetHandle()),
+ base::Bind(&RenderProcessHostImpl::SendAecDumpFileToRenderer,
+ weak_factory_.GetWeakPtr(),
+ id));
+}
+
+#undef IntToStringType
+
void RenderProcessHostImpl::SendAecDumpFileToRenderer(
+ int id,
IPC::PlatformFileForTransit file_for_transit) {
if (file_for_transit == IPC::InvalidPlatformFileForTransit())
return;
- Send(new MediaStreamMsg_EnableAecDump(file_for_transit));
+ Send(new AecDumpMsg_EnableAecDump(id, file_for_transit));
}
void RenderProcessHostImpl::SendDisableAecDumpToRenderer() {
- Send(new MediaStreamMsg_DisableAecDump());
+ Send(new AecDumpMsg_DisableAecDump());
}
#endif
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h
index cd7ec89..2728626 100644
--- a/content/browser/renderer_host/render_process_host_impl.h
+++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -56,7 +56,6 @@
class RenderWidgetHost;
class RenderWidgetHostImpl;
class RenderWidgetHostViewFrameSubscriber;
-class ScreenOrientationDispatcherHost;
class StoragePartition;
class StoragePartitionImpl;
@@ -181,9 +180,6 @@
void WebRtcLogMessage(const std::string& message);
#endif
- scoped_refptr<ScreenOrientationDispatcherHost>
- screen_orientation_dispatcher_host() const;
-
// Used to extend the lifetime of the sessions until the render view
// in the renderer is fully closed. This is static because its also called
// with mock hosts as input in test cases.
@@ -328,8 +324,14 @@
virtual void OnGpuSwitching() OVERRIDE;
#if defined(ENABLE_WEBRTC)
+ void OnRegisterAecDumpConsumer(int id);
+ void OnUnregisterAecDumpConsumer(int id);
+ void RegisterAecDumpConsumerOnUIThread(int id);
+ void UnregisterAecDumpConsumerOnUIThread(int id);
+ void EnableAecDumpForId(const base::FilePath& file, int id);
// Sends |file_for_transit| to the render process.
- void SendAecDumpFileToRenderer(IPC::PlatformFileForTransit file_for_transit);
+ void SendAecDumpFileToRenderer(int id,
+ IPC::PlatformFileForTransit file_for_transit);
void SendDisableAecDumpToRenderer();
#endif
@@ -448,12 +450,12 @@
scoped_refptr<P2PSocketDispatcherHost> p2p_socket_dispatcher_host_;
+ // Must be accessed on UI thread.
+ std::vector<int> aec_dump_consumers_;
+
WebRtcStopRtpDumpCallback stop_rtp_dump_callback_;
#endif
- // Message filter and dispatcher for screen orientation.
- ScreenOrientationDispatcherHost* screen_orientation_dispatcher_host_;
-
int worker_ref_count_;
// Records the time when the process starts surviving for workers for UMA.
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index ed4034d..164f613 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -91,12 +91,14 @@
#if defined(OS_MACOSX)
#include "content/browser/renderer_host/popup_menu_helper_mac.h"
-#elif defined(OS_ANDROID)
-#include "content/browser/media/android/media_web_contents_observer.h"
#elif defined(OS_WIN)
#include "base/win/win_util.h"
#endif
+#if defined(ENABLE_BROWSER_CDMS)
+#include "content/browser/media/media_web_contents_observer.h"
+#endif
+
using base::TimeDelta;
using blink::WebConsoleMessage;
using blink::WebDragOperation;
@@ -223,7 +225,7 @@
GetProcess()->GetID(), GetRoutingID()));
}
-#if defined(OS_ANDROID)
+#if defined(ENABLE_BROWSER_CDMS)
media_web_contents_observer_.reset(new MediaWebContentsObserver(this));
#endif
@@ -385,8 +387,6 @@
GpuProcessHost::gpu_enabled() &&
!command_line.HasSwitch(switches::kDisableFlashStage3d);
- prefs.gl_multisampling_enabled =
- !command_line.HasSwitch(switches::kDisableGLMultisampling);
prefs.site_specific_quirks_enabled =
!command_line.HasSwitch(switches::kDisableSiteSpecificQuirks);
prefs.allow_file_access_from_file_urls =
@@ -410,8 +410,6 @@
!command_line.HasSwitch(switches::kDisableDeferredFilters);
prefs.container_culling_enabled =
command_line.HasSwitch(switches::kEnableContainerCulling);
- prefs.lazy_layout_enabled =
- command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures);
prefs.region_based_columns_enabled =
command_line.HasSwitch(switches::kEnableRegionBasedColumns);
@@ -460,8 +458,9 @@
prefs.javascript_enabled = true;
}
- prefs.is_online = !net::NetworkChangeNotifier::IsOffline();
prefs.connection_type = net::NetworkChangeNotifier::GetConnectionType();
+ prefs.is_online =
+ prefs.connection_type != net::NetworkChangeNotifier::CONNECTION_NONE;
prefs.gesture_tap_highlight_enabled = !command_line.HasSwitch(
switches::kDisableGestureTapHighlight);
@@ -988,8 +987,6 @@
OnDidContentsPreferredSizeChange)
IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffset,
OnDidChangeScrollOffset)
- IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame,
- OnDidChangeScrollOffsetPinningForMainFrame)
IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent,
OnRouteCloseEvent)
IPC_MESSAGE_HANDLER(ViewHostMsg_RouteMessageEvent, OnRouteMessageEvent)
@@ -1189,10 +1186,14 @@
bool uses_temporary_zoom_level) {
delegate_->DocumentAvailableInMainFrame(this);
+ if (!uses_temporary_zoom_level)
+ return;
+
HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>(
HostZoomMap::GetForBrowserContext(GetProcess()->GetBrowserContext()));
- host_zoom_map->SetUsesTemporaryZoomLevel(
- GetProcess()->GetID(), GetRoutingID(), uses_temporary_zoom_level);
+ host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(),
+ GetRoutingID(),
+ host_zoom_map->GetDefaultZoomLevel());
}
void RenderViewHostImpl::OnToggleFullscreen(bool enter_fullscreen) {
@@ -1217,12 +1218,6 @@
view_->ScrollOffsetChanged();
}
-void RenderViewHostImpl::OnDidChangeScrollOffsetPinningForMainFrame(
- bool is_pinned_to_left, bool is_pinned_to_right) {
- if (view_)
- view_->SetScrollOffsetPinning(is_pinned_to_left, is_pinned_to_right);
-}
-
void RenderViewHostImpl::OnRouteCloseEvent() {
// Have the delegate route this to the active RenderViewHost.
delegate_->RouteCloseEvent(this);
@@ -1441,6 +1436,15 @@
rvh_state_ == STATE_PENDING_SWAP_OUT;
}
+void RenderViewHostImpl::OnTextSurroundingSelectionResponse(
+ const base::string16& content,
+ size_t start_offset,
+ size_t end_offset) {
+ if (!view_)
+ return;
+ view_->OnTextSurroundingSelectionResponse(content, start_offset, end_offset);
+}
+
void RenderViewHostImpl::ExitFullscreen() {
RejectMouseLockOrUnlockIfNecessary();
// Notify delegate_ and renderer of fullscreen state change.
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index f389992..5f7344f 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -391,11 +391,13 @@
void DidCancelPopupMenu();
#endif
-#if defined(OS_ANDROID)
+#if defined(ENABLE_BROWSER_CDMS)
MediaWebContentsObserver* media_web_contents_observer() {
return media_web_contents_observer_.get();
}
+#endif
+#if defined(OS_ANDROID)
void DidSelectPopupMenuItems(const std::vector<int>& selected_indices);
void DidCancelPopupMenu();
#endif
@@ -438,6 +440,10 @@
// Whether the RVH is waiting for the unload ack from the renderer.
bool IsWaitingForUnloadACK() const;
+ void OnTextSurroundingSelectionResponse(const base::string16& content,
+ size_t start_offset,
+ size_t end_offset);
+
// Update the FrameTree to use this RenderViewHost's main frame
// RenderFrameHost. Called when the RenderViewHost is committed.
//
@@ -492,8 +498,6 @@
void OnToggleFullscreen(bool enter_fullscreen);
void OnDidContentsPreferredSizeChange(const gfx::Size& new_size);
void OnDidChangeScrollOffset();
- void OnDidChangeScrollOffsetPinningForMainFrame(bool is_pinned_to_left,
- bool is_pinned_to_right);
void OnPasteFromSelectionClipboard();
void OnRouteCloseEvent();
void OnRouteMessageEvent(const ViewMsg_PostMessage_Params& params);
@@ -620,9 +624,8 @@
// Set to true if we requested the on screen keyboard to be displayed.
bool virtual_keyboard_requested_;
-#if defined(OS_ANDROID)
- // Manages all the android mediaplayer managers and forwards IPCs to the
- // managers.
+#if defined(ENABLE_BROWSER_CDMS)
+ // Manages all the media player and CDM managers and forwards IPCs to them.
scoped_ptr<MediaWebContentsObserver> media_web_contents_observer_;
#endif
diff --git a/content/browser/renderer_host/render_view_host_unittest.cc b/content/browser/renderer_host/render_view_host_unittest.cc
index 15fa110..6889cd6 100644
--- a/content/browser/renderer_host/render_view_host_unittest.cc
+++ b/content/browser/renderer_host/render_view_host_unittest.cc
@@ -63,7 +63,8 @@
TEST_F(RenderViewHostTest, FilterAbout) {
test_rvh()->SendNavigate(1, GURL("about:cache"));
ASSERT_TRUE(controller().GetVisibleEntry());
- EXPECT_EQ(GURL(kAboutBlankURL), controller().GetVisibleEntry()->GetURL());
+ EXPECT_EQ(GURL(url::kAboutBlankURL),
+ controller().GetVisibleEntry()->GetURL());
}
// Create a full screen popup RenderWidgetHost and View.
@@ -152,8 +153,8 @@
drop_data.url = file_url;
drop_data.html_base_url = file_url;
test_rvh()->TestOnStartDragging(drop_data);
- EXPECT_EQ(GURL(kAboutBlankURL), delegate_view.drag_url());
- EXPECT_EQ(GURL(kAboutBlankURL), delegate_view.html_base_url());
+ EXPECT_EQ(GURL(url::kAboutBlankURL), delegate_view.drag_url());
+ EXPECT_EQ(GURL(url::kAboutBlankURL), delegate_view.html_base_url());
GURL http_url = GURL("http://www.domain.com/index.html");
drop_data.url = http_url;
diff --git a/content/browser/renderer_host/render_widget_helper_mac.mm b/content/browser/renderer_host/render_widget_helper_mac.mm
index 4a16293..824b226 100644
--- a/content/browser/renderer_host/render_widget_helper_mac.mm
+++ b/content/browser/renderer_host/render_widget_helper_mac.mm
@@ -21,7 +21,10 @@
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
gfx::AcceleratedWidget native_widget =
content::GpuSurfaceTracker::Get()->AcquireNativeWidget(params.surface_id);
- [native_widget gotAcceleratedIOSurfaceFrame:params.surface_handle
+ IOSurfaceID io_surface_handle = static_cast<IOSurfaceID>(
+ params.surface_handle);
+ [native_widget gotAcceleratedIOSurfaceFrame:io_surface_handle
+ withOutputSurfaceID:params.surface_id
withPixelSize:params.size
withScaleFactor:params.scale_factor];
}
diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h
index 983f282..91ce943 100644
--- a/content/browser/renderer_host/render_widget_host_delegate.h
+++ b/content/browser/renderer_host/render_widget_host_delegate.h
@@ -59,6 +59,9 @@
// Notifies that screen rects were sent to renderer process.
virtual void DidSendScreenRects(RenderWidgetHostImpl* rwh) {}
+ // Notifies that RenderWidgetHost will toggle touch emulation.
+ virtual void OnTouchEmulationEnabled(bool enabled) {}
+
#if defined(OS_WIN)
// Returns the widget's parent's NativeViewAccessible.
virtual gfx::NativeViewAccessible GetParentNativeViewAccessible();
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 7bb64e5..52a3890 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -458,8 +458,8 @@
IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor)
IPC_MESSAGE_HANDLER(ViewHostMsg_SetTouchEventEmulationEnabled,
OnSetTouchEventEmulationEnabled)
- IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputTypeChanged,
- OnTextInputTypeChanged)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged,
+ OnTextInputStateChanged)
IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition,
OnImeCancelComposition)
IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnLockMouse)
@@ -1611,6 +1611,9 @@
void RenderWidgetHostImpl::OnSetTouchEventEmulationEnabled(
bool enabled, bool allow_pinch) {
+ if (delegate_)
+ delegate_->OnTouchEmulationEnabled(enabled);
+
if (enabled) {
if (!touch_emulator_)
touch_emulator_.reset(new TouchEmulator(this));
@@ -1621,12 +1624,10 @@
}
}
-void RenderWidgetHostImpl::OnTextInputTypeChanged(
- ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline) {
+void RenderWidgetHostImpl::OnTextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params) {
if (view_)
- view_->TextInputTypeChanged(type, input_mode, can_compose_inline);
+ view_->TextInputStateChanged(params);
}
#if defined(OS_MACOSX) || defined(USE_AURA)
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index fee3d89..65fa860 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -627,9 +627,9 @@
virtual void OnBlur();
void OnSetCursor(const WebCursor& cursor);
void OnSetTouchEventEmulationEnabled(bool enabled, bool allow_pinch);
- void OnTextInputTypeChanged(ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline);
+ void OnTextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params);
+
#if defined(OS_MACOSX) || defined(USE_AURA)
void OnImeCompositionRangeChanged(
const gfx::Range& range,
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index e2ececa..120161d 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -35,7 +35,7 @@
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/gpu_process_host_ui_shim.h"
#include "content/browser/gpu/gpu_surface_tracker.h"
-#include "content/browser/media/android/media_web_contents_observer.h"
+#include "content/browser/media/media_web_contents_observer.h"
#include "content/browser/renderer_host/compositor_impl_android.h"
#include "content/browser/renderer_host/dip_util.h"
#include "content/browser/renderer_host/image_transport_factory_android.h"
@@ -218,8 +218,6 @@
OnDidChangeBodyBackgroundColor)
IPC_MESSAGE_HANDLER(ViewHostMsg_SetNeedsBeginFrame,
OnSetNeedsBeginFrame)
- IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged,
- OnTextInputStateChanged)
IPC_MESSAGE_HANDLER(ViewHostMsg_SmartClipDataExtracted,
OnSmartClipDataExtracted)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -435,6 +433,12 @@
}
}
+void RenderWidgetHostViewAndroid::OnTextSurroundingSelectionResponse(
+ const base::string16& content,
+ size_t start_offset,
+ size_t end_offset) {
+}
+
void RenderWidgetHostViewAndroid::ReleaseLocksOnSurface() {
if (!frame_evictor_->HasFrame()) {
DCHECK_EQ(locks_on_frame_count_, 0u);
@@ -476,18 +480,11 @@
// is TabContentsDelegate.
}
-void RenderWidgetHostViewAndroid::TextInputTypeChanged(
- ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline) {
- // Unused on Android, which uses OnTextInputChanged instead.
-}
-
long RenderWidgetHostViewAndroid::GetNativeImeAdapter() {
return reinterpret_cast<intptr_t>(&ime_adapter_android_);
}
-void RenderWidgetHostViewAndroid::OnTextInputStateChanged(
+void RenderWidgetHostViewAndroid::TextInputStateChanged(
const ViewHostMsg_TextInputState_Params& params) {
// If the change is not originated from IME (e.g. Javascript, autofill),
// send back the renderer an acknowledgement, regardless of how we exit from
@@ -688,7 +685,6 @@
DCHECK(frame_provider_);
scoped_refptr<cc::DelegatedRendererLayer> delegated_layer =
cc::DelegatedRendererLayer::Create(frame_provider_);
- delegated_layer->SetDisplaySize(texture_size_in_layer_);
delegated_layer->SetBounds(content_size_in_layer_);
delegated_layer->SetHideLayerAndSubtree(true);
delegated_layer->SetIsDrawable(true);
@@ -792,6 +788,14 @@
last_output_surface_id_ = output_surface_id;
}
+ // DelegatedRendererLayerImpl applies the inverse device_scale_factor of the
+ // renderer frame, assuming that the browser compositor will scale
+ // it back up to device scale. But on Android we put our browser layers in
+ // physical pixels and set our browser CC device_scale_factor to 1, so this
+ // suppresses the transform. This line may need to be removed when fixing
+ // http://crbug.com/384134 or http://crbug.com/310763
+ frame_data->device_scale_factor = 1.0f;
+
if (!has_content) {
DestroyDelegatedContent();
} else {
@@ -812,7 +816,6 @@
}
if (layer_.get()) {
- layer_->SetDisplaySize(texture_size_in_layer_);
layer_->SetIsDrawable(true);
layer_->SetContentsOpaque(true);
layer_->SetBounds(content_size_in_layer_);
@@ -859,10 +862,6 @@
return;
}
- // Always let ContentViewCore know about the new frame first, so it can decide
- // to schedule a Draw immediately when it sees the texture layer invalidation.
- OnFrameMetadataUpdated(frame->metadata);
-
if (layer_ && layer_->layer_tree_host()) {
for (size_t i = 0; i < frame->metadata.latency_info.size(); i++) {
scoped_ptr<cc::SwapPromise> swap_promise(
@@ -880,6 +879,8 @@
SwapDelegatedFrame(output_surface_id, frame->delegated_frame_data.Pass());
frame_evictor_->SwappedFrame(!host_->is_hidden());
+
+ OnFrameMetadataUpdated(frame->metadata);
}
void RenderWidgetHostViewAndroid::OnSwapCompositorFrame(
@@ -1089,11 +1090,6 @@
gesture_provider_.OnTouchEventAck(event_consumed);
}
-void RenderWidgetHostViewAndroid::SetScrollOffsetPinning(
- bool is_pinned_to_left, bool is_pinned_to_right) {
- // intentionally empty, like RenderWidgetHostViewViews
-}
-
void RenderWidgetHostViewAndroid::GestureEventAck(
const blink::WebGestureEvent& event,
InputEventAckState ack_result) {
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h
index d00c5b6..267b410 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.h
+++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -100,9 +100,8 @@
virtual float GetOverdrawBottomHeight() const OVERRIDE;
virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE;
virtual void SetIsLoading(bool is_loading) OVERRIDE;
- virtual void TextInputTypeChanged(ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline) OVERRIDE;
+ virtual void TextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params) OVERRIDE;
virtual void ImeCancelComposition() OVERRIDE;
virtual void FocusedNodeChanged(bool is_editable_node) OVERRIDE;
virtual void RenderProcessGone(base::TerminationStatus status,
@@ -142,8 +141,6 @@
virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
virtual void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch,
InputEventAckState ack_result) OVERRIDE;
- virtual void SetScrollOffsetPinning(
- bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE;
virtual InputEventAckState FilterInputEvent(
const blink::WebInputEvent& input_event) OVERRIDE;
virtual void OnSetNeedsFlushInput() OVERRIDE;
@@ -163,6 +160,9 @@
OVERRIDE;
virtual void LockCompositingSurface() OVERRIDE;
virtual void UnlockCompositingSurface() OVERRIDE;
+ virtual void OnTextSurroundingSelectionResponse(const base::string16& content,
+ size_t start_offset,
+ size_t end_offset) OVERRIDE;
// cc::DelegatedFrameResourceCollectionClient implementation.
virtual void UnusedResourcesAreAvailable() OVERRIDE;
@@ -195,7 +195,6 @@
void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event);
void SendGestureEvent(const blink::WebGestureEvent& event);
- void OnTextInputStateChanged(const ViewHostMsg_TextInputState_Params& params);
void OnDidChangeBodyBackgroundColor(SkColor color);
void OnStartContentIntent(const GURL& content_url);
void OnSetNeedsBeginFrame(bool enabled);
@@ -311,6 +310,9 @@
// The most recent content size that was pushed to the texture layer.
gfx::Size content_size_in_layer_;
+ // The device scale of the last received frame.
+ float device_scale_factor_;
+
// The output surface id of the last received frame.
uint32_t last_output_surface_id_;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 6bec9f2..26e425b 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -306,7 +306,16 @@
results->depth = 24;
results->depthPerComponent = 8;
results->deviceScaleFactor = display.device_scale_factor();
+
+ // The Display rotation and the WebScreenInfo orientation are not the same
+ // angle. The former is the physical display rotation while the later is the
+ // rotation required by the content to be shown properly on the screen, in
+ // other words, relative to the physical display.
results->orientationAngle = display.RotationAsDegree();
+ if (results->orientationAngle == 90)
+ results->orientationAngle = 270;
+ else if (results->orientationAngle == 270)
+ results->orientationAngle = 90;
}
bool PointerEventActivates(const ui::Event& event) {
@@ -449,20 +458,6 @@
////////////////////////////////////////////////////////////////////////////////
// RenderWidgetHostViewAura, RenderWidgetHostView implementation:
-bool RenderWidgetHostViewAura::OnMessageReceived(
- const IPC::Message& message) {
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostViewAura, message)
- // TODO(kevers): Move to RenderWidgetHostViewImpl and consolidate IPC
- // messages for TextInput<State|Type>Changed. Corresponding code in
- // RenderWidgetHostViewAndroid should also be moved at the same time.
- IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged,
- OnTextInputStateChanged)
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
- return handled;
-}
-
void RenderWidgetHostViewAura::InitAsChild(
gfx::NativeView parent_view) {
window_->SetType(ui::wm::WINDOW_TYPE_CONTROL);
@@ -623,7 +618,6 @@
}
}
- SnapToPhysicalPixelBoundary();
InternalSetBounds(gfx::Rect(relative_origin, rect.size()));
}
@@ -814,25 +808,19 @@
UpdateCursorIfOverSelf();
}
-void RenderWidgetHostViewAura::TextInputTypeChanged(
- ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline) {
- if (text_input_type_ != type ||
- text_input_mode_ != input_mode ||
- can_compose_inline_ != can_compose_inline) {
- text_input_type_ = type;
- text_input_mode_ = input_mode;
- can_compose_inline_ = can_compose_inline;
+void RenderWidgetHostViewAura::TextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params) {
+ if (text_input_type_ != params.type ||
+ text_input_mode_ != params.mode ||
+ can_compose_inline_ != params.can_compose_inline) {
+ text_input_type_ = params.type;
+ text_input_mode_ = params.mode;
+ can_compose_inline_ = params.can_compose_inline;
if (GetInputMethod())
GetInputMethod()->OnTextInputTypeChanged(this);
if (touch_editing_client_)
touch_editing_client_->OnTextInputTypeChanged(text_input_type_);
}
-}
-
-void RenderWidgetHostViewAura::OnTextInputStateChanged(
- const ViewHostMsg_TextInputState_Params& params) {
if (params.show_ime_if_needed && params.type != ui::TEXT_INPUT_TYPE_NONE) {
if (GetInputMethod())
GetInputMethod()->ShowImeIfNeeded();
@@ -987,15 +975,14 @@
gfx::Vector2dF fudge = view_offset_snapped - view_offset;
fudge.Scale(1.0 / current_device_scale_factor_);
- gfx::Transform fudge_transform;
- fudge_transform.Translate(fudge.x(), fudge.y());
- GetLayer()->cc_layer()->SetTransform(fudge_transform);
+ GetLayer()->SetSubpixelPositionOffset(fudge);
}
void RenderWidgetHostViewAura::InternalSetBounds(const gfx::Rect& rect) {
if (HasDisplayPropertyChanged(window_))
host_->InvalidateScreenInfo();
+ SnapToPhysicalPixelBoundary();
// Don't recursively call SetBounds if this bounds update is the result of
// a Window::SetBoundsInternal call.
if (!in_bounds_changed_)
@@ -1021,6 +1008,11 @@
if (!legacy_render_widget_host_HWND_) {
legacy_render_widget_host_HWND_ = LegacyRenderWidgetHostHWND::Create(
reinterpret_cast<HWND>(GetNativeViewId()));
+ BrowserAccessibilityManagerWin* manager =
+ static_cast<BrowserAccessibilityManagerWin*>(
+ GetBrowserAccessibilityManager());
+ if (manager)
+ manager->SetAccessibleHWND(legacy_render_widget_host_HWND_.get());
}
if (legacy_render_widget_host_HWND_) {
legacy_render_widget_host_HWND_->SetBounds(
@@ -1224,11 +1216,6 @@
new SyntheticGestureTargetAura(host_));
}
-void RenderWidgetHostViewAura::SetScrollOffsetPinning(
- bool is_pinned_to_left, bool is_pinned_to_right) {
- // Not needed. Mac-only.
-}
-
InputEventAckState RenderWidgetHostViewAura::FilterInputEvent(
const blink::WebInputEvent& input_event) {
bool consumed = false;
@@ -1253,33 +1240,23 @@
}
void RenderWidgetHostViewAura::CreateBrowserAccessibilityManagerIfNeeded() {
- if (GetBrowserAccessibilityManager())
- return;
-
- BrowserAccessibilityManager* manager = NULL;
#if defined(OS_WIN)
- aura::WindowTreeHost* host = window_->GetHost();
- if (!host)
- return;
- HWND hwnd = host->GetAcceleratedWidget();
-
- // The accessible_parent may be NULL at this point. The WebContents will pass
- // it down to this instance (by way of the RenderViewHost and
- // RenderWidgetHost) when it is known. This instance will then set it on its
- // BrowserAccessibilityManager.
- gfx::NativeViewAccessible accessible_parent =
- host_->GetParentNativeViewAccessible();
-
- if (legacy_render_widget_host_HWND_) {
- manager = new BrowserAccessibilityManagerWin(
+ if (!GetBrowserAccessibilityManager()) {
+ gfx::NativeViewAccessible accessible_parent =
+ host_->GetParentNativeViewAccessible();
+ LegacyRenderWidgetHostHWND* parent_hwnd =
+ legacy_render_widget_host_HWND_.get();
+ SetBrowserAccessibilityManager(new BrowserAccessibilityManagerWin(
legacy_render_widget_host_HWND_.get(), accessible_parent,
- BrowserAccessibilityManagerWin::GetEmptyDocument(), host_);
+ BrowserAccessibilityManagerWin::GetEmptyDocument(), host_));
}
#else
- manager = BrowserAccessibilityManager::Create(
- BrowserAccessibilityManager::GetEmptyDocument(), host_);
+ if (!GetBrowserAccessibilityManager()) {
+ SetBrowserAccessibilityManager(
+ BrowserAccessibilityManager::Create(
+ BrowserAccessibilityManager::GetEmptyDocument(), host_));
+ }
#endif
- SetBrowserAccessibilityManager(manager);
}
gfx::GLSurfaceHandle RenderWidgetHostViewAura::GetCompositingSurface() {
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 7cd0423..8eab68b 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -35,6 +35,8 @@
#include "ui/wm/public/activation_change_observer.h"
#include "ui/wm/public/activation_delegate.h"
+struct ViewHostMsg_TextInputState_Params;
+
namespace aura {
class WindowTracker;
namespace client {
@@ -129,7 +131,6 @@
explicit RenderWidgetHostViewAura(RenderWidgetHost* host);
// RenderWidgetHostView implementation.
- virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE;
virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE;
virtual void SetSize(const gfx::Size& size) OVERRIDE;
@@ -161,9 +162,8 @@
virtual void Blur() OVERRIDE;
virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE;
virtual void SetIsLoading(bool is_loading) OVERRIDE;
- virtual void TextInputTypeChanged(ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline) OVERRIDE;
+ virtual void TextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params) OVERRIDE;
virtual void ImeCancelComposition() OVERRIDE;
virtual void ImeCompositionRangeChanged(
const gfx::Range& range,
@@ -215,8 +215,6 @@
InputEventAckState ack_result) OVERRIDE;
virtual scoped_ptr<SyntheticGestureTarget> CreateSyntheticGestureTarget()
OVERRIDE;
- virtual void SetScrollOffsetPinning(
- bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE;
virtual InputEventAckState FilterInputEvent(
const blink::WebInputEvent& input_event) OVERRIDE;
virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
@@ -317,8 +315,6 @@
virtual void OnHostMoved(const aura::WindowTreeHost* host,
const gfx::Point& new_origin) OVERRIDE;
- void OnTextInputStateChanged(const ViewHostMsg_TextInputState_Params& params);
-
#if defined(OS_WIN)
// Sets the cutout rects from constrained windows. These are rectangles that
// windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout
@@ -352,6 +348,8 @@
private:
FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SetCompositionText);
FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventState);
+ FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
+ TouchEventPositionsArentRounded);
FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventSyncAsync);
FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SwapNotifiesWindow);
FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
@@ -424,8 +422,6 @@
virtual RenderWidgetHostImpl* GetHost() OVERRIDE;
virtual void SchedulePaintInRect(
const gfx::Rect& damage_rect_in_dip) OVERRIDE;
- virtual void DelegatedCompositorDidSwapBuffers() OVERRIDE {}
- virtual void DelegatedCompositorAbortedSwapBuffers() OVERRIDE {}
virtual bool IsVisible() OVERRIDE;
virtual scoped_ptr<ResizeLock> CreateResizeLock(
bool defer_compositor_lock) OVERRIDE;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
index d871154..1844246 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -1724,11 +1724,6 @@
EXPECT_TRUE(view_->last_copy_request_->has_texture_mailbox());
request = view_->last_copy_request_.Pass();
- // There should be one subscriber texture in flight.
- EXPECT_EQ(1u,
- view_->GetDelegatedFrameHost()->
- active_frame_subscriber_textures_.size());
-
// Send back the mailbox included in the request. There's no release callback
// since the mailbox came from the RWHVA originally.
request->SendTextureResult(view_rect.size(),
@@ -1739,9 +1734,6 @@
run_loop.Run();
// The callback should succeed.
- EXPECT_EQ(0u,
- view_->GetDelegatedFrameHost()->
- active_frame_subscriber_textures_.size());
EXPECT_EQ(1, callback_count_);
EXPECT_TRUE(result_);
@@ -1751,11 +1743,6 @@
EXPECT_EQ(1, callback_count_);
request = view_->last_copy_request_.Pass();
- // There should be one subscriber texture in flight again.
- EXPECT_EQ(1u,
- view_->GetDelegatedFrameHost()->
- active_frame_subscriber_textures_.size());
-
// Destroy the RenderWidgetHostViewAura and ImageTransportFactory.
TearDownEnvironment();
@@ -1802,6 +1789,31 @@
EXPECT_EQ(60, params.a.visible_viewport_size.height());
}
+// Ensures that touch event positions are never truncated to integers.
+TEST_F(RenderWidgetHostViewAuraTest, TouchEventPositionsArentRounded) {
+ const float kX = 30.58f;
+ const float kY = 50.23f;
+
+ view_->InitAsChild(NULL);
+ view_->Show();
+
+ ui::TouchEvent press(ui::ET_TOUCH_PRESSED,
+ gfx::PointF(kX, kY),
+ 0,
+ ui::EventTimeForNow());
+
+ view_->OnTouchEvent(&press);
+ EXPECT_EQ(blink::WebInputEvent::TouchStart, view_->touch_event_.type);
+ EXPECT_TRUE(view_->touch_event_.cancelable);
+ EXPECT_EQ(1U, view_->touch_event_.touchesLength);
+ EXPECT_EQ(blink::WebTouchPoint::StatePressed,
+ view_->touch_event_.touches[0].state);
+ EXPECT_EQ(kX, view_->touch_event_.touches[0].screenPosition.x);
+ EXPECT_EQ(kX, view_->touch_event_.touches[0].position.x);
+ EXPECT_EQ(kY, view_->touch_event_.touches[0].screenPosition.y);
+ EXPECT_EQ(kY, view_->touch_event_.touches[0].position.y);
+}
+
// Tests that scroll ACKs are correctly handled by the overscroll-navigation
// controller.
TEST_F(RenderWidgetHostViewAuraOverscrollTest, WheelScrollEventOverscrolls) {
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index f8b1512..9bf2e60 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -37,8 +37,8 @@
struct AccessibilityHostMsg_EventParams;
struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params;
-struct ViewHostMsg_TextInputState_Params;
struct ViewHostMsg_SelectionBounds_Params;
+struct ViewHostMsg_TextInputState_Params;
namespace media {
class VideoFrame;
@@ -219,9 +219,8 @@
virtual void SetIsLoading(bool is_loading) = 0;
// Updates the type of the input method attached to the view.
- virtual void TextInputTypeChanged(ui::TextInputType type,
- ui::TextInputMode mode,
- bool can_compose_inline) = 0;
+ virtual void TextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params) = 0;
// Cancel the ongoing composition of the input method attached to the view.
virtual void ImeCancelComposition() = 0;
@@ -316,8 +315,9 @@
virtual gfx::GLSurfaceHandle GetCompositingSurface() = 0;
- virtual void SetScrollOffsetPinning(
- bool is_pinned_to_left, bool is_pinned_to_right) = 0;
+ virtual void OnTextSurroundingSelectionResponse(const base::string16& content,
+ size_t start_offset,
+ size_t end_offset) {};
#if defined(OS_ANDROID)
virtual void ShowDisambiguationPopup(const gfx::Rect& target_rect,
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 1817841..b370e02 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
#import <Cocoa/Cocoa.h>
+#include <IOSurface/IOSurfaceAPI.h>
#include <list>
#include <map>
#include <string>
@@ -30,6 +31,8 @@
#include "third_party/WebKit/public/web/WebCompositionUnderline.h"
#include "ui/base/cocoa/base_view.h"
+struct ViewHostMsg_TextInputState_Params;
+
namespace content {
class CompositingIOSurfaceMac;
class CompositingIOSurfaceContext;
@@ -214,7 +217,6 @@
public DelegatedFrameHostClient,
public IPC::Sender,
public SoftwareFrameManagerClient,
- public BrowserCompositorViewMacClient,
public CompositingIOSurfaceLayerClient {
public:
// The view will associate itself with the given widget. The native view must
@@ -272,9 +274,8 @@
virtual void Blur() OVERRIDE;
virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE;
virtual void SetIsLoading(bool is_loading) OVERRIDE;
- virtual void TextInputTypeChanged(ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline) OVERRIDE;
+ virtual void TextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params) OVERRIDE;
virtual void ImeCancelComposition() OVERRIDE;
virtual void ImeCompositionRangeChanged(
const gfx::Range& range,
@@ -328,8 +329,6 @@
virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE;
virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
- virtual void SetScrollOffsetPinning(
- bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE;
virtual bool LockMouse() OVERRIDE;
virtual void UnlockMouse() OVERRIDE;
virtual void WheelEventAck(const blink::WebMouseWheelEvent& event,
@@ -345,9 +344,6 @@
virtual SkBitmap::Config PreferredReadbackFormat() OVERRIDE;
- // BrowserCompositorViewMacHelper implementation.
- virtual void BrowserCompositorDidDrawFrame() OVERRIDE;
-
// CompositingIOSurfaceLayerClient implementation.
virtual void AcceleratedLayerDidDrawFrame(bool succeeded) OVERRIDE;
@@ -365,14 +361,11 @@
// Update the IOSurface to be drawn and call setNeedsDisplay on
// |cocoa_view_|.
- void CompositorSwapBuffers(uint64 surface_handle,
+ void CompositorSwapBuffers(IOSurfaceID surface_handle,
const gfx::Size& size,
float scale_factor,
const std::vector<ui::LatencyInfo>& latency_info);
- // Draw the IOSurface by making its context current to this view.
- void DrawIOSurfaceWithoutCoreAnimation();
-
// Called when a GPU error is detected. Posts a task to destroy all
// compositing state.
void GotAcceleratedCompositingError();
@@ -419,17 +412,6 @@
// someone (other than superview) has retained |cocoa_view_|.
RenderWidgetHostImpl* render_widget_host_;
- // Whether last rendered frame was accelerated.
- bool last_frame_was_accelerated_;
-
- // The time at which this view started displaying white pixels as a result of
- // not having anything to paint (empty backing store from renderer). This
- // value returns true for is_null() if we are not recording whiteout times.
- base::TimeTicks whiteout_start_time_;
-
- // The time it took after this view was selected for it to be fully painted.
- base::TimeTicks web_contents_switch_paint_time_;
-
// Current text input type.
ui::TextInputType text_input_type_;
bool can_compose_inline_;
@@ -453,21 +435,9 @@
scoped_ptr<DelegatedFrameHost> delegated_frame_host_;
scoped_ptr<ui::Layer> root_layer_;
- // This lock is taken when the browser compositor produces a frame, and is
- // released when that frame is displayed. It is by this mechanism that the
- // browser compositor can exert GPU backpressure on the renderer compositor.
- scoped_refptr<ui::CompositorLock> browser_compositor_lock_;
- bool browser_compositor_damaged_during_lock_;
-
// This holds the current software compositing framebuffer, if any.
scoped_ptr<SoftwareFrameManager> software_frame_manager_;
- // Whether to allow overlapping views.
- bool allow_overlapping_views_;
-
- // Whether to use the CoreAnimation path to draw content.
- bool use_core_animation_;
-
// Latency info to send back when the next frame appears on the
// screen.
std::vector<ui::LatencyInfo> pending_latency_info_;
@@ -529,8 +499,6 @@
virtual RenderWidgetHostImpl* GetHost() OVERRIDE;
virtual void SchedulePaintInRect(
const gfx::Rect& damage_rect_in_dip) OVERRIDE;
- virtual void DelegatedCompositorDidSwapBuffers() OVERRIDE;
- virtual void DelegatedCompositorAbortedSwapBuffers() OVERRIDE;
virtual bool IsVisible() OVERRIDE;
virtual scoped_ptr<ResizeLock> CreateResizeLock(
bool defer_compositor_lock) OVERRIDE;
@@ -572,18 +540,10 @@
};
void DestroyCompositedIOSurfaceLayer(
DestroyCompositedIOSurfaceLayerBehavior destroy_layer_behavior);
- enum DestroyContextBehavior {
- kLeaveContextBoundToView,
- kDestroyContext,
- };
- void DestroyCompositedIOSurfaceAndLayer(
- DestroyContextBehavior destroy_context_behavior);
+ void DestroyCompositedIOSurfaceAndLayer();
void DestroyCompositingStateOnError();
- // Unbind the GL context (if any) that is bound to |cocoa_view_|.
- void ClearBoundContextDrawable();
-
// Called when a GPU SwapBuffers is received.
void GotAcceleratedFrame();
@@ -593,8 +553,6 @@
// IPC message handlers.
void OnPluginFocusChanged(bool focused, int plugin_id);
void OnStartPluginIme();
- void OnDidChangeScrollbarsForMainFrame(bool has_horizontal_scrollbar,
- bool has_vertical_scrollbar);
// Convert |rect| from the views coordinate (upper-left origin) into
// the OpenGL coordinate (lower-left origin) and scale for HiDPI displays.
@@ -603,12 +561,6 @@
// Send updated vsync parameters to the renderer.
void SendVSyncParametersToRenderer();
- // Release the browser compositor lock, and request another frame from the
- // browser compositor. Because this can be requested from inside compositor
- // calbacks, post it as task instead of calling it directly.
- void PostReleaseBrowserCompositorLock();
- void ReleaseBrowserCompositorLock();
-
// The associated view. This is weak and is inserted into the view hierarchy
// to own this RenderWidgetHostViewMac object. Set to nil at the start of the
// destructor.
@@ -640,18 +592,11 @@
// Overlay view has |underlay_view_| set to this view.
base::WeakPtr<RenderWidgetHostViewMac> overlay_view_;
- // Offset at which overlay view should be rendered.
- gfx::Point overlay_view_offset_;
-
// The underlay view which this view is rendered above in the same
// accelerated IOSurface.
// Underlay view has |overlay_view_| set to this view.
base::WeakPtr<RenderWidgetHostViewMac> underlay_view_;
- // Set to true when |underlay_view_| has drawn this view. After that point,
- // this view should not draw again until |underlay_view_| is changed.
- bool underlay_view_has_drawn_;
-
// Factory used to safely reference overlay view set in SetOverlayView.
base::WeakPtrFactory<RenderWidgetHostViewMac>
overlay_view_weak_factory_;
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index f5868fd..38fb478 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -5,6 +5,7 @@
#include "content/browser/renderer_host/render_widget_host_view_mac.h"
#import <objc/runtime.h>
+#include <OpenGL/gl.h>
#include <QuartzCore/QuartzCore.h>
#include "base/basictypes.h"
@@ -142,13 +143,9 @@
- (void)processedWheelEvent:(const blink::WebMouseWheelEvent&)event
consumed:(BOOL)consumed;
-- (void)scrollOffsetPinnedToLeft:(BOOL)left toRight:(BOOL)right;
-- (void)setHasHorizontalScrollbar:(BOOL)has_horizontal_scrollbar;
- (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv;
- (void)windowDidChangeBackingProperties:(NSNotification*)notification;
- (void)windowChangedGlobalFrame:(NSNotification*)notification;
-- (void)drawWithDirtyRect:(CGRect)dirtyRect
- inContext:(CGContextRef)context;
- (void)checkForPluginImeCancellation;
- (void)updateScreenProperties;
- (void)setResponderDelegate:
@@ -190,8 +187,6 @@
styleMask:windowStyle
backing:bufferingType
defer:deferCreation]) {
- DCHECK_EQ(content::CORE_ANIMATION_DISABLED,
- content::GetCoreAnimationStatus());
[self setOpaque:NO];
[self setBackgroundColor:[NSColor clearColor]];
[self startObservingClicks];
@@ -408,30 +403,7 @@
void RenderWidgetHostViewMac::SchedulePaintInRect(
const gfx::Rect& damage_rect_in_dip) {
- if (browser_compositor_lock_)
- browser_compositor_damaged_during_lock_ = true;
- else
- [browser_compositor_view_ compositor]->ScheduleFullRedraw();
-}
-
-void RenderWidgetHostViewMac::DelegatedCompositorDidSwapBuffers() {
- // If this view is not visible then do not lock the compositor, because the
- // wait for the surface to be drawn will time out.
- NSWindow* window = [cocoa_view_ window];
- if (!window)
- return;
- if (window && [window respondsToSelector:@selector(occlusionState)]) {
- bool window_is_occluded =
- !([window occlusionState] & NSWindowOcclusionStateVisible);
- if (window_is_occluded)
- return;
- }
- browser_compositor_lock_ =
- [browser_compositor_view_ compositor]->GetCompositorLock();
-}
-
-void RenderWidgetHostViewMac::DelegatedCompositorAbortedSwapBuffers() {
- PostReleaseBrowserCompositorLock();
+ [browser_compositor_view_ compositor]->ScheduleFullRedraw();
}
bool RenderWidgetHostViewMac::IsVisible() {
@@ -477,18 +449,14 @@
RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget)
: render_widget_host_(RenderWidgetHostImpl::From(widget)),
- last_frame_was_accelerated_(false),
text_input_type_(ui::TEXT_INPUT_TYPE_NONE),
can_compose_inline_(true),
- allow_overlapping_views_(false),
- use_core_animation_(false),
pending_latency_info_delay_(0),
pending_latency_info_delay_weak_ptr_factory_(this),
backing_store_scale_factor_(1),
is_loading_(false),
weak_factory_(this),
fullscreen_parent_host_view_(NULL),
- underlay_view_has_drawn_(false),
overlay_view_weak_factory_(this),
software_frame_weak_ptr_factory_(this) {
software_frame_manager_.reset(new SoftwareFrameManager(
@@ -499,14 +467,11 @@
cocoa_view_ = [[[RenderWidgetHostViewCocoa alloc]
initWithRenderWidgetHostViewMac:this] autorelease];
- if (GetCoreAnimationStatus() == CORE_ANIMATION_ENABLED) {
- use_core_animation_ = true;
- background_layer_.reset([[CALayer alloc] init]);
- [background_layer_
- setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)];
- [cocoa_view_ setLayer:background_layer_];
- [cocoa_view_ setWantsLayer:YES];
- }
+ background_layer_.reset([[CALayer alloc] init]);
+ [background_layer_
+ setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)];
+ [cocoa_view_ setLayer:background_layer_];
+ [cocoa_view_ setWantsLayer:YES];
render_widget_host_->SetView(this);
}
@@ -519,7 +484,7 @@
UnlockMouse();
// Make sure that the layer doesn't reach into the now-invalid object.
- DestroyCompositedIOSurfaceAndLayer(kDestroyContext);
+ DestroyCompositedIOSurfaceAndLayer();
DestroySoftwareLayer();
// We are owned by RenderWidgetHostViewCocoa, so if we go away before the
@@ -535,11 +500,7 @@
}
void RenderWidgetHostViewMac::SetAllowOverlappingViews(bool overlapping) {
- if (allow_overlapping_views_ == overlapping)
- return;
- allow_overlapping_views_ = overlapping;
- [cocoa_view_ setNeedsDisplay:YES];
- [[cocoa_view_ window] disableScreenUpdatesUntilFlush];
+ // TODO(ccameron): Remove callers of this function.
}
///////////////////////////////////////////////////////////////////////////////
@@ -561,9 +522,8 @@
return false;
}
- int current_window_number = use_core_animation_ ?
- CompositingIOSurfaceContext::kOffscreenContextWindowNumber :
- window_number();
+ int current_window_number =
+ CompositingIOSurfaceContext::kOffscreenContextWindowNumber;
bool new_surface_needed = !compositing_iosurface_;
bool new_context_needed =
!compositing_iosurface_context_ ||
@@ -582,7 +542,6 @@
// context. Having two GL contexts bound to a view will result in
// crashes and corruption.
// http://crbug.com/230883
- ClearBoundContextDrawable();
if (!new_context) {
LOG(ERROR) << "Failed to create CompositingIOSurfaceContext";
return false;
@@ -604,7 +563,7 @@
void RenderWidgetHostViewMac::EnsureSoftwareLayer() {
TRACE_EVENT0("browser", "RenderWidgetHostViewMac::EnsureSoftwareLayer");
- if (software_layer_ || !use_core_animation_)
+ if (software_layer_)
return;
software_layer_.reset([[SoftwareLayer alloc] init]);
@@ -629,7 +588,7 @@
TRACE_EVENT0("browser",
"RenderWidgetHostViewMac::EnsureCompositedIOSurfaceLayer");
DCHECK(compositing_iosurface_context_);
- if (compositing_iosurface_layer_ || !use_core_animation_)
+ if (compositing_iosurface_layer_)
return;
compositing_iosurface_layer_.reset([[CompositingIOSurfaceLayer alloc]
@@ -657,40 +616,13 @@
compositing_iosurface_layer_.reset();
}
-void RenderWidgetHostViewMac::DestroyCompositedIOSurfaceAndLayer(
- DestroyContextBehavior destroy_context_behavior) {
+void RenderWidgetHostViewMac::DestroyCompositedIOSurfaceAndLayer() {
// Any pending frames will not be displayed, so ack them now.
SendPendingSwapAck();
DestroyCompositedIOSurfaceLayer(kRemoveLayerFromHierarchy);
compositing_iosurface_ = NULL;
-
- switch (destroy_context_behavior) {
- case kLeaveContextBoundToView:
- break;
- case kDestroyContext:
- ClearBoundContextDrawable();
- compositing_iosurface_context_ = NULL;
- break;
- default:
- NOTREACHED();
- break;
- }
-}
-
-void RenderWidgetHostViewMac::ClearBoundContextDrawable() {
- if (use_core_animation_)
- return;
-
- if (compositing_iosurface_context_ &&
- cocoa_view_ &&
- [[compositing_iosurface_context_->nsgl_context() view]
- isEqual:cocoa_view_]) {
- // Disable screen updates because removing the GL context from below can
- // cause flashes.
- [[cocoa_view_ window] disableScreenUpdatesUntilFlush];
- [compositing_iosurface_context_->nsgl_context() clearDrawable];
- }
+ compositing_iosurface_context_ = NULL;
}
bool RenderWidgetHostViewMac::OnMessageReceived(const IPC::Message& message) {
@@ -698,8 +630,6 @@
IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostViewMac, message)
IPC_MESSAGE_HANDLER(ViewHostMsg_PluginFocusChanged, OnPluginFocusChanged)
IPC_MESSAGE_HANDLER(ViewHostMsg_StartPluginIme, OnStartPluginIme)
- IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollbarsForMainFrame,
- OnDidChangeScrollbarsForMainFrame)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -827,23 +757,6 @@
}
}
-void RenderWidgetHostViewMac::PostReleaseBrowserCompositorLock() {
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(&RenderWidgetHostViewMac::ReleaseBrowserCompositorLock,
- weak_factory_.GetWeakPtr()));
-}
-
-void RenderWidgetHostViewMac::ReleaseBrowserCompositorLock() {
- if (!browser_compositor_view_)
- return;
-
- browser_compositor_lock_ = NULL;
- if (browser_compositor_damaged_during_lock_) {
- browser_compositor_damaged_during_lock_ = false;
- [browser_compositor_view_ compositor]->ScheduleFullRedraw();
- }
-}
-
void RenderWidgetHostViewMac::SendVSyncParametersToRenderer() {
if (!render_widget_host_ || !display_link_)
return;
@@ -876,8 +789,6 @@
if (!render_widget_host_->is_hidden())
return;
- if (web_contents_switch_paint_time_.is_null())
- web_contents_switch_paint_time_ = base::TimeTicks::Now();
render_widget_host_->WasShown();
software_frame_manager_->SetVisibility(true);
if (delegated_frame_host_)
@@ -887,10 +798,6 @@
// do, and are drawn, then the needsDisplay bit will be cleared.
[compositing_iosurface_layer_ setNeedsDisplay];
PauseForPendingResizeOrRepaintsAndDraw();
-
- // We're messing with the window, so do this to ensure no flashes.
- if (!use_core_animation_)
- [[cocoa_view_ window] disableScreenUpdatesUntilFlush];
}
void RenderWidgetHostViewMac::WasHidden() {
@@ -900,7 +807,6 @@
// Any pending frames will not be displayed until this is shown again. Ack
// them now.
SendPendingSwapAck();
- PostReleaseBrowserCompositorLock();
// If we have a renderer, then inform it that we are being hidden so it can
// reduce its resource utilization.
@@ -908,16 +814,6 @@
software_frame_manager_->SetVisibility(false);
if (delegated_frame_host_)
delegated_frame_host_->WasHidden();
-
- // There can be a transparent flash as this view is removed and the next is
- // added, because of OSX windowing races between displaying the contents of
- // the NSView and its corresponding OpenGL context.
- // disableScreenUpdatesUntilFlush prevents the transparent flash by avoiding
- // screen updates until the next tab draws.
- if (!use_core_animation_)
- [[cocoa_view_ window] disableScreenUpdatesUntilFlush];
-
- web_contents_switch_paint_time_ = base::TimeTicks();
}
void RenderWidgetHostViewMac::SetSize(const gfx::Size& size) {
@@ -1023,10 +919,6 @@
}
void RenderWidgetHostViewMac::Hide() {
- // We're messing with the window, so do this to ensure no flashes.
- if (!use_core_animation_)
- [[cocoa_view_ window] disableScreenUpdatesUntilFlush];
-
[cocoa_view_ setHidden:YES];
WasHidden();
@@ -1061,14 +953,12 @@
// like Chrome does on Windows, call |UpdateCursor()| here.
}
-void RenderWidgetHostViewMac::TextInputTypeChanged(
- ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline) {
- if (text_input_type_ != type
- || can_compose_inline_ != can_compose_inline) {
- text_input_type_ = type;
- can_compose_inline_ = can_compose_inline;
+void RenderWidgetHostViewMac::TextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params) {
+ if (text_input_type_ != params.type ||
+ can_compose_inline_ != params.can_compose_inline) {
+ text_input_type_ = params.type;
+ can_compose_inline_ = params.can_compose_inline;
if (HasFocus()) {
SetTextInputActive(true);
@@ -1127,7 +1017,6 @@
// Delete the delegated frame state, which will reach back into
// render_widget_host_.
- browser_compositor_lock_ = NULL;
[browser_compositor_view_ resetClient];
delegated_frame_host_.reset();
root_layer_.reset();
@@ -1435,7 +1324,7 @@
}
void RenderWidgetHostViewMac::CompositorSwapBuffers(
- uint64 surface_handle,
+ IOSurfaceID surface_handle,
const gfx::Size& size,
float surface_scale_factor,
const std::vector<ui::LatencyInfo>& latency_info) {
@@ -1466,7 +1355,7 @@
scoped_layer_remover.Reset(
base::Bind(RemoveLayerFromSuperlayer, compositing_iosurface_layer_));
DestroyCompositedIOSurfaceLayer(kLeaveLayerInHierarchy);
- DestroyCompositedIOSurfaceAndLayer(kDestroyContext);
+ DestroyCompositedIOSurfaceAndLayer();
}
// Ensure compositing_iosurface_ and compositing_iosurface_context_ be
@@ -1575,14 +1464,8 @@
// If we reach here, then the frame will be displayed by a future draw
// call, so don't make the callback.
ignore_result(scoped_ack.Release());
- if (use_core_animation_) {
- DCHECK(compositing_iosurface_layer_);
- [compositing_iosurface_layer_ gotNewFrame];
- } else {
- gfx::ScopedCGLSetCurrentContext scoped_set_current_context(
- compositing_iosurface_context_->cgl_context());
- DrawIOSurfaceWithoutCoreAnimation();
- }
+ DCHECK(compositing_iosurface_layer_);
+ [compositing_iosurface_layer_ gotNewFrame];
// Try to finish previous copy requests after draw to get better pipelining.
if (compositing_iosurface_)
@@ -1593,72 +1476,6 @@
LayoutLayers();
}
-void RenderWidgetHostViewMac::DrawIOSurfaceWithoutCoreAnimation() {
- CHECK(!use_core_animation_);
- CHECK(compositing_iosurface_);
-
- // If there is a pending frame, it should be acked by the end of this
- // function. Note that the ack should happen only after all drawing is
- // complete, so that the ack happens after any blocking due to vsync.
- base::ScopedClosureRunner scoped_ack(
- base::Bind(&RenderWidgetHostViewMac::SendPendingSwapAck,
- weak_factory_.GetWeakPtr()));
-
- GLint old_gl_surface_order = 0;
- GLint new_gl_surface_order = allow_overlapping_views_ ? -1 : 1;
- [compositing_iosurface_context_->nsgl_context()
- getValues:&old_gl_surface_order
- forParameter:NSOpenGLCPSurfaceOrder];
- if (old_gl_surface_order != new_gl_surface_order) {
- [compositing_iosurface_context_->nsgl_context()
- setValues:&new_gl_surface_order
- forParameter:NSOpenGLCPSurfaceOrder];
- }
-
- // Instead of drawing, request that underlay view redraws.
- if (underlay_view_ &&
- underlay_view_->compositing_iosurface_ &&
- underlay_view_has_drawn_) {
- [underlay_view_->cocoa_view() setNeedsDisplayInRect:NSMakeRect(0, 0, 1, 1)];
- return;
- }
-
- bool has_overlay = overlay_view_ && overlay_view_->compositing_iosurface_;
- if (has_overlay) {
- // Un-bind the overlay view's OpenGL context, since its content will be
- // drawn by this context. Not doing this can result in corruption.
- // http://crbug.com/330701
- overlay_view_->ClearBoundContextDrawable();
- }
- [compositing_iosurface_context_->nsgl_context() setView:cocoa_view_];
-
- gfx::Rect view_rect(NSRectToCGRect([cocoa_view_ frame]));
- if (!compositing_iosurface_->DrawIOSurface(
- compositing_iosurface_context_, view_rect,
- ViewScaleFactor(), !has_overlay)) {
- GotAcceleratedCompositingError();
- return;
- }
-
- if (has_overlay) {
- overlay_view_->underlay_view_has_drawn_ = true;
- gfx::Rect overlay_view_rect(
- NSRectToCGRect([overlay_view_->cocoa_view() frame]));
- overlay_view_rect.set_x(overlay_view_offset_.x());
- overlay_view_rect.set_y(view_rect.height() -
- overlay_view_rect.height() -
- overlay_view_offset_.y());
- if (!overlay_view_->compositing_iosurface_->DrawIOSurface(
- compositing_iosurface_context_, overlay_view_rect,
- overlay_view_->ViewScaleFactor(), true)) {
- GotAcceleratedCompositingError();
- return;
- }
- }
-
- SendPendingLatencyInfoToHost();
-}
-
void RenderWidgetHostViewMac::GotAcceleratedCompositingError() {
LOG(ERROR) << "Encountered accelerated compositing error";
base::MessageLoop::current()->PostTask(
@@ -1677,17 +1494,13 @@
if (compositing_iosurface_context_)
compositing_iosurface_context_->PoisonContextAndSharegroup();
- DestroyCompositedIOSurfaceAndLayer(kDestroyContext);
+ DestroyCompositedIOSurfaceAndLayer();
// Request that a new frame be generated and dirty the view.
if (render_widget_host_)
render_widget_host_->ScheduleComposite();
[cocoa_view_ setNeedsDisplay:YES];
- // Mark the last frame as not accelerated (so that the window is prepared for
- // an underlay next time an accelerated frame comes in).
- last_frame_was_accelerated_ = false;
-
// TODO(ccameron): It may be a good idea to request that the renderer recreate
// its GL context as well, and fall back to software if this happens
// repeatedly.
@@ -1700,14 +1513,6 @@
overlay_view_ = overlay->overlay_view_weak_factory_.GetWeakPtr();
overlay_view_->underlay_view_ = overlay_view_weak_factory_.GetWeakPtr();
- if (use_core_animation_)
- return;
-
- overlay_view_offset_ = offset;
- overlay_view_->underlay_view_has_drawn_ = false;
-
- [cocoa_view_ setNeedsDisplay:YES];
- [[cocoa_view_ window] disableScreenUpdatesUntilFlush];
}
void RenderWidgetHostViewMac::RemoveOverlayView() {
@@ -1715,11 +1520,6 @@
overlay_view_->underlay_view_.reset();
overlay_view_.reset();
}
- if (use_core_animation_)
- return;
-
- [cocoa_view_ setNeedsDisplay:YES];
- [[cocoa_view_ window] disableScreenUpdatesUntilFlush];
}
bool RenderWidgetHostViewMac::GetLineBreakIndex(
@@ -1862,11 +1662,13 @@
"RenderWidgetHostViewMac::AcceleratedSurfaceBuffersSwapped");
DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ IOSurfaceID io_surface_handle =
+ static_cast<IOSurfaceID>(params.surface_handle);
AddPendingSwapAck(params.route_id,
gpu_host_id,
compositing_iosurface_ ?
compositing_iosurface_->GetRendererID() : 0);
- CompositorSwapBuffers(params.surface_handle,
+ CompositorSwapBuffers(io_surface_handle,
params.size,
params.scale_factor,
params.latency_info);
@@ -1879,11 +1681,13 @@
"RenderWidgetHostViewMac::AcceleratedSurfacePostSubBuffer");
DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ IOSurfaceID io_surface_handle =
+ static_cast<IOSurfaceID>(params.surface_handle);
AddPendingSwapAck(params.route_id,
gpu_host_id,
compositing_iosurface_ ?
compositing_iosurface_->GetRendererID() : 0);
- CompositorSwapBuffers(params.surface_handle,
+ CompositorSwapBuffers(io_surface_handle,
params.surface_size,
params.surface_scale_factor,
params.latency_info);
@@ -1895,21 +1699,20 @@
}
void RenderWidgetHostViewMac::AcceleratedSurfaceRelease() {
- DestroyCompositedIOSurfaceAndLayer(kDestroyContext);
+ DestroyCompositedIOSurfaceAndLayer();
}
bool RenderWidgetHostViewMac::HasAcceleratedSurface(
const gfx::Size& desired_size) {
- if (last_frame_was_accelerated_) {
- return compositing_iosurface_ &&
- compositing_iosurface_->HasIOSurface() &&
+ if (compositing_iosurface_) {
+ return compositing_iosurface_->HasIOSurface() &&
(desired_size.IsEmpty() ||
compositing_iosurface_->dip_io_surface_size() == desired_size);
- } else {
- return (software_frame_manager_->HasCurrentFrame() &&
- (desired_size.IsEmpty() ||
+ }
+ if (software_frame_manager_->HasCurrentFrame()) {
+ return (desired_size.IsEmpty() ||
software_frame_manager_->GetCurrentFrameSizeInDIP() ==
- desired_size));
+ desired_size);
}
return false;
}
@@ -1920,8 +1723,8 @@
if (frame->delegated_frame_data) {
if (!browser_compositor_view_) {
- browser_compositor_view_.reset([[BrowserCompositorViewMac alloc]
- initWithSuperview:cocoa_view_ withClient:this]);
+ browser_compositor_view_.reset(
+ [[BrowserCompositorViewMac alloc] initWithSuperview:cocoa_view_]);
root_layer_.reset(new ui::Layer(ui::LAYER_TEXTURED));
delegated_frame_host_.reset(new DelegatedFrameHost(this));
[browser_compositor_view_ compositor]->SetRootLayer(root_layer_.get());
@@ -1953,21 +1756,19 @@
// Add latency info to report when the frame finishes drawing.
AddPendingLatencyInfo(frame->metadata.latency_info);
- if (use_core_animation_) {
- const void* pixels = software_frame_manager_->GetCurrentFramePixels();
- gfx::Size size_in_pixels =
- software_frame_manager_->GetCurrentFrameSizeInPixels();
+ const void* pixels = software_frame_manager_->GetCurrentFramePixels();
+ gfx::Size size_in_pixels =
+ software_frame_manager_->GetCurrentFrameSizeInPixels();
- EnsureSoftwareLayer();
- [software_layer_ setContentsToData:pixels
- withRowBytes:4 * size_in_pixels.width()
- withPixelSize:size_in_pixels
- withScaleFactor:frame->metadata.device_scale_factor];
+ EnsureSoftwareLayer();
+ [software_layer_ setContentsToData:pixels
+ withRowBytes:4 * size_in_pixels.width()
+ withPixelSize:size_in_pixels
+ withScaleFactor:frame->metadata.device_scale_factor];
- // Send latency information to the host immediately, as there will be no
- // subsequent draw call in which to do so.
- SendPendingLatencyInfoToHost();
- }
+ // Send latency information to the host immediately, as there will be no
+ // subsequent draw call in which to do so.
+ SendPendingLatencyInfoToHost();
GotSoftwareFrame();
@@ -2020,12 +1821,6 @@
return gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::NATIVE_TRANSPORT);
}
-void RenderWidgetHostViewMac::SetScrollOffsetPinning(
- bool is_pinned_to_left, bool is_pinned_to_right) {
- [cocoa_view_ scrollOffsetPinnedToLeft:is_pinned_to_left
- toRight:is_pinned_to_right];
-}
-
bool RenderWidgetHostViewMac::LockMouse() {
if (mouse_locked_)
return true;
@@ -2098,19 +1893,10 @@
void RenderWidgetHostViewMac::GotAcceleratedFrame() {
EnsureCompositedIOSurfaceLayer();
SendVSyncParametersToRenderer();
- if (!last_frame_was_accelerated_) {
- last_frame_was_accelerated_ = true;
- if (!use_core_animation_) {
- // Need to wipe the software view with transparency to expose the GL
- // underlay. Invalidate the whole window to do that.
- [cocoa_view_ setNeedsDisplay:YES];
- }
-
- // Delete software backingstore and layer.
- software_frame_manager_->DiscardCurrentFrame();
- DestroySoftwareLayer();
- }
+ // Delete software backingstore and layer.
+ software_frame_manager_->DiscardCurrentFrame();
+ DestroySoftwareLayer();
}
void RenderWidgetHostViewMac::GotSoftwareFrame() {
@@ -2126,34 +1912,9 @@
// Draw the contents of the frame immediately. It is critical that this
// happen before the frame be acked, otherwise the new frame will likely be
// ready before the drawing is complete, thrashing the browser main thread.
- if (use_core_animation_) {
- [software_layer_ displayIfNeeded];
- } else {
- [cocoa_view_ setNeedsDisplay:YES];
- [cocoa_view_ displayIfNeeded];
- }
+ [software_layer_ displayIfNeeded];
- if (last_frame_was_accelerated_) {
- last_frame_was_accelerated_ = false;
-
- // If overlapping views are allowed, then don't unbind the context
- // from the view (that is, don't call clearDrawble -- just delete the
- // texture and IOSurface). Rather, let it sit behind the software frame
- // that will be put up in front. This will prevent transparent
- // flashes.
- // http://crbug.com/154531
- // Also note that it is necessary that clearDrawable be called if
- // overlapping views are not allowed, e.g, for content shell.
- // http://crbug.com/178408
- // Disable screen updates so that the changes of flashes is minimized.
- // http://crbug.com/279472
- if (!use_core_animation_)
- [[cocoa_view_ window] disableScreenUpdatesUntilFlush];
- if (allow_overlapping_views_)
- DestroyCompositedIOSurfaceAndLayer(kLeaveContextBoundToView);
- else
- DestroyCompositedIOSurfaceAndLayer(kDestroyContext);
- }
+ DestroyCompositedIOSurfaceAndLayer();
}
void RenderWidgetHostViewMac::SetActive(bool active) {
@@ -2187,12 +1948,6 @@
render_widget_host_->GetRoutingID(), GetBoundsInRootWindow(),
GetViewBounds()));
}
-
- if (compositing_iosurface_ && !use_core_animation_) {
- // This will migrate the context to the appropriate window.
- if (!EnsureCompositedIOSurface())
- GotAcceleratedCompositingError();
- }
}
void RenderWidgetHostViewMac::ShowDefinitionForSelection() {
@@ -2292,11 +2047,6 @@
[cocoa_view_ setPluginImeActive:YES];
}
-void RenderWidgetHostViewMac::OnDidChangeScrollbarsForMainFrame(
- bool has_horizontal_scrollbar, bool has_vertical_scrollbar) {
- [cocoa_view_ setHasHorizontalScrollbar:has_horizontal_scrollbar];
-}
-
gfx::Rect RenderWidgetHostViewMac::GetScaledOpenGLPixelRect(
const gfx::Rect& rect) {
gfx::Rect src_gl_subrect = rect;
@@ -2311,29 +2061,27 @@
// If a screenshot is being taken when using CoreAnimation, send a few extra
// calls to setNeedsDisplay and wait for their resulting display calls,
// before reporting that the frame has reached the screen.
- if (use_core_animation_) {
- bool should_defer = false;
- for (size_t i = 0; i < latency_info.size(); i++) {
- if (latency_info[i].FindLatency(
- ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT,
- render_widget_host_->GetLatencyComponentId(),
- NULL)) {
- should_defer = true;
- }
+ bool should_defer = false;
+ for (size_t i = 0; i < latency_info.size(); i++) {
+ if (latency_info[i].FindLatency(
+ ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT,
+ render_widget_host_->GetLatencyComponentId(),
+ NULL)) {
+ should_defer = true;
}
- if (should_defer) {
- // Multiple pending screenshot requests will work, but if every frame
- // requests a screenshot, then the delay will never expire. Assert this
- // here to avoid this.
- CHECK_EQ(pending_latency_info_delay_, 0u);
- // Wait a fixed number of frames (calls to CALayer::display) before
- // claiming that the screenshot has reached the screen. This number
- // comes from taking the first number where tests didn't fail (six),
- // and doubling it.
- const uint32 kScreenshotLatencyDelayInFrames = 12;
- pending_latency_info_delay_ = kScreenshotLatencyDelayInFrames;
- TickPendingLatencyInfoDelay();
- }
+ }
+ if (should_defer) {
+ // Multiple pending screenshot requests will work, but if every frame
+ // requests a screenshot, then the delay will never expire. Assert this
+ // here to avoid this.
+ CHECK_EQ(pending_latency_info_delay_, 0u);
+ // Wait a fixed number of frames (calls to CALayer::display) before
+ // claiming that the screenshot has reached the screen. This number
+ // comes from taking the first number where tests didn't fail (six),
+ // and doubling it.
+ const uint32 kScreenshotLatencyDelayInFrames = 12;
+ pending_latency_info_delay_ = kScreenshotLatencyDelayInFrames;
+ TickPendingLatencyInfoDelay();
}
for (size_t i = 0; i < latency_info.size(); i++) {
@@ -2425,9 +2173,6 @@
}
void RenderWidgetHostViewMac::LayoutLayers() {
- if (!use_core_animation_)
- return;
-
if (browser_compositor_view_) {
[browser_compositor_view_ layoutLayers];
return;
@@ -2497,13 +2242,6 @@
}
////////////////////////////////////////////////////////////////////////////////
-// BrowserCompositorViewMacClient, public:
-
-void RenderWidgetHostViewMac::BrowserCompositorDidDrawFrame() {
- PostReleaseBrowserCompositorLock();
-}
-
-////////////////////////////////////////////////////////////////////////////////
// CompositingIOSurfaceLayerClient, public:
void RenderWidgetHostViewMac::AcceleratedLayerDidDrawFrame(bool succeeded) {
@@ -2546,11 +2284,6 @@
handlingGlobalFrameDidChange_ = NO;
[[NSNotificationCenter defaultCenter]
addObserver:self
- selector:@selector(globalFrameDidChange:)
- name:NSViewGlobalFrameDidChangeNotification
- object:self];
- [[NSNotificationCenter defaultCenter]
- addObserver:self
selector:@selector(didChangeScreenParameters:)
name:NSApplicationDidChangeScreenParametersNotification
object:nil];
@@ -2598,22 +2331,6 @@
[responderDelegate_ rendererHandledWheelEvent:event consumed:consumed];
}
-- (void)scrollOffsetPinnedToLeft:(BOOL)left toRight:(BOOL)right {
- if (responderDelegate_ &&
- [responderDelegate_
- respondsToSelector:@selector(scrollOffsetPinnedToLeft:toRight:)]) {
- [responderDelegate_ scrollOffsetPinnedToLeft:left toRight:right];
- }
-}
-
-- (void)setHasHorizontalScrollbar:(BOOL)has_horizontal_scrollbar {
- if (responderDelegate_ &&
- [responderDelegate_
- respondsToSelector:@selector(setHasHorizontalScrollbar:)]) {
- [responderDelegate_ setHasHorizontalScrollbar:has_horizontal_scrollbar];
- }
-}
-
- (BOOL)respondsToSelector:(SEL)selector {
// Trickiness: this doesn't mean "does this object's superclass respond to
// this selector" but rather "does the -respondsToSelector impl from the
@@ -3182,11 +2899,6 @@
- (void)viewWillMoveToWindow:(NSWindow*)newWindow {
NSWindow* oldWindow = [self window];
- // We're messing with the window, so do this to ensure no flashes. This one
- // prevents a flash when the current tab is closed.
- if (!renderWidgetHostView_->use_core_animation_)
- [oldWindow disableScreenUpdatesUntilFlush];
-
NSNotificationCenter* notificationCenter =
[NSNotificationCenter defaultCenter];
@@ -3251,19 +2963,6 @@
afterDelay:0];
}
-- (void)globalFrameDidChange:(NSNotification*)notification {
- if (handlingGlobalFrameDidChange_)
- return;
-
- handlingGlobalFrameDidChange_ = YES;
- if (!renderWidgetHostView_->use_core_animation_ &&
- renderWidgetHostView_->compositing_iosurface_context_) {
- [renderWidgetHostView_->compositing_iosurface_context_->nsgl_context()
- update];
- }
- handlingGlobalFrameDidChange_ = NO;
-}
-
- (void)windowChangedGlobalFrame:(NSNotification*)notification {
renderWidgetHostView_->UpdateScreenInfo(
renderWidgetHostView_->GetNativeView());
@@ -3296,181 +2995,6 @@
renderWidgetHostView_->PauseForPendingResizeOrRepaintsAndDraw();
}
-// Fills with white the parts of the area to the right and bottom for |rect|
-// that intersect |damagedRect|.
-- (void)fillBottomRightRemainderOfRect:(gfx::Rect)rect
- dirtyRect:(gfx::Rect)damagedRect
- inContext:(CGContextRef)context {
- if (damagedRect.right() > rect.right()) {
- int x = std::max(rect.right(), damagedRect.x());
- int y = std::min(rect.bottom(), damagedRect.bottom());
- int width = damagedRect.right() - x;
- int height = damagedRect.y() - y;
-
- // Extra fun to get around the fact that gfx::Rects can't have
- // negative sizes.
- if (width < 0) {
- x += width;
- width = -width;
- }
- if (height < 0) {
- y += height;
- height = -height;
- }
-
- NSRect r = [self flipRectToNSRect:gfx::Rect(x, y, width, height)];
- CGContextSetFillColorWithColor(context,
- CGColorGetConstantColor(kCGColorWhite));
- CGContextFillRect(context, NSRectToCGRect(r));
- }
- if (damagedRect.bottom() > rect.bottom()) {
- int x = damagedRect.x();
- int y = damagedRect.bottom();
- int width = damagedRect.right() - x;
- int height = std::max(rect.bottom(), damagedRect.y()) - y;
-
- // Extra fun to get around the fact that gfx::Rects can't have
- // negative sizes.
- if (width < 0) {
- x += width;
- width = -width;
- }
- if (height < 0) {
- y += height;
- height = -height;
- }
-
- NSRect r = [self flipRectToNSRect:gfx::Rect(x, y, width, height)];
- CGContextSetFillColorWithColor(context,
- CGColorGetConstantColor(kCGColorWhite));
- CGContextFillRect(context, NSRectToCGRect(r));
- }
-}
-
-- (void)drawRect:(NSRect)dirtyRect {
- TRACE_EVENT0("browser", "RenderWidgetHostViewCocoa::drawRect");
- DCHECK(!renderWidgetHostView_->use_core_animation_);
-
- if (!renderWidgetHostView_->render_widget_host_) {
- // When using CoreAnimation, this path is used to paint the contents area
- // white before any frames come in. When layers to draw frames exist, this
- // is not hit.
- [[NSColor whiteColor] set];
- NSRectFill(dirtyRect);
- return;
- }
-
- const gfx::Rect damagedRect([self flipNSRectToRect:dirtyRect]);
-
- if (renderWidgetHostView_->last_frame_was_accelerated_ &&
- renderWidgetHostView_->compositing_iosurface_) {
- if (renderWidgetHostView_->allow_overlapping_views_) {
- // If overlapping views need to be allowed, punch a hole in the window
- // to expose the GL underlay.
- TRACE_EVENT2("gpu", "NSRectFill clear", "w", damagedRect.width(),
- "h", damagedRect.height());
- // NSRectFill is extremely slow (15ms for a window on a fast MacPro), so
- // this is only done when it's a real invalidation from window damage (not
- // when a BuffersSwapped was received). Note that even a 1x1 NSRectFill
- // can take many milliseconds sometimes (!) so this is skipped completely
- // for drawRects that are triggered by BuffersSwapped messages.
- [[NSColor clearColor] set];
- NSRectFill(dirtyRect);
- }
-
- gfx::ScopedCGLSetCurrentContext scoped_set_current_context(
- renderWidgetHostView_->compositing_iosurface_context_->cgl_context());
- renderWidgetHostView_->DrawIOSurfaceWithoutCoreAnimation();
- return;
- }
-
- CGContextRef context = static_cast<CGContextRef>(
- [[NSGraphicsContext currentContext] graphicsPort]);
- [self drawWithDirtyRect:NSRectToCGRect(dirtyRect)
- inContext:context];
-}
-
-- (void)drawWithDirtyRect:(CGRect)dirtyRect
- inContext:(CGContextRef)context {
- content::SoftwareFrameManager* software_frame_manager =
- renderWidgetHostView_->software_frame_manager_.get();
- if (software_frame_manager->HasCurrentFrame()) {
- // Note: All coordinates are in view units, not pixels.
- gfx::Rect bitmapRect(
- software_frame_manager->GetCurrentFrameSizeInDIP());
-
- // Specify the proper y offset to ensure that the view is rooted to the
- // upper left corner. This can be negative, if the window was resized
- // smaller and the renderer hasn't yet repainted.
- int yOffset = NSHeight([self bounds]) - bitmapRect.height();
-
- NSRect nsDirtyRect = NSRectFromCGRect(dirtyRect);
- const gfx::Rect damagedRect([self flipNSRectToRect:nsDirtyRect]);
-
- gfx::Rect paintRect = gfx::IntersectRects(bitmapRect, damagedRect);
- if (!paintRect.IsEmpty()) {
- gfx::Size sizeInPixels =
- software_frame_manager->GetCurrentFrameSizeInPixels();
- base::ScopedCFTypeRef<CGDataProviderRef> dataProvider(
- CGDataProviderCreateWithData(
- NULL,
- software_frame_manager->GetCurrentFramePixels(),
- 4 * sizeInPixels.width() * sizeInPixels.height(),
- NULL));
- base::ScopedCFTypeRef<CGImageRef> image(
- CGImageCreate(
- sizeInPixels.width(),
- sizeInPixels.height(),
- 8,
- 32,
- 4 * sizeInPixels.width(),
- base::mac::GetSystemColorSpace(),
- kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
- dataProvider,
- NULL,
- false,
- kCGRenderingIntentDefault));
- CGRect imageRect = bitmapRect.ToCGRect();
- imageRect.origin.y = yOffset;
- CGContextDrawImage(context, imageRect, image);
- }
-
- renderWidgetHostView_->SendPendingLatencyInfoToHost();
-
- // Fill the remaining portion of the damagedRect with white
- [self fillBottomRightRemainderOfRect:bitmapRect
- dirtyRect:damagedRect
- inContext:context];
-
- if (!renderWidgetHostView_->whiteout_start_time_.is_null()) {
- base::TimeDelta whiteout_duration = base::TimeTicks::Now() -
- renderWidgetHostView_->whiteout_start_time_;
- UMA_HISTOGRAM_TIMES("MPArch.RWHH_WhiteoutDuration", whiteout_duration);
-
- // Reset the start time to 0 so that we start recording again the next
- // time the backing store is NULL...
- renderWidgetHostView_->whiteout_start_time_ = base::TimeTicks();
- }
- if (!renderWidgetHostView_->web_contents_switch_paint_time_.is_null()) {
- base::TimeDelta web_contents_switch_paint_duration =
- base::TimeTicks::Now() -
- renderWidgetHostView_->web_contents_switch_paint_time_;
- UMA_HISTOGRAM_TIMES("MPArch.RWH_TabSwitchPaintDuration",
- web_contents_switch_paint_duration);
- // Reset contents_switch_paint_time_ to 0 so future tab selections are
- // recorded.
- renderWidgetHostView_->web_contents_switch_paint_time_ =
- base::TimeTicks();
- }
- } else {
- CGContextSetFillColorWithColor(context,
- CGColorGetConstantColor(kCGColorWhite));
- CGContextFillRect(context, dirtyRect);
- if (renderWidgetHostView_->whiteout_start_time_.is_null())
- renderWidgetHostView_->whiteout_start_time_ = base::TimeTicks::Now();
- }
-}
-
- (BOOL)canBecomeKeyView {
if (!renderWidgetHostView_->render_widget_host_)
return NO;
@@ -4400,9 +3924,7 @@
}
- (BOOL)isOpaque {
- if (renderWidgetHostView_->use_core_animation_)
- return YES;
- return [super isOpaque];
+ return YES;
}
// "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
diff --git a/content/browser/renderer_host/sandbox_ipc_linux.cc b/content/browser/renderer_host/sandbox_ipc_linux.cc
index d0397ad..7598bdb 100644
--- a/content/browser/renderer_host/sandbox_ipc_linux.cc
+++ b/content/browser/renderer_host/sandbox_ipc_linux.cc
@@ -39,7 +39,8 @@
// MSCharSetToFontconfig translates a Microsoft charset identifier to a
// fontconfig language set by appending to |langset|.
-static void MSCharSetToFontconfig(FcLangSet* langset, unsigned fdwCharSet) {
+// Returns true if |langset| is Latin/Greek/Cyrillic.
+bool MSCharSetToFontconfig(FcLangSet* langset, unsigned fdwCharSet) {
// We have need to translate raw fdwCharSet values into terms that
// fontconfig can understand. (See the description of fdwCharSet in the MSDN
// documentation for CreateFont:
@@ -58,6 +59,7 @@
// So, for each of the documented fdwCharSet values I've had to take a
// guess at the set of ISO 639-1 languages intended.
+ bool is_lgc = false;
switch (fdwCharSet) {
case NPCharsetAnsi:
// These values I don't really know what to do with, so I'm going to map
@@ -66,23 +68,25 @@
case NPCharsetMac:
case NPCharsetOEM:
case NPCharsetSymbol:
+ is_lgc = true;
FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("en"));
break;
case NPCharsetBaltic:
// The three baltic languages.
+ is_lgc = true;
FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("et"));
FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("lv"));
FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("lt"));
break;
- // TODO(jungshik): Would we be better off mapping Big5 to zh-tw
- // and GB2312 to zh-cn? Fontconfig has 4 separate orthography
- // files (zh-{cn,tw,hk,mo}.
case NPCharsetChineseBIG5:
+ FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("zh-tw"));
+ break;
case NPCharsetGB2312:
- FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("zh"));
+ FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("zh-cn"));
break;
case NPCharsetEastEurope:
// A scattering of eastern European languages.
+ is_lgc = true;
FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("pl"));
FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("cs"));
FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("sk"));
@@ -90,6 +94,7 @@
FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("hr"));
break;
case NPCharsetGreek:
+ is_lgc = true;
FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("el"));
break;
case NPCharsetHangul:
@@ -98,6 +103,7 @@
FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("ko"));
break;
case NPCharsetRussian:
+ is_lgc = true;
FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("ru"));
break;
case NPCharsetShiftJIS:
@@ -105,9 +111,11 @@
FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("ja"));
break;
case NPCharsetTurkish:
+ is_lgc = true;
FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("tr"));
break;
case NPCharsetVietnamese:
+ is_lgc = true;
FcLangSetAdd(langset, reinterpret_cast<const FcChar8*>("vi"));
break;
case NPCharsetArabic:
@@ -123,6 +131,7 @@
// Don't add any languages in that case that we don't recognise the
// constant.
}
+ return is_lgc;
}
} // namespace
@@ -210,8 +219,8 @@
HandleFontMatchRequest(fd, pickle, iter, fds.get());
} else if (kind == FontConfigIPC::METHOD_OPEN) {
HandleFontOpenRequest(fd, pickle, iter, fds.get());
- } else if (kind == LinuxSandbox::METHOD_GET_FONT_FAMILY_FOR_CHAR) {
- HandleGetFontFamilyForChar(fd, pickle, iter, fds.get());
+ } else if (kind == LinuxSandbox::METHOD_GET_FALLBACK_FONT_FOR_CHAR) {
+ HandleGetFallbackFontForChar(fd, pickle, iter, fds.get());
} else if (kind == LinuxSandbox::METHOD_LOCALTIME) {
HandleLocaltime(fd, pickle, iter, fds.get());
} else if (kind == LinuxSandbox::METHOD_GET_STYLE_FOR_STRIKE) {
@@ -302,7 +311,7 @@
}
}
-void SandboxIPCHandler::HandleGetFontFamilyForChar(
+void SandboxIPCHandler::HandleGetFallbackFontForChar(
int fd,
const Pickle& pickle,
PickleIterator iter,
@@ -319,17 +328,23 @@
if (!pickle.ReadString(&iter, &preferred_locale))
return;
- blink::WebFontFamily family;
- WebFontInfo::familyForChar(c, preferred_locale.c_str(), &family);
+ blink::WebFallbackFont fallbackFont;
+ WebFontInfo::fallbackFontForChar(c, preferred_locale.c_str(), &fallbackFont);
Pickle reply;
- if (family.name.data()) {
- reply.WriteString(family.name.data());
+ if (fallbackFont.name.data()) {
+ reply.WriteString(fallbackFont.name.data());
} else {
reply.WriteString(std::string());
}
- reply.WriteBool(family.isBold);
- reply.WriteBool(family.isItalic);
+ if (fallbackFont.filename.data()) {
+ reply.WriteString(fallbackFont.filename.data());
+ } else {
+ reply.WriteString(std::string());
+ }
+ reply.WriteInt(fallbackFont.ttcIndex);
+ reply.WriteBool(fallbackFont.isBold);
+ reply.WriteBool(fallbackFont.isItalic);
SendRendererReply(fds, reply, -1);
}
@@ -437,24 +452,27 @@
}
FcLangSet* langset = FcLangSetCreate();
- MSCharSetToFontconfig(langset, charset);
+ bool is_lgc = MSCharSetToFontconfig(langset, charset);
FcPattern* pattern = FcPatternCreate();
- // TODO(agl): FC_FAMILy needs to change
FcPatternAddString(
pattern, FC_FAMILY, reinterpret_cast<const FcChar8*>(face.c_str()));
+ // TODO(thestig) Check if we can access Chrome's per-script font preference
+ // here and select better default fonts for non-LGC case.
std::string generic_font_name;
- switch (fallback_family) {
- case PP_BROWSERFONT_TRUSTED_FAMILY_SERIF:
- generic_font_name = "Times New Roman";
- break;
- case PP_BROWSERFONT_TRUSTED_FAMILY_SANSSERIF:
- generic_font_name = "Arial";
- break;
- case PP_BROWSERFONT_TRUSTED_FAMILY_MONOSPACE:
- generic_font_name = "Courier New";
- break;
+ if (is_lgc) {
+ switch (fallback_family) {
+ case PP_BROWSERFONT_TRUSTED_FAMILY_SERIF:
+ generic_font_name = "Times New Roman";
+ break;
+ case PP_BROWSERFONT_TRUSTED_FAMILY_SANSSERIF:
+ generic_font_name = "Arial";
+ break;
+ case PP_BROWSERFONT_TRUSTED_FAMILY_MONOSPACE:
+ generic_font_name = "Courier New";
+ break;
+ }
}
if (!generic_font_name.empty()) {
const FcChar8* fc_generic_font_name =
diff --git a/content/browser/renderer_host/sandbox_ipc_linux.h b/content/browser/renderer_host/sandbox_ipc_linux.h
index 05b9000..fc986a6 100644
--- a/content/browser/renderer_host/sandbox_ipc_linux.h
+++ b/content/browser/renderer_host/sandbox_ipc_linux.h
@@ -45,7 +45,7 @@
PickleIterator iter,
const std::vector<base::ScopedFD*>& fds);
- void HandleGetFontFamilyForChar(int fd,
+ void HandleGetFallbackFontForChar(int fd,
const Pickle& pickle,
PickleIterator iter,
const std::vector<base::ScopedFD*>& fds);
diff --git a/content/browser/renderer_host/ui_events_helper.cc b/content/browser/renderer_host/ui_events_helper.cc
index 1fafff4..c521ee6 100644
--- a/content/browser/renderer_host/ui_events_helper.cc
+++ b/content/browser/renderer_host/ui_events_helper.cc
@@ -314,7 +314,7 @@
point->position.x = event.x();
point->position.y = event.y();
- const gfx::Point root_point = event.root_location();
+ const gfx::PointF& root_point = event.root_location_f();
point->screenPosition.x = root_point.x();
point->screenPosition.y = root_point.y();
diff --git a/content/browser/resources/gpu/gpu_internals.html b/content/browser/resources/gpu/gpu_internals.html
index ef4def7..a54861b 100644
--- a/content/browser/resources/gpu/gpu_internals.html
+++ b/content/browser/resources/gpu/gpu_internals.html
@@ -6,6 +6,7 @@
found in the LICENSE file.
-->
<head i18n-values="dir:textdirection;">
+<meta name="viewport" content="width=device-width" />
<style>
* {
box-sizing: border-box;
diff --git a/content/browser/resources/gpu/info_view.css b/content/browser/resources/gpu/info_view.css
index 8676909..b78ab19 100644
--- a/content/browser/resources/gpu/info_view.css
+++ b/content/browser/resources/gpu/info_view.css
@@ -34,6 +34,8 @@
#info-view table {
border-collapse: collapse;
cursor: text;
+ table-layout: fixed;
+ width: 100%;
}
#info-view table,
@@ -45,6 +47,10 @@
text-align: top;
}
+#info-view td {
+ overflow-x: auto;
+}
+
#info-view .feature-green {
color: rgb(0, 128, 0);
}
diff --git a/content/browser/resources/gpu/info_view.html b/content/browser/resources/gpu/info_view.html
index f5e4676..76b235e 100644
--- a/content/browser/resources/gpu/info_view.html
+++ b/content/browser/resources/gpu/info_view.html
@@ -56,6 +56,10 @@
<div style="display:none">
<div id="info-view-table-template">
<table id="info-view-table">
+ <colgroup>
+ <col style="width: 25%" />
+ <col style="width: 75%" />
+ </colgroup>
<tr jsselect="value">
<td jsdisplay="!(value instanceof Array)">
<span class="row-title" jscontent="description">title</span>
diff --git a/content/browser/resources/indexed_db/indexeddb_internals.css b/content/browser/resources/indexed_db/indexeddb_internals.css
index c52f5ff..774938b 100644
--- a/content/browser/resources/indexed_db/indexeddb_internals.css
+++ b/content/browser/resources/indexed_db/indexeddb_internals.css
@@ -86,6 +86,9 @@
.indexeddb-transaction.running {
font-weight: bold;
}
+.indexeddb-transaction.committing {
+ font-weight: bold;
+}
.indexeddb-transaction.blocked {
}
@@ -95,6 +98,9 @@
.indexeddb-transaction.running .indexeddb-transaction-state {
background-color: rgb(235, 249, 235);
}
+.indexeddb-transaction.committing .indexeddb-transaction-state {
+ background-color: rgb(235, 235, 249);
+}
.indexeddb-transaction.blocked .indexeddb-transaction-state {
background-color: rgb(249, 235, 235);
}
diff --git a/content/browser/resources/indexed_db/indexeddb_internals.html b/content/browser/resources/indexed_db/indexeddb_internals.html
index 781fcb0..bf7fa1c 100644
--- a/content/browser/resources/indexed_db/indexeddb_internals.html
+++ b/content/browser/resources/indexed_db/indexeddb_internals.html
@@ -152,7 +152,7 @@
</td>
<td class="indexeddb-transaction-age">
- <span jsdisplay="status == 'started' || status == 'running'"
+ <span jsdisplay="status == 'started' || status == 'running' || status == 'committing'"
jscontent="Math.round(runtime)">
</span>
</td>
diff --git a/content/browser/resources/media/OWNERS b/content/browser/resources/media/OWNERS
index d132d0e..bcb6c24 100644
--- a/content/browser/resources/media/OWNERS
+++ b/content/browser/resources/media/OWNERS
@@ -1,7 +1,6 @@
acolwell@chromium.org
dalecurtis@chromium.org
ddorwin@chromium.org
-fischman@chromium.org
scherkus@chromium.org
shadi@chromium.org
tommi@chromium.org
diff --git a/content/browser/resources/service_worker/serviceworker_internals.html b/content/browser/resources/service_worker/serviceworker_internals.html
index dcc4a4c..85e7045 100644
--- a/content/browser/resources/service_worker/serviceworker_internals.html
+++ b/content/browser/resources/service_worker/serviceworker_internals.html
@@ -48,6 +48,9 @@
<button href="#" class="sync"
jsvalues=".cmdArgs:{partition_id:$partition_id,version_id:version_id}"
jsdisplay="$this.running_status == 'RUNNING'">Sync</button>
+ <button href="#" class="push"
+ jsvalues=".cmdArgs:{partition_id:$partition_id,version_id:version_id}"
+ jsdisplay="$this.running_status == 'RUNNING'">Push</button>
<button href="#" class="inspect"
jsvalues=".cmdArgs:{process_id:process_id,devtools_agent_route_id:devtools_agent_route_id}"
jsdisplay="$this.running_status == 'RUNNING'">Inspect</button>
diff --git a/content/browser/resources/service_worker/serviceworker_internals.js b/content/browser/resources/service_worker/serviceworker_internals.js
index 33f068e..5e698b8 100644
--- a/content/browser/resources/service_worker/serviceworker_internals.js
+++ b/content/browser/resources/service_worker/serviceworker_internals.js
@@ -53,7 +53,7 @@
}
// All commands are completed with 'onOperationComplete'.
- var COMMANDS = ['stop', 'sync', 'inspect', 'unregister', 'start'];
+ var COMMANDS = ['stop', 'sync', 'push', 'inspect', 'unregister', 'start'];
function commandHandler(command) {
return function(event) {
var link = event.target;
diff --git a/content/browser/screen_orientation/OWNERS b/content/browser/screen_orientation/OWNERS
new file mode 100644
index 0000000..2d28246
--- /dev/null
+++ b/content/browser/screen_orientation/OWNERS
@@ -0,0 +1 @@
+mlamouri@chromium.org
diff --git a/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc b/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc
index 3bb494d..67174d0 100644
--- a/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc
+++ b/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc
@@ -6,11 +6,14 @@
#include "content/browser/screen_orientation/screen_orientation_provider.h"
#include "content/common/screen_orientation_messages.h"
+#include "content/public/browser/render_frame_host.h"
+#include "content/public/browser/web_contents.h"
namespace content {
-ScreenOrientationDispatcherHost::ScreenOrientationDispatcherHost()
- : BrowserMessageFilter(ScreenOrientationMsgStart) {
+ScreenOrientationDispatcherHost::ScreenOrientationDispatcherHost(
+ WebContents* web_contents)
+ : WebContentsObserver(web_contents) {
if (!provider_.get())
provider_.reset(CreateProvider());
}
@@ -19,10 +22,12 @@
}
bool ScreenOrientationDispatcherHost::OnMessageReceived(
- const IPC::Message& message) {
+ const IPC::Message& message,
+ RenderFrameHost* render_frame_host) {
bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(ScreenOrientationDispatcherHost, message)
+ IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(ScreenOrientationDispatcherHost, message,
+ render_frame_host)
IPC_MESSAGE_HANDLER(ScreenOrientationHostMsg_LockRequest, OnLockRequest)
IPC_MESSAGE_HANDLER(ScreenOrientationHostMsg_Unlock, OnUnlockRequest)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -42,24 +47,28 @@
}
void ScreenOrientationDispatcherHost::OnLockRequest(
+ RenderFrameHost* render_frame_host,
blink::WebScreenOrientationLockType orientation,
int request_id) {
if (!provider_) {
- Send(new ScreenOrientationMsg_LockError(
- request_id,
- blink::WebLockOrientationCallback::ErrorTypeNotAvailable));
+ render_frame_host->Send(new ScreenOrientationMsg_LockError(
+ render_frame_host->GetRoutingID(),
+ request_id,
+ blink::WebLockOrientationCallback::ErrorTypeNotAvailable));
return;
}
// TODO(mlamouri): pass real values.
- Send(new ScreenOrientationMsg_LockSuccess(
- request_id,
- 0,
- blink::WebScreenOrientationPortraitPrimary));
+ render_frame_host->Send(new ScreenOrientationMsg_LockSuccess(
+ render_frame_host->GetRoutingID(),
+ request_id,
+ 0,
+ blink::WebScreenOrientationPortraitPrimary));
provider_->LockOrientation(orientation);
}
-void ScreenOrientationDispatcherHost::OnUnlockRequest() {
+void ScreenOrientationDispatcherHost::OnUnlockRequest(
+ RenderFrameHost* render_frame_host) {
if (!provider_.get())
return;
diff --git a/content/browser/screen_orientation/screen_orientation_dispatcher_host.h b/content/browser/screen_orientation/screen_orientation_dispatcher_host.h
index 363c08c..c86854a 100644
--- a/content/browser/screen_orientation/screen_orientation_dispatcher_host.h
+++ b/content/browser/screen_orientation/screen_orientation_dispatcher_host.h
@@ -5,36 +5,38 @@
#ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_H_
#define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_H_
-#include "content/public/browser/browser_message_filter.h"
+#include "content/public/browser/web_contents_observer.h"
#include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
#include "third_party/WebKit/public/platform/WebScreenOrientationType.h"
namespace content {
+class RenderFrameHost;
class ScreenOrientationProvider;
+class WebContents;
-// ScreenOrientationDispatcherHost is a browser filter for Screen Orientation
-// messages and also helps dispatching messages about orientation changes to the
-// renderers.
+// ScreenOrientationDispatcherHost receives lock and unlock requests from the
+// RenderFrames and dispatch them to the ScreenOrientationProvider. It also
+// make sure that the right RenderFrame get replied for each lock request.
class CONTENT_EXPORT ScreenOrientationDispatcherHost
- : public BrowserMessageFilter {
+ : public WebContentsObserver {
public:
- ScreenOrientationDispatcherHost();
+ explicit ScreenOrientationDispatcherHost(WebContents* web_contents);
+ virtual ~ScreenOrientationDispatcherHost();
- // BrowserMessageFilter
- virtual bool OnMessageReceived(const IPC::Message&) OVERRIDE;
+ // WebContentsObserver
+ virtual bool OnMessageReceived(const IPC::Message&,
+ RenderFrameHost* render_frame_host) OVERRIDE;
void OnOrientationChange(blink::WebScreenOrientationType orientation);
void SetProviderForTests(ScreenOrientationProvider* provider);
- protected:
- virtual ~ScreenOrientationDispatcherHost();
-
private:
- void OnLockRequest(blink::WebScreenOrientationLockType orientation,
+ void OnLockRequest(RenderFrameHost* render_frame_host,
+ blink::WebScreenOrientationLockType orientation,
int request_id);
- void OnUnlockRequest();
+ void OnUnlockRequest(RenderFrameHost* render_frame_host);
static ScreenOrientationProvider* CreateProvider();
diff --git a/content/browser/screen_orientation/screen_orientation_dispatcher_host_unittest.cc b/content/browser/screen_orientation/screen_orientation_dispatcher_host_unittest.cc
deleted file mode 100644
index b652413..0000000
--- a/content/browser/screen_orientation/screen_orientation_dispatcher_host_unittest.cc
+++ /dev/null
@@ -1,184 +0,0 @@
-// Copyright 2014 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 "base/logging.h"
-#include "base/memory/scoped_ptr.h"
-#include "content/browser/screen_orientation/screen_orientation_dispatcher_host.h"
-#include "content/browser/screen_orientation/screen_orientation_provider.h"
-#include "content/common/screen_orientation_messages.h"
-#include "content/public/browser/browser_context.h"
-#include "content/public/test/mock_render_process_host.h"
-#include "content/public/test/test_browser_context.h"
-#include "content/public/test/test_browser_thread_bundle.h"
-#include "content/public/test/test_utils.h"
-#include "ipc/ipc_test_sink.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace content {
-
-class MockScreenOrientationProvider : public ScreenOrientationProvider {
- public:
- MockScreenOrientationProvider()
- : orientation_(blink::WebScreenOrientationLockPortraitPrimary),
- unlock_called_(false) {}
-
- virtual void LockOrientation(blink::WebScreenOrientationLockType orientation)
- OVERRIDE {
- orientation_ = orientation;
- }
-
- virtual void UnlockOrientation() OVERRIDE {
- unlock_called_ = true;
- }
-
- blink::WebScreenOrientationLockType orientation() const {
- return orientation_;
- }
-
- bool unlock_called() const {
- return unlock_called_;
- }
-
- virtual ~MockScreenOrientationProvider() {}
-
- private:
- blink::WebScreenOrientationLockType orientation_;
- bool unlock_called_;
-
- DISALLOW_COPY_AND_ASSIGN(MockScreenOrientationProvider);
-};
-
-class ScreenOrientationDispatcherHostWithSink FINAL :
- public ScreenOrientationDispatcherHost {
- public:
- explicit ScreenOrientationDispatcherHostWithSink(IPC::TestSink* sink)
- : ScreenOrientationDispatcherHost() , sink_(sink) {}
-
- virtual bool Send(IPC::Message* message) OVERRIDE {
- return sink_->Send(message);
- }
-
- private:
- virtual ~ScreenOrientationDispatcherHostWithSink() { }
-
- IPC::TestSink* sink_;
-};
-
-class ScreenOrientationDispatcherHostTest : public testing::Test {
- protected:
- virtual ScreenOrientationDispatcherHost* CreateDispatcher() {
- return new ScreenOrientationDispatcherHost();
- }
-
- virtual void SetUp() OVERRIDE {
- provider_ = new MockScreenOrientationProvider();
-
- dispatcher_ = CreateDispatcher();
- dispatcher_->SetProviderForTests(provider_);
- }
-
- // The dispatcher_ owns the provider_ but we still want to access it.
- MockScreenOrientationProvider* provider_;
- scoped_refptr<ScreenOrientationDispatcherHost> dispatcher_;
-};
-
-class ScreenOrientationDispatcherHostWithSinkTest :
- public ScreenOrientationDispatcherHostTest {
- protected:
- virtual ScreenOrientationDispatcherHost* CreateDispatcher() OVERRIDE {
- return new ScreenOrientationDispatcherHostWithSink(&sink_);
- }
-
- const IPC::TestSink& sink() const {
- return sink_;
- }
-
- IPC::TestSink sink_;
-};
-
-// Test that when receiving a lock message, it is correctly dispatched to the
-// ScreenOrientationProvider.
-// We don't actually need this to be a *WithSinkTest but otherwise the IPC
-// messages are detected as leaked.
-TEST_F(ScreenOrientationDispatcherHostWithSinkTest, ProviderLock) {
- // If we change this array, update |orientationsToTestCount| below.
- blink::WebScreenOrientationLockType orientationsToTest[] = {
- blink::WebScreenOrientationLockPortraitPrimary,
- blink::WebScreenOrientationLockPortraitSecondary,
- blink::WebScreenOrientationLockLandscapePrimary,
- blink::WebScreenOrientationLockLandscapeSecondary,
- blink::WebScreenOrientationLockPortrait,
- blink::WebScreenOrientationLockLandscapePrimary,
- blink::WebScreenOrientationLockAny
- };
-
- // Unfortunately, initializer list constructor for std::list is not yet
- // something we can use.
- // Keep this in sync with |orientationsToTest|.
- int orientationsToTestCount = 7;
-
- for (int i = 0; i < orientationsToTestCount; ++i) {
- bool message_was_handled = false;
- blink::WebScreenOrientationLockType orientation = orientationsToTest[i];
-
- message_was_handled = dispatcher_->OnMessageReceived(
- ScreenOrientationHostMsg_LockRequest(orientation, 0));
-
- EXPECT_TRUE(message_was_handled);
- EXPECT_EQ(orientation, provider_->orientation());
- }
-}
-
-// Test that when receiving an unlock message, it is correctly dispatched to the
-// ScreenOrientationProvider.
-TEST_F(ScreenOrientationDispatcherHostTest, ProviderUnlock) {
- bool message_was_handled = dispatcher_->OnMessageReceived(
- ScreenOrientationHostMsg_Unlock());
-
- EXPECT_TRUE(message_was_handled);
- EXPECT_TRUE(provider_->unlock_called());
-}
-
-// Test that when there is no provider, a LockRequest fails with the appropriate
-// ErrorType.
-TEST_F(ScreenOrientationDispatcherHostWithSinkTest, NoProvider_LockError) {
- dispatcher_->SetProviderForTests(NULL);
-
- const int request_id = 3;
- dispatcher_->OnMessageReceived(ScreenOrientationHostMsg_LockRequest(
- blink::WebScreenOrientationLockPortraitPrimary, request_id));
-
- EXPECT_EQ(1u, sink().message_count());
-
- const IPC::Message* msg = sink().GetFirstMessageMatching(
- ScreenOrientationMsg_LockError::ID);
- EXPECT_TRUE(msg != NULL);
-
- Tuple2<int, blink::WebLockOrientationCallback::ErrorType> params;
- ScreenOrientationMsg_LockError::Read(msg, ¶ms);
- EXPECT_EQ(request_id, params.a);
- EXPECT_EQ(blink::WebLockOrientationCallback::ErrorTypeNotAvailable, params.b);
-}
-
-// Test that when there is a provider, we always send a success response back to
-// the renderer.
-// TODO(mlamouri): we currently do not test the content of the message because
-// it currently contains dummy values.
-TEST_F(ScreenOrientationDispatcherHostWithSinkTest, WithProvider_LockSuccess) {
- const int request_id = 42;
- dispatcher_->OnMessageReceived(ScreenOrientationHostMsg_LockRequest(
- blink::WebScreenOrientationLockPortraitPrimary, request_id));
-
- EXPECT_EQ(1u, sink().message_count());
-
- const IPC::Message* msg = sink().GetFirstMessageMatching(
- ScreenOrientationMsg_LockSuccess::ID);
- EXPECT_TRUE(msg != NULL);
-
- Tuple3<int, unsigned, blink::WebScreenOrientationType> params;
- ScreenOrientationMsg_LockSuccess::Read(msg, ¶ms);
- EXPECT_EQ(request_id, params.a);
-}
-
-} // namespace content
diff --git a/content/browser/service_worker/BUILD.gn b/content/browser/service_worker/BUILD.gn
new file mode 100644
index 0000000..d9f2066
--- /dev/null
+++ b/content/browser/service_worker/BUILD.gn
@@ -0,0 +1,12 @@
+# Copyright 2014 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.
+
+import("//third_party/protobuf/proto_library.gni")
+
+proto_library("database_proto") {
+ sources = [
+ "service_worker_database.proto",
+ ]
+}
+
diff --git a/content/browser/service_worker/database_proto.target.darwin-arm.mk b/content/browser/service_worker/database_proto.target.darwin-arm.mk
index 1f46990..5ef274a 100644
--- a/content/browser/service_worker/database_proto.target.darwin-arm.mk
+++ b/content/browser/service_worker/database_proto.target.darwin-arm.mk
@@ -105,6 +105,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -134,6 +135,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -209,6 +211,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -238,6 +241,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/service_worker/database_proto.target.darwin-arm64.mk b/content/browser/service_worker/database_proto.target.darwin-arm64.mk
index 0898919..6096b8a 100644
--- a/content/browser/service_worker/database_proto.target.darwin-arm64.mk
+++ b/content/browser/service_worker/database_proto.target.darwin-arm64.mk
@@ -95,6 +95,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -124,6 +125,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/service_worker/database_proto.target.darwin-mips.mk b/content/browser/service_worker/database_proto.target.darwin-mips.mk
index 6779325..acff46c 100644
--- a/content/browser/service_worker/database_proto.target.darwin-mips.mk
+++ b/content/browser/service_worker/database_proto.target.darwin-mips.mk
@@ -100,6 +100,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -129,6 +130,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -199,6 +201,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -228,6 +231,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/service_worker/database_proto.target.darwin-x86.mk b/content/browser/service_worker/database_proto.target.darwin-x86.mk
index 1e0ff6a..e7cfd13 100644
--- a/content/browser/service_worker/database_proto.target.darwin-x86.mk
+++ b/content/browser/service_worker/database_proto.target.darwin-x86.mk
@@ -100,6 +100,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -129,6 +130,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -198,6 +200,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -227,6 +230,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/service_worker/database_proto.target.darwin-x86_64.mk b/content/browser/service_worker/database_proto.target.darwin-x86_64.mk
index df7ea6b..72e5f2c 100644
--- a/content/browser/service_worker/database_proto.target.darwin-x86_64.mk
+++ b/content/browser/service_worker/database_proto.target.darwin-x86_64.mk
@@ -99,6 +99,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -128,6 +129,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -196,6 +198,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -225,6 +228,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/service_worker/database_proto.target.linux-arm.mk b/content/browser/service_worker/database_proto.target.linux-arm.mk
index 1f46990..5ef274a 100644
--- a/content/browser/service_worker/database_proto.target.linux-arm.mk
+++ b/content/browser/service_worker/database_proto.target.linux-arm.mk
@@ -105,6 +105,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -134,6 +135,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -209,6 +211,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -238,6 +241,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/service_worker/database_proto.target.linux-arm64.mk b/content/browser/service_worker/database_proto.target.linux-arm64.mk
index 0898919..6096b8a 100644
--- a/content/browser/service_worker/database_proto.target.linux-arm64.mk
+++ b/content/browser/service_worker/database_proto.target.linux-arm64.mk
@@ -95,6 +95,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -124,6 +125,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/service_worker/database_proto.target.linux-mips.mk b/content/browser/service_worker/database_proto.target.linux-mips.mk
index 6779325..acff46c 100644
--- a/content/browser/service_worker/database_proto.target.linux-mips.mk
+++ b/content/browser/service_worker/database_proto.target.linux-mips.mk
@@ -100,6 +100,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -129,6 +130,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -199,6 +201,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -228,6 +231,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/service_worker/database_proto.target.linux-x86.mk b/content/browser/service_worker/database_proto.target.linux-x86.mk
index 1e0ff6a..e7cfd13 100644
--- a/content/browser/service_worker/database_proto.target.linux-x86.mk
+++ b/content/browser/service_worker/database_proto.target.linux-x86.mk
@@ -100,6 +100,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -129,6 +130,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -198,6 +200,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -227,6 +230,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/service_worker/database_proto.target.linux-x86_64.mk b/content/browser/service_worker/database_proto.target.linux-x86_64.mk
index df7ea6b..72e5f2c 100644
--- a/content/browser/service_worker/database_proto.target.linux-x86_64.mk
+++ b/content/browser/service_worker/database_proto.target.linux-x86_64.mk
@@ -99,6 +99,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -128,6 +129,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -196,6 +198,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -225,6 +228,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/service_worker/service_worker_browsertest.cc b/content/browser/service_worker/service_worker_browsertest.cc
index d07d196..97ff8f0 100644
--- a/content/browser/service_worker/service_worker_browsertest.cc
+++ b/content/browser/service_worker/service_worker_browsertest.cc
@@ -39,6 +39,7 @@
ServiceWorkerStatusCode status;
ServiceWorkerFetchEventResult result;
ServiceWorkerResponse response;
+ scoped_ptr<webkit_blob::BlobDataHandle> blob_data_handle;
};
void RunAndQuit(const base::Closure& closure,
@@ -76,6 +77,7 @@
// to pass to DispatchFetchEvent.
void ReceiveFetchResult(BrowserThread::ID run_quit_thread,
const base::Closure& quit,
+ ChromeBlobStorageContext* blob_context,
FetchResult* out_result,
ServiceWorkerStatusCode actual_status,
ServiceWorkerFetchEventResult actual_result,
@@ -83,6 +85,11 @@
out_result->status = actual_status;
out_result->result = actual_result;
out_result->response = actual_response;
+ if (!actual_response.blob_uuid.empty()) {
+ out_result->blob_data_handle =
+ blob_context->context()->GetBlobDataFromUUID(
+ actual_response.blob_uuid);
+ }
if (!quit.is_null())
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, quit);
}
@@ -90,15 +97,16 @@
ServiceWorkerVersion::FetchCallback CreateResponseReceiver(
BrowserThread::ID run_quit_thread,
const base::Closure& quit,
+ ChromeBlobStorageContext* blob_context,
FetchResult* result) {
- return base::Bind(&ReceiveFetchResult, run_quit_thread, quit, result);
+ return base::Bind(&ReceiveFetchResult, run_quit_thread, quit,
+ make_scoped_refptr<ChromeBlobStorageContext>(blob_context),
+ result);
}
void ReadResponseBody(std::string* body,
- scoped_refptr<ChromeBlobStorageContext> context,
- std::string blob_uuid) {
- scoped_ptr<webkit_blob::BlobDataHandle> blob_data_handle =
- context->context()->GetBlobDataFromUUID(blob_uuid);
+ webkit_blob::BlobDataHandle* blob_data_handle) {
+ ASSERT_TRUE(blob_data_handle);
ASSERT_EQ(1U, blob_data_handle->data()->items().size());
*body = std::string(blob_data_handle->data()->items()[0].bytes(),
blob_data_handle->data()->items()[0].length());
@@ -300,8 +308,12 @@
ASSERT_EQ(expected_status, status);
}
- void FetchOnRegisteredWorker(ServiceWorkerFetchEventResult* result,
- ServiceWorkerResponse* response) {
+ void FetchOnRegisteredWorker(
+ ServiceWorkerFetchEventResult* result,
+ ServiceWorkerResponse* response,
+ scoped_ptr<webkit_blob::BlobDataHandle>* blob_data_handle) {
+ blob_context_ = ChromeBlobStorageContext::GetFor(
+ shell()->web_contents()->GetBrowserContext());
FetchResult fetch_result;
fetch_result.status = SERVICE_WORKER_ERROR_FAILED;
base::RunLoop fetch_run_loop;
@@ -314,16 +326,18 @@
fetch_run_loop.Run();
*result = fetch_result.result;
*response = fetch_result.response;
+ *blob_data_handle = fetch_result.blob_data_handle.Pass();
ASSERT_EQ(SERVICE_WORKER_OK, fetch_result.status);
}
- void FetchTestHelper(const std::string& worker_url,
- ServiceWorkerFetchEventResult* result,
- ServiceWorkerResponse* response) {
+ void FetchTestHelper(
+ const std::string& worker_url,
+ ServiceWorkerFetchEventResult* result,
+ ServiceWorkerResponse* response,
+ scoped_ptr<webkit_blob::BlobDataHandle>* blob_data_handle) {
RunOnIOThread(
base::Bind(&self::SetUpRegistrationOnIOThread, this, worker_url));
-
- FetchOnRegisteredWorker(result, response);
+ FetchOnRegisteredWorker(result, response, blob_data_handle);
}
void SetUpRegistrationOnIOThread(const std::string& worker_url) {
@@ -368,7 +382,8 @@
std::map<std::string, std::string>());
version_->SetStatus(ServiceWorkerVersion::ACTIVE);
version_->DispatchFetchEvent(
- request, CreateResponseReceiver(BrowserThread::UI, done, result));
+ request, CreateResponseReceiver(BrowserThread::UI, done,
+ blob_context_, result));
}
void StopOnIOThread(const base::Closure& done,
@@ -388,6 +403,7 @@
protected:
scoped_refptr<ServiceWorkerRegistration> registration_;
scoped_refptr<ServiceWorkerVersion> version_;
+ scoped_refptr<ChromeBlobStorageContext> blob_context_;
};
IN_PROC_BROWSER_TEST_F(EmbeddedWorkerBrowserTest, StartAndStop) {
@@ -480,7 +496,9 @@
IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, FetchEvent_Response) {
ServiceWorkerFetchEventResult result;
ServiceWorkerResponse response;
- FetchTestHelper("/service_worker/fetch_event.js", &result, &response);
+ scoped_ptr<webkit_blob::BlobDataHandle> blob_data_handle;
+ FetchTestHelper("/service_worker/fetch_event.js",
+ &result, &response, &blob_data_handle);
ASSERT_EQ(SERVICE_WORKER_FETCH_EVENT_RESULT_RESPONSE, result);
EXPECT_EQ(301, response.status_code);
EXPECT_EQ("Moved Permanently", response.status_text);
@@ -489,12 +507,10 @@
expected_headers["Content-Type"] = "text/html; charset=UTF-8";
EXPECT_EQ(expected_headers, response.headers);
- scoped_refptr<ChromeBlobStorageContext> context =
- ChromeBlobStorageContext::GetFor(
- shell()->web_contents()->GetBrowserContext());
std::string body;
RunOnIOThread(
- base::Bind(&ReadResponseBody, &body, context, response.blob_uuid));
+ base::Bind(&ReadResponseBody,
+ &body, base::Owned(blob_data_handle.release())));
EXPECT_EQ("This resource is gone. Gone, gone, gone.", body);
}
@@ -524,9 +540,9 @@
&self::SetUpRegistrationOnIOThread, this, "/service_worker/sync.js"));
ServiceWorkerFetchEventResult result;
ServiceWorkerResponse response;
-
+ scoped_ptr<webkit_blob::BlobDataHandle> blob_data_handle;
// Should 404 before sync event.
- FetchOnRegisteredWorker(&result, &response);
+ FetchOnRegisteredWorker(&result, &response, &blob_data_handle);
EXPECT_EQ(404, response.status_code);
// Run the sync event.
@@ -542,7 +558,7 @@
ASSERT_EQ(SERVICE_WORKER_OK, status);
// Should 200 after sync event.
- FetchOnRegisteredWorker(&result, &response);
+ FetchOnRegisteredWorker(&result, &response, &blob_data_handle);
EXPECT_EQ(200, response.status_code);
}
diff --git a/content/browser/service_worker/service_worker_database.cc b/content/browser/service_worker/service_worker_database.cc
index f4da827..1058acc 100644
--- a/content/browser/service_worker/service_worker_database.cc
+++ b/content/browser/service_worker/service_worker_database.cc
@@ -720,6 +720,13 @@
return WriteBatch(&batch);
}
+ServiceWorkerDatabase::Status ServiceWorkerDatabase::DestroyDatabase() {
+ DCHECK(sequence_checker_.CalledOnValidSequencedThread());
+ Disable(FROM_HERE, STATUS_OK);
+ return LevelDBStatusToStatus(
+ leveldb::DestroyDB(path_.AsUTF8Unsafe(), leveldb::Options()));
+}
+
ServiceWorkerDatabase::Status ServiceWorkerDatabase::LazyOpen(
bool create_if_missing) {
DCHECK(sequence_checker_.CalledOnValidSequencedThread());
@@ -1064,9 +1071,11 @@
void ServiceWorkerDatabase::Disable(
const tracked_objects::Location& from_here,
Status status) {
- DLOG(ERROR) << "Failed at: " << from_here.ToString()
- << " with error: " << StatusToString(status);
- DLOG(ERROR) << "ServiceWorkerDatabase is disabled.";
+ if (status != STATUS_OK) {
+ DLOG(ERROR) << "Failed at: " << from_here.ToString()
+ << " with error: " << StatusToString(status);
+ DLOG(ERROR) << "ServiceWorkerDatabase is disabled.";
+ }
state_ = DISABLED;
db_.reset();
}
diff --git a/content/browser/service_worker/service_worker_database.h b/content/browser/service_worker/service_worker_database.h
index 7b2a68d..6475de0 100644
--- a/content/browser/service_worker/service_worker_database.h
+++ b/content/browser/service_worker/service_worker_database.h
@@ -187,6 +187,10 @@
const GURL& origin,
std::vector<int64>* newly_purgeable_resources);
+ // Completely deletes the contents of the database.
+ // Be careful using this function.
+ Status DestroyDatabase();
+
private:
// Opens the database at the |path_|. This is lazily called when the first
// database API is called. Returns OK if the database is successfully opened.
@@ -310,6 +314,7 @@
FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, OpenDatabase_InMemory);
FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, DatabaseVersion);
FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, GetNextAvailableIds);
+ FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, DestroyDatabase);
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDatabase);
};
diff --git a/content/browser/service_worker/service_worker_database_unittest.cc b/content/browser/service_worker/service_worker_database_unittest.cc
index 0fe8c4b..baa2542 100644
--- a/content/browser/service_worker/service_worker_database_unittest.cc
+++ b/content/browser/service_worker/service_worker_database_unittest.cc
@@ -6,6 +6,7 @@
#include <string>
+#include "base/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/stl_util.h"
#include "content/browser/service_worker/service_worker_database.pb.h"
@@ -887,4 +888,17 @@
EXPECT_TRUE(ContainsKey(purgeable_ids_out, 4));
}
+TEST(ServiceWorkerDatabaseTest, DestroyDatabase) {
+ base::ScopedTempDir database_dir;
+ ASSERT_TRUE(database_dir.CreateUniqueTempDir());
+ scoped_ptr<ServiceWorkerDatabase> database(
+ CreateDatabase(database_dir.path()));
+
+ EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK, database->LazyOpen(true));
+ ASSERT_TRUE(base::DirectoryExists(database_dir.path()));
+
+ EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK, database->DestroyDatabase());
+ ASSERT_FALSE(base::DirectoryExists(database_dir.path()));
+}
+
} // namespace content
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc
index db9e373..7e216d2 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
@@ -49,9 +49,9 @@
}
ServiceWorkerDispatcherHost::~ServiceWorkerDispatcherHost() {
- if (context_) {
- context_->RemoveAllProviderHostsForProcess(render_process_id_);
- context_->embedded_worker_registry()->RemoveChildProcessSender(
+ if (GetContext()) {
+ GetContext()->RemoveAllProviderHostsForProcess(render_process_id_);
+ GetContext()->embedded_worker_registry()->RemoveChildProcessSender(
render_process_id_);
}
}
@@ -62,16 +62,16 @@
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&ServiceWorkerDispatcherHost::Init,
- this, make_scoped_refptr(context_wrapper)));
- return;
+ this, make_scoped_refptr(context_wrapper)));
+ return;
}
- context_ = context_wrapper->context()->AsWeakPtr();
- context_->embedded_worker_registry()->AddChildProcessSender(
+ context_wrapper_ = context_wrapper;
+ GetContext()->embedded_worker_registry()->AddChildProcessSender(
render_process_id_, this);
}
-void ServiceWorkerDispatcherHost::OnFilterAdded(IPC::Channel* channel) {
- BrowserMessageFilter::OnFilterAdded(channel);
+void ServiceWorkerDispatcherHost::OnFilterAdded(IPC::Sender* sender) {
+ BrowserMessageFilter::OnFilterAdded(sender);
channel_ready_ = true;
std::vector<IPC::Message*> messages;
pending_messages_.release(&messages);
@@ -119,8 +119,9 @@
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
- if (!handled && context_) {
- handled = context_->embedded_worker_registry()->OnMessageReceived(message);
+ if (!handled && GetContext()) {
+ handled =
+ GetContext()->embedded_worker_registry()->OnMessageReceived(message);
if (!handled)
BadMessageReceived();
}
@@ -151,7 +152,7 @@
int provider_id,
const GURL& pattern,
const GURL& script_url) {
- if (!context_ || !ServiceWorkerUtils::IsFeatureEnabled()) {
+ if (!GetContext() || !ServiceWorkerUtils::IsFeatureEnabled()) {
Send(new ServiceWorkerMsg_ServiceWorkerRegistrationError(
thread_id,
request_id,
@@ -172,14 +173,22 @@
return;
}
- ServiceWorkerProviderHost* provider_host = context_->GetProviderHost(
+ ServiceWorkerProviderHost* provider_host = GetContext()->GetProviderHost(
render_process_id_, provider_id);
if (!provider_host) {
BadMessageReceived();
return;
}
+ if (!provider_host->IsContextAlive()) {
+ Send(new ServiceWorkerMsg_ServiceWorkerRegistrationError(
+ thread_id,
+ request_id,
+ WebServiceWorkerError::ErrorTypeDisabled,
+ base::ASCIIToUTF16(kDisabledErrorMessage)));
+ return;
+ }
- context_->RegisterServiceWorker(
+ GetContext()->RegisterServiceWorker(
pattern,
script_url,
render_process_id_,
@@ -198,7 +207,7 @@
// TODO(alecflett): This check is insufficient for release. Add a
// ServiceWorker-specific policy query in
// ChildProcessSecurityImpl. See http://crbug.com/311631.
- if (!context_ || !ServiceWorkerUtils::IsFeatureEnabled()) {
+ if (!GetContext() || !ServiceWorkerUtils::IsFeatureEnabled()) {
Send(new ServiceWorkerMsg_ServiceWorkerRegistrationError(
thread_id,
request_id,
@@ -207,14 +216,22 @@
return;
}
- ServiceWorkerProviderHost* provider_host = context_->GetProviderHost(
+ ServiceWorkerProviderHost* provider_host = GetContext()->GetProviderHost(
render_process_id_, provider_id);
if (!provider_host) {
BadMessageReceived();
return;
}
+ if (!provider_host->IsContextAlive()) {
+ Send(new ServiceWorkerMsg_ServiceWorkerRegistrationError(
+ thread_id,
+ request_id,
+ blink::WebServiceWorkerError::ErrorTypeDisabled,
+ base::ASCIIToUTF16(kDisabledErrorMessage)));
+ return;
+ }
- context_->UnregisterServiceWorker(
+ GetContext()->UnregisterServiceWorker(
pattern,
base::Bind(&ServiceWorkerDispatcherHost::UnregistrationComplete,
this,
@@ -226,7 +243,7 @@
int handle_id,
const base::string16& message,
const std::vector<int>& sent_message_port_ids) {
- if (!context_ || !ServiceWorkerUtils::IsFeatureEnabled())
+ if (!GetContext() || !ServiceWorkerUtils::IsFeatureEnabled())
return;
ServiceWorkerHandle* handle = handles_.Lookup(handle_id);
@@ -246,38 +263,42 @@
}
void ServiceWorkerDispatcherHost::OnProviderCreated(int provider_id) {
- if (!context_)
+ if (!GetContext())
return;
- if (context_->GetProviderHost(render_process_id_, provider_id)) {
+ if (GetContext()->GetProviderHost(render_process_id_, provider_id)) {
BadMessageReceived();
return;
}
scoped_ptr<ServiceWorkerProviderHost> provider_host(
new ServiceWorkerProviderHost(
- render_process_id_, provider_id, context_, this));
- context_->AddProviderHost(provider_host.Pass());
+ render_process_id_, provider_id, GetContext()->AsWeakPtr(), this));
+ GetContext()->AddProviderHost(provider_host.Pass());
}
void ServiceWorkerDispatcherHost::OnProviderDestroyed(int provider_id) {
- if (!context_)
+ if (!GetContext())
return;
- if (!context_->GetProviderHost(render_process_id_, provider_id)) {
+ if (!GetContext()->GetProviderHost(render_process_id_, provider_id)) {
BadMessageReceived();
return;
}
- context_->RemoveProviderHost(render_process_id_, provider_id);
+ GetContext()->RemoveProviderHost(render_process_id_, provider_id);
}
void ServiceWorkerDispatcherHost::OnSetHostedVersionId(
int provider_id, int64 version_id) {
- if (!context_)
+ if (!GetContext())
return;
ServiceWorkerProviderHost* provider_host =
- context_->GetProviderHost(render_process_id_, provider_id);
- if (!provider_host || !provider_host->SetHostedVersionId(version_id)) {
+ GetContext()->GetProviderHost(render_process_id_, provider_id);
+ if (!provider_host) {
BadMessageReceived();
return;
}
+ if (!provider_host->IsContextAlive())
+ return;
+ if (!provider_host->SetHostedVersionId(version_id))
+ BadMessageReceived();
}
void ServiceWorkerDispatcherHost::RegistrationComplete(
@@ -286,7 +307,7 @@
ServiceWorkerStatusCode status,
int64 registration_id,
int64 version_id) {
- if (!context_)
+ if (!GetContext())
return;
if (status != SERVICE_WORKER_OK) {
@@ -294,43 +315,47 @@
return;
}
- ServiceWorkerVersion* version = context_->GetLiveVersion(version_id);
+ ServiceWorkerVersion* version = GetContext()->GetLiveVersion(version_id);
DCHECK(version);
DCHECK_EQ(registration_id, version->registration_id());
scoped_ptr<ServiceWorkerHandle> handle =
- ServiceWorkerHandle::Create(context_, this, thread_id, version);
+ ServiceWorkerHandle::Create(GetContext()->AsWeakPtr(),
+ this, thread_id, version);
Send(new ServiceWorkerMsg_ServiceWorkerRegistered(
thread_id, request_id, handle->GetObjectInfo()));
RegisterServiceWorkerHandle(handle.Pass());
}
+// TODO(nhiroki): These message handlers that take |embedded_worker_id| as an
+// input should check if the worker refers to the live context. If the context
+// was deleted, handle the messege gracefully (http://crbug.com/371675).
void ServiceWorkerDispatcherHost::OnWorkerScriptLoaded(int embedded_worker_id) {
- if (!context_)
+ if (!GetContext())
return;
- context_->embedded_worker_registry()->OnWorkerScriptLoaded(
+ GetContext()->embedded_worker_registry()->OnWorkerScriptLoaded(
render_process_id_, embedded_worker_id);
}
void ServiceWorkerDispatcherHost::OnWorkerScriptLoadFailed(
int embedded_worker_id) {
- if (!context_)
+ if (!GetContext())
return;
- context_->embedded_worker_registry()->OnWorkerScriptLoadFailed(
+ GetContext()->embedded_worker_registry()->OnWorkerScriptLoadFailed(
render_process_id_, embedded_worker_id);
}
void ServiceWorkerDispatcherHost::OnWorkerStarted(
int thread_id, int embedded_worker_id) {
- if (!context_)
+ if (!GetContext())
return;
- context_->embedded_worker_registry()->OnWorkerStarted(
+ GetContext()->embedded_worker_registry()->OnWorkerStarted(
render_process_id_, thread_id, embedded_worker_id);
}
void ServiceWorkerDispatcherHost::OnWorkerStopped(int embedded_worker_id) {
- if (!context_)
+ if (!GetContext())
return;
- context_->embedded_worker_registry()->OnWorkerStopped(
+ GetContext()->embedded_worker_registry()->OnWorkerStopped(
render_process_id_, embedded_worker_id);
}
@@ -340,21 +365,22 @@
int line_number,
int column_number,
const GURL& source_url) {
- if (!context_)
+ if (!GetContext())
return;
- context_->embedded_worker_registry()->OnReportException(embedded_worker_id,
- error_message,
- line_number,
- column_number,
- source_url);
+ GetContext()->embedded_worker_registry()->OnReportException(
+ embedded_worker_id,
+ error_message,
+ line_number,
+ column_number,
+ source_url);
}
void ServiceWorkerDispatcherHost::OnReportConsoleMessage(
int embedded_worker_id,
const EmbeddedWorkerHostMsg_ReportConsoleMessage_Params& params) {
- if (!context_)
+ if (!GetContext())
return;
- context_->embedded_worker_registry()->OnReportConsoleMessage(
+ GetContext()->embedded_worker_registry()->OnReportConsoleMessage(
embedded_worker_id,
params.source_identifier,
params.message_level,
@@ -409,4 +435,8 @@
thread_id, request_id, error_type, error_message));
}
+ServiceWorkerContextCore* ServiceWorkerDispatcherHost::GetContext() {
+ return context_wrapper_->context();
+}
+
} // namespace content
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.h b/content/browser/service_worker/service_worker_dispatcher_host.h
index 71999d5..b269311 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.h
+++ b/content/browser/service_worker/service_worker_dispatcher_host.h
@@ -32,13 +32,13 @@
void Init(ServiceWorkerContextWrapper* context_wrapper);
// BrowserMessageFilter implementation
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE;
virtual void OnDestruct() const OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
// IPC::Sender implementation
- // Send() queues the message until the underlying channel is ready. This
+ // Send() queues the message until the underlying sender is ready. This
// class assumes that Send() can only fail after that when the renderer
// process has terminated, at which point the whole instance will eventually
// be destroyed.
@@ -109,13 +109,15 @@
int request_id,
ServiceWorkerStatusCode status);
+ ServiceWorkerContextCore* GetContext();
+
int render_process_id_;
MessagePortMessageFilter* const message_port_message_filter_;
- base::WeakPtr<ServiceWorkerContextCore> context_;
+ scoped_refptr<ServiceWorkerContextWrapper> context_wrapper_;
IDMap<ServiceWorkerHandle, IDMapOwnPointer> handles_;
- bool channel_ready_; // True after BrowserMessageFilter::channel_ != NULL.
+ bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL.
ScopedVector<IPC::Message> pending_messages_;
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost);
diff --git a/content/browser/service_worker/service_worker_histograms.cc b/content/browser/service_worker/service_worker_histograms.cc
new file mode 100644
index 0000000..8d1df4b
--- /dev/null
+++ b/content/browser/service_worker/service_worker_histograms.cc
@@ -0,0 +1,30 @@
+// Copyright 2014 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 "content/browser/service_worker/service_worker_histograms.h"
+
+#include "base/metrics/histogram.h"
+
+namespace content {
+
+// static
+void ServiceWorkerHistograms::CountInitDiskCacheResult(bool result) {
+ UMA_HISTOGRAM_BOOLEAN("ServiceWorker.DiskCache.InitResult", result);
+}
+
+// static
+void ServiceWorkerHistograms::CountReadResponseResult(
+ ServiceWorkerHistograms::ReadResponseResult result) {
+ UMA_HISTOGRAM_ENUMERATION("ServiceWorker.DiskCache.ReadResponseResult",
+ result, NUM_READ_RESPONSE_RESULT_TYPES);
+}
+
+// static
+void ServiceWorkerHistograms::CountWriteResponseResult(
+ ServiceWorkerHistograms::WriteResponseResult result) {
+ UMA_HISTOGRAM_ENUMERATION("ServiceWorker.DiskCache.WriteResponseResult",
+ result, NUM_WRITE_RESPONSE_RESULT_TYPES);
+}
+
+} // namespace content
diff --git a/content/browser/service_worker/service_worker_histograms.h b/content/browser/service_worker/service_worker_histograms.h
new file mode 100644
index 0000000..a9ad8c6
--- /dev/null
+++ b/content/browser/service_worker/service_worker_histograms.h
@@ -0,0 +1,38 @@
+// Copyright 2014 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 CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_HISTOGRAMS_H_
+#define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_HISTOGRAMS_H_
+
+#include "base/macros.h"
+
+namespace content {
+
+class ServiceWorkerHistograms {
+ public:
+ enum ReadResponseResult {
+ READ_OK,
+ READ_HEADERS_ERROR,
+ READ_DATA_ERROR,
+ NUM_READ_RESPONSE_RESULT_TYPES,
+ };
+
+ enum WriteResponseResult {
+ WRITE_OK,
+ WRITE_HEADERS_ERROR,
+ WRITE_DATA_ERROR,
+ NUM_WRITE_RESPONSE_RESULT_TYPES,
+ };
+
+ static void CountInitDiskCacheResult(bool result);
+ static void CountReadResponseResult(ReadResponseResult result);
+ static void CountWriteResponseResult(WriteResponseResult result);
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(ServiceWorkerHistograms);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_HISTOGRAMS_H_
diff --git a/content/browser/service_worker/service_worker_internals_ui.cc b/content/browser/service_worker/service_worker_internals_ui.cc
index e0f39a7..e976ad8 100644
--- a/content/browser/service_worker/service_worker_internals_ui.cc
+++ b/content/browser/service_worker/service_worker_internals_ui.cc
@@ -82,6 +82,31 @@
(*version.*method)(callback);
}
+void DispatchPushEventWithVersionID(
+ scoped_refptr<ServiceWorkerContextWrapper> context,
+ int64 version_id,
+ const ServiceWorkerInternalsUI::StatusCallback& callback) {
+ if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
+ BrowserThread::PostTask(
+ BrowserThread::IO,
+ FROM_HERE,
+ base::Bind(DispatchPushEventWithVersionID,
+ context,
+ version_id,
+ callback));
+ return;
+ }
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ scoped_refptr<ServiceWorkerVersion> version =
+ context->context()->GetLiveVersion(version_id);
+ if (!version) {
+ callback.Run(SERVICE_WORKER_ERROR_NOT_FOUND);
+ return;
+ }
+ std::string data = "Test push message from ServiceWorkerInternals.";
+ version->DispatchPushEvent(callback, data);
+}
+
void UnregisterWithScope(
scoped_refptr<ServiceWorkerContextWrapper> context,
const GURL& scope,
@@ -400,6 +425,10 @@
base::Unretained(this),
&ServiceWorkerVersion::DispatchSyncEvent));
web_ui->RegisterMessageCallback(
+ "push",
+ base::Bind(&ServiceWorkerInternalsUI::DispatchPushEvent,
+ base::Unretained(this)));
+ web_ui->RegisterMessageCallback(
"inspect",
base::Bind(&ServiceWorkerInternalsUI::InspectWorker,
base::Unretained(this)));
@@ -551,6 +580,29 @@
method, context, version_id, callback);
}
+void ServiceWorkerInternalsUI::DispatchPushEvent(
+ const ListValue* args) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ int callback_id;
+ int partition_id;
+ int64 version_id;
+ std::string version_id_string;
+ const DictionaryValue* cmd_args = NULL;
+ scoped_refptr<ServiceWorkerContextWrapper> context;
+ if (!args->GetInteger(0, &callback_id) ||
+ !args->GetDictionary(1, &cmd_args) ||
+ !cmd_args->GetInteger("partition_id", &partition_id) ||
+ !GetServiceWorkerContext(partition_id, &context) ||
+ !cmd_args->GetString("version_id", &version_id_string) ||
+ !base::StringToInt64(version_id_string, &version_id)) {
+ return;
+ }
+
+ base::Callback<void(ServiceWorkerStatusCode)> callback =
+ base::Bind(OperationCompleteCallback, AsWeakPtr(), callback_id);
+ DispatchPushEventWithVersionID(context, version_id, callback);
+}
+
void ServiceWorkerInternalsUI::InspectWorker(const ListValue* args) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
int callback_id;
diff --git a/content/browser/service_worker/service_worker_internals_ui.h b/content/browser/service_worker/service_worker_internals_ui.h
index 3e239e2..84c1e19 100644
--- a/content/browser/service_worker/service_worker_internals_ui.h
+++ b/content/browser/service_worker/service_worker_internals_ui.h
@@ -53,6 +53,7 @@
void GetAllRegistrations(const base::ListValue* args);
void CallServiceWorkerVersionMethod(ServiceWorkerVersionMethod method,
const base::ListValue* args);
+ void DispatchPushEvent(const base::ListValue* args);
void InspectWorker(const base::ListValue* args);
void Unregister(const base::ListValue* args);
void StartWorker(const base::ListValue* args);
diff --git a/content/browser/service_worker/service_worker_proto.gyp b/content/browser/service_worker/service_worker_proto.gyp
index bb9b2e1..b2588ff 100644
--- a/content/browser/service_worker/service_worker_proto.gyp
+++ b/content/browser/service_worker/service_worker_proto.gyp
@@ -1,6 +1,7 @@
{
'targets': [
{
+ # GN version: //content/browser/service_worker:database_proto
'target_name': 'database_proto',
'type': 'static_library',
'sources': [
diff --git a/content/browser/service_worker/service_worker_provider_host.cc b/content/browser/service_worker/service_worker_provider_host.cc
index 8ce0d7c..eeba373 100644
--- a/content/browser/service_worker/service_worker_provider_host.cc
+++ b/content/browser/service_worker/service_worker_provider_host.cc
@@ -55,21 +55,13 @@
if (!dispatcher_host_)
return; // Could be NULL in some tests.
- ServiceWorkerObjectInfo info;
- if (context_ && version) {
- scoped_ptr<ServiceWorkerHandle> handle =
- ServiceWorkerHandle::Create(context_, dispatcher_host_,
- kDocumentMainThreadId, version);
- info = handle->GetObjectInfo();
- dispatcher_host_->RegisterServiceWorkerHandle(handle.Pass());
- }
- dispatcher_host_->Send(
- new ServiceWorkerMsg_SetCurrentServiceWorker(
- kDocumentMainThreadId, provider_id(), info));
+ dispatcher_host_->Send(new ServiceWorkerMsg_SetCurrentServiceWorker(
+ kDocumentMainThreadId, provider_id(), CreateHandleAndPass(version)));
}
void ServiceWorkerProviderHost::SetWaitingVersion(
ServiceWorkerVersion* version) {
+ DCHECK(ValidateVersionForAssociation(version));
if (version == waiting_version_)
return;
scoped_refptr<ServiceWorkerVersion> previous_version = waiting_version_;
@@ -82,7 +74,8 @@
if (!dispatcher_host_)
return; // Could be NULL in some tests.
- // TODO(kinuko): dispatch pendingchange event to the document.
+ dispatcher_host_->Send(new ServiceWorkerMsg_SetWaitingServiceWorker(
+ kDocumentMainThreadId, provider_id(), CreateHandleAndPass(version)));
}
bool ServiceWorkerProviderHost::SetHostedVersionId(int64 version_id) {
@@ -125,6 +118,28 @@
return scoped_ptr<ServiceWorkerRequestHandler>();
}
+bool ServiceWorkerProviderHost::ValidateVersionForAssociation(
+ ServiceWorkerVersion* version) {
+ if (running_hosted_version_)
+ return false;
+ if (!version)
+ return true;
+
+ // A version to be associated with this provider should have the same
+ // registration (scope) as current active/waiting versions.
+ if (active_version_) {
+ if (active_version_->registration_id() != version->registration_id())
+ return false;
+ DCHECK_EQ(active_version_->scope(), version->scope());
+ }
+ if (waiting_version_) {
+ if (waiting_version_->registration_id() != version->registration_id())
+ return false;
+ DCHECK_EQ(waiting_version_->scope(), version->scope());
+ }
+ return true;
+}
+
void ServiceWorkerProviderHost::PostMessage(
const base::string16& message,
const std::vector<int>& sent_message_port_ids) {
@@ -144,4 +159,22 @@
new_routing_ids));
}
+ServiceWorkerObjectInfo ServiceWorkerProviderHost::CreateHandleAndPass(
+ ServiceWorkerVersion* version) {
+ DCHECK(ValidateVersionForAssociation(version));
+ ServiceWorkerObjectInfo info;
+ if (context_ && version) {
+ scoped_ptr<ServiceWorkerHandle> handle =
+ ServiceWorkerHandle::Create(context_, dispatcher_host_,
+ kDocumentMainThreadId, version);
+ info = handle->GetObjectInfo();
+ dispatcher_host_->RegisterServiceWorkerHandle(handle.Pass());
+ }
+ return info;
+}
+
+bool ServiceWorkerProviderHost::IsContextAlive() {
+ return context_ != NULL;
+}
+
} // namespace content
diff --git a/content/browser/service_worker/service_worker_provider_host.h b/content/browser/service_worker/service_worker_provider_host.h
index d8481e1..31f4a37 100644
--- a/content/browser/service_worker/service_worker_provider_host.h
+++ b/content/browser/service_worker/service_worker_provider_host.h
@@ -11,6 +11,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
+#include "content/common/service_worker/service_worker_types.h"
#include "webkit/common/resource_type.h"
namespace IPC {
@@ -28,7 +29,7 @@
class ServiceWorkerRequestHandler;
class ServiceWorkerVersion;
-// This class is the browser-process representation of a serice worker
+// This class is the browser-process representation of a service worker
// provider. There is a provider per document and the lifetime of this
// object is tied to the lifetime of its document in the renderer process.
// This class holds service worker state that is scoped to an individual
@@ -73,14 +74,14 @@
void SetDocumentUrl(const GURL& url);
const GURL& document_url() const { return document_url_; }
- // Associate |version| to this provider as its '.active' or '.waiting'
+ // Associates |version| to this provider as its '.active' or '.waiting'
// version.
// Giving NULL to this method will unset the corresponding field.
void SetActiveVersion(ServiceWorkerVersion* version);
void SetWaitingVersion(ServiceWorkerVersion* version);
// Returns false if the version is not in the expected STARTING in our
- // our process state. That would be indicative of a bad IPC message.
+ // process state. That would be indicative of a bad IPC message.
bool SetHostedVersionId(int64 versions_id);
// Returns a handler for a request, the handler may return NULL if
@@ -89,11 +90,24 @@
ResourceType::Type resource_type,
base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context);
+ // Returns true if |version| has the same registration as active and waiting
+ // versions.
+ bool ValidateVersionForAssociation(ServiceWorkerVersion* version);
+
+ // Returns true if the context referred to by this host (i.e. |context_|) is
+ // still alive.
+ bool IsContextAlive();
+
// Dispatches message event to the document.
void PostMessage(const base::string16& message,
const std::vector<int>& sent_message_port_ids);
private:
+ // Creates a ServiceWorkerHandle to retain |version| and returns a
+ // ServiceWorkerInfo with the handle ID to pass to the provider. The
+ // provider is responsible for releasing the handle.
+ ServiceWorkerObjectInfo CreateHandleAndPass(ServiceWorkerVersion* version);
+
const int process_id_;
const int provider_id_;
GURL document_url_;
diff --git a/content/browser/service_worker/service_worker_provider_host_unittest.cc b/content/browser/service_worker/service_worker_provider_host_unittest.cc
index 49dbfb1..1f52514 100644
--- a/content/browser/service_worker/service_worker_provider_host_unittest.cc
+++ b/content/browser/service_worker/service_worker_provider_host_unittest.cc
@@ -201,19 +201,45 @@
TEST_F(ServiceWorkerProviderHostWaitingVersionTest,
AssociateWaitingVersionToDocuments) {
- const GURL scope("http://www.example.com/*");
- const GURL script_url("http://www.example.com/service_worker.js");
-
- scoped_refptr<ServiceWorkerRegistration> registration(
+ const GURL scope1("http://www.example.com/*");
+ const GURL script_url1("http://www.example.com/service_worker1.js");
+ scoped_refptr<ServiceWorkerRegistration> registration1(
new ServiceWorkerRegistration(
- scope, script_url, 1L, context_->AsWeakPtr()));
- scoped_refptr<ServiceWorkerVersion> version(
- new ServiceWorkerVersion(registration, 1L, context_->AsWeakPtr()));
+ scope1, script_url1, 1L, context_->AsWeakPtr()));
+ scoped_refptr<ServiceWorkerVersion> version1(
+ new ServiceWorkerVersion(registration1, 1L, context_->AsWeakPtr()));
ServiceWorkerRegisterJob::AssociateWaitingVersionToDocuments(
- context_->AsWeakPtr(), version.get());
- EXPECT_EQ(version.get(), provider_host1_->waiting_version());
- EXPECT_EQ(version.get(), provider_host2_->waiting_version());
+ context_->AsWeakPtr(), version1.get());
+ EXPECT_EQ(version1.get(), provider_host1_->waiting_version());
+ EXPECT_EQ(version1.get(), provider_host2_->waiting_version());
+ EXPECT_EQ(NULL, provider_host3_->waiting_version());
+
+ // Version2 is associated with the same registration as version1, so the
+ // waiting version of host1 and host2 should be replaced.
+ scoped_refptr<ServiceWorkerVersion> version2(
+ new ServiceWorkerVersion(registration1, 2L, context_->AsWeakPtr()));
+ ServiceWorkerRegisterJob::AssociateWaitingVersionToDocuments(
+ context_->AsWeakPtr(), version2.get());
+ EXPECT_EQ(version2.get(), provider_host1_->waiting_version());
+ EXPECT_EQ(version2.get(), provider_host2_->waiting_version());
+ EXPECT_EQ(NULL, provider_host3_->waiting_version());
+
+ const GURL scope3(provider_host1_->document_url());
+ const GURL script_url3("http://www.example.com/service_worker3.js");
+ scoped_refptr<ServiceWorkerRegistration> registration3(
+ new ServiceWorkerRegistration(
+ scope3, script_url3, 3L, context_->AsWeakPtr()));
+ scoped_refptr<ServiceWorkerVersion> version3(
+ new ServiceWorkerVersion(registration3, 3L, context_->AsWeakPtr()));
+
+ // Although version3 can match longer than version2 for host1, it should be
+ // ignored because version3 is associated with a different registration from
+ // version2.
+ ServiceWorkerRegisterJob::AssociateWaitingVersionToDocuments(
+ context_->AsWeakPtr(), version3.get());
+ EXPECT_EQ(version2.get(), provider_host1_->waiting_version());
+ EXPECT_EQ(version2.get(), provider_host2_->waiting_version());
EXPECT_EQ(NULL, provider_host3_->waiting_version());
}
diff --git a/content/browser/service_worker/service_worker_read_from_cache_job.cc b/content/browser/service_worker/service_worker_read_from_cache_job.cc
index eddbcd4..5189a86 100644
--- a/content/browser/service_worker/service_worker_read_from_cache_job.cc
+++ b/content/browser/service_worker/service_worker_read_from_cache_job.cc
@@ -6,6 +6,7 @@
#include "content/browser/service_worker/service_worker_context_core.h"
#include "content/browser/service_worker/service_worker_disk_cache.h"
+#include "content/browser/service_worker/service_worker_histograms.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/http/http_request_headers.h"
@@ -134,6 +135,8 @@
scoped_refptr<ServiceWorkerReadFromCacheJob> protect(this);
if (!http_info_io_buffer_->http_info) {
DCHECK(result < 0);
+ ServiceWorkerHistograms::CountReadResponseResult(
+ ServiceWorkerHistograms::READ_HEADERS_ERROR);
NotifyDone(net::URLRequestStatus(net::URLRequestStatus::FAILED, result));
return;
}
@@ -170,12 +173,18 @@
}
void ServiceWorkerReadFromCacheJob::OnReadComplete(int result) {
- if (result == 0)
+ ServiceWorkerHistograms::ReadResponseResult check_result;
+ if (result == 0) {
+ check_result = ServiceWorkerHistograms::READ_OK;
NotifyDone(net::URLRequestStatus());
- else if (result < 0)
+ } else if (result < 0) {
+ check_result = ServiceWorkerHistograms::READ_DATA_ERROR;
NotifyDone(net::URLRequestStatus(net::URLRequestStatus::FAILED, result));
- else
+ } else {
+ check_result = ServiceWorkerHistograms::READ_OK;
SetStatus(net::URLRequestStatus()); // Clear the IO_PENDING status
+ }
+ ServiceWorkerHistograms::CountReadResponseResult(check_result);
NotifyReadComplete(result);
}
diff --git a/content/browser/service_worker/service_worker_register_job.cc b/content/browser/service_worker/service_worker_register_job.cc
index dca493f..6eba2e8 100644
--- a/content/browser/service_worker/service_worker_register_job.cc
+++ b/content/browser/service_worker/service_worker_register_job.cc
@@ -407,18 +407,28 @@
DCHECK(context);
DCHECK(version);
- // TODO(michaeln): This needs to respect the longest prefix wins
- // when it comes to finding a registration for a document url.
- // This should utilize storage->FindRegistrationForDocument().
for (scoped_ptr<ServiceWorkerContextCore::ProviderHostIterator> it =
context->GetProviderHostIterator();
!it->IsAtEnd();
it->Advance()) {
ServiceWorkerProviderHost* host = it->GetProviderHost();
+ if (!host->IsContextAlive())
+ continue;
if (ServiceWorkerUtils::ScopeMatches(version->scope(),
- host->document_url()))
+ host->document_url())) {
+ // The spec's _Update algorithm says, "upgrades active version to a new
+ // version for the same URL scope.", so skip if the scope (registration)
+ // of |version| is different from that of the current active/waiting
+ // version.
+ if (!host->ValidateVersionForAssociation(version))
+ continue;
+
+ // TODO(nhiroki): Keep |host->waiting_version()| to be replaced and set
+ // status of them to 'redandunt' after breaking the loop.
+
host->SetWaitingVersion(version);
- // TODO(nhiroki): Take care of 'installing' version when it's supported.
+ // TODO(nhiroki): Set |host|'s installing version to null.
+ }
}
}
@@ -432,6 +442,8 @@
!it->IsAtEnd();
it->Advance()) {
ServiceWorkerProviderHost* host = it->GetProviderHost();
+ if (!host->IsContextAlive())
+ continue;
if (host->waiting_version() &&
host->waiting_version()->version_id() == version_id) {
host->SetWaitingVersion(NULL);
diff --git a/content/browser/service_worker/service_worker_request_handler.cc b/content/browser/service_worker/service_worker_request_handler.cc
index 3faf502..a04e011 100644
--- a/content/browser/service_worker/service_worker_request_handler.cc
+++ b/content/browser/service_worker/service_worker_request_handler.cc
@@ -70,7 +70,7 @@
ServiceWorkerProviderHost* provider_host =
context_wrapper->context()->GetProviderHost(process_id, provider_id);
- if (!provider_host)
+ if (!provider_host || !provider_host->IsContextAlive())
return;
scoped_ptr<ServiceWorkerRequestHandler> handler(
diff --git a/content/browser/service_worker/service_worker_storage.cc b/content/browser/service_worker/service_worker_storage.cc
index 26f83f6..8a924e0 100644
--- a/content/browser/service_worker/service_worker_storage.cc
+++ b/content/browser/service_worker/service_worker_storage.cc
@@ -12,6 +12,7 @@
#include "base/task_runner_util.h"
#include "content/browser/service_worker/service_worker_context_core.h"
#include "content/browser/service_worker/service_worker_disk_cache.h"
+#include "content/browser/service_worker/service_worker_histograms.h"
#include "content/browser/service_worker/service_worker_info.h"
#include "content/browser/service_worker/service_worker_registration.h"
#include "content/browser/service_worker/service_worker_utils.h"
@@ -592,13 +593,18 @@
info.active_version = version->GetInfo();
else
info.waiting_version = version->GetInfo();
- } else {
+ infos.push_back(info);
+ continue;
+ }
+
+ if (it->is_active) {
info.active_version.is_null = false;
- if (it->is_active)
- info.active_version.status = ServiceWorkerVersion::ACTIVE;
- else
- info.active_version.status = ServiceWorkerVersion::INSTALLED;
+ info.active_version.status = ServiceWorkerVersion::ACTIVE;
info.active_version.version_id = it->version_id;
+ } else {
+ info.waiting_version.is_null = false;
+ info.waiting_version.status = ServiceWorkerVersion::INSTALLED;
+ info.waiting_version.version_id = it->version_id;
}
infos.push_back(info);
}
@@ -759,6 +765,7 @@
disk_cache_->Disable();
state_ = DISABLED;
}
+ ServiceWorkerHistograms::CountInitDiskCacheResult(rv == net::OK);
}
void ServiceWorkerStorage::StartPurgingResources(
diff --git a/content/browser/service_worker/service_worker_storage_unittest.cc b/content/browser/service_worker/service_worker_storage_unittest.cc
index 6dd8620..417a0b7 100644
--- a/content/browser/service_worker/service_worker_storage_unittest.cc
+++ b/content/browser/service_worker/service_worker_storage_unittest.cc
@@ -182,6 +182,93 @@
}
protected:
+ ServiceWorkerStatusCode StoreRegistration(
+ scoped_refptr<ServiceWorkerRegistration> registration,
+ scoped_refptr<ServiceWorkerVersion> version) {
+ bool was_called = false;
+ ServiceWorkerStatusCode result = SERVICE_WORKER_ERROR_FAILED;
+ storage()->StoreRegistration(
+ registration, version, MakeStatusCallback(&was_called, &result));
+ EXPECT_FALSE(was_called); // always async
+ base::RunLoop().RunUntilIdle();
+ EXPECT_TRUE(was_called);
+ return result;
+ }
+
+ ServiceWorkerStatusCode DeleteRegistration(
+ int64 registration_id,
+ const GURL& origin) {
+ bool was_called = false;
+ ServiceWorkerStatusCode result = SERVICE_WORKER_ERROR_FAILED;
+ storage()->DeleteRegistration(
+ registration_id, origin, MakeStatusCallback(&was_called, &result));
+ EXPECT_FALSE(was_called); // always async
+ base::RunLoop().RunUntilIdle();
+ EXPECT_TRUE(was_called);
+ return result;
+ }
+
+ void GetAllRegistrations(
+ std::vector<ServiceWorkerRegistrationInfo>* registrations) {
+ bool was_called = false;
+ storage()->GetAllRegistrations(
+ MakeGetAllCallback(&was_called, registrations));
+ EXPECT_FALSE(was_called); // always async
+ base::RunLoop().RunUntilIdle();
+ EXPECT_TRUE(was_called);
+ }
+
+ ServiceWorkerStatusCode UpdateToActiveState(
+ scoped_refptr<ServiceWorkerRegistration> registration) {
+ bool was_called = false;
+ ServiceWorkerStatusCode result = SERVICE_WORKER_ERROR_FAILED;
+ storage()->UpdateToActiveState(
+ registration, MakeStatusCallback(&was_called, &result));
+ EXPECT_FALSE(was_called); // always async
+ base::RunLoop().RunUntilIdle();
+ EXPECT_TRUE(was_called);
+ return result;
+ }
+
+ ServiceWorkerStatusCode FindRegistrationForDocument(
+ const GURL& document_url,
+ scoped_refptr<ServiceWorkerRegistration>* registration) {
+ bool was_called = false;
+ ServiceWorkerStatusCode result = SERVICE_WORKER_ERROR_FAILED;
+ storage()->FindRegistrationForDocument(
+ document_url, MakeFindCallback(&was_called, &result, registration));
+ base::RunLoop().RunUntilIdle();
+ EXPECT_TRUE(was_called);
+ return result;
+ }
+
+ ServiceWorkerStatusCode FindRegistrationForPattern(
+ const GURL& scope,
+ scoped_refptr<ServiceWorkerRegistration>* registration) {
+ bool was_called = false;
+ ServiceWorkerStatusCode result = SERVICE_WORKER_ERROR_FAILED;
+ storage()->FindRegistrationForPattern(
+ scope, MakeFindCallback(&was_called, &result, registration));
+ EXPECT_FALSE(was_called); // always async
+ base::RunLoop().RunUntilIdle();
+ EXPECT_TRUE(was_called);
+ return result;
+ }
+
+ ServiceWorkerStatusCode FindRegistrationForId(
+ int64 registration_id,
+ const GURL& origin,
+ scoped_refptr<ServiceWorkerRegistration>* registration) {
+ bool was_called = false;
+ ServiceWorkerStatusCode result = SERVICE_WORKER_ERROR_FAILED;
+ storage()->FindRegistrationForId(
+ registration_id, origin,
+ MakeFindCallback(&was_called, &result, registration));
+ base::RunLoop().RunUntilIdle();
+ EXPECT_TRUE(was_called);
+ return result;
+ }
+
scoped_ptr<ServiceWorkerContextCore> context_;
base::WeakPtr<ServiceWorkerContextCore> context_ptr_;
TestBrowserThreadBundle browser_thread_bundle_;
@@ -194,36 +281,21 @@
const int64 kRegistrationId = 0;
const int64 kVersionId = 0;
- bool was_called = false;
- ServiceWorkerStatusCode result = SERVICE_WORKER_OK;
scoped_refptr<ServiceWorkerRegistration> found_registration;
// We shouldn't find anything without having stored anything.
- storage()->FindRegistrationForDocument(
- kDocumentUrl,
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, result);
+ EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND,
+ FindRegistrationForDocument(kDocumentUrl, &found_registration));
EXPECT_FALSE(found_registration);
- was_called = false;
- storage()->FindRegistrationForPattern(
- kScope,
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, result);
+
+ EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND,
+ FindRegistrationForPattern(kScope, &found_registration));
EXPECT_FALSE(found_registration);
- was_called = false;
- storage()->FindRegistrationForId(
- kRegistrationId,
- kScope.GetOrigin(),
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, result);
+
+ EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND,
+ FindRegistrationForId(
+ kRegistrationId, kScope.GetOrigin(), &found_registration));
EXPECT_FALSE(found_registration);
- was_called = false;
// Store something.
scoped_refptr<ServiceWorkerRegistration> live_registration =
@@ -234,81 +306,48 @@
live_registration, kVersionId, context_ptr_);
live_version->SetStatus(ServiceWorkerVersion::INSTALLED);
live_registration->set_waiting_version(live_version);
- storage()->StoreRegistration(live_registration, live_version,
- MakeStatusCallback(&was_called, &result));
- EXPECT_FALSE(was_called); // always async
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
- was_called = false;
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ StoreRegistration(live_registration, live_version));
// Now we should find it and get the live ptr back immediately.
- storage()->FindRegistrationForDocument(
- kDocumentUrl,
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ FindRegistrationForDocument(kDocumentUrl, &found_registration));
EXPECT_EQ(live_registration, found_registration);
- was_called = false;
found_registration = NULL;
// But FindRegistrationForPattern is always async.
- storage()->FindRegistrationForPattern(
- kScope,
- MakeFindCallback(&was_called, &result, &found_registration));
- EXPECT_FALSE(was_called);
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ FindRegistrationForPattern(kScope, &found_registration));
EXPECT_EQ(live_registration, found_registration);
- was_called = false;
found_registration = NULL;
// Can be found by id too.
- storage()->FindRegistrationForId(
- kRegistrationId,
- kScope.GetOrigin(),
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ FindRegistrationForId(
+ kRegistrationId, kScope.GetOrigin(), &found_registration));
ASSERT_TRUE(found_registration);
EXPECT_EQ(kRegistrationId, found_registration->id());
EXPECT_EQ(live_registration, found_registration);
- was_called = false;
found_registration = NULL;
// Drop the live registration, but keep the version live.
live_registration = NULL;
// Now FindRegistrationForDocument should be async.
- storage()->FindRegistrationForDocument(
- kDocumentUrl,
- MakeFindCallback(&was_called, &result, &found_registration));
- EXPECT_FALSE(was_called);
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ FindRegistrationForDocument(kDocumentUrl, &found_registration));
ASSERT_TRUE(found_registration);
EXPECT_EQ(kRegistrationId, found_registration->id());
EXPECT_TRUE(found_registration->HasOneRef());
- EXPECT_EQ(live_version,
- found_registration->waiting_version());
- was_called = false;
+ EXPECT_EQ(live_version, found_registration->waiting_version());
found_registration = NULL;
// Drop the live version too.
live_version = NULL;
// And FindRegistrationForPattern is always async.
- storage()->FindRegistrationForPattern(
- kScope,
- MakeFindCallback(&was_called, &result, &found_registration));
- EXPECT_FALSE(was_called);
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ FindRegistrationForPattern(kScope, &found_registration));
ASSERT_TRUE(found_registration);
EXPECT_EQ(kRegistrationId, found_registration->id());
EXPECT_TRUE(found_registration->HasOneRef());
@@ -316,7 +355,6 @@
ASSERT_TRUE(found_registration->waiting_version());
EXPECT_EQ(ServiceWorkerVersion::INSTALLED,
found_registration->waiting_version()->status());
- was_called = false;
// Update to active.
scoped_refptr<ServiceWorkerVersion> temp_version =
@@ -325,38 +363,20 @@
temp_version->SetStatus(ServiceWorkerVersion::ACTIVE);
found_registration->set_active_version(temp_version);
temp_version = NULL;
- storage()->UpdateToActiveState(
- found_registration,
- MakeStatusCallback(&was_called, &result));
- EXPECT_FALSE(was_called);
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
- was_called = false;
+ EXPECT_EQ(SERVICE_WORKER_OK, UpdateToActiveState(found_registration));
found_registration = NULL;
// Trying to update a unstored registration to active should fail.
scoped_refptr<ServiceWorkerRegistration> unstored_registration =
new ServiceWorkerRegistration(
kScope, kScript, kRegistrationId + 1, context_ptr_);
- storage()->UpdateToActiveState(
- unstored_registration,
- MakeStatusCallback(&was_called, &result));
- EXPECT_FALSE(was_called);
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, result);
- was_called = false;
+ EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND,
+ UpdateToActiveState(unstored_registration));
unstored_registration = NULL;
// The Find methods should return a registration with an active version.
- storage()->FindRegistrationForDocument(
- kDocumentUrl,
- MakeFindCallback(&was_called, &result, &found_registration));
- EXPECT_FALSE(was_called);
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ FindRegistrationForDocument(kDocumentUrl, &found_registration));
ASSERT_TRUE(found_registration);
EXPECT_EQ(kRegistrationId, found_registration->id());
EXPECT_TRUE(found_registration->HasOneRef());
@@ -364,42 +384,22 @@
ASSERT_TRUE(found_registration->active_version());
EXPECT_EQ(ServiceWorkerVersion::ACTIVE,
found_registration->active_version()->status());
- was_called = false;
// Delete from storage but with a instance still live.
EXPECT_TRUE(context_->GetLiveVersion(kRegistrationId));
- storage()->DeleteRegistration(
- kRegistrationId,
- kScope.GetOrigin(),
- MakeStatusCallback(&was_called, &result));
- EXPECT_FALSE(was_called);
- base::RunLoop().RunUntilIdle();
- EXPECT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ DeleteRegistration(kRegistrationId, kScope.GetOrigin()));
EXPECT_TRUE(context_->GetLiveVersion(kRegistrationId));
- was_called = false;
// Should no longer be found.
- storage()->FindRegistrationForId(
- kRegistrationId,
- kScope.GetOrigin(),
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, result);
+ EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND,
+ FindRegistrationForId(
+ kRegistrationId, kScope.GetOrigin(), &found_registration));
EXPECT_FALSE(found_registration);
- was_called = false;
// Deleting an unstored registration should succeed.
- storage()->DeleteRegistration(
- kRegistrationId + 1,
- kScope.GetOrigin(),
- MakeStatusCallback(&was_called, &result));
- EXPECT_FALSE(was_called);
- base::RunLoop().RunUntilIdle();
- EXPECT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
- was_called = false;
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ DeleteRegistration(kRegistrationId + 1, kScope.GetOrigin()));
}
TEST_F(ServiceWorkerStorageTest, InstallingRegistrationsAreFindable) {
@@ -409,8 +409,6 @@
const int64 kRegistrationId = 0;
const int64 kVersionId = 0;
- bool was_called = false;
- ServiceWorkerStatusCode result = SERVICE_WORKER_OK;
scoped_refptr<ServiceWorkerRegistration> found_registration;
// Create an unstored registration.
@@ -424,77 +422,45 @@
live_registration->set_waiting_version(live_version);
// Should not be findable, including by GetAllRegistrations.
- storage()->FindRegistrationForId(
- kRegistrationId,
- kScope.GetOrigin(),
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, result);
+ EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND,
+ FindRegistrationForId(
+ kRegistrationId, kScope.GetOrigin(), &found_registration));
EXPECT_FALSE(found_registration);
- was_called = false;
- storage()->FindRegistrationForDocument(
- kDocumentUrl,
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, result);
+
+ EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND,
+ FindRegistrationForDocument(kDocumentUrl, &found_registration));
EXPECT_FALSE(found_registration);
- was_called = false;
- storage()->FindRegistrationForPattern(
- kScope,
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, result);
+
+ EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND,
+ FindRegistrationForPattern(kScope, &found_registration));
EXPECT_FALSE(found_registration);
- was_called = false;
+
std::vector<ServiceWorkerRegistrationInfo> all_registrations;
- storage()->GetAllRegistrations(
- MakeGetAllCallback(&was_called, &all_registrations));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
+ GetAllRegistrations(&all_registrations);
EXPECT_TRUE(all_registrations.empty());
- was_called = false;
// Notify storage of it being installed.
storage()->NotifyInstallingRegistration(live_registration);
// Now should be findable.
- storage()->FindRegistrationForId(
- kRegistrationId,
- kScope.GetOrigin(),
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ FindRegistrationForId(
+ kRegistrationId, kScope.GetOrigin(), &found_registration));
EXPECT_EQ(live_registration, found_registration);
- was_called = false;
found_registration = NULL;
- storage()->FindRegistrationForDocument(
- kDocumentUrl,
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
+
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ FindRegistrationForDocument(kDocumentUrl, &found_registration));
EXPECT_EQ(live_registration, found_registration);
- was_called = false;
found_registration = NULL;
- storage()->FindRegistrationForPattern(
- kScope,
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
+
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ FindRegistrationForPattern(kScope, &found_registration));
EXPECT_EQ(live_registration, found_registration);
- was_called = false;
found_registration = NULL;
- storage()->GetAllRegistrations(
- MakeGetAllCallback(&was_called, &all_registrations));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
+
+ GetAllRegistrations(&all_registrations);
EXPECT_EQ(1u, all_registrations.size());
- was_called = false;
all_registrations.clear();
// Notify storage of installation no longer happening.
@@ -502,38 +468,21 @@
live_registration, NULL, SERVICE_WORKER_OK);
// Once again, should not be findable.
- storage()->FindRegistrationForId(
- kRegistrationId,
- kScope.GetOrigin(),
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, result);
+ EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND,
+ FindRegistrationForId(
+ kRegistrationId, kScope.GetOrigin(), &found_registration));
EXPECT_FALSE(found_registration);
- was_called = false;
- storage()->FindRegistrationForDocument(
- kDocumentUrl,
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, result);
- EXPECT_FALSE(found_registration);
- was_called = false;
- storage()->FindRegistrationForPattern(
- kScope,
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND, result);
- EXPECT_FALSE(found_registration);
- was_called = false;
- storage()->GetAllRegistrations(
- MakeGetAllCallback(&was_called, &all_registrations));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
+ EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND,
+ FindRegistrationForDocument(kDocumentUrl, &found_registration));
+ EXPECT_FALSE(found_registration);
+
+ EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND,
+ FindRegistrationForPattern(kScope, &found_registration));
+ EXPECT_FALSE(found_registration);
+
+ GetAllRegistrations(&all_registrations);
EXPECT_TRUE(all_registrations.empty());
- was_called = false;
}
TEST_F(ServiceWorkerStorageTest, ResourceIdsAreStoredAndPurged) {
@@ -577,13 +526,8 @@
// Storing the registration/version should take the resources ids out
// of the uncommitted list.
- bool was_called = false;
- ServiceWorkerStatusCode result = SERVICE_WORKER_ERROR_FAILED;
- storage()->StoreRegistration(registration, registration->waiting_version(),
- MakeStatusCallback(&was_called, &result));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ StoreRegistration(registration, registration->waiting_version()));
std::set<int64> verify_ids;
EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK,
storage()->database_->GetUncommittedResourceIds(&verify_ids));
@@ -592,7 +536,8 @@
// Deleting it should result in the resources being added to the
// purgeable list and then doomed in the disk cache and removed from
// that list.
- was_called = false;
+ bool was_called = false;
+ ServiceWorkerStatusCode result = SERVICE_WORKER_ERROR_FAILED;
verify_ids.clear();
storage()->DeleteRegistration(
registration->id(), kScope.GetOrigin(),
@@ -614,8 +559,6 @@
TEST_F(ServiceWorkerStorageTest, FindRegistration_LongestScopeMatch) {
const GURL kDocumentUrl("http://www.example.com/scope/foo");
- bool was_called = false;
- ServiceWorkerStatusCode result = SERVICE_WORKER_OK;
scoped_refptr<ServiceWorkerRegistration> found_registration;
// Registration for "/scope/*".
@@ -666,38 +609,18 @@
storage()->NotifyInstallingRegistration(live_registration3);
// Find a registration among installing ones.
- storage()->FindRegistrationForDocument(
- kDocumentUrl,
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ FindRegistrationForDocument(kDocumentUrl, &found_registration));
EXPECT_EQ(live_registration2, found_registration);
- was_called = false;
found_registration = NULL;
// Store registrations.
- storage()->StoreRegistration(live_registration1, live_version1,
- MakeStatusCallback(&was_called, &result));
- EXPECT_FALSE(was_called);
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
- was_called = false;
- storage()->StoreRegistration(live_registration2, live_version2,
- MakeStatusCallback(&was_called, &result));
- EXPECT_FALSE(was_called);
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
- was_called = false;
- storage()->StoreRegistration(live_registration3, live_version3,
- MakeStatusCallback(&was_called, &result));
- EXPECT_FALSE(was_called);
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
- was_called = false;
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ StoreRegistration(live_registration1, live_version1));
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ StoreRegistration(live_registration2, live_version2));
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ StoreRegistration(live_registration3, live_version3));
// Notify storage of installations no longer happening.
storage()->NotifyDoneInstallingRegistration(
@@ -708,15 +631,9 @@
live_registration3, NULL, SERVICE_WORKER_OK);
// Find a registration among installed ones.
- storage()->FindRegistrationForDocument(
- kDocumentUrl,
- MakeFindCallback(&was_called, &result, &found_registration));
- base::RunLoop().RunUntilIdle();
- ASSERT_TRUE(was_called);
- EXPECT_EQ(SERVICE_WORKER_OK, result);
+ EXPECT_EQ(SERVICE_WORKER_OK,
+ FindRegistrationForDocument(kDocumentUrl, &found_registration));
EXPECT_EQ(live_registration2, found_registration);
- was_called = false;
- found_registration = NULL;
}
} // namespace content
diff --git a/content/browser/service_worker/service_worker_url_request_job.cc b/content/browser/service_worker/service_worker_url_request_job.cc
index b48b8d9..9d75b93 100644
--- a/content/browser/service_worker/service_worker_url_request_job.cc
+++ b/content/browser/service_worker/service_worker_url_request_job.cc
@@ -151,6 +151,7 @@
void ServiceWorkerURLRequestJob::OnReadCompleted(net::URLRequest* request,
int bytes_read) {
+ SetStatus(request->status());
if (!request->status().is_success()) {
NotifyDone(request->status());
return;
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
index 8f6ee72..50f24df 100644
--- a/content/browser/service_worker/service_worker_version.cc
+++ b/content/browser/service_worker/service_worker_version.cc
@@ -304,6 +304,35 @@
}
}
+void ServiceWorkerVersion::DispatchPushEvent(const StatusCallback& callback,
+ const std::string& data) {
+ DCHECK_EQ(ACTIVE, status()) << status();
+
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableExperimentalWebPlatformFeatures)) {
+ callback.Run(SERVICE_WORKER_ERROR_ABORT);
+ return;
+ }
+
+ if (running_status() != RUNNING) {
+ // Schedule calling this method after starting the worker.
+ StartWorker(base::Bind(&RunTaskAfterStartWorker,
+ weak_factory_.GetWeakPtr(), callback,
+ base::Bind(&self::DispatchPushEvent,
+ weak_factory_.GetWeakPtr(),
+ callback, data)));
+ return;
+ }
+
+ int request_id = push_callbacks_.Add(new StatusCallback(callback));
+ ServiceWorkerStatusCode status = embedded_worker_->SendMessage(
+ ServiceWorkerMsg_PushEvent(request_id, data));
+ if (status != SERVICE_WORKER_OK) {
+ push_callbacks_.Remove(request_id);
+ RunSoon(base::Bind(callback, status));
+ }
+}
+
void ServiceWorkerVersion::AddProcessToWorker(int process_id) {
embedded_worker_->AddProcessReference(process_id);
}
@@ -396,6 +425,9 @@
RunIDMapCallbacks(&sync_callbacks_,
&StatusCallback::Run,
MakeTuple(SERVICE_WORKER_ERROR_FAILED));
+ RunIDMapCallbacks(&push_callbacks_,
+ &StatusCallback::Run,
+ MakeTuple(SERVICE_WORKER_ERROR_FAILED));
FOR_EACH_OBSERVER(Listener, listeners_, OnWorkerStopped(this));
}
@@ -440,6 +472,8 @@
OnFetchEventFinished)
IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_SyncEventFinished,
OnSyncEventFinished)
+ IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_PushEventFinished,
+ OnPushEventFinished)
IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_PostMessageToDocument,
OnPostMessageToDocument)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -560,6 +594,19 @@
sync_callbacks_.Remove(request_id);
}
+void ServiceWorkerVersion::OnPushEventFinished(
+ int request_id) {
+ StatusCallback* callback = push_callbacks_.Lookup(request_id);
+ if (!callback) {
+ NOTREACHED() << "Got unexpected message: " << request_id;
+ return;
+ }
+
+ scoped_refptr<ServiceWorkerVersion> protect(this);
+ callback->Run(SERVICE_WORKER_OK);
+ push_callbacks_.Remove(request_id);
+}
+
void ServiceWorkerVersion::OnPostMessageToDocument(
int client_id,
const base::string16& message,
diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h
index 621ae7a..0c7bda5 100644
--- a/content/browser/service_worker/service_worker_version.h
+++ b/content/browser/service_worker/service_worker_version.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
#define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
+#include <string>
#include <vector>
#include "base/basictypes.h"
@@ -175,6 +176,14 @@
// This must be called when the status() is ACTIVE.
void DispatchSyncEvent(const StatusCallback& callback);
+ // Sends push event to the associated embedded worker and asynchronously calls
+ // |callback| when it errors out or it gets response from the worker to notify
+ // completion.
+ //
+ // This must be called when the status() is ACTIVE.
+ void DispatchPushEvent(const StatusCallback& callback,
+ const std::string& data);
+
// These are expected to be called when a renderer process host for the
// same-origin as for this ServiceWorkerVersion is created. The added
// processes are used to run an in-renderer embedded worker.
@@ -238,6 +247,7 @@
ServiceWorkerFetchEventResult result,
const ServiceWorkerResponse& response);
void OnSyncEventFinished(int request_id);
+ void OnPushEventFinished(int request_id);
void OnPostMessageToDocument(int client_id,
const base::string16& message,
const std::vector<int>& sent_message_port_ids);
@@ -259,6 +269,7 @@
IDMap<StatusCallback, IDMapOwnPointer> install_callbacks_;
IDMap<FetchCallback, IDMapOwnPointer> fetch_callbacks_;
IDMap<StatusCallback, IDMapOwnPointer> sync_callbacks_;
+ IDMap<StatusCallback, IDMapOwnPointer> push_callbacks_;
ControlleeMap controllee_map_;
ControlleeByIDMap controllee_by_id_;
diff --git a/content/browser/service_worker/service_worker_write_to_cache_job.cc b/content/browser/service_worker/service_worker_write_to_cache_job.cc
index 313e3a4..bd16a13 100644
--- a/content/browser/service_worker/service_worker_write_to_cache_job.cc
+++ b/content/browser/service_worker/service_worker_write_to_cache_job.cc
@@ -6,6 +6,7 @@
#include "content/browser/service_worker/service_worker_context_core.h"
#include "content/browser/service_worker/service_worker_disk_cache.h"
+#include "content/browser/service_worker/service_worker_histograms.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/http/http_request_headers.h"
@@ -191,6 +192,8 @@
void ServiceWorkerWriteToCacheJob::OnWriteHeadersComplete(int result) {
SetStatus(net::URLRequestStatus()); // Clear the IO_PENDING status
if (result < 0) {
+ ServiceWorkerHistograms::CountWriteResponseResult(
+ ServiceWorkerHistograms::WRITE_HEADERS_ERROR);
AsyncNotifyDoneHelper(net::URLRequestStatus(
net::URLRequestStatus::FAILED, result));
return;
@@ -218,10 +221,14 @@
return;
}
if (result < 0) {
+ ServiceWorkerHistograms::CountWriteResponseResult(
+ ServiceWorkerHistograms::WRITE_DATA_ERROR);
AsyncNotifyDoneHelper(net::URLRequestStatus(
net::URLRequestStatus::FAILED, result));
return;
}
+ ServiceWorkerHistograms::CountWriteResponseResult(
+ ServiceWorkerHistograms::WRITE_OK);
SetStatus(net::URLRequestStatus()); // Clear the IO_PENDING status
NotifyReadComplete(result);
}
diff --git a/content/browser/session_history_browsertest.cc b/content/browser/session_history_browsertest.cc
index c4054b4..4465510 100644
--- a/content/browser/session_history_browsertest.cc
+++ b/content/browser/session_history_browsertest.cc
@@ -52,7 +52,7 @@
embedded_test_server()->RegisterRequestHandler(
base::Bind(&HandleEchoTitleRequest, "/echotitle"));
- NavigateToURL(shell(), GURL(kAboutBlankURL));
+ NavigateToURL(shell(), GURL(url::kAboutBlankURL));
}
// Simulate clicking a link. Only works on the frames.html testserver page.
@@ -164,10 +164,10 @@
EXPECT_EQ("bot1", GetTabTitle());
GoBack();
- EXPECT_EQ(std::string(kAboutBlankURL), GetTabTitle());
+ EXPECT_EQ(std::string(url::kAboutBlankURL), GetTabTitle());
ASSERT_FALSE(CanGoBack());
- EXPECT_EQ(std::string(kAboutBlankURL), GetTabTitle());
+ EXPECT_EQ(std::string(url::kAboutBlankURL), GetTabTitle());
GoForward();
EXPECT_EQ("bot1", GetTabTitle());
@@ -203,8 +203,8 @@
EXPECT_EQ(frames, GetTabURL());
GoBack();
- EXPECT_EQ(std::string(kAboutBlankURL), GetTabTitle());
- EXPECT_EQ(GURL(kAboutBlankURL), GetTabURL());
+ EXPECT_EQ(std::string(url::kAboutBlankURL), GetTabTitle());
+ EXPECT_EQ(GURL(url::kAboutBlankURL), GetTabURL());
GoForward();
EXPECT_EQ("bot1", GetTabTitle());
@@ -400,10 +400,10 @@
// history is [blank, bot1, bot2, *bot3]
JavascriptGo("-3");
- EXPECT_EQ(std::string(kAboutBlankURL), GetTabTitle());
+ EXPECT_EQ(std::string(url::kAboutBlankURL), GetTabTitle());
ASSERT_FALSE(CanGoBack());
- EXPECT_EQ(std::string(kAboutBlankURL), GetTabTitle());
+ EXPECT_EQ(std::string(url::kAboutBlankURL), GetTabTitle());
JavascriptGo("1");
EXPECT_EQ("bot1", GetTabTitle());
@@ -419,10 +419,10 @@
EXPECT_EQ("bot1", GetTabTitle());
JavascriptGo("-1");
- EXPECT_EQ(std::string(kAboutBlankURL), GetTabTitle());
+ EXPECT_EQ(std::string(url::kAboutBlankURL), GetTabTitle());
ASSERT_FALSE(CanGoBack());
- EXPECT_EQ(std::string(kAboutBlankURL), GetTabTitle());
+ EXPECT_EQ(std::string(url::kAboutBlankURL), GetTabTitle());
JavascriptGo("1");
EXPECT_EQ("bot1", GetTabTitle());
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index 1bcf3fc..5193a7d 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -219,10 +219,10 @@
{
// There should be only one RenderWidgetHost when there are no
// cross-process iframes.
- std::set<RenderWidgetHostImpl*> widgets_set =
+ std::set<RenderWidgetHostView*> views_set =
static_cast<WebContentsImpl*>(shell()->web_contents())
- ->GetRenderWidgetHostsInTree();
- EXPECT_EQ(1U, widgets_set.size());
+ ->GetRenderWidgetHostViewsInTree();
+ EXPECT_EQ(1U, views_set.size());
}
// These must stay in scope with replace_host.
@@ -249,10 +249,10 @@
{
// There should be now two RenderWidgetHosts, one for each process
// rendering a frame.
- std::set<RenderWidgetHostImpl*> widgets_set =
+ std::set<RenderWidgetHostView*> views_set =
static_cast<WebContentsImpl*>(shell()->web_contents())
- ->GetRenderWidgetHostsInTree();
- EXPECT_EQ(2U, widgets_set.size());
+ ->GetRenderWidgetHostViewsInTree();
+ EXPECT_EQ(2U, views_set.size());
}
// Load another cross-site page into the same iframe.
@@ -279,10 +279,10 @@
child->current_frame_host()->GetProcess());
EXPECT_NE(rph, child->current_frame_host()->GetProcess());
{
- std::set<RenderWidgetHostImpl*> widgets_set =
+ std::set<RenderWidgetHostView*> views_set =
static_cast<WebContentsImpl*>(shell()->web_contents())
- ->GetRenderWidgetHostsInTree();
- EXPECT_EQ(2U, widgets_set.size());
+ ->GetRenderWidgetHostViewsInTree();
+ EXPECT_EQ(2U, views_set.size());
}
}
diff --git a/content/browser/speech/google_streaming_remote_engine.cc b/content/browser/speech/google_streaming_remote_engine.cc
index 6b78f23..f9e2e6e 100644
--- a/content/browser/speech/google_streaming_remote_engine.cc
+++ b/content/browser/speech/google_streaming_remote_engine.cc
@@ -14,7 +14,6 @@
#include "base/time/time.h"
#include "content/browser/speech/audio_buffer.h"
#include "content/browser/speech/proto/google_streaming_api.pb.h"
-#include "content/public/common/content_switches.h"
#include "content/public/common/speech_recognition_error.h"
#include "content/public/common/speech_recognition_result.h"
#include "google_apis/google_api_keys.h"
diff --git a/content/browser/speech/proto/BUILD.gn b/content/browser/speech/proto/BUILD.gn
new file mode 100644
index 0000000..fb54fb2
--- /dev/null
+++ b/content/browser/speech/proto/BUILD.gn
@@ -0,0 +1,11 @@
+# Copyright 2014 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.
+
+import("//third_party/protobuf/proto_library.gni")
+
+proto_library("proto") {
+ sources = [
+ "google_streaming_api.proto",
+ ]
+}
diff --git a/content/browser/speech/proto/speech_proto.gyp b/content/browser/speech/proto/speech_proto.gyp
index f26021b..47da499 100644
--- a/content/browser/speech/proto/speech_proto.gyp
+++ b/content/browser/speech/proto/speech_proto.gyp
@@ -4,7 +4,9 @@
{
'targets': [
- {'target_name': 'speech_proto',
+ {
+ # GN version: //content/browser/speech/proto:proto
+ 'target_name': 'speech_proto',
'type': 'static_library',
'sources': [
'google_streaming_api.proto',
diff --git a/content/browser/speech/proto/speech_proto.target.darwin-arm.mk b/content/browser/speech/proto/speech_proto.target.darwin-arm.mk
index 55c219d..4d246d4 100644
--- a/content/browser/speech/proto/speech_proto.target.darwin-arm.mk
+++ b/content/browser/speech/proto/speech_proto.target.darwin-arm.mk
@@ -105,6 +105,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -134,6 +135,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -209,6 +211,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -238,6 +241,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/speech/proto/speech_proto.target.darwin-arm64.mk b/content/browser/speech/proto/speech_proto.target.darwin-arm64.mk
index a8cfc91..daf386b 100644
--- a/content/browser/speech/proto/speech_proto.target.darwin-arm64.mk
+++ b/content/browser/speech/proto/speech_proto.target.darwin-arm64.mk
@@ -95,6 +95,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -124,6 +125,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/speech/proto/speech_proto.target.darwin-mips.mk b/content/browser/speech/proto/speech_proto.target.darwin-mips.mk
index 068e7d7..b05819e 100644
--- a/content/browser/speech/proto/speech_proto.target.darwin-mips.mk
+++ b/content/browser/speech/proto/speech_proto.target.darwin-mips.mk
@@ -100,6 +100,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -129,6 +130,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -199,6 +201,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -228,6 +231,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/speech/proto/speech_proto.target.darwin-x86.mk b/content/browser/speech/proto/speech_proto.target.darwin-x86.mk
index dd27b7c..99c8577 100644
--- a/content/browser/speech/proto/speech_proto.target.darwin-x86.mk
+++ b/content/browser/speech/proto/speech_proto.target.darwin-x86.mk
@@ -100,6 +100,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -129,6 +130,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -198,6 +200,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -227,6 +230,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/speech/proto/speech_proto.target.darwin-x86_64.mk b/content/browser/speech/proto/speech_proto.target.darwin-x86_64.mk
index 2154593..cba5af3 100644
--- a/content/browser/speech/proto/speech_proto.target.darwin-x86_64.mk
+++ b/content/browser/speech/proto/speech_proto.target.darwin-x86_64.mk
@@ -99,6 +99,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -128,6 +129,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -196,6 +198,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -225,6 +228,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/speech/proto/speech_proto.target.linux-arm.mk b/content/browser/speech/proto/speech_proto.target.linux-arm.mk
index 55c219d..4d246d4 100644
--- a/content/browser/speech/proto/speech_proto.target.linux-arm.mk
+++ b/content/browser/speech/proto/speech_proto.target.linux-arm.mk
@@ -105,6 +105,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -134,6 +135,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -209,6 +211,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -238,6 +241,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/speech/proto/speech_proto.target.linux-arm64.mk b/content/browser/speech/proto/speech_proto.target.linux-arm64.mk
index a8cfc91..daf386b 100644
--- a/content/browser/speech/proto/speech_proto.target.linux-arm64.mk
+++ b/content/browser/speech/proto/speech_proto.target.linux-arm64.mk
@@ -95,6 +95,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -124,6 +125,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/speech/proto/speech_proto.target.linux-mips.mk b/content/browser/speech/proto/speech_proto.target.linux-mips.mk
index 068e7d7..b05819e 100644
--- a/content/browser/speech/proto/speech_proto.target.linux-mips.mk
+++ b/content/browser/speech/proto/speech_proto.target.linux-mips.mk
@@ -100,6 +100,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -129,6 +130,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -199,6 +201,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -228,6 +231,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/speech/proto/speech_proto.target.linux-x86.mk b/content/browser/speech/proto/speech_proto.target.linux-x86.mk
index dd27b7c..99c8577 100644
--- a/content/browser/speech/proto/speech_proto.target.linux-x86.mk
+++ b/content/browser/speech/proto/speech_proto.target.linux-x86.mk
@@ -100,6 +100,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -129,6 +130,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -198,6 +200,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -227,6 +230,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/speech/proto/speech_proto.target.linux-x86_64.mk b/content/browser/speech/proto/speech_proto.target.linux-x86_64.mk
index 2154593..cba5af3 100644
--- a/content/browser/speech/proto/speech_proto.target.linux-x86_64.mk
+++ b/content/browser/speech/proto/speech_proto.target.linux-x86_64.mk
@@ -99,6 +99,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -128,6 +129,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
@@ -196,6 +198,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -225,6 +228,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/protoc_out \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/protobuf \
diff --git a/content/browser/storage_partition_impl_map.cc b/content/browser/storage_partition_impl_map.cc
index 74a212f..fdfb34e 100644
--- a/content/browser/storage_partition_impl_map.cc
+++ b/content/browser/storage_partition_impl_map.cc
@@ -266,6 +266,27 @@
}
}
+// Ensures each path in |active_paths| is a direct child of storage_root.
+void NormalizeActivePaths(const base::FilePath& storage_root,
+ base::hash_set<base::FilePath>* active_paths) {
+ base::hash_set<base::FilePath> normalized_active_paths;
+
+ for (base::hash_set<base::FilePath>::iterator iter = active_paths->begin();
+ iter != active_paths->end(); ++iter) {
+ base::FilePath relative_path;
+ if (!storage_root.AppendRelativePath(*iter, &relative_path))
+ continue;
+
+ std::vector<base::FilePath::StringType> components;
+ relative_path.GetComponents(&components);
+
+ DCHECK(!relative_path.empty());
+ normalized_active_paths.insert(storage_root.Append(components.front()));
+ }
+
+ active_paths->swap(normalized_active_paths);
+}
+
// Deletes all entries inside the |storage_root| that are not in the
// |active_paths|. Deletion is done in 2 steps:
//
@@ -289,6 +310,8 @@
scoped_ptr<base::hash_set<base::FilePath> > active_paths) {
CHECK(storage_root.IsAbsolute());
+ NormalizeActivePaths(storage_root, active_paths.get());
+
base::FileEnumerator enumerator(storage_root, false, kAllFileTypes);
base::FilePath trash_directory;
if (!base::CreateTemporaryDirInDir(storage_root, kTrashDirname,
diff --git a/content/browser/storage_partition_impl_map.h b/content/browser/storage_partition_impl_map.h
index 972335a..c15fefc 100644
--- a/content/browser/storage_partition_impl_map.h
+++ b/content/browser/storage_partition_impl_map.h
@@ -25,7 +25,8 @@
class BrowserContext;
// A std::string to StoragePartition map for use with SupportsUserData APIs.
-class StoragePartitionImplMap : public base::SupportsUserData::Data {
+class CONTENT_EXPORT StoragePartitionImplMap
+ : public base::SupportsUserData::Data {
public:
explicit StoragePartitionImplMap(BrowserContext* browser_context);
@@ -57,6 +58,7 @@
private:
FRIEND_TEST_ALL_PREFIXES(StoragePartitionConfigTest, OperatorLess);
+ FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplMapTest, GarbageCollect);
// Each StoragePartition is uniquely identified by which partition domain
// it belongs to (such as an app or the browser itself), the user supplied
diff --git a/content/browser/storage_partition_impl_map_unittest.cc b/content/browser/storage_partition_impl_map_unittest.cc
index 04127cc..ae7fa6d 100644
--- a/content/browser/storage_partition_impl_map_unittest.cc
+++ b/content/browser/storage_partition_impl_map_unittest.cc
@@ -3,16 +3,17 @@
// found in the LICENSE file.
#include "content/browser/storage_partition_impl_map.h"
+
+#include "base/file_util.h"
+#include "base/run_loop.h"
+#include "content/public/test/test_browser_context.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
-class StoragePartitionConfigTest : public testing::Test {
-};
-
// Test that the Less comparison function is implemented properly to uniquely
// identify storage partitions used as keys in a std::map.
-TEST_F(StoragePartitionConfigTest, OperatorLess) {
+TEST(StoragePartitionConfigTest, OperatorLess) {
StoragePartitionImplMap::StoragePartitionConfig c1(
std::string(), std::string(), false);
StoragePartitionImplMap::StoragePartitionConfig c2(
@@ -60,4 +61,32 @@
EXPECT_TRUE(!less(c1, c2) && !less(c2, c1));
}
+TEST(StoragePartitionImplMapTest, GarbageCollect) {
+ base::MessageLoop message_loop;
+ TestBrowserContext browser_context;
+ StoragePartitionImplMap storage_partition_impl_map(&browser_context);
+
+ scoped_ptr<base::hash_set<base::FilePath> > active_paths(
+ new base::hash_set<base::FilePath>);
+
+ base::FilePath active_path = browser_context.GetPath().Append(
+ StoragePartitionImplMap::GetStoragePartitionPath(
+ "active", std::string()));
+ ASSERT_TRUE(base::CreateDirectory(active_path));
+ active_paths->insert(active_path);
+
+ base::FilePath inactive_path = browser_context.GetPath().Append(
+ StoragePartitionImplMap::GetStoragePartitionPath(
+ "inactive", std::string()));
+ ASSERT_TRUE(base::CreateDirectory(inactive_path));
+
+ base::RunLoop run_loop;
+ storage_partition_impl_map.GarbageCollect(
+ active_paths.Pass(), run_loop.QuitClosure());
+ run_loop.Run();
+
+ EXPECT_TRUE(base::PathExists(active_path));
+ EXPECT_FALSE(base::PathExists(inactive_path));
+}
+
} // namespace content
diff --git a/content/browser/tracing/BUILD.gn b/content/browser/tracing/BUILD.gn
new file mode 100644
index 0000000..94694ee
--- /dev/null
+++ b/content/browser/tracing/BUILD.gn
@@ -0,0 +1,66 @@
+# Copyright 2014 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.
+
+import("//tools/grit/grit_rule.gni")
+
+# generate_about_tracing puts its files in this directory
+tracing_gen_dir = "$root_gen_dir/content/browser/tracing"
+
+# The script just writes filename with no dirs to the .grd, so we always need
+# this file to be in the same directory as the inputs.
+tracing_grd = "$tracing_gen_dir/tracing_resources.grd"
+
+action("generate_tracing_grd") {
+ visibility = ":resources"
+ script = "generate_trace_viewer_grd.py"
+
+ input_pages = [
+ "$tracing_gen_dir/about_tracing.html",
+ "$tracing_gen_dir/about_tracing.js",
+ ]
+ source_prereqs = input_pages
+ outputs = [ tracing_grd ]
+
+ args = rebase_path(input_pages, target_gen_dir) + [
+ "--output", rebase_path(tracing_grd, root_build_dir),
+ ]
+
+ deps = [
+ "//third_party/trace-viewer:generate_about_tracing",
+ ]
+}
+
+# This can't use the grit template because the grd file is generated at build
+# time, so the trick of using grit_info to get the real inputs/outputs at GYP
+# time isn't possible.
+action("resources") {
+ script = "//tools/grit/grit.py"
+
+ # Get the list of grit script sources.
+ grit_inputs_build_rel =
+ exec_script("//tools/grit/grit_info.py", [ "--inputs" ], "list lines")
+
+ source_prereqs = rebase_path(grit_inputs_build_rel, ".", root_build_dir) + [
+ grit_resource_id_file,
+ ]
+ outputs = [
+ "$target_gen_dir/grit/tracing_resources.h",
+ "$target_gen_dir/tracing_resources.pak",
+ ]
+
+ args = [
+ "-i", rebase_path(tracing_grd, root_build_dir), "build",
+ "-f", rebase_path(grit_resource_id_file, root_build_dir),
+ "-o", rebase_path(target_gen_dir, root_build_dir),
+ # resource_ids has an entry for our .grd file that looks like:
+ # "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd"
+ # and what we pass here should make that resolve to our .grd file.
+ "-DSHARED_INTERMEDIATE_DIR=" +
+ rebase_path(root_gen_dir, root_build_dir),
+ ] + grit_defines
+
+ deps = [
+ ":generate_tracing_grd",
+ ]
+}
diff --git a/content/browser/tracing/tracing_ui.cc b/content/browser/tracing/tracing_ui.cc
index 6ef08e3..9f31753 100644
--- a/content/browser/tracing/tracing_ui.cc
+++ b/content/browser/tracing/tracing_ui.cc
@@ -16,6 +16,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/values.h"
+#include "content/browser/tracing/grit/tracing_resources.h"
#include "content/browser/tracing/tracing_controller_impl.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/tracing_controller.h"
@@ -23,7 +24,6 @@
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
#include "content/public/common/url_constants.h"
-#include "grit/tracing_resources.h"
namespace content {
namespace {
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 4728e22..b76a165 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -36,6 +36,7 @@
#include "content/browser/geolocation/geolocation_dispatcher_host.h"
#include "content/browser/host_zoom_map_impl.h"
#include "content/browser/loader/resource_dispatcher_host_impl.h"
+#include "content/browser/media/midi_dispatcher_host.h"
#include "content/browser/message_port_message_filter.h"
#include "content/browser/message_port_service.h"
#include "content/browser/power_save_blocker_impl.h"
@@ -44,6 +45,7 @@
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
+#include "content/browser/screen_orientation/screen_orientation_dispatcher_host.h"
#include "content/browser/site_instance_impl.h"
#include "content/browser/web_contents/web_contents_view_guest.h"
#include "content/browser/webui/generic_handler.h"
@@ -216,9 +218,13 @@
rfh->Send(message_copy);
}
-void AddRenderWidgetHostToSet(std::set<RenderWidgetHostImpl*>* set,
- RenderFrameHost* rfh) {
- set->insert(static_cast<RenderFrameHostImpl*>(rfh)->GetRenderWidgetHost());
+void AddRenderWidgetHostViewToSet(std::set<RenderWidgetHostView*>* set,
+ RenderFrameHost* rfh) {
+ RenderWidgetHostView* rwhv = static_cast<RenderFrameHostImpl*>(rfh)
+ ->frame_tree_node()
+ ->render_manager()
+ ->GetRenderWidgetHostView();
+ set->insert(rwhv);
}
} // namespace
@@ -347,6 +353,7 @@
render_view_message_source_(NULL),
fullscreen_widget_routing_id_(MSG_ROUTING_NONE),
is_subframe_(false),
+ touch_emulation_enabled_(false),
last_dialog_suppressed_(false) {
for (size_t i = 0; i < g_created_callbacks.Get().size(); i++)
g_created_callbacks.Get().at(i).Run(this);
@@ -533,8 +540,6 @@
IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend)
IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission,
OnRequestPpapiBrokerPermission)
- IPC_MESSAGE_HANDLER_GENERIC(BrowserPluginHostMsg_AllocateInstanceID,
- OnBrowserPluginMessage(message))
IPC_MESSAGE_HANDLER_GENERIC(BrowserPluginHostMsg_Attach,
OnBrowserPluginMessage(message))
IPC_MESSAGE_HANDLER(ImageHostMsg_DidDownloadImage, OnDidDownloadImage)
@@ -613,7 +618,7 @@
delegate_->Attach(this);
// Ensure the visible RVH reflects the new delegate's preferences.
if (view_)
- view_->SetOverscrollControllerEnabled(delegate->CanOverscrollContent());
+ view_->SetOverscrollControllerEnabled(CanOverscrollContent());
}
}
@@ -942,15 +947,14 @@
void WebContentsImpl::WasShown() {
controller_.SetActive(true);
- std::set<RenderWidgetHostImpl*> widgets = GetRenderWidgetHostsInTree();
- for (std::set<RenderWidgetHostImpl*>::iterator iter = widgets.begin();
+ std::set<RenderWidgetHostView*> widgets = GetRenderWidgetHostViewsInTree();
+ for (std::set<RenderWidgetHostView*>::iterator iter = widgets.begin();
iter != widgets.end();
iter++) {
- RenderWidgetHostView* rwhv = (*iter)->GetView();
- if (rwhv) {
- rwhv->Show();
+ if (*iter) {
+ (*iter)->Show();
#if defined(OS_MACOSX)
- rwhv->SetActive(true);
+ (*iter)->SetActive(true);
#endif
}
}
@@ -980,13 +984,12 @@
// removes the |GetRenderViewHost()|; then when we actually destroy the
// window, OnWindowPosChanged() notices and calls WasHidden() (which
// calls us).
- std::set<RenderWidgetHostImpl*> widgets = GetRenderWidgetHostsInTree();
- for (std::set<RenderWidgetHostImpl*>::iterator iter = widgets.begin();
+ std::set<RenderWidgetHostView*> widgets = GetRenderWidgetHostViewsInTree();
+ for (std::set<RenderWidgetHostView*>::iterator iter = widgets.begin();
iter != widgets.end();
iter++) {
- RenderWidgetHostView* rwhv = (*iter)->GetView();
- if (rwhv)
- rwhv->Hide();
+ if (*iter)
+ (*iter)->Hide();
}
}
@@ -1093,6 +1096,10 @@
NotificationService::AllBrowserContextsAndSources());
geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this));
+ midi_dispatcher_host_.reset(new MidiDispatcherHost(this));
+
+ screen_orientation_dispatcher_host_.reset(
+ new ScreenOrientationDispatcherHost(this));
#if defined(OS_ANDROID)
date_time_chooser_.reset(new DateTimeChooserAndroid());
@@ -1143,9 +1150,15 @@
observers_.RemoveObserver(observer);
}
-std::set<RenderWidgetHostImpl*> WebContentsImpl::GetRenderWidgetHostsInTree() {
- std::set<RenderWidgetHostImpl*> set;
- ForEachFrame(base::Bind(&AddRenderWidgetHostToSet, base::Unretained(&set)));
+std::set<RenderWidgetHostView*>
+WebContentsImpl::GetRenderWidgetHostViewsInTree() {
+ std::set<RenderWidgetHostView*> set;
+ if (ShowingInterstitialPage()) {
+ set.insert(GetRenderWidgetHostView());
+ } else {
+ ForEachFrame(
+ base::Bind(&AddRenderWidgetHostViewToSet, base::Unretained(&set)));
+ }
return set;
}
@@ -1698,6 +1711,12 @@
browser_plugin_embedder_->DidSendScreenRects();
}
+void WebContentsImpl::OnTouchEmulationEnabled(bool enabled) {
+ touch_emulation_enabled_ = enabled;
+ if (view_)
+ view_->SetOverscrollControllerEnabled(CanOverscrollContent());
+}
+
void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) {
const gfx::Size old_size = GetPreferredSize();
preferred_size_ = pref_size;
@@ -2267,7 +2286,7 @@
bool WebContentsImpl::FocusLocationBarByDefault() {
NavigationEntry* entry = controller_.GetVisibleEntry();
- if (entry && entry->GetURL() == GURL(kAboutBlankURL))
+ if (entry && entry->GetURL() == GURL(url::kAboutBlankURL))
return true;
return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this);
}
@@ -2456,10 +2475,9 @@
FOR_EACH_OBSERVER(WebContentsObserver, observers_,
DidNavigateMainFrame(details, params));
- if (delegate_) {
+ if (delegate_)
delegate_->DidNavigateMainFramePostCommit(this);
- view_->SetOverscrollControllerEnabled(delegate_->CanOverscrollContent());
- }
+ view_->SetOverscrollControllerEnabled(CanOverscrollContent());
}
void WebContentsImpl::DidNavigateAnyFramePostCommit(
@@ -2484,6 +2502,10 @@
}
bool WebContentsImpl::CanOverscrollContent() const {
+ // Disable overscroll when touch emulation is on. See crbug.com/369938.
+ if (touch_emulation_enabled_)
+ return false;
+
if (delegate_)
return delegate_->CanOverscrollContent();
@@ -3295,7 +3317,7 @@
return;
if (delegate_)
- view_->SetOverscrollControllerEnabled(delegate_->CanOverscrollContent());
+ view_->SetOverscrollControllerEnabled(CanOverscrollContent());
NotificationService::current()->Notify(
NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED,
@@ -3797,7 +3819,7 @@
// Make sure the visible RVH reflects the new delegate's preferences.
if (delegate_)
- view_->SetOverscrollControllerEnabled(delegate_->CanOverscrollContent());
+ view_->SetOverscrollControllerEnabled(CanOverscrollContent());
view_->RenderViewSwappedIn(new_host);
}
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 5aeb88b..40e0fe4 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -50,12 +50,14 @@
class GeolocationDispatcherHost;
class InterstitialPageImpl;
class JavaScriptDialogManager;
+class MidiDispatcherHost;
class PowerSaveBlocker;
class RenderViewHost;
class RenderViewHostDelegateView;
class RenderViewHostImpl;
class RenderWidgetHostImpl;
class SavePackage;
+class ScreenOrientationDispatcherHost;
class SiteInstance;
class TestWebContents;
class WebContentsDelegate;
@@ -506,6 +508,7 @@
virtual bool HandleGestureEvent(
const blink::WebGestureEvent& event) OVERRIDE;
virtual void DidSendScreenRects(RenderWidgetHostImpl* rwh) OVERRIDE;
+ virtual void OnTouchEmulationEnabled(bool enabled) OVERRIDE;
#if defined(OS_WIN)
virtual gfx::NativeViewAccessible GetParentNativeViewAccessible() OVERRIDE;
#endif
@@ -672,8 +675,8 @@
void RemoveDestructionObserver(WebContentsImpl* web_contents);
// Traverses all the RenderFrameHosts in the FrameTree and creates a set
- // all the unique RenderWidgetHosts.
- std::set<RenderWidgetHostImpl*> GetRenderWidgetHostsInTree();
+ // all the unique RenderWidgetHostViews.
+ std::set<RenderWidgetHostView*> GetRenderWidgetHostViewsInTree();
// Callback function when showing JavaScript dialogs. Takes in a routing ID
// pair to identify the RenderFrameHost that opened the dialog, because it's
@@ -1122,11 +1125,19 @@
// different process from its parent page.
bool is_subframe_;
+ // Whether touch emulation is enabled in RenderWidgetHost.
+ bool touch_emulation_enabled_;
+
// Whether the last JavaScript dialog shown was suppressed. Used for testing.
bool last_dialog_suppressed_;
scoped_ptr<GeolocationDispatcherHost> geolocation_dispatcher_host_;
+ scoped_ptr<MidiDispatcherHost> midi_dispatcher_host_;
+
+ scoped_ptr<ScreenOrientationDispatcherHost>
+ screen_orientation_dispatcher_host_;
+
DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
};
diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc
index 363a9b0..b487a16 100644
--- a/content/browser/web_contents/web_contents_impl_unittest.cc
+++ b/content/browser/web_contents/web_contents_impl_unittest.cc
@@ -325,7 +325,8 @@
NavigationControllerImpl& cont =
static_cast<NavigationControllerImpl&>(controller());
FrameHostMsg_DidCommitProvisionalLoad_Params params;
- InitNavigateParams(¶ms, 0, GURL(kAboutBlankURL), PAGE_TRANSITION_TYPED);
+ InitNavigateParams(
+ ¶ms, 0, GURL(url::kAboutBlankURL), PAGE_TRANSITION_TYPED);
LoadCommittedDetails details;
cont.RendererDidNavigate(main_test_rfh(), params, &details);
@@ -1232,7 +1233,7 @@
// When opening a new window, it is navigated to about:blank internally.
// Currently, this results in two DidNavigate events.
- const GURL url(kAboutBlankURL);
+ const GURL url(url::kAboutBlankURL);
contents()->TestDidNavigate(orig_rvh, 1, url, PAGE_TRANSITION_TYPED);
contents()->TestDidNavigate(orig_rvh, 1, url, PAGE_TRANSITION_TYPED);
@@ -2297,7 +2298,7 @@
// A navigation to about:whatever should always look like a navigation to
// about:blank
- GURL url_normalized(kAboutBlankURL);
+ GURL url_normalized(url::kAboutBlankURL);
GURL url_from_ipc("about:whatever");
// We navigate the test WebContents to about:blank, since NavigateAndCommit
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index 772d2af..db7b056 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -1196,10 +1196,8 @@
ui::OSExchangeData data(provider); // takes ownership of |provider|.
- if (!image.isNull()) {
- drag_utils::SetDragImageOnDataObject(image,
- gfx::Size(image.width(), image.height()), image_offset, &data);
- }
+ if (!image.isNull())
+ drag_utils::SetDragImageOnDataObject(image, image_offset, &data);
scoped_ptr<WebDragSourceAura> drag_source(
new WebDragSourceAura(GetNativeView(), web_contents_));
diff --git a/content/browser/web_contents/web_contents_view_aura_browsertest.cc b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
index 492ab7b..685097e 100644
--- a/content/browser/web_contents/web_contents_view_aura_browsertest.cc
+++ b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
@@ -555,6 +555,34 @@
EXPECT_EQ(NULL, screenshot_manager()->screenshot_taken_for());
}
+// Tests that navigations resulting from reloads and history.replaceState
+// do not capture screenshots while navigations resulting from
+// histrory.pushState do.
+IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, ReplaceStateReloadPushState) {
+ ASSERT_NO_FATAL_FAILURE(
+ StartTestWithPage("files/overscroll_navigation.html"));
+ WebContentsImpl* web_contents =
+ static_cast<WebContentsImpl*>(shell()->web_contents());
+ RenderFrameHost* main_frame = web_contents->GetMainFrame();
+
+ set_min_screenshot_interval(0);
+ screenshot_manager()->Reset();
+ ExecuteSyncJSFunction(main_frame, "use_replace_state()");
+ screenshot_manager()->WaitUntilScreenshotIsReady();
+ // history.replaceState shouldn't capture a screenshot
+ EXPECT_FALSE(screenshot_manager()->screenshot_taken_for());
+ screenshot_manager()->Reset();
+ web_contents->GetController().Reload(true);
+ WaitForLoadStop(web_contents);
+ // reloading the page shouldn't capture a screenshot
+ EXPECT_FALSE(screenshot_manager()->screenshot_taken_for());
+ screenshot_manager()->Reset();
+ ExecuteSyncJSFunction(main_frame, "use_push_state()");
+ screenshot_manager()->WaitUntilScreenshotIsReady();
+ // pushing a state should capture a screenshot
+ EXPECT_TRUE(screenshot_manager()->screenshot_taken_for());
+}
+
// TODO(sadrul): This test is disabled because it reparents in a way the
// FocusController does not support. This code would crash in
// a production build. It only passed prior to this revision
diff --git a/content/browser/web_contents/web_contents_view_guest.cc b/content/browser/web_contents/web_contents_view_guest.cc
index 9ebb060..14f4600 100644
--- a/content/browser/web_contents/web_contents_view_guest.cc
+++ b/content/browser/web_contents/web_contents_view_guest.cc
@@ -169,7 +169,7 @@
RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForPopupWidget(
RenderWidgetHost* render_widget_host) {
- return platform_view_->CreateViewForWidget(render_widget_host);
+ return platform_view_->CreateViewForPopupWidget(render_widget_host);
}
void WebContentsViewGuest::SetPageTitle(const base::string16& title) {
diff --git a/content/browser/web_contents/web_contents_view_overscroll_animator_mac.h b/content/browser/web_contents/web_contents_view_overscroll_animator_mac.h
new file mode 100644
index 0000000..0603a9b
--- /dev/null
+++ b/content/browser/web_contents/web_contents_view_overscroll_animator_mac.h
@@ -0,0 +1,61 @@
+// Copyright 2014 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 CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_OVERSCROLL_ANIMATOR_MAC_H_
+#define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_OVERSCROLL_ANIMATOR_MAC_H_
+
+#import <Cocoa/Cocoa.h>
+
+namespace content {
+class WebContentsImpl;
+
+// The direction of the overscroll animations. Backwards means that the user
+// wants to navigate backwards in the navigation history. The opposite applies
+// to forwards.
+enum OverscrollAnimatorDirection {
+ OVERSCROLL_ANIMATOR_DIRECTION_BACKWARDS,
+ OVERSCROLL_ANIMATOR_DIRECTION_FORWARDS,
+};
+} // namespace content
+
+// NSViews that intend to manage the animation associated with an overscroll
+// must implement this protocol.
+@protocol WebContentsOverscrollAnimator
+// Some implementations require the WebContentsView to supply a snapshot of a
+// previous navigation state. This method determines whether the snapshot passed
+// to the overscroll animator is expected to be non-nil.
+- (BOOL)needsNavigationSnapshot;
+
+// Begin an overscroll animation. The method -needsNavigationSnapshot determines
+// whether |snapshot| can be nil.
+- (void)beginOverscrollInDirection:
+ (content::OverscrollAnimatorDirection)direction
+ navigationSnapshot:(NSImage*)snapshot;
+
+// Due to the nature of some of the overscroll animations, implementators of
+// this protocol must have control over the layout of the RenderWidgetHost's
+// NativeView. When there is no overscroll animation in progress, the
+// implementor must guarantee that the frame of the RenderWidgetHost's
+// NativeView in screen coordinates is the same as its own frame in screen
+// coordinates.
+// Due to the odd ownership cycles of the RenderWidgetHost's NativeView, it is
+// important that its presence in the NSView hierarchy is the only strong
+// reference, and that when it gets removed from the NSView hierarchy, it will
+// be dealloc'ed shortly thereafter.
+- (void)addRenderWidgetHostNativeView:(NSView*)view;
+
+// During an overscroll animation, |progress| ranges from 0 to 2, and indicates
+// how close the overscroll is to completing. If the overscroll ends with
+// |progress| >= 1, then the overscroll is considered completed.
+- (void)updateOverscrollProgress:(CGFloat)progress;
+
+// Animate the finish of the overscroll and perform a navigation. The navigation
+// may not happen synchronously, but is guaranteed to eventually occur.
+- (void)completeOverscroll:(content::WebContentsImpl*)webContents;
+
+// Animate the cancellation of the overscroll.
+- (void)cancelOverscroll;
+@end
+
+#endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_OVERSCROLL_ANIMATOR_MAC_H_
diff --git a/content/browser/web_contents/web_contents_view_overscroll_animator_slider_mac.h b/content/browser/web_contents/web_contents_view_overscroll_animator_slider_mac.h
new file mode 100644
index 0000000..2cc87ec
--- /dev/null
+++ b/content/browser/web_contents/web_contents_view_overscroll_animator_slider_mac.h
@@ -0,0 +1,59 @@
+// Copyright 2014 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 CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_OVERSCROLL_ANIMATOR_SLIDER_MAC_H_
+#define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_OVERSCROLL_ANIMATOR_SLIDER_MAC_H_
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/mac/scoped_nsobject.h"
+#include "base/memory/scoped_ptr.h"
+#include "content/browser/web_contents/web_contents_view_overscroll_animator_mac.h"
+
+namespace overscroll_animator {
+class WebContentsPaintObserver;
+} // namespace overscroll_animator
+
+@interface OverscrollAnimatorSliderView
+ : NSView<WebContentsOverscrollAnimator> {
+ // This container view holds the RenderWidgetHost's NativeViews. Most of the
+ // time, its frame in screen coordinates is the same as SliderView's frame in
+ // screen coordinates. During an overscroll animation, it may temporarily be
+ // relocated, but it will return to its original position after the overscroll
+ // animation is finished.
+ base::scoped_nsobject<NSView> middleView_;
+
+ // This view is a sibling of middleView_, and is guaranteed to live below it.
+ // Most of the time, it is hidden. During a backwards overscroll animation,
+ // middleView_ is slid to the right, and bottomView_ peeks out from the
+ // original position of middleView_.
+ base::scoped_nsobject<NSImageView> bottomView_;
+
+ // This view is a sibling of middleView_, and is guaranteed to live above it.
+ // Most of the time, it is hidden. During a forwards overscroll animation,
+ // topView_ is slid to the left from off screen, its final position exactly
+ // covering middleView_.
+ base::scoped_nsobject<NSImageView> topView_;
+
+ // The direction of the current overscroll animation. This property has no
+ // meaning when inOverscroll_ is false.
+ content::OverscrollAnimatorDirection direction_;
+
+ // Indicates that this view is completing or cancelling the overscroll. This
+ // animation cannot be cancelled.
+ BOOL animating_;
+
+ // Reflects whether this view is in the process of handling an overscroll.
+ BOOL inOverscroll_;
+
+ // The most recent value passed to -updateOverscrollProgress:.
+ CGFloat progress_;
+
+ // An observer that reports the first non-empty paint of a WebContents. This
+ // is used when completing an overscroll animation.
+ scoped_ptr<overscroll_animator::WebContentsPaintObserver> observer_;
+}
+@end
+
+#endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_OVERSCROLL_ANIMATOR_SLIDER_MAC_H_
diff --git a/content/browser/web_contents/web_contents_view_overscroll_animator_slider_mac.mm b/content/browser/web_contents/web_contents_view_overscroll_animator_slider_mac.mm
new file mode 100644
index 0000000..29c84c1
--- /dev/null
+++ b/content/browser/web_contents/web_contents_view_overscroll_animator_slider_mac.mm
@@ -0,0 +1,259 @@
+// Copyright 2014 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.
+
+#import <QuartzCore/QuartzCore.h>
+
+#include "content/browser/web_contents/web_contents_view_overscroll_animator_slider_mac.h"
+
+#include "content/browser/web_contents/web_contents_impl.h"
+#include "content/public/browser/web_contents_observer.h"
+
+namespace {
+// The minimum possible progress of an overscroll animation.
+CGFloat kMinProgress = 0;
+// The maximum possible progress of an overscroll animation.
+CGFloat kMaxProgress = 2.0;
+// The maximum duration of the completion or cancellation animations. The
+// effective maximum is half of this value, since the longest animation is from
+// progress = 1.0 to progress = 2.0;
+CGFloat kMaxAnimationDuration = 0.2;
+} // namespace
+
+// OverscrollAnimatorSliderView Private Category -------------------------------
+
+@interface OverscrollAnimatorSliderView ()
+// Callback from WebContentsPaintObserver.
+- (void)webContentsFinishedNonEmptyPaint;
+
+// Resets overscroll animation state.
+- (void)reset;
+
+// Given a |progress| from 0 to 2, the expected frame origin of the -movingView.
+- (NSPoint)frameOriginWithProgress:(CGFloat)progress;
+
+// The NSView that is moving during the overscroll animation.
+- (NSView*)movingView;
+
+// The expected duration of an animation from progress_ to |progress|
+- (CGFloat)animationDurationForProgress:(CGFloat)progress;
+
+// NSView override. During an overscroll animation, the cursor may no longer
+// rest on the RenderWidgetHost's NativeView, which prevents wheel events from
+// reaching the NativeView. The overscroll animation is driven by wheel events
+// so they must be explicitly forwarded to the NativeView.
+- (void)scrollWheel:(NSEvent*)event;
+@end
+
+// Helper Class (ResizingView) -------------------------------------------------
+
+// This NSView subclass is intended to be the RenderWidgetHost's NativeView's
+// parent NSView. It is possible for the RenderWidgetHost's NativeView's size to
+// become out of sync with its parent NSView. The override of
+// -resizeSubviewsWithOldSize: ensures that the sizes will eventually become
+// consistent.
+// http://crbug.com/264207
+@interface ResizingView : NSView
+@end
+
+@implementation ResizingView
+- (void)resizeSubviewsWithOldSize:(NSSize)oldBoundsSize {
+ for (NSView* subview in self.subviews)
+ [subview setFrame:self.bounds];
+}
+@end
+
+// Helper Class (WebContentsPaintObserver) -------------------------------------
+
+namespace overscroll_animator {
+class WebContentsPaintObserver : public content::WebContentsObserver {
+ public:
+ WebContentsPaintObserver(content::WebContents* web_contents,
+ OverscrollAnimatorSliderView* slider_view)
+ : WebContentsObserver(web_contents), slider_view_(slider_view) {}
+
+ virtual void DidFirstVisuallyNonEmptyPaint() OVERRIDE {
+ [slider_view_ webContentsFinishedNonEmptyPaint];
+ }
+
+ private:
+ OverscrollAnimatorSliderView* slider_view_; // Weak reference.
+};
+} // namespace overscroll_animator
+
+// OverscrollAnimatorSliderView Implementation ---------------------------------
+
+@implementation OverscrollAnimatorSliderView
+
+- (instancetype)initWithFrame:(NSRect)frame {
+ self = [super initWithFrame:frame];
+ if (self) {
+ bottomView_.reset([[NSImageView alloc] initWithFrame:self.bounds]);
+ bottomView_.get().imageScaling = NSImageScaleNone;
+ bottomView_.get().autoresizingMask =
+ NSViewWidthSizable | NSViewHeightSizable;
+ bottomView_.get().imageAlignment = NSImageAlignTop;
+ [self addSubview:bottomView_];
+ middleView_.reset([[ResizingView alloc] initWithFrame:self.bounds]);
+ middleView_.get().autoresizingMask =
+ NSViewWidthSizable | NSViewHeightSizable;
+ [self addSubview:middleView_];
+ topView_.reset([[NSImageView alloc] initWithFrame:self.bounds]);
+ topView_.get().autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
+ topView_.get().imageScaling = NSImageScaleNone;
+ topView_.get().imageAlignment = NSImageAlignTop;
+ [self addSubview:topView_];
+
+ [self reset];
+ }
+ return self;
+}
+
+- (void)webContentsFinishedNonEmptyPaint {
+ observer_.reset();
+ [self reset];
+}
+
+- (void)reset {
+ DCHECK(!animating_);
+ inOverscroll_ = NO;
+ progress_ = kMinProgress;
+
+ [CATransaction begin];
+ [CATransaction setDisableActions:YES];
+ bottomView_.get().hidden = YES;
+ middleView_.get().hidden = NO;
+ topView_.get().hidden = YES;
+
+ [bottomView_ setFrameOrigin:NSMakePoint(0, 0)];
+ [middleView_ setFrameOrigin:NSMakePoint(0, 0)];
+ [topView_ setFrameOrigin:NSMakePoint(0, 0)];
+ [CATransaction commit];
+}
+
+- (NSPoint)frameOriginWithProgress:(CGFloat)progress {
+ if (direction_ == content::OVERSCROLL_ANIMATOR_DIRECTION_BACKWARDS)
+ return NSMakePoint(progress / kMaxProgress * self.bounds.size.width, 0);
+ return NSMakePoint((1 - progress / kMaxProgress) * self.bounds.size.width, 0);
+}
+
+- (NSView*)movingView {
+ if (direction_ == content::OVERSCROLL_ANIMATOR_DIRECTION_BACKWARDS)
+ return middleView_;
+ return topView_;
+}
+
+- (CGFloat)animationDurationForProgress:(CGFloat)progress {
+ CGFloat progressPercentage =
+ fabs(progress_ - progress) / (kMaxProgress - kMinProgress);
+ return progressPercentage * kMaxAnimationDuration;
+}
+
+- (void)scrollWheel:(NSEvent*)event {
+ NSView* latestRenderWidgetHostView = [[middleView_ subviews] lastObject];
+ [latestRenderWidgetHostView scrollWheel:event];
+}
+
+// WebContentsOverscrollAnimator Implementation --------------------------------
+
+- (BOOL)needsNavigationSnapshot {
+ return YES;
+}
+
+- (void)beginOverscrollInDirection:
+ (content::OverscrollAnimatorDirection)direction
+ navigationSnapshot:(NSImage*)snapshot {
+ // TODO(erikchen): If snapshot is nil, need a placeholder.
+ if (animating_ || inOverscroll_)
+ return;
+
+ inOverscroll_ = YES;
+ direction_ = direction;
+ if (direction_ == content::OVERSCROLL_ANIMATOR_DIRECTION_BACKWARDS) {
+ // The middleView_ will slide to the right, revealing bottomView_.
+ bottomView_.get().hidden = NO;
+ [bottomView_ setImage:snapshot];
+ } else {
+ // The topView_ will slide in from the right, concealing middleView_.
+ topView_.get().hidden = NO;
+ [topView_ setFrameOrigin:NSMakePoint(self.bounds.size.width, 0)];
+ [topView_ setImage:snapshot];
+ }
+
+ [self updateOverscrollProgress:kMinProgress];
+}
+
+- (void)addRenderWidgetHostNativeView:(NSView*)view {
+ [middleView_ addSubview:view];
+}
+
+- (void)updateOverscrollProgress:(CGFloat)progress {
+ if (animating_)
+ return;
+ DCHECK_LE(progress, kMaxProgress);
+ DCHECK_GE(progress, kMinProgress);
+ progress_ = progress;
+ [[self movingView] setFrameOrigin:[self frameOriginWithProgress:progress]];
+}
+
+- (void)completeOverscroll:(content::WebContentsImpl*)webContents {
+ if (animating_ || !inOverscroll_)
+ return;
+
+ animating_ = YES;
+
+ NSView* view = [self movingView];
+ [NSAnimationContext beginGrouping];
+ [NSAnimationContext currentContext].duration =
+ [self animationDurationForProgress:kMaxProgress];
+ [[NSAnimationContext currentContext] setCompletionHandler:^{
+ animating_ = NO;
+
+ // Animation is complete. Now perform page load.
+ if (direction_ == content::OVERSCROLL_ANIMATOR_DIRECTION_BACKWARDS)
+ webContents->GetController().GoBack();
+ else
+ webContents->GetController().GoForward();
+
+ // Reset the position of the middleView_, but wait for the page to paint
+ // before showing it.
+ middleView_.get().hidden = YES;
+ [middleView_ setFrameOrigin:NSMakePoint(0, 0)];
+ observer_.reset(
+ new overscroll_animator::WebContentsPaintObserver(webContents, self));
+ }];
+
+ // Animate the moving view to its final position.
+ [[view animator] setFrameOrigin:[self frameOriginWithProgress:kMaxProgress]];
+
+ [NSAnimationContext endGrouping];
+}
+
+- (void)cancelOverscroll {
+ if (animating_)
+ return;
+
+ if (!inOverscroll_) {
+ [self reset];
+ return;
+ }
+
+ animating_ = YES;
+
+ NSView* view = [self movingView];
+ [NSAnimationContext beginGrouping];
+ [NSAnimationContext currentContext].duration =
+ [self animationDurationForProgress:kMinProgress];
+ [[NSAnimationContext currentContext] setCompletionHandler:^{
+ // Animation is complete. Reset the state.
+ animating_ = NO;
+ [self reset];
+ }];
+
+ // Animate the moving view to its initial position.
+ [[view animator] setFrameOrigin:[self frameOriginWithProgress:kMinProgress]];
+
+ [NSAnimationContext endGrouping];
+}
+
+@end
diff --git a/content/browser/webui/web_ui_controller_factory_registry.cc b/content/browser/webui/web_ui_controller_factory_registry.cc
index a933ecd..a80f52b 100644
--- a/content/browser/webui/web_ui_controller_factory_registry.cc
+++ b/content/browser/webui/web_ui_controller_factory_registry.cc
@@ -83,7 +83,7 @@
return UseWebUIForURL(browser_context, url) ||
// It's possible to load about:blank in a Web UI renderer.
// See http://crbug.com/42547
- url.spec() == kAboutBlankURL ||
+ url.spec() == url::kAboutBlankURL ||
// javascript: and debug URLs like chrome://kill are allowed.
IsRendererDebugURL(url);
}
diff --git a/content/child/appcache/appcache_backend_proxy.cc b/content/child/appcache/appcache_backend_proxy.cc
index 8f9d06a..e1d96d6 100644
--- a/content/child/appcache/appcache_backend_proxy.cc
+++ b/content/child/appcache/appcache_backend_proxy.cc
@@ -54,8 +54,8 @@
cache_document_was_loaded_from));
}
-appcache::Status AppCacheBackendProxy::GetStatus(int host_id) {
- appcache::Status status = appcache::UNCACHED;
+appcache::AppCacheStatus AppCacheBackendProxy::GetStatus(int host_id) {
+ appcache::AppCacheStatus status = appcache::APPCACHE_STATUS_UNCACHED;
sender_->Send(new AppCacheHostMsg_GetStatus(host_id, &status));
return status;
}
diff --git a/content/child/appcache/appcache_backend_proxy.h b/content/child/appcache/appcache_backend_proxy.h
index 0f3ab2d..389f08c 100644
--- a/content/child/appcache/appcache_backend_proxy.h
+++ b/content/child/appcache/appcache_backend_proxy.h
@@ -38,7 +38,7 @@
int host_id,
const GURL& document_url,
int64 cache_document_was_loaded_from) OVERRIDE;
- virtual appcache::Status GetStatus(int host_id) OVERRIDE;
+ virtual appcache::AppCacheStatus GetStatus(int host_id) OVERRIDE;
virtual bool StartUpdate(int host_id) OVERRIDE;
virtual bool SwapCache(int host_id) OVERRIDE;
virtual void GetResourceList(
diff --git a/content/child/appcache/appcache_dispatcher.cc b/content/child/appcache/appcache_dispatcher.cc
index 412dcdb..11e5b9d 100644
--- a/content/child/appcache/appcache_dispatcher.cc
+++ b/content/child/appcache/appcache_dispatcher.cc
@@ -37,12 +37,12 @@
}
void AppCacheDispatcher::OnStatusChanged(const std::vector<int>& host_ids,
- appcache::Status status) {
+ appcache::AppCacheStatus status) {
frontend_->OnStatusChanged(host_ids, status);
}
void AppCacheDispatcher::OnEventRaised(const std::vector<int>& host_ids,
- appcache::EventID event_id) {
+ appcache::AppCacheEventID event_id) {
frontend_->OnEventRaised(host_ids, event_id);
}
@@ -54,14 +54,14 @@
void AppCacheDispatcher::OnErrorEventRaised(
const std::vector<int>& host_ids,
- const appcache::ErrorDetails& details) {
+ const appcache::AppCacheErrorDetails& details) {
frontend_->OnErrorEventRaised(host_ids, details);
}
void AppCacheDispatcher::OnLogMessage(
int host_id, int log_level, const std::string& message) {
frontend_->OnLogMessage(
- host_id, static_cast<appcache::LogLevel>(log_level), message);
+ host_id, static_cast<appcache::AppCacheLogLevel>(log_level), message);
}
void AppCacheDispatcher::OnContentBlocked(int host_id,
diff --git a/content/child/appcache/appcache_dispatcher.h b/content/child/appcache/appcache_dispatcher.h
index 0fce801..6b62727 100644
--- a/content/child/appcache/appcache_dispatcher.h
+++ b/content/child/appcache/appcache_dispatcher.h
@@ -34,13 +34,13 @@
// Ipc message handlers
void OnCacheSelected(int host_id, const appcache::AppCacheInfo& info);
void OnStatusChanged(const std::vector<int>& host_ids,
- appcache::Status status);
+ appcache::AppCacheStatus status);
void OnEventRaised(const std::vector<int>& host_ids,
- appcache::EventID event_id);
+ appcache::AppCacheEventID event_id);
void OnProgressEventRaised(const std::vector<int>& host_ids,
const GURL& url, int num_total, int num_complete);
void OnErrorEventRaised(const std::vector<int>& host_ids,
- const appcache::ErrorDetails& details);
+ const appcache::AppCacheErrorDetails& details);
void OnLogMessage(int host_id, int log_level, const std::string& message);
void OnContentBlocked(int host_id, const GURL& manifest_url);
diff --git a/content/child/appcache/appcache_frontend_impl.cc b/content/child/appcache/appcache_frontend_impl.cc
index 6496f69..1a33e0d 100644
--- a/content/child/appcache/appcache_frontend_impl.cc
+++ b/content/child/appcache/appcache_frontend_impl.cc
@@ -26,7 +26,7 @@
}
void AppCacheFrontendImpl::OnStatusChanged(const std::vector<int>& host_ids,
- appcache::Status status) {
+ appcache::AppCacheStatus status) {
for (std::vector<int>::const_iterator i = host_ids.begin();
i != host_ids.end(); ++i) {
WebApplicationCacheHostImpl* host = GetHost(*i);
@@ -36,9 +36,10 @@
}
void AppCacheFrontendImpl::OnEventRaised(const std::vector<int>& host_ids,
- appcache::EventID event_id) {
- DCHECK(event_id != appcache::PROGRESS_EVENT); // See OnProgressEventRaised.
- DCHECK(event_id != appcache::ERROR_EVENT); // See OnErrorEventRaised.
+ appcache::AppCacheEventID event_id) {
+ DCHECK(event_id !=
+ appcache::APPCACHE_PROGRESS_EVENT); // See OnProgressEventRaised.
+ DCHECK(event_id != appcache::APPCACHE_ERROR_EVENT); // See OnErrorEventRaised.
for (std::vector<int>::const_iterator i = host_ids.begin();
i != host_ids.end(); ++i) {
WebApplicationCacheHostImpl* host = GetHost(*i);
@@ -62,7 +63,7 @@
void AppCacheFrontendImpl::OnErrorEventRaised(
const std::vector<int>& host_ids,
- const appcache::ErrorDetails& details) {
+ const appcache::AppCacheErrorDetails& details) {
for (std::vector<int>::const_iterator i = host_ids.begin();
i != host_ids.end(); ++i) {
WebApplicationCacheHostImpl* host = GetHost(*i);
@@ -72,7 +73,7 @@
}
void AppCacheFrontendImpl::OnLogMessage(int host_id,
- appcache::LogLevel log_level,
+ appcache::AppCacheLogLevel log_level,
const std::string& message) {
WebApplicationCacheHostImpl* host = GetHost(host_id);
if (host)
@@ -89,67 +90,67 @@
// Ensure that enum values never get out of sync with the
// ones declared for use within the WebKit api
COMPILE_ASSERT((int)WebApplicationCacheHost::Uncached ==
- (int)appcache::UNCACHED, Uncached);
+ (int)appcache::APPCACHE_STATUS_UNCACHED, Uncached);
COMPILE_ASSERT((int)WebApplicationCacheHost::Idle ==
- (int)appcache::IDLE, Idle);
+ (int)appcache::APPCACHE_STATUS_IDLE, Idle);
COMPILE_ASSERT((int)WebApplicationCacheHost::Checking ==
- (int)appcache::CHECKING, Checking);
+ (int)appcache::APPCACHE_STATUS_CHECKING, Checking);
COMPILE_ASSERT((int)WebApplicationCacheHost::Downloading ==
- (int)appcache::DOWNLOADING, Downloading);
+ (int)appcache::APPCACHE_STATUS_DOWNLOADING, Downloading);
COMPILE_ASSERT((int)WebApplicationCacheHost::UpdateReady ==
- (int)appcache::UPDATE_READY, UpdateReady);
+ (int)appcache::APPCACHE_STATUS_UPDATE_READY, UpdateReady);
COMPILE_ASSERT((int)WebApplicationCacheHost::Obsolete ==
- (int)appcache::OBSOLETE, Obsolete);
+ (int)appcache::APPCACHE_STATUS_OBSOLETE, Obsolete);
COMPILE_ASSERT((int)WebApplicationCacheHost::CheckingEvent ==
- (int)appcache::CHECKING_EVENT, CheckingEvent);
+ (int)appcache::APPCACHE_CHECKING_EVENT, CheckingEvent);
COMPILE_ASSERT((int)WebApplicationCacheHost::ErrorEvent ==
- (int)appcache::ERROR_EVENT, ErrorEvent);
+ (int)appcache::APPCACHE_ERROR_EVENT, ErrorEvent);
COMPILE_ASSERT((int)WebApplicationCacheHost::NoUpdateEvent ==
- (int)appcache::NO_UPDATE_EVENT, NoUpdateEvent);
+ (int)appcache::APPCACHE_NO_UPDATE_EVENT, NoUpdateEvent);
COMPILE_ASSERT((int)WebApplicationCacheHost::DownloadingEvent ==
- (int)appcache::DOWNLOADING_EVENT, DownloadingEvent);
+ (int)appcache::APPCACHE_DOWNLOADING_EVENT, DownloadingEvent);
COMPILE_ASSERT((int)WebApplicationCacheHost::ProgressEvent ==
- (int)appcache::PROGRESS_EVENT, ProgressEvent);
+ (int)appcache::APPCACHE_PROGRESS_EVENT, ProgressEvent);
COMPILE_ASSERT((int)WebApplicationCacheHost::UpdateReadyEvent ==
- (int)appcache::UPDATE_READY_EVENT, UpdateReadyEvent);
+ (int)appcache::APPCACHE_UPDATE_READY_EVENT, UpdateReadyEvent);
COMPILE_ASSERT((int)WebApplicationCacheHost::CachedEvent ==
- (int)appcache::CACHED_EVENT, CachedEvent);
+ (int)appcache::APPCACHE_CACHED_EVENT, CachedEvent);
COMPILE_ASSERT((int)WebApplicationCacheHost::ObsoleteEvent ==
- (int)appcache::OBSOLETE_EVENT, ObsoleteEvent);
+ (int)appcache::APPCACHE_OBSOLETE_EVENT, ObsoleteEvent);
COMPILE_ASSERT((int)WebConsoleMessage::LevelDebug ==
- (int)appcache::LOG_DEBUG, LevelDebug);
+ (int)appcache::APPCACHE_LOG_DEBUG, LevelDebug);
COMPILE_ASSERT((int)WebConsoleMessage::LevelLog ==
- (int)appcache::LOG_INFO, LevelLog);
+ (int)appcache::APPCACHE_LOG_INFO, LevelLog);
COMPILE_ASSERT((int)WebConsoleMessage::LevelWarning ==
- (int)appcache::LOG_WARNING, LevelWarning);
+ (int)appcache::APPCACHE_LOG_WARNING, LevelWarning);
COMPILE_ASSERT((int)WebConsoleMessage::LevelError ==
- (int)appcache::LOG_ERROR, LevelError);
+ (int)appcache::APPCACHE_LOG_ERROR, LevelError);
COMPILE_ASSERT((int)WebApplicationCacheHost::ManifestError ==
- (int)appcache::MANIFEST_ERROR,
+ (int)appcache::APPCACHE_MANIFEST_ERROR,
ManifestError);
COMPILE_ASSERT((int)WebApplicationCacheHost::SignatureError ==
- (int)appcache::SIGNATURE_ERROR,
+ (int)appcache::APPCACHE_SIGNATURE_ERROR,
SignatureError);
COMPILE_ASSERT((int)WebApplicationCacheHost::ResourceError ==
- (int)appcache::RESOURCE_ERROR,
+ (int)appcache::APPCACHE_RESOURCE_ERROR,
ResourceError);
COMPILE_ASSERT((int)WebApplicationCacheHost::ChangedError ==
- (int)appcache::CHANGED_ERROR,
+ (int)appcache::APPCACHE_CHANGED_ERROR,
ChangedError);
COMPILE_ASSERT((int)WebApplicationCacheHost::AbortError ==
- (int)appcache::ABORT_ERROR,
+ (int)appcache::APPCACHE_ABORT_ERROR,
AbortError);
COMPILE_ASSERT((int)WebApplicationCacheHost::QuotaError ==
- (int)appcache::QUOTA_ERROR,
+ (int)appcache::APPCACHE_QUOTA_ERROR,
QuotaError);
COMPILE_ASSERT((int)WebApplicationCacheHost::PolicyError ==
- (int)appcache::POLICY_ERROR,
+ (int)appcache::APPCACHE_POLICY_ERROR,
PolicyError);
COMPILE_ASSERT((int)WebApplicationCacheHost::UnknownError ==
- (int)appcache::UNKNOWN_ERROR,
+ (int)appcache::APPCACHE_UNKNOWN_ERROR,
UnknownError);
} // namespace content
diff --git a/content/child/appcache/appcache_frontend_impl.h b/content/child/appcache/appcache_frontend_impl.h
index 0c4fee5..90ac4fe 100644
--- a/content/child/appcache/appcache_frontend_impl.h
+++ b/content/child/appcache/appcache_frontend_impl.h
@@ -14,18 +14,18 @@
virtual void OnCacheSelected(int host_id,
const appcache::AppCacheInfo& info) OVERRIDE;
virtual void OnStatusChanged(const std::vector<int>& host_ids,
- appcache::Status status) OVERRIDE;
+ appcache::AppCacheStatus status) OVERRIDE;
virtual void OnEventRaised(const std::vector<int>& host_ids,
- appcache::EventID event_id) OVERRIDE;
+ appcache::AppCacheEventID event_id) OVERRIDE;
virtual void OnProgressEventRaised(const std::vector<int>& host_ids,
const GURL& url,
int num_total,
int num_complete) OVERRIDE;
virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
- const appcache::ErrorDetails& details)
+ const appcache::AppCacheErrorDetails& details)
OVERRIDE;
virtual void OnLogMessage(int host_id,
- appcache::LogLevel log_level,
+ appcache::AppCacheLogLevel log_level,
const std::string& message) OVERRIDE;
virtual void OnContentBlocked(int host_id, const GURL& manifest_url) OVERRIDE;
};
diff --git a/content/child/appcache/web_application_cache_host_impl.cc b/content/child/appcache/web_application_cache_host_impl.cc
index fb996ee..427262e 100644
--- a/content/child/appcache/web_application_cache_host_impl.cc
+++ b/content/child/appcache/web_application_cache_host_impl.cc
@@ -61,12 +61,12 @@
: client_(client),
backend_(backend),
host_id_(all_hosts()->Add(this)),
- status_(appcache::UNCACHED),
+ status_(appcache::APPCACHE_STATUS_UNCACHED),
is_scheme_supported_(false),
is_get_method_(false),
is_new_master_entry_(MAYBE),
was_select_cache_called_(false) {
- DCHECK(client && backend && (host_id_ != appcache::kNoHostId));
+ DCHECK(client && backend && (host_id_ != appcache::kAppCacheNoHostId));
backend_->RegisterHost(host_id_);
}
@@ -82,37 +82,40 @@
client_->didChangeCacheAssociation();
}
-void WebApplicationCacheHostImpl::OnStatusChanged(appcache::Status status) {
+void WebApplicationCacheHostImpl::OnStatusChanged(
+ appcache::AppCacheStatus status) {
// TODO(michaeln): delete me, not used
}
-void WebApplicationCacheHostImpl::OnEventRaised(appcache::EventID event_id) {
- DCHECK(event_id != appcache::PROGRESS_EVENT); // See OnProgressEventRaised.
- DCHECK(event_id != appcache::ERROR_EVENT); // See OnErrorEventRaised.
+void WebApplicationCacheHostImpl::OnEventRaised(
+ appcache::AppCacheEventID event_id) {
+ DCHECK(event_id !=
+ appcache::APPCACHE_PROGRESS_EVENT); // See OnProgressEventRaised.
+ DCHECK(event_id != appcache::APPCACHE_ERROR_EVENT); // See OnErrorEventRaised.
// Emit logging output prior to calling out to script as we can get
// deleted within the script event handler.
const char* kFormatString = "Application Cache %s event";
std::string message = base::StringPrintf(kFormatString,
kEventNames[event_id]);
- OnLogMessage(appcache::LOG_INFO, message);
+ OnLogMessage(appcache::APPCACHE_LOG_INFO, message);
switch (event_id) {
- case appcache::CHECKING_EVENT:
- status_ = appcache::CHECKING;
+ case appcache::APPCACHE_CHECKING_EVENT:
+ status_ = appcache::APPCACHE_STATUS_CHECKING;
break;
- case appcache::DOWNLOADING_EVENT:
- status_ = appcache::DOWNLOADING;
+ case appcache::APPCACHE_DOWNLOADING_EVENT:
+ status_ = appcache::APPCACHE_STATUS_DOWNLOADING;
break;
- case appcache::UPDATE_READY_EVENT:
- status_ = appcache::UPDATE_READY;
+ case appcache::APPCACHE_UPDATE_READY_EVENT:
+ status_ = appcache::APPCACHE_STATUS_UPDATE_READY;
break;
- case appcache::CACHED_EVENT:
- case appcache::NO_UPDATE_EVENT:
- status_ = appcache::IDLE;
+ case appcache::APPCACHE_CACHED_EVENT:
+ case appcache::APPCACHE_NO_UPDATE_EVENT:
+ status_ = appcache::APPCACHE_STATUS_IDLE;
break;
- case appcache::OBSOLETE_EVENT:
- status_ = appcache::OBSOLETE;
+ case appcache::APPCACHE_OBSOLETE_EVENT:
+ status_ = appcache::APPCACHE_STATUS_OBSOLETE;
break;
default:
NOTREACHED();
@@ -129,24 +132,25 @@
const char* kFormatString = "Application Cache Progress event (%d of %d) %s";
std::string message = base::StringPrintf(kFormatString, num_complete,
num_total, url.spec().c_str());
- OnLogMessage(appcache::LOG_INFO, message);
- status_ = appcache::DOWNLOADING;
+ OnLogMessage(appcache::APPCACHE_LOG_INFO, message);
+ status_ = appcache::APPCACHE_STATUS_DOWNLOADING;
client_->notifyProgressEventListener(url, num_total, num_complete);
}
void WebApplicationCacheHostImpl::OnErrorEventRaised(
- const appcache::ErrorDetails& details) {
+ const appcache::AppCacheErrorDetails& details) {
// Emit logging output prior to calling out to script as we can get
// deleted within the script event handler.
const char* kFormatString = "Application Cache Error event: %s";
std::string full_message =
base::StringPrintf(kFormatString, details.message.c_str());
- OnLogMessage(appcache::LOG_ERROR, full_message);
+ OnLogMessage(appcache::APPCACHE_LOG_ERROR, full_message);
- status_ = cache_info_.is_complete ? appcache::IDLE : appcache::UNCACHED;
+ status_ = cache_info_.is_complete ? appcache::APPCACHE_STATUS_IDLE :
+ appcache::APPCACHE_STATUS_UNCACHED;
if (details.is_cross_origin) {
// Don't leak detailed information to script for cross-origin resources.
- DCHECK_EQ(appcache::RESOURCE_ERROR, details.reason);
+ DCHECK_EQ(appcache::APPCACHE_RESOURCE_ERROR, details.reason);
client_->notifyErrorEventListener(
static_cast<ErrorReason>(details.reason), details.url, 0, WebString());
} else {
@@ -170,7 +174,7 @@
const WebApplicationCacheHostImpl* spawning_host_impl =
static_cast<const WebApplicationCacheHostImpl*>(spawning_host);
if (spawning_host_impl && (spawning_host_impl != this) &&
- (spawning_host_impl->status_ != appcache::UNCACHED)) {
+ (spawning_host_impl->status_ != appcache::APPCACHE_STATUS_UNCACHED)) {
backend_->SetSpawningHostId(host_id_, spawning_host_impl->host_id());
}
}
@@ -185,8 +189,8 @@
return;
was_select_cache_called_ = true;
- status_ = (document_response_.appCacheID() == appcache::kNoCacheId) ?
- appcache::UNCACHED : appcache::CHECKING;
+ status_ = (document_response_.appCacheID() == appcache::kAppCacheNoCacheId) ?
+ appcache::APPCACHE_STATUS_UNCACHED : appcache::APPCACHE_STATUS_CHECKING;
is_new_master_entry_ = NO;
backend_->SelectCache(host_id_, document_url_,
document_response_.appCacheID(),
@@ -203,18 +207,18 @@
// 6.9.6 The application cache selection algorithm
// Check for new 'master' entries.
- if (document_response_.appCacheID() == appcache::kNoCacheId) {
+ if (document_response_.appCacheID() == appcache::kAppCacheNoCacheId) {
if (is_scheme_supported_ && is_get_method_ &&
(manifest_gurl.GetOrigin() == document_url_.GetOrigin())) {
- status_ = appcache::CHECKING;
+ status_ = appcache::APPCACHE_STATUS_CHECKING;
is_new_master_entry_ = YES;
} else {
- status_ = appcache::UNCACHED;
+ status_ = appcache::APPCACHE_STATUS_UNCACHED;
is_new_master_entry_ = NO;
manifest_gurl = GURL();
}
backend_->SelectCache(
- host_id_, document_url_, appcache::kNoCacheId, manifest_gurl);
+ host_id_, document_url_, appcache::kAppCacheNoCacheId, manifest_gurl);
return true;
}
@@ -226,11 +230,11 @@
if (document_manifest_gurl != manifest_gurl) {
backend_->MarkAsForeignEntry(host_id_, document_url_,
document_response_.appCacheID());
- status_ = appcache::UNCACHED;
+ status_ = appcache::APPCACHE_STATUS_UNCACHED;
return false; // the navigation will be restarted
}
- status_ = appcache::CHECKING;
+ status_ = appcache::APPCACHE_STATUS_CHECKING;
// Its a 'master' entry thats already in the cache.
backend_->SelectCache(host_id_, document_url_,
@@ -248,7 +252,7 @@
original_main_resource_url_ = GURL();
is_scheme_supported_ = appcache::IsSchemeSupported(document_url_);
- if ((document_response_.appCacheID() != appcache::kNoCacheId) ||
+ if ((document_response_.appCacheID() != appcache::kAppCacheNoCacheId) ||
!is_scheme_supported_ || !is_get_method_)
is_new_master_entry_ = NO;
}
@@ -273,8 +277,9 @@
bool WebApplicationCacheHostImpl::startUpdate() {
if (!backend_->StartUpdate(host_id_))
return false;
- if (status_ == appcache::IDLE || status_ == appcache::UPDATE_READY)
- status_ = appcache::CHECKING;
+ if (status_ == appcache::APPCACHE_STATUS_IDLE ||
+ status_ == appcache::APPCACHE_STATUS_UPDATE_READY)
+ status_ = appcache::APPCACHE_STATUS_CHECKING;
else
status_ = backend_->GetStatus(host_id_);
return true;
diff --git a/content/child/appcache/web_application_cache_host_impl.h b/content/child/appcache/web_application_cache_host_impl.h
index 4f570c5..07ec2db 100644
--- a/content/child/appcache/web_application_cache_host_impl.h
+++ b/content/child/appcache/web_application_cache_host_impl.h
@@ -31,11 +31,11 @@
blink::WebApplicationCacheHostClient* client() const { return client_; }
virtual void OnCacheSelected(const appcache::AppCacheInfo& info);
- void OnStatusChanged(appcache::Status);
- void OnEventRaised(appcache::EventID);
+ void OnStatusChanged(appcache::AppCacheStatus);
+ void OnEventRaised(appcache::AppCacheEventID);
void OnProgressEventRaised(const GURL& url, int num_total, int num_complete);
- void OnErrorEventRaised(const appcache::ErrorDetails& details);
- virtual void OnLogMessage(appcache::LogLevel log_level,
+ void OnErrorEventRaised(const appcache::AppCacheErrorDetails& details);
+ virtual void OnLogMessage(appcache::AppCacheLogLevel log_level,
const std::string& message) {}
virtual void OnContentBlocked(const GURL& manifest_url) {}
@@ -64,7 +64,7 @@
blink::WebApplicationCacheHostClient* client_;
appcache::AppCacheBackend* backend_;
int host_id_;
- appcache::Status status_;
+ appcache::AppCacheStatus status_;
blink::WebURLResponse document_response_;
GURL document_url_;
bool is_scheme_supported_;
diff --git a/content/child/assert_matching_enums.cc b/content/child/assert_matching_enums.cc
new file mode 100644
index 0000000..f52f6ad
--- /dev/null
+++ b/content/child/assert_matching_enums.cc
@@ -0,0 +1,59 @@
+// Copyright 2014 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.
+
+// Use this file to assert that *_list.h enums that are meant to do the bridge
+// from Blink are valid.
+
+#include "base/macros.h"
+#include "cc/animation/animation.h"
+#include "content/public/common/screen_orientation_values.h"
+#include "net/base/mime_util.h"
+#include "third_party/WebKit/public/platform/WebAnimation.h"
+#include "third_party/WebKit/public/platform/WebMimeRegistry.h"
+#include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
+
+namespace content {
+
+#define COMPILE_ASSERT_MATCHING_ENUM(expected, actual) \
+ COMPILE_ASSERT(int(expected) == int(actual), mismatching_enums)
+
+// ScreenOrientationValues
+COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockDefault,
+ DEFAULT);
+COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortraitPrimary,
+ PORTRAIT_PRIMARY);
+COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortraitSecondary,
+ PORTRAIT_SECONDARY);
+COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscapePrimary,
+ LANDSCAPE_PRIMARY);
+COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscapeSecondary,
+ LANDSCAPE_SECONDARY);
+COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockAny,
+ ANY);
+COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscape,
+ LANDSCAPE);
+COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortrait,
+ PORTRAIT);
+
+// SupportsType
+COMPILE_ASSERT_MATCHING_ENUM(blink::WebMimeRegistry::IsNotSupported,
+ net::IsNotSupported);
+COMPILE_ASSERT_MATCHING_ENUM(blink::WebMimeRegistry::IsSupported,
+ net::IsSupported);
+COMPILE_ASSERT_MATCHING_ENUM(blink::WebMimeRegistry::MayBeSupported,
+ net::MayBeSupported);
+
+// TargetProperty
+COMPILE_ASSERT_MATCHING_ENUM(blink::WebAnimation::TargetPropertyTransform,
+ cc::Animation::Transform);
+COMPILE_ASSERT_MATCHING_ENUM(blink::WebAnimation::TargetPropertyOpacity,
+ cc::Animation::Opacity);
+COMPILE_ASSERT_MATCHING_ENUM(blink::WebAnimation::TargetPropertyFilter,
+ cc::Animation::Filter);
+#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
+COMPILE_ASSERT_MATCHING_ENUM(blink::WebAnimation::TargetPropertyScrollOffset,
+ cc::Animation::ScrollOffset);
+#endif
+
+} // namespace content
diff --git a/content/child/child_histogram_message_filter.cc b/content/child/child_histogram_message_filter.cc
index cab7bea..3cf36ce 100644
--- a/content/child/child_histogram_message_filter.cc
+++ b/content/child/child_histogram_message_filter.cc
@@ -12,20 +12,20 @@
#include "content/child/child_process.h"
#include "content/child/child_thread.h"
#include "content/common/child_process_messages.h"
-#include "ipc/ipc_channel.h"
+#include "ipc/ipc_sender.h"
namespace content {
ChildHistogramMessageFilter::ChildHistogramMessageFilter()
- : channel_(NULL),
+ : sender_(NULL),
io_message_loop_(ChildProcess::current()->io_message_loop_proxy()) {
}
ChildHistogramMessageFilter::~ChildHistogramMessageFilter() {
}
-void ChildHistogramMessageFilter::OnFilterAdded(IPC::Channel* channel) {
- channel_ = channel;
+void ChildHistogramMessageFilter::OnFilterAdded(IPC::Sender* sender) {
+ sender_ = sender;
}
void ChildHistogramMessageFilter::OnFilterRemoved() {
@@ -60,7 +60,7 @@
std::vector<std::string> deltas;
histogram_delta_serialization_->PrepareAndSerializeDeltas(&deltas);
- channel_->Send(
+ sender_->Send(
new ChildProcessHostMsg_ChildHistogramData(sequence_number, deltas));
static int count = 0;
diff --git a/content/child/child_histogram_message_filter.h b/content/child/child_histogram_message_filter.h
index 14aa740..34498c7 100644
--- a/content/child/child_histogram_message_filter.h
+++ b/content/child/child_histogram_message_filter.h
@@ -24,7 +24,7 @@
ChildHistogramMessageFilter();
// IPC::MessageFilter implementation.
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
@@ -42,7 +42,7 @@
// Send only a delta to what we have already sent.
void UploadAllHistograms(int sequence_number);
- IPC::Channel* channel_;
+ IPC::Sender* sender_;
scoped_refptr<base::MessageLoopProxy> io_message_loop_;
diff --git a/content/child/child_thread.cc b/content/child/child_thread.cc
index 5e77c40..55cef8f 100644
--- a/content/child/child_thread.cc
+++ b/content/child/child_thread.cc
@@ -120,7 +120,7 @@
// forever and leave behind a renderer process which eats 100% CPU forever.
//
// This is because the terminate signals (ViewMsg_ShouldClose and the error
- // from the IPC channel) are routed to the main message loop but never
+ // from the IPC sender) are routed to the main message loop but never
// processed (because that message loop is stuck in V8).
//
// One could make the browser SIGKILL the renderers, but that leaves open a
@@ -128,7 +128,7 @@
// the browser because "it's stuck") will leave behind a process eating all
// the CPU.
//
- // So, we install a filter on the channel so that we can process this event
+ // So, we install a filter on the sender so that we can process this event
// here and kill the process.
// TODO(earthdok): Re-enable on CrOS http://crbug.com/360622
#if (defined(ADDRESS_SANITIZER) || defined(LEAK_SANITIZER) || \
diff --git a/content/child/fileapi/OWNERS b/content/child/fileapi/OWNERS
index 2dc5ad3..2c20f11 100644
--- a/content/child/fileapi/OWNERS
+++ b/content/child/fileapi/OWNERS
@@ -5,7 +5,6 @@
# For security review of IPC message files.
per-file *_messages*.h=set noparent
-per-file *_messages*.h=cdn@chromium.org
per-file *_messages*.h=cevans@chromium.org
per-file *_messages*.h=dcheng@chromium.org
per-file *_messages*.h=inferno@chromium.org
diff --git a/content/child/indexed_db/OWNERS b/content/child/indexed_db/OWNERS
index 53e405c..c7ad25e 100644
--- a/content/child/indexed_db/OWNERS
+++ b/content/child/indexed_db/OWNERS
@@ -1,12 +1,11 @@
dgrogan@chromium.org
-hans@chromium.org
michaeln@chromium.org
jsbell@chromium.org
-alecflett@chromium.org
+ericu@chromium.org
+cmumford@chromium.org
# For security review of IPC message files.
per-file *_messages*.h=set noparent
-per-file *_messages*.h=cdn@chromium.org
per-file *_messages*.h=cevans@chromium.org
per-file *_messages*.h=dcheng@chromium.org
per-file *_messages*.h=inferno@chromium.org
diff --git a/content/child/indexed_db/indexed_db_dispatcher.cc b/content/child/indexed_db/indexed_db_dispatcher.cc
index 3a66188..e6fc2b9 100644
--- a/content/child/indexed_db/indexed_db_dispatcher.cc
+++ b/content/child/indexed_db/indexed_db_dispatcher.cc
@@ -310,7 +310,7 @@
WebIDBCallbacks* callbacks) {
ResetCursorPrefetchCaches(transaction_id, kAllCursors);
IndexedDBHostMsg_DatabaseGet_Params params;
- init_params(params, callbacks);
+ init_params(¶ms, callbacks);
params.ipc_database_id = ipc_database_id;
params.transaction_id = transaction_id;
params.object_store_id = object_store_id;
@@ -345,7 +345,7 @@
ResetCursorPrefetchCaches(transaction_id, kAllCursors);
IndexedDBHostMsg_DatabasePut_Params params;
- init_params(params, callbacks);
+ init_params(¶ms, callbacks);
params.ipc_database_id = ipc_database_id;
params.transaction_id = transaction_id;
params.object_store_id = object_store_id;
@@ -397,7 +397,7 @@
WebIDBCallbacks* callbacks) {
ResetCursorPrefetchCaches(transaction_id, kAllCursors);
IndexedDBHostMsg_DatabaseOpenCursor_Params params;
- init_params(params, callbacks);
+ init_params(¶ms, callbacks);
params.ipc_database_id = ipc_database_id;
params.transaction_id = transaction_id;
params.object_store_id = object_store_id;
@@ -422,7 +422,7 @@
WebIDBCallbacks* callbacks) {
ResetCursorPrefetchCaches(transaction_id, kAllCursors);
IndexedDBHostMsg_DatabaseCount_Params params;
- init_params(params, callbacks);
+ init_params(¶ms, callbacks);
params.ipc_database_id = ipc_database_id;
params.transaction_id = transaction_id;
params.object_store_id = object_store_id;
@@ -439,7 +439,7 @@
WebIDBCallbacks* callbacks) {
ResetCursorPrefetchCaches(transaction_id, kAllCursors);
IndexedDBHostMsg_DatabaseDeleteRange_Params params;
- init_params(params, callbacks);
+ init_params(¶ms, callbacks);
params.ipc_database_id = ipc_database_id;
params.transaction_id = transaction_id;
params.object_store_id = object_store_id;
diff --git a/content/child/indexed_db/indexed_db_dispatcher.h b/content/child/indexed_db/indexed_db_dispatcher.h
index c4159be..d0e1118 100644
--- a/content/child/indexed_db/indexed_db_dispatcher.h
+++ b/content/child/indexed_db/indexed_db_dispatcher.h
@@ -6,6 +6,7 @@
#define CONTENT_CHILD_INDEXED_DB_INDEXED_DB_DISPATCHER_H_
#include <map>
+#include <string>
#include <vector>
#include "base/gtest_prod_util.h"
@@ -182,10 +183,10 @@
}
template <typename T>
- void init_params(T& params, blink::WebIDBCallbacks* callbacks_ptr) {
+ void init_params(T* params, blink::WebIDBCallbacks* callbacks_ptr) {
scoped_ptr<blink::WebIDBCallbacks> callbacks(callbacks_ptr);
- params.ipc_thread_id = CurrentWorkerId();
- params.ipc_callbacks_id = pending_callbacks_.Add(callbacks.release());
+ params->ipc_thread_id = CurrentWorkerId();
+ params->ipc_callbacks_id = pending_callbacks_.Add(callbacks.release());
}
// IDBCallback message handlers.
diff --git a/content/child/indexed_db/indexed_db_dispatcher_unittest.cc b/content/child/indexed_db/indexed_db_dispatcher_unittest.cc
index dbe43fc..6bc4d5d 100644
--- a/content/child/indexed_db/indexed_db_dispatcher_unittest.cc
+++ b/content/child/indexed_db/indexed_db_dispatcher_unittest.cc
@@ -39,16 +39,22 @@
private:
bool error_seen_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockCallbacks);
};
class MockDispatcher : public IndexedDBDispatcher {
public:
- MockDispatcher(ThreadSafeSender* sender) : IndexedDBDispatcher(sender) {}
+ explicit MockDispatcher(ThreadSafeSender* sender)
+ : IndexedDBDispatcher(sender) {}
virtual bool Send(IPC::Message* msg) OVERRIDE {
delete msg;
return true;
}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockDispatcher);
};
} // namespace
@@ -128,7 +134,8 @@
class CursorCallbacks : public WebIDBCallbacks {
public:
- CursorCallbacks(scoped_ptr<WebIDBCursor>* cursor) : cursor_(cursor) {}
+ explicit CursorCallbacks(scoped_ptr<WebIDBCursor>* cursor)
+ : cursor_(cursor) {}
virtual void onSuccess(const WebData&,
const WebVector<WebBlobInfo>&) OVERRIDE {}
@@ -142,6 +149,8 @@
private:
scoped_ptr<WebIDBCursor>* cursor_;
+
+ DISALLOW_COPY_AND_ASSIGN(CursorCallbacks);
};
} // namespace
@@ -248,6 +257,8 @@
private:
int reset_count_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockCursor);
};
} // namespace
diff --git a/content/child/indexed_db/indexed_db_key_builders.cc b/content/child/indexed_db/indexed_db_key_builders.cc
index 831161c..fe3b3f0 100644
--- a/content/child/indexed_db/indexed_db_key_builders.cc
+++ b/content/child/indexed_db/indexed_db_key_builders.cc
@@ -4,6 +4,10 @@
#include "content/child/indexed_db/indexed_db_key_builders.h"
+#include <algorithm>
+#include <string>
+#include <vector>
+
#include "base/logging.h"
#include "third_party/WebKit/public/platform/WebVector.h"
diff --git a/content/child/indexed_db/indexed_db_key_builders.h b/content/child/indexed_db/indexed_db_key_builders.h
index 5a51a8a..fb299c0 100644
--- a/content/child/indexed_db/indexed_db_key_builders.h
+++ b/content/child/indexed_db/indexed_db_key_builders.h
@@ -22,26 +22,41 @@
class CONTENT_EXPORT IndexedDBKeyBuilder {
public:
static IndexedDBKey Build(const blink::WebIDBKey& key);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBKeyBuilder);
};
class CONTENT_EXPORT WebIDBKeyBuilder {
public:
static blink::WebIDBKey Build(const content::IndexedDBKey& key);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WebIDBKeyBuilder);
};
class CONTENT_EXPORT IndexedDBKeyRangeBuilder {
public:
static IndexedDBKeyRange Build(const blink::WebIDBKeyRange& key_range);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBKeyRangeBuilder);
};
class CONTENT_EXPORT IndexedDBKeyPathBuilder {
public:
static IndexedDBKeyPath Build(const blink::WebIDBKeyPath& key_path);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexedDBKeyPathBuilder);
};
class CONTENT_EXPORT WebIDBKeyPathBuilder {
public:
static blink::WebIDBKeyPath Build(const IndexedDBKeyPath& key_path);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WebIDBKeyPathBuilder);
};
} // namespace content
diff --git a/content/child/indexed_db/webidbcursor_impl.h b/content/child/indexed_db/webidbcursor_impl.h
index f68da6a..1a06d99 100644
--- a/content/child/indexed_db/webidbcursor_impl.h
+++ b/content/child/indexed_db/webidbcursor_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBCURSOR_IMPL_H_
-#define CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBCURSOR_IMPL_H_
+#ifndef CONTENT_CHILD_INDEXED_DB_WEBIDBCURSOR_IMPL_H_
+#define CONTENT_CHILD_INDEXED_DB_WEBIDBCURSOR_IMPL_H_
#include <deque>
#include <vector>
@@ -90,4 +90,4 @@
} // namespace content
-#endif // CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBCURSOR_IMPL_H_
+#endif // CONTENT_CHILD_INDEXED_DB_WEBIDBCURSOR_IMPL_H_
diff --git a/content/child/indexed_db/webidbcursor_impl_unittest.cc b/content/child/indexed_db/webidbcursor_impl_unittest.cc
index a131096..2ff4617 100644
--- a/content/child/indexed_db/webidbcursor_impl_unittest.cc
+++ b/content/child/indexed_db/webidbcursor_impl_unittest.cc
@@ -28,7 +28,7 @@
class MockDispatcher : public IndexedDBDispatcher {
public:
- MockDispatcher(ThreadSafeSender* thread_safe_sender)
+ explicit MockDispatcher(ThreadSafeSender* thread_safe_sender)
: IndexedDBDispatcher(thread_safe_sender),
prefetch_calls_(0),
last_prefetch_count_(0),
@@ -103,7 +103,6 @@
const WebIDBKey& primaryKey,
const WebData& value,
const WebVector<WebBlobInfo>& webBlobInfo) OVERRIDE {
-
if (key_)
*key_ = IndexedDBKeyBuilder::Build(key);
if (webBlobInfo_)
@@ -140,7 +139,6 @@
};
TEST_F(WebIDBCursorImplTest, PrefetchTest) {
-
const int64 transaction_id = 1;
{
WebIDBCursorImpl cursor(WebIDBCursorImpl::kInvalidCursorId,
@@ -164,7 +162,6 @@
int last_prefetch_count = 0;
for (int repetitions = 0; repetitions < kPrefetchRepetitions;
++repetitions) {
-
// Initiate the prefetch
cursor.continueFunction(null_key_, new MockContinueCallbacks());
EXPECT_EQ(continue_calls, dispatcher_->continue_calls());
@@ -212,7 +209,6 @@
}
TEST_F(WebIDBCursorImplTest, AdvancePrefetchTest) {
-
const int64 transaction_id = 1;
WebIDBCursorImpl cursor(WebIDBCursorImpl::kInvalidCursorId,
transaction_id,
diff --git a/content/child/indexed_db/webidbdatabase_impl.cc b/content/child/indexed_db/webidbdatabase_impl.cc
index ee83e18..757d195 100644
--- a/content/child/indexed_db/webidbdatabase_impl.cc
+++ b/content/child/indexed_db/webidbdatabase_impl.cc
@@ -4,6 +4,7 @@
#include "content/child/indexed_db/webidbdatabase_impl.h"
+#include <string>
#include <vector>
#include "content/child/indexed_db/indexed_db_dispatcher.h"
@@ -108,31 +109,6 @@
callbacks);
}
-// TODO(ericu): Remove this once it's obsolete. It's only here for the
-// three-sided-patch dance.
-void WebIDBDatabaseImpl::put(long long transaction_id,
- long long object_store_id,
- const blink::WebData& value,
- const WebIDBKey& key,
- PutMode put_mode,
- WebIDBCallbacks* callbacks,
- const WebVector<long long>& web_index_ids,
- const WebVector<WebIndexKeys>& web_index_keys) {
- IndexedDBDispatcher* dispatcher =
- IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get());
- const blink::WebVector<WebBlobInfo> web_blob_info;
- dispatcher->RequestIDBDatabasePut(ipc_database_id_,
- transaction_id,
- object_store_id,
- value,
- web_blob_info,
- IndexedDBKeyBuilder::Build(key),
- put_mode,
- callbacks,
- web_index_ids,
- web_index_keys);
-}
-
void WebIDBDatabaseImpl::put(long long transaction_id,
long long object_store_id,
const blink::WebData& value,
diff --git a/content/child/indexed_db/webidbdatabase_impl.h b/content/child/indexed_db/webidbdatabase_impl.h
index 088f722..c488af6 100644
--- a/content/child/indexed_db/webidbdatabase_impl.h
+++ b/content/child/indexed_db/webidbdatabase_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBDATABASE_IMPL_H_
-#define CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBDATABASE_IMPL_H_
+#ifndef CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
+#define CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
@@ -46,16 +46,6 @@
const blink::WebIDBKeyRange&,
bool keyOnly,
blink::WebIDBCallbacks*);
-// TODO(ericu): Remove this once it's obsolete. It's only here for the
-// three-sided-patch dance.
- virtual void put(long long transactionId,
- long long objectStoreId,
- const blink::WebData& value,
- const blink::WebIDBKey&,
- PutMode,
- blink::WebIDBCallbacks*,
- const blink::WebVector<long long>& indexIds,
- const blink::WebVector<WebIndexKeys>&);
virtual void put(long long transactionId,
long long objectStoreId,
const blink::WebData& value,
@@ -116,4 +106,4 @@
} // namespace content
-#endif // CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBDATABASE_IMPL_H_
+#endif // CONTENT_CHILD_INDEXED_DB_WEBIDBDATABASE_IMPL_H_
diff --git a/content/child/indexed_db/webidbfactory_impl.h b/content/child/indexed_db/webidbfactory_impl.h
index 1484cd6..cc11bba 100644
--- a/content/child/indexed_db/webidbfactory_impl.h
+++ b/content/child/indexed_db/webidbfactory_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBFACTORY_IMPL_H_
-#define CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBFACTORY_IMPL_H_
+#ifndef CONTENT_CHILD_INDEXED_DB_WEBIDBFACTORY_IMPL_H_
+#define CONTENT_CHILD_INDEXED_DB_WEBIDBFACTORY_IMPL_H_
#include "base/memory/ref_counted.h"
#include "third_party/WebKit/public/platform/WebIDBCallbacks.h"
@@ -42,4 +42,4 @@
} // namespace content
-#endif // CONTENT_CHILD_INDEXED_DB_PROXY_WEBIDBFACTORY_IMPL_H_
+#endif // CONTENT_CHILD_INDEXED_DB_WEBIDBFACTORY_IMPL_H_
diff --git a/content/child/npapi/plugin_url_fetcher.cc b/content/child/npapi/plugin_url_fetcher.cc
index d596b96..acd508b 100644
--- a/content/child/npapi/plugin_url_fetcher.cc
+++ b/content/child/npapi/plugin_url_fetcher.cc
@@ -22,6 +22,7 @@
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/http/http_response_headers.h"
+#include "net/url_request/url_request.h"
#include "third_party/WebKit/public/platform/WebURLLoaderClient.h"
#include "third_party/WebKit/public/platform/WebURLResponse.h"
#include "webkit/child/multipart_response_delegate.h"
@@ -213,8 +214,7 @@
// in url_request.cc, but weburlloader_impl.cc and this file have to duplicate
// it instead of passing that information.
int response_code = info.headers->response_code();
- if (response_code != 307)
- method_ = "GET";
+ method_ = net::URLRequest::ComputeMethodForRedirect(method_, response_code);
GURL old_url = url_;
url_ = new_url;
first_party_for_cookies_ = new_first_party_for_cookies;
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index f20e4dd..95697d9 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -19,6 +19,7 @@
#include "content/child/request_info.h"
#include "content/child/site_isolation_policy.h"
#include "content/child/sync_load_response.h"
+#include "content/child/threaded_data_provider.h"
#include "content/common/inter_process_time_ticks_converter.h"
#include "content/common/resource_messages.h"
#include "content/public/child/request_peer.h"
@@ -80,6 +81,8 @@
virtual void SetDefersLoading(bool value) OVERRIDE;
virtual void DidChangePriority(net::RequestPriority new_priority,
int intra_priority_value) OVERRIDE;
+ virtual bool AttachThreadedDataReceiver(
+ blink::WebThreadedDataReceiver* threaded_data_receiver) OVERRIDE;
virtual void SyncLoad(SyncLoadResponse* response) OVERRIDE;
private:
@@ -191,12 +194,10 @@
return;
}
- if (!is_synchronous_request_)
+ if (!is_synchronous_request_) {
+ // This also removes the the request from the dispatcher.
dispatcher_->CancelPendingRequest(request_id_);
-
- // We can't remove the request ID from the resource dispatcher because more
- // data might be pending. Sending the cancel message may cause more data
- // to be flushed, and will then cause a complete message to be sent.
+ }
}
void IPCResourceLoaderBridge::SetDefersLoading(bool value) {
@@ -220,6 +221,17 @@
request_id_, new_priority, intra_priority_value);
}
+bool IPCResourceLoaderBridge::AttachThreadedDataReceiver(
+ blink::WebThreadedDataReceiver* threaded_data_receiver) {
+ if (request_id_ < 0) {
+ NOTREACHED() << "Trying to attach threaded receiver on unstarted request";
+ return false;
+ }
+
+ return dispatcher_->AttachThreadedDataReceiver(request_id_,
+ threaded_data_receiver);
+}
+
void IPCResourceLoaderBridge::SyncLoad(SyncLoadResponse* response) {
if (request_id_ != -1) {
NOTREACHED() << "Starting a request twice";
@@ -405,6 +417,7 @@
TRACE_EVENT0("loader", "ResourceDispatcher::OnReceivedData");
DCHECK_GT(data_length, 0);
PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
+ bool send_ack = true;
if (request_info && data_length > 0) {
CHECK(base::SharedMemory::IsHandleValid(request_info->buffer->handle()));
CHECK_GE(request_info->buffer_size, data_offset + data_length);
@@ -416,9 +429,10 @@
base::TimeTicks time_start = base::TimeTicks::Now();
- const char* data_ptr = static_cast<char*>(request_info->buffer->memory());
- CHECK(data_ptr);
- CHECK(data_ptr + data_offset);
+ const char* data_start = static_cast<char*>(request_info->buffer->memory());
+ CHECK(data_start);
+ CHECK(data_start + data_offset);
+ const char* data_ptr = data_start + data_offset;
// Check whether this response data is compliant with our cross-site
// document blocking policy. We only do this for the first packet.
@@ -426,22 +440,31 @@
if (request_info->site_isolation_metadata.get()) {
request_info->blocked_response =
SiteIsolationPolicy::ShouldBlockResponse(
- request_info->site_isolation_metadata, data_ptr + data_offset,
- data_length, &alternative_data);
+ request_info->site_isolation_metadata, data_ptr, data_length,
+ &alternative_data);
request_info->site_isolation_metadata.reset();
- }
- // When the response is not blocked.
- if (!request_info->blocked_response) {
- request_info->peer->OnReceivedData(
- data_ptr + data_offset, data_length, encoded_data_length);
- } else if (alternative_data.size() > 0) {
- // When the response is blocked, and when we have any alternative data to
+ // When the response is blocked we may have any alternative data to
// send to the renderer. When |alternative_data| is zero-sized, we do not
// call peer's callback.
- request_info->peer->OnReceivedData(alternative_data.data(),
- alternative_data.size(),
- alternative_data.size());
+ if (request_info->blocked_response && !alternative_data.empty()) {
+ data_ptr = alternative_data.data();
+ data_length = alternative_data.size();
+ encoded_data_length = alternative_data.size();
+ }
+ }
+
+ if (!request_info->blocked_response || !alternative_data.empty()) {
+ if (request_info->threaded_data_provider) {
+ request_info->threaded_data_provider->OnReceivedDataOnForegroundThread(
+ data_ptr, data_length, encoded_data_length);
+ // A threaded data provider will take care of its own ACKing, as the
+ // data may be processed later on another thread.
+ send_ack = false;
+ } else {
+ request_info->peer->OnReceivedData(
+ data_ptr, data_length, encoded_data_length);
+ }
}
UMA_HISTOGRAM_TIMES("ResourceDispatcher.OnReceivedDataTime",
@@ -449,7 +472,8 @@
}
// Acknowledge the reception of this data.
- message_sender_->Send(new ResourceHostMsg_DataReceived_ACK(request_id));
+ if (send_ack)
+ message_sender_->Send(new ResourceHostMsg_DataReceived_ACK(request_id));
}
void ResourceDispatcher::OnDownloadedData(int request_id,
@@ -586,11 +610,10 @@
return;
}
- PendingRequestInfo& request_info = it->second;
- ReleaseResourcesInMessageQueue(&request_info.deferred_message_queue);
- pending_requests_.erase(it);
-
+ // Cancel the request, and clean it up so the bridge will receive no more
+ // messages.
message_sender_->Send(new ResourceHostMsg_CancelRequest(request_id));
+ RemovePendingRequest(request_id);
}
void ResourceDispatcher::SetDefersLoading(int request_id, bool value) {
@@ -623,8 +646,25 @@
request_id, new_priority, intra_priority_value));
}
+bool ResourceDispatcher::AttachThreadedDataReceiver(
+ int request_id, blink::WebThreadedDataReceiver* threaded_data_receiver) {
+ PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
+ DCHECK(request_info);
+
+ if (request_info->buffer != NULL) {
+ DCHECK(!request_info->threaded_data_provider);
+ request_info->threaded_data_provider = new ThreadedDataProvider(
+ request_id, threaded_data_receiver, request_info->buffer,
+ request_info->buffer_size);
+ return true;
+ }
+
+ return false;
+}
+
ResourceDispatcher::PendingRequestInfo::PendingRequestInfo()
: peer(NULL),
+ threaded_data_provider(NULL),
resource_type(ResourceType::SUB_RESOURCE),
is_deferred(false),
download_to_file(false),
@@ -640,6 +680,7 @@
const GURL& request_url,
bool download_to_file)
: peer(peer),
+ threaded_data_provider(NULL),
resource_type(resource_type),
origin_pid(origin_pid),
is_deferred(false),
@@ -650,7 +691,10 @@
request_start(base::TimeTicks::Now()),
blocked_response(false) {}
-ResourceDispatcher::PendingRequestInfo::~PendingRequestInfo() {}
+ResourceDispatcher::PendingRequestInfo::~PendingRequestInfo() {
+ if (threaded_data_provider)
+ threaded_data_provider->Stop();
+}
void ResourceDispatcher::DispatchMessage(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(ResourceDispatcher, message)
diff --git a/content/child/resource_dispatcher.h b/content/child/resource_dispatcher.h
index 2e4b54e..b21ec39 100644
--- a/content/child/resource_dispatcher.h
+++ b/content/child/resource_dispatcher.h
@@ -23,6 +23,10 @@
struct ResourceMsg_RequestCompleteData;
+namespace blink {
+class WebThreadedDataReceiver;
+}
+
namespace webkit_glue {
class ResourceLoaderBridge;
}
@@ -30,6 +34,7 @@
namespace content {
class RequestPeer;
class ResourceDispatcherDelegate;
+class ThreadedDataProvider;
struct ResourceResponseInfo;
struct RequestInfo;
struct ResourceResponseHead;
@@ -65,7 +70,8 @@
// request was found and removed.
bool RemovePendingRequest(int request_id);
- // Cancels a request in the |pending_requests_| list.
+ // Cancels a request in the |pending_requests_| list. The request will be
+ // removed from the dispatcher as well.
void CancelPendingRequest(int request_id);
// Toggles the is_deferred attribute for the specified request.
@@ -76,6 +82,11 @@
net::RequestPriority new_priority,
int intra_priority_value);
+ // The provided data receiver will receive incoming resource data rather
+ // than the resource bridge.
+ bool AttachThreadedDataReceiver(
+ int request_id, blink::WebThreadedDataReceiver* threaded_data_receiver);
+
IPC::Sender* message_sender() const { return message_sender_; }
// This does not take ownership of the delegate. It is expected that the
@@ -106,6 +117,7 @@
~PendingRequestInfo();
RequestPeer* peer;
+ ThreadedDataProvider* threaded_data_provider;
ResourceType::Type resource_type;
// The PID of the original process which issued this request. This gets
// non-zero only for a request proxied by another renderer, particularly
diff --git a/content/child/resource_dispatcher_unittest.cc b/content/child/resource_dispatcher_unittest.cc
index 6f48b70..86dc17f 100644
--- a/content/child/resource_dispatcher_unittest.cc
+++ b/content/child/resource_dispatcher_unittest.cc
@@ -5,11 +5,14 @@
#include <string>
#include <vector>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/shared_memory.h"
#include "base/message_loop/message_loop.h"
#include "base/process/process.h"
#include "base/process/process_handle.h"
#include "base/run_loop.h"
+#include "base/stl_util.h"
#include "content/child/request_extra_data.h"
#include "content/child/request_info.h"
#include "content/child/resource_dispatcher.h"
@@ -27,20 +30,30 @@
namespace content {
-static const char test_page_url[] = "http://www.google.com/";
-static const char test_page_headers[] =
+static const char kTestPageUrl[] = "http://www.google.com/";
+static const char kTestPageHeaders[] =
"HTTP/1.1 200 OK\nContent-Type:text/html\n\n";
-static const char test_page_mime_type[] = "text/html";
-static const char test_page_charset[] = "";
-static const char test_page_contents[] =
+static const char kTestPageMimeType[] = "text/html";
+static const char kTestPageCharset[] = "";
+static const char kTestPageContents[] =
"<html><head><title>Google</title></head><body><h1>Google</h1></body></html>";
-static const uint32 test_page_contents_len = arraysize(test_page_contents) - 1;
+static const char kTestRedirectHeaders[] =
+ "HTTP/1.1 302 Found\nLocation:http://www.google.com/\n\n";
// Listens for request response data and stores it so that it can be compared
// to the reference data.
-class TestRequestCallback : public RequestPeer {
+class TestRequestPeer : public RequestPeer {
public:
- TestRequestCallback() : complete_(false) {
+ TestRequestPeer(ResourceLoaderBridge* bridge)
+ : follow_redirects_(true),
+ defer_on_redirect_(false),
+ seen_redirects_(0),
+ cancel_on_receive_response_(false),
+ received_response_(false),
+ total_encoded_data_length_(0),
+ total_downloaded_data_length_(0),
+ complete_(false),
+ bridge_(bridge) {
}
virtual void OnUploadProgress(uint64 position, uint64 size) OVERRIDE {
@@ -49,18 +62,28 @@
virtual bool OnReceivedRedirect(const GURL& new_url,
const GURL& new_first_party_for_cookies,
const ResourceResponseInfo& info) OVERRIDE {
- return true;
+ ++seen_redirects_;
+ if (defer_on_redirect_)
+ bridge_->SetDefersLoading(true);
+ return follow_redirects_;
}
virtual void OnReceivedResponse(const ResourceResponseInfo& info) OVERRIDE {
+ EXPECT_FALSE(received_response_);
+ received_response_ = true;
+ if (cancel_on_receive_response_)
+ bridge_->Cancel();
}
virtual void OnDownloadedData(int len, int encoded_data_length) OVERRIDE {
+ total_downloaded_data_length_ += len;
+ total_encoded_data_length_ += encoded_data_length;
}
virtual void OnReceivedData(const char* data,
int data_length,
int encoded_data_length) OVERRIDE {
+ EXPECT_TRUE(received_response_);
EXPECT_FALSE(complete_);
data_.append(data, data_length);
total_encoded_data_length_ += encoded_data_length;
@@ -73,30 +96,75 @@
const std::string& security_info,
const base::TimeTicks& completion_time,
int64 total_transfer_size) OVERRIDE {
+ EXPECT_TRUE(received_response_);
EXPECT_FALSE(complete_);
complete_ = true;
}
- bool complete() const {
- return complete_;
+ void set_follow_redirects(bool follow_redirects) {
+ follow_redirects_ = follow_redirects;
}
+
+ void set_defer_on_redirect(bool defer_on_redirect) {
+ defer_on_redirect_ = defer_on_redirect;
+ }
+
+ void set_cancel_on_receive_response(bool cancel_on_receive_response) {
+ cancel_on_receive_response_ = cancel_on_receive_response;
+ }
+
+ int seen_redirects() const { return seen_redirects_; }
+
+ bool received_response() const { return received_response_; }
+
const std::string& data() const {
return data_;
}
int total_encoded_data_length() const {
return total_encoded_data_length_;
}
+ int total_downloaded_data_length() const {
+ return total_downloaded_data_length_;
+ }
+
+ bool complete() const { return complete_; }
private:
- bool complete_;
+ // True if should follow redirects, false if should cancel them.
+ bool follow_redirects_;
+ // True if the request should be deferred on redirects.
+ bool defer_on_redirect_;
+ // Number of total redirects seen.
+ int seen_redirects_;
+
+ bool cancel_on_receive_response_;
+ bool received_response_;
+
+ // Data received. If downloading to file, remains empty.
std::string data_;
+ // Total encoded data length, regardless of whether downloading to a file or
+ // not.
int total_encoded_data_length_;
+ // Total length when downloading to a file.
+ int total_downloaded_data_length_;
+
+ bool complete_;
+
+ ResourceLoaderBridge* bridge_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestRequestPeer);
};
-
-// Sets up the message sender override for the unit test
+// Sets up the message sender override for the unit test.
class ResourceDispatcherTest : public testing::Test, public IPC::Sender {
public:
+ ResourceDispatcherTest() : dispatcher_(this) {}
+
+ virtual ~ResourceDispatcherTest() {
+ STLDeleteContainerPairSecondPointers(shared_memory_map_.begin(),
+ shared_memory_map_.end());
+ }
+
// Emulates IPC send operations (IPC::Sender) by adding
// pending messages to the queue.
virtual bool Send(IPC::Message* msg) OVERRIDE {
@@ -105,112 +173,525 @@
return true;
}
- // Emulates the browser process and processes the pending IPC messages,
- // returning the hardcoded file contents.
- void ProcessMessages() {
- while (!message_queue_.empty()) {
- ResourceHostMsg_RequestResource::Param params;
- ASSERT_TRUE(ResourceHostMsg_RequestResource::Read(
- &message_queue_[0], ¶ms));
- int request_id = params.b;
- ResourceHostMsg_Request request = params.c;
+ size_t queued_messages() const { return message_queue_.size(); }
- // check values
- EXPECT_EQ(test_page_url, request.url.spec());
-
- // received response message
- ResourceResponseHead response;
- std::string raw_headers(test_page_headers);
- std::replace(raw_headers.begin(), raw_headers.end(), '\n', '\0');
- response.headers = new net::HttpResponseHeaders(raw_headers);
- response.mime_type = test_page_mime_type;
- response.charset = test_page_charset;
- dispatcher_->OnReceivedResponse(request_id, response);
-
- // received data message with the test contents
- base::SharedMemory shared_mem;
- EXPECT_TRUE(shared_mem.CreateAndMapAnonymous(test_page_contents_len));
- char* put_data_here = static_cast<char*>(shared_mem.memory());
- memcpy(put_data_here, test_page_contents, test_page_contents_len);
- base::SharedMemoryHandle dup_handle;
- EXPECT_TRUE(shared_mem.GiveToProcess(
- base::Process::Current().handle(), &dup_handle));
- dispatcher_->OnSetDataBuffer(request_id, dup_handle,
- test_page_contents_len, 0);
- dispatcher_->OnReceivedData(request_id, 0, test_page_contents_len,
- test_page_contents_len);
-
- message_queue_.erase(message_queue_.begin());
-
- // read the ack message.
- Tuple1<int> request_ack;
- ASSERT_TRUE(ResourceHostMsg_DataReceived_ACK::Read(
- &message_queue_[0], &request_ack));
-
- ASSERT_EQ(request_ack.a, request_id);
-
- message_queue_.erase(message_queue_.begin());
+ // Returns the ID of the consumed request. Can't make assumptions about the
+ // ID, because numbering is based on a global.
+ int ConsumeRequestResource() {
+ if (message_queue_.empty()) {
+ ADD_FAILURE() << "Missing resource request message";
+ return -1;
}
+
+ ResourceHostMsg_RequestResource::Param params;
+ if (ResourceHostMsg_RequestResource::ID != message_queue_[0].type() ||
+ !ResourceHostMsg_RequestResource::Read(&message_queue_[0], ¶ms)) {
+ ADD_FAILURE() << "Expected ResourceHostMsg_RequestResource message";
+ return -1;
+ }
+ ResourceHostMsg_Request request = params.c;
+ EXPECT_EQ(kTestPageUrl, request.url.spec());
+ message_queue_.erase(message_queue_.begin());
+ return params.b;
}
- protected:
- // testing::Test
- virtual void SetUp() OVERRIDE {
- dispatcher_.reset(new ResourceDispatcher(this));
+ void ConsumeFollowRedirect(int expected_request_id) {
+ ASSERT_FALSE(message_queue_.empty());
+ Tuple1<int> args;
+ ASSERT_EQ(ResourceHostMsg_FollowRedirect::ID, message_queue_[0].type());
+ ASSERT_TRUE(ResourceHostMsg_FollowRedirect::Read(
+ &message_queue_[0], &args));
+ EXPECT_EQ(expected_request_id, args.a);
+ message_queue_.erase(message_queue_.begin());
}
- virtual void TearDown() OVERRIDE {
- dispatcher_.reset();
+
+ void ConsumeDataReceived_ACK(int expected_request_id) {
+ ASSERT_FALSE(message_queue_.empty());
+ Tuple1<int> args;
+ ASSERT_EQ(ResourceHostMsg_DataReceived_ACK::ID, message_queue_[0].type());
+ ASSERT_TRUE(ResourceHostMsg_DataReceived_ACK::Read(
+ &message_queue_[0], &args));
+ EXPECT_EQ(expected_request_id, args.a);
+ message_queue_.erase(message_queue_.begin());
+ }
+
+ void ConsumeDataDownloaded_ACK(int expected_request_id) {
+ ASSERT_FALSE(message_queue_.empty());
+ Tuple1<int> args;
+ ASSERT_EQ(ResourceHostMsg_DataDownloaded_ACK::ID, message_queue_[0].type());
+ ASSERT_TRUE(ResourceHostMsg_DataDownloaded_ACK::Read(
+ &message_queue_[0], &args));
+ EXPECT_EQ(expected_request_id, args.a);
+ message_queue_.erase(message_queue_.begin());
+ }
+
+ void ConsumeReleaseDownloadedFile(int expected_request_id) {
+ ASSERT_FALSE(message_queue_.empty());
+ Tuple1<int> args;
+ ASSERT_EQ(ResourceHostMsg_ReleaseDownloadedFile::ID,
+ message_queue_[0].type());
+ ASSERT_TRUE(ResourceHostMsg_ReleaseDownloadedFile::Read(
+ &message_queue_[0], &args));
+ EXPECT_EQ(expected_request_id, args.a);
+ message_queue_.erase(message_queue_.begin());
+ }
+
+ void ConsumeCancelRequest(int expected_request_id) {
+ ASSERT_FALSE(message_queue_.empty());
+ Tuple1<int> args;
+ ASSERT_EQ(ResourceHostMsg_CancelRequest::ID, message_queue_[0].type());
+ ASSERT_TRUE(ResourceHostMsg_CancelRequest::Read(
+ &message_queue_[0], &args));
+ EXPECT_EQ(expected_request_id, args.a);
+ message_queue_.erase(message_queue_.begin());
+ }
+
+ void NotifyReceivedRedirect(int request_id) {
+ ResourceResponseHead head;
+ std::string raw_headers(kTestRedirectHeaders);
+ std::replace(raw_headers.begin(), raw_headers.end(), '\n', '\0');
+ head.headers = new net::HttpResponseHeaders(raw_headers);
+ head.error_code = net::OK;
+ EXPECT_EQ(true, dispatcher_.OnMessageReceived(
+ ResourceMsg_ReceivedRedirect(request_id, GURL(kTestPageUrl),
+ GURL(kTestPageUrl), head)));
+ }
+
+ void NotifyReceivedResponse(int request_id) {
+ ResourceResponseHead head;
+ std::string raw_headers(kTestPageHeaders);
+ std::replace(raw_headers.begin(), raw_headers.end(), '\n', '\0');
+ head.headers = new net::HttpResponseHeaders(raw_headers);
+ head.mime_type = kTestPageMimeType;
+ head.charset = kTestPageCharset;
+ head.error_code = net::OK;
+ EXPECT_EQ(true,
+ dispatcher_.OnMessageReceived(
+ ResourceMsg_ReceivedResponse(request_id, head)));
+ }
+
+ void NotifySetDataBuffer(int request_id, size_t buffer_size) {
+ base::SharedMemory* shared_memory = new base::SharedMemory();
+ ASSERT_FALSE(shared_memory_map_[request_id]);
+ shared_memory_map_[request_id] = shared_memory;
+ EXPECT_TRUE(shared_memory->CreateAndMapAnonymous(buffer_size));
+
+ base::SharedMemoryHandle duplicate_handle;
+ EXPECT_TRUE(shared_memory->ShareToProcess(
+ base::Process::Current().handle(), &duplicate_handle));
+ EXPECT_TRUE(dispatcher_.OnMessageReceived(
+ ResourceMsg_SetDataBuffer(request_id, duplicate_handle,
+ shared_memory->requested_size(), 0)));
+ }
+
+ void NotifyDataReceived(int request_id, std::string data) {
+ ASSERT_LE(data.length(), shared_memory_map_[request_id]->requested_size());
+ memcpy(shared_memory_map_[request_id]->memory(), data.c_str(),
+ data.length());
+
+ EXPECT_TRUE(dispatcher_.OnMessageReceived(
+ ResourceMsg_DataReceived(request_id, 0, data.length(), data.length())));
+ }
+
+ void NotifyDataDownloaded(int request_id, int decoded_length,
+ int encoded_length) {
+ EXPECT_TRUE(dispatcher_.OnMessageReceived(
+ ResourceMsg_DataDownloaded(request_id, decoded_length,
+ encoded_length)));
+ }
+
+ void NotifyRequestComplete(int request_id, size_t total_size) {
+ ResourceMsg_RequestCompleteData request_complete_data;
+ request_complete_data.error_code = net::OK;
+ request_complete_data.was_ignored_by_handler = false;
+ request_complete_data.exists_in_cache = false;
+ request_complete_data.encoded_data_length = total_size;
+ EXPECT_TRUE(dispatcher_.OnMessageReceived(
+ ResourceMsg_RequestComplete(request_id, request_complete_data)));
}
ResourceLoaderBridge* CreateBridge() {
+ return CreateBridgeInternal(false);
+ }
+
+ ResourceLoaderBridge* CreateBridgeForDownloadToFile() {
+ return CreateBridgeInternal(true);
+ }
+
+ ResourceDispatcher* dispatcher() { return &dispatcher_; }
+
+ private:
+ ResourceLoaderBridge* CreateBridgeInternal(bool download_to_file) {
RequestInfo request_info;
request_info.method = "GET";
- request_info.url = GURL(test_page_url);
- request_info.first_party_for_cookies = GURL(test_page_url);
+ request_info.url = GURL(kTestPageUrl);
+ request_info.first_party_for_cookies = GURL(kTestPageUrl);
request_info.referrer = GURL();
request_info.headers = std::string();
request_info.load_flags = 0;
request_info.requestor_pid = 0;
request_info.request_type = ResourceType::SUB_RESOURCE;
- request_info.appcache_host_id = appcache::kNoHostId;
+ request_info.appcache_host_id = appcache::kAppCacheNoHostId;
request_info.routing_id = 0;
+ request_info.download_to_file = download_to_file;
RequestExtraData extra_data;
request_info.extra_data = &extra_data;
- return dispatcher_->CreateBridge(request_info);
+ return dispatcher_.CreateBridge(request_info);
}
+ // Map of request IDs to shared memory.
+ std::map<int, base::SharedMemory*> shared_memory_map_;
+
std::vector<IPC::Message> message_queue_;
- static scoped_ptr<ResourceDispatcher> dispatcher_;
+ ResourceDispatcher dispatcher_;
+ base::MessageLoop message_loop_;
};
-/*static*/
-scoped_ptr<ResourceDispatcher> ResourceDispatcherTest::dispatcher_;
-
-// Does a simple request and tests that the correct data is received.
+// Does a simple request and tests that the correct data is received. Simulates
+// two reads.
TEST_F(ResourceDispatcherTest, RoundTrip) {
- TestRequestCallback callback;
+ // Number of bytes received in the first read.
+ const size_t kFirstReceiveSize = 2;
+ ASSERT_LT(kFirstReceiveSize, strlen(kTestPageContents));
+
scoped_ptr<ResourceLoaderBridge> bridge(CreateBridge());
+ TestRequestPeer peer(bridge.get());
- bridge->Start(&callback);
+ EXPECT_TRUE(bridge->Start(&peer));
+ int id = ConsumeRequestResource();
+ EXPECT_EQ(0u, queued_messages());
- ProcessMessages();
+ NotifyReceivedResponse(id);
+ EXPECT_EQ(0u, queued_messages());
+ EXPECT_TRUE(peer.received_response());
- // FIXME(brettw) when the request complete messages are actually handledo
- // and dispatched, uncomment this.
- //EXPECT_TRUE(callback.complete());
- //EXPECT_STREQ(test_page_contents, callback.data().c_str());
- //EXPECT_EQ(test_page_contents_len, callback.total_encoded_data_length());
+ NotifySetDataBuffer(id, strlen(kTestPageContents));
+ NotifyDataReceived(id, std::string(kTestPageContents, kFirstReceiveSize));
+ ConsumeDataReceived_ACK(id);
+ EXPECT_EQ(0u, queued_messages());
+
+ NotifyDataReceived(id, kTestPageContents + kFirstReceiveSize);
+ ConsumeDataReceived_ACK(id);
+ EXPECT_EQ(0u, queued_messages());
+
+ NotifyRequestComplete(id, strlen(kTestPageContents));
+ EXPECT_EQ(kTestPageContents, peer.data());
+ EXPECT_TRUE(peer.complete());
+ EXPECT_EQ(0u, queued_messages());
}
-// Tests that the request IDs are straight when there are multiple requests.
+// Tests that the request IDs are straight when there are two interleaving
+// requests.
TEST_F(ResourceDispatcherTest, MultipleRequests) {
- // FIXME
+ const char kTestPageContents2[] = "Not kTestPageContents";
+
+ scoped_ptr<ResourceLoaderBridge> bridge1(CreateBridge());
+ TestRequestPeer peer1(bridge1.get());
+ scoped_ptr<ResourceLoaderBridge> bridge2(CreateBridge());
+ TestRequestPeer peer2(bridge2.get());
+
+ EXPECT_TRUE(bridge1->Start(&peer1));
+ int id1 = ConsumeRequestResource();
+ EXPECT_TRUE(bridge2->Start(&peer2));
+ int id2 = ConsumeRequestResource();
+ EXPECT_EQ(0u, queued_messages());
+
+ NotifyReceivedResponse(id1);
+ EXPECT_TRUE(peer1.received_response());
+ EXPECT_FALSE(peer2.received_response());
+ NotifyReceivedResponse(id2);
+ EXPECT_TRUE(peer2.received_response());
+ EXPECT_EQ(0u, queued_messages());
+
+ NotifySetDataBuffer(id2, strlen(kTestPageContents2));
+ NotifyDataReceived(id2, kTestPageContents2);
+ ConsumeDataReceived_ACK(id2);
+ NotifySetDataBuffer(id1, strlen(kTestPageContents));
+ NotifyDataReceived(id1, kTestPageContents);
+ ConsumeDataReceived_ACK(id1);
+ EXPECT_EQ(0u, queued_messages());
+
+ NotifyRequestComplete(id1, strlen(kTestPageContents));
+ EXPECT_EQ(kTestPageContents, peer1.data());
+ EXPECT_TRUE(peer1.complete());
+ EXPECT_FALSE(peer2.complete());
+
+ NotifyRequestComplete(id2, strlen(kTestPageContents2));
+ EXPECT_EQ(kTestPageContents2, peer2.data());
+ EXPECT_TRUE(peer2.complete());
+
+ EXPECT_EQ(0u, queued_messages());
}
-// Tests that the cancel method prevents other messages from being received
+// Tests that the cancel method prevents other messages from being received.
TEST_F(ResourceDispatcherTest, Cancel) {
- // FIXME
+ scoped_ptr<ResourceLoaderBridge> bridge(CreateBridge());
+ TestRequestPeer peer(bridge.get());
+
+ EXPECT_TRUE(bridge->Start(&peer));
+ int id = ConsumeRequestResource();
+ EXPECT_EQ(0u, queued_messages());
+
+ // Cancel the request.
+ bridge->Cancel();
+ ConsumeCancelRequest(id);
+
+ // Any future messages related to the request should be ignored.
+ NotifyReceivedResponse(id);
+ NotifySetDataBuffer(id, strlen(kTestPageContents));
+ NotifyDataReceived(id, kTestPageContents);
+ NotifyRequestComplete(id, strlen(kTestPageContents));
+
+ EXPECT_EQ(0u, queued_messages());
+ EXPECT_EQ("", peer.data());
+ EXPECT_FALSE(peer.received_response());
+ EXPECT_FALSE(peer.complete());
+}
+
+// Tests that calling cancel during a callback works as expected.
+TEST_F(ResourceDispatcherTest, CancelDuringCallback) {
+ scoped_ptr<ResourceLoaderBridge> bridge(CreateBridge());
+ TestRequestPeer peer(bridge.get());
+ peer.set_cancel_on_receive_response(true);
+
+ EXPECT_TRUE(bridge->Start(&peer));
+ int id = ConsumeRequestResource();
+ EXPECT_EQ(0u, queued_messages());
+
+ NotifyReceivedResponse(id);
+ EXPECT_TRUE(peer.received_response());
+ // Request should have been cancelled.
+ ConsumeCancelRequest(id);
+
+ // Any future messages related to the request should be ignored.
+ NotifySetDataBuffer(id, strlen(kTestPageContents));
+ NotifyDataReceived(id, kTestPageContents);
+ NotifyRequestComplete(id, strlen(kTestPageContents));
+
+ EXPECT_EQ(0u, queued_messages());
+ EXPECT_EQ("", peer.data());
+ EXPECT_FALSE(peer.complete());
+}
+
+// Checks that redirects work as expected.
+TEST_F(ResourceDispatcherTest, Redirect) {
+ scoped_ptr<ResourceLoaderBridge> bridge(CreateBridge());
+ TestRequestPeer peer(bridge.get());
+
+ EXPECT_TRUE(bridge->Start(&peer));
+ int id = ConsumeRequestResource();
+
+ NotifyReceivedRedirect(id);
+ ConsumeFollowRedirect(id);
+ EXPECT_EQ(1, peer.seen_redirects());
+
+ NotifyReceivedRedirect(id);
+ ConsumeFollowRedirect(id);
+ EXPECT_EQ(2, peer.seen_redirects());
+
+ NotifyReceivedResponse(id);
+ EXPECT_TRUE(peer.received_response());
+
+ NotifySetDataBuffer(id, strlen(kTestPageContents));
+ NotifyDataReceived(id, kTestPageContents);
+ ConsumeDataReceived_ACK(id);
+
+ NotifyRequestComplete(id, strlen(kTestPageContents));
+ EXPECT_EQ(kTestPageContents, peer.data());
+ EXPECT_TRUE(peer.complete());
+ EXPECT_EQ(0u, queued_messages());
+ EXPECT_EQ(2, peer.seen_redirects());
+}
+
+// Tests that that cancelling during a redirect method prevents other messages
+// from being received.
+TEST_F(ResourceDispatcherTest, CancelDuringRedirect) {
+ scoped_ptr<ResourceLoaderBridge> bridge(CreateBridge());
+ TestRequestPeer peer(bridge.get());
+ peer.set_follow_redirects(false);
+
+ EXPECT_TRUE(bridge->Start(&peer));
+ int id = ConsumeRequestResource();
+ EXPECT_EQ(0u, queued_messages());
+
+ // Redirect the request, which triggers a cancellation.
+ NotifyReceivedRedirect(id);
+ ConsumeCancelRequest(id);
+ EXPECT_EQ(1, peer.seen_redirects());
+ EXPECT_EQ(0u, queued_messages());
+
+ // Any future messages related to the request should be ignored. In practice,
+ // only the NotifyRequestComplete should be received after this point.
+ NotifyReceivedRedirect(id);
+ NotifyReceivedResponse(id);
+ NotifySetDataBuffer(id, strlen(kTestPageContents));
+ NotifyDataReceived(id, kTestPageContents);
+ NotifyRequestComplete(id, strlen(kTestPageContents));
+
+ EXPECT_EQ(0u, queued_messages());
+ EXPECT_EQ("", peer.data());
+ EXPECT_FALSE(peer.complete());
+ EXPECT_EQ(1, peer.seen_redirects());
+}
+
+// Checks that deferring a request delays messages until it's resumed.
+TEST_F(ResourceDispatcherTest, Defer) {
+ scoped_ptr<ResourceLoaderBridge> bridge(CreateBridge());
+ TestRequestPeer peer(bridge.get());
+
+ EXPECT_TRUE(bridge->Start(&peer));
+ int id = ConsumeRequestResource();
+ EXPECT_EQ(0u, queued_messages());
+
+ bridge->SetDefersLoading(true);
+ NotifyReceivedResponse(id);
+ NotifySetDataBuffer(id, strlen(kTestPageContents));
+ NotifyDataReceived(id, kTestPageContents);
+ NotifyRequestComplete(id, strlen(kTestPageContents));
+
+ // None of the messages should have been processed yet, so no queued messages
+ // to the browser process, and no data received by the peer.
+ EXPECT_EQ(0u, queued_messages());
+ EXPECT_EQ("", peer.data());
+ EXPECT_FALSE(peer.complete());
+ EXPECT_EQ(0, peer.seen_redirects());
+
+ // Resuming the request should asynchronously unleash the deferred messages.
+ bridge->SetDefersLoading(false);
+ base::RunLoop().RunUntilIdle();
+
+ ConsumeDataReceived_ACK(id);
+ EXPECT_EQ(0u, queued_messages());
+ EXPECT_TRUE(peer.received_response());
+ EXPECT_EQ(kTestPageContents, peer.data());
+ EXPECT_TRUE(peer.complete());
+}
+
+// Checks that deferring a request during a redirect delays messages until it's
+// resumed.
+TEST_F(ResourceDispatcherTest, DeferOnRedirect) {
+ scoped_ptr<ResourceLoaderBridge> bridge(CreateBridge());
+ TestRequestPeer peer(bridge.get());
+ peer.set_defer_on_redirect(true);
+
+ EXPECT_TRUE(bridge->Start(&peer));
+ int id = ConsumeRequestResource();
+ EXPECT_EQ(0u, queued_messages());
+
+ // The request should be deferred during the redirect, including the message
+ // to follow the redirect.
+ NotifyReceivedRedirect(id);
+ NotifyReceivedResponse(id);
+ NotifySetDataBuffer(id, strlen(kTestPageContents));
+ NotifyDataReceived(id, kTestPageContents);
+ NotifyRequestComplete(id, strlen(kTestPageContents));
+
+ // None of the messages should have been processed yet, so no queued messages
+ // to the browser process, and no data received by the peer.
+ EXPECT_EQ(0u, queued_messages());
+ EXPECT_EQ("", peer.data());
+ EXPECT_FALSE(peer.complete());
+ EXPECT_EQ(1, peer.seen_redirects());
+
+ // Resuming the request should asynchronously unleash the deferred messages.
+ bridge->SetDefersLoading(false);
+ base::RunLoop().RunUntilIdle();
+
+ ConsumeFollowRedirect(id);
+ ConsumeDataReceived_ACK(id);
+
+ EXPECT_EQ(0u, queued_messages());
+ EXPECT_TRUE(peer.received_response());
+ EXPECT_EQ(kTestPageContents, peer.data());
+ EXPECT_TRUE(peer.complete());
+ EXPECT_EQ(1, peer.seen_redirects());
+}
+
+// Checks that a deferred request that's cancelled doesn't receive any messages.
+TEST_F(ResourceDispatcherTest, CancelDeferredRequest) {
+ scoped_ptr<ResourceLoaderBridge> bridge(CreateBridge());
+ TestRequestPeer peer(bridge.get());
+
+ EXPECT_TRUE(bridge->Start(&peer));
+ int id = ConsumeRequestResource();
+ EXPECT_EQ(0u, queued_messages());
+
+ bridge->SetDefersLoading(true);
+ NotifyReceivedRedirect(id);
+ bridge->Cancel();
+ ConsumeCancelRequest(id);
+
+ NotifyRequestComplete(id, 0);
+ base::RunLoop().RunUntilIdle();
+
+ // None of the messages should have been processed.
+ EXPECT_EQ(0u, queued_messages());
+ EXPECT_EQ("", peer.data());
+ EXPECT_FALSE(peer.complete());
+ EXPECT_EQ(0, peer.seen_redirects());
+}
+
+TEST_F(ResourceDispatcherTest, DownloadToFile) {
+ scoped_ptr<ResourceLoaderBridge> bridge(CreateBridgeForDownloadToFile());
+ TestRequestPeer peer(bridge.get());
+ const int kDownloadedIncrement = 100;
+ const int kEncodedIncrement = 50;
+
+ EXPECT_TRUE(bridge->Start(&peer));
+ int id = ConsumeRequestResource();
+ EXPECT_EQ(0u, queued_messages());
+
+ NotifyReceivedResponse(id);
+ EXPECT_EQ(0u, queued_messages());
+ EXPECT_TRUE(peer.received_response());
+
+ int expected_total_downloaded_length = 0;
+ int expected_total_encoded_length = 0;
+ for (int i = 0; i < 10; ++i) {
+ NotifyDataDownloaded(id, kDownloadedIncrement, kEncodedIncrement);
+ ConsumeDataDownloaded_ACK(id);
+ expected_total_downloaded_length += kDownloadedIncrement;
+ expected_total_encoded_length += kEncodedIncrement;
+ EXPECT_EQ(expected_total_downloaded_length,
+ peer.total_downloaded_data_length());
+ EXPECT_EQ(expected_total_encoded_length, peer.total_encoded_data_length());
+ }
+
+ NotifyRequestComplete(id, strlen(kTestPageContents));
+ EXPECT_EQ("", peer.data());
+ EXPECT_TRUE(peer.complete());
+ EXPECT_EQ(0u, queued_messages());
+
+ bridge.reset();
+ ConsumeReleaseDownloadedFile(id);
+ EXPECT_EQ(0u, queued_messages());
+ EXPECT_EQ(expected_total_downloaded_length,
+ peer.total_downloaded_data_length());
+ EXPECT_EQ(expected_total_encoded_length, peer.total_encoded_data_length());
+}
+
+// Make sure that when a download to file is cancelled, the file is destroyed.
+TEST_F(ResourceDispatcherTest, CancelDownloadToFile) {
+ scoped_ptr<ResourceLoaderBridge> bridge(CreateBridgeForDownloadToFile());
+ TestRequestPeer peer(bridge.get());
+
+ EXPECT_TRUE(bridge->Start(&peer));
+ int id = ConsumeRequestResource();
+ EXPECT_EQ(0u, queued_messages());
+
+ NotifyReceivedResponse(id);
+ EXPECT_EQ(0u, queued_messages());
+ EXPECT_TRUE(peer.received_response());
+
+ // Cancelling the request deletes the file.
+ bridge->Cancel();
+ ConsumeCancelRequest(id);
+ ConsumeReleaseDownloadedFile(id);
+
+ // Deleting the bridge shouldn't send another message to delete the file.
+ bridge.reset();
+ EXPECT_EQ(0u, queued_messages());
}
TEST_F(ResourceDispatcherTest, Cookies) {
@@ -221,116 +702,6 @@
// FIXME
}
-// This class provides functionality to validate whether the ResourceDispatcher
-// object honors the deferred loading contract correctly, i.e. if deferred
-// loading is enabled it should queue up any responses received. If deferred
-// loading is enabled/disabled in the context of a dispatched message, other
-// queued messages should not be dispatched until deferred load is turned off.
-class DeferredResourceLoadingTest : public ResourceDispatcherTest,
- public RequestPeer {
- public:
- DeferredResourceLoadingTest()
- : defer_loading_(false) {
- }
-
- virtual bool Send(IPC::Message* msg) OVERRIDE {
- delete msg;
- return true;
- }
-
- void InitMessages() {
- set_defer_loading(true);
-
- ResourceResponseHead response_head;
- response_head.error_code = net::OK;
-
- dispatcher_->OnMessageReceived(
- ResourceMsg_ReceivedResponse(0, response_head));
-
- // Duplicate the shared memory handle so both the test and the callee can
- // close their copy.
- base::SharedMemoryHandle duplicated_handle;
- EXPECT_TRUE(shared_handle_.ShareToProcess(base::GetCurrentProcessHandle(),
- &duplicated_handle));
-
- dispatcher_->OnMessageReceived(
- ResourceMsg_SetDataBuffer(0, duplicated_handle, 100, 0));
- dispatcher_->OnMessageReceived(ResourceMsg_DataReceived(0, 0, 100, 100));
-
- set_defer_loading(false);
- }
-
- // RequestPeer methods.
- virtual void OnUploadProgress(uint64 position, uint64 size) OVERRIDE {
- }
-
- virtual bool OnReceivedRedirect(const GURL& new_url,
- const GURL& new_first_party_for_cookies,
- const ResourceResponseInfo& info) OVERRIDE {
- return true;
- }
-
- virtual void OnReceivedResponse(const ResourceResponseInfo& info) OVERRIDE {
- EXPECT_EQ(defer_loading_, false);
- set_defer_loading(true);
- }
-
- virtual void OnDownloadedData(int len, int encoded_data_length) OVERRIDE {
- }
-
- virtual void OnReceivedData(const char* data,
- int data_length,
- int encoded_data_length) OVERRIDE {
- EXPECT_EQ(defer_loading_, false);
- set_defer_loading(false);
- }
-
- virtual void OnCompletedRequest(
- int error_code,
- bool was_ignored_by_handler,
- bool stale_copy_in_cache,
- const std::string& security_info,
- const base::TimeTicks& completion_time,
- int64 total_transfer_size) OVERRIDE {
- }
-
- protected:
- virtual void SetUp() OVERRIDE {
- ResourceDispatcherTest::SetUp();
- EXPECT_TRUE(shared_handle_.CreateAnonymous(100));
- }
-
- virtual void TearDown() OVERRIDE {
- shared_handle_.Close();
- ResourceDispatcherTest::TearDown();
- }
-
- private:
- void set_defer_loading(bool defer) {
- defer_loading_ = defer;
- dispatcher_->SetDefersLoading(0, defer);
- }
-
- bool defer_loading() const {
- return defer_loading_;
- }
-
- bool defer_loading_;
- base::SharedMemory shared_handle_;
-};
-
-TEST_F(DeferredResourceLoadingTest, DeferredLoadTest) {
- base::MessageLoopForIO message_loop;
-
- scoped_ptr<ResourceLoaderBridge> bridge(CreateBridge());
-
- bridge->Start(this);
- InitMessages();
-
- // Dispatch deferred messages.
- base::RunLoop().RunUntilIdle();
-}
-
class TimeConversionTest : public ResourceDispatcherTest,
public RequestPeer {
public:
@@ -343,7 +714,7 @@
scoped_ptr<ResourceLoaderBridge> bridge(CreateBridge());
bridge->Start(this);
- dispatcher_->OnMessageReceived(
+ dispatcher()->OnMessageReceived(
ResourceMsg_ReceivedResponse(0, response_head));
}
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
index 3dd2ad3..1b471c0 100644
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -48,6 +48,7 @@
WebRuntimeFeatures::enableNavigatorContentUtils(false);
WebRuntimeFeatures::enableTouchIconLoading(true);
WebRuntimeFeatures::enableOrientationEvent(true);
+ WebRuntimeFeatures::enableFastMobileScrolling(true);
#else
WebRuntimeFeatures::enableNavigatorContentUtils(true);
#endif // defined(OS_ANDROID)
diff --git a/content/child/service_worker/service_worker_dispatcher.cc b/content/child/service_worker/service_worker_dispatcher.cc
index 6db0c286..131b714 100644
--- a/content/child/service_worker/service_worker_dispatcher.cc
+++ b/content/child/service_worker/service_worker_dispatcher.cc
@@ -57,6 +57,8 @@
OnRegistrationError)
IPC_MESSAGE_HANDLER(ServiceWorkerMsg_ServiceWorkerStateChanged,
OnServiceWorkerStateChanged)
+ IPC_MESSAGE_HANDLER(ServiceWorkerMsg_SetWaitingServiceWorker,
+ OnSetWaitingServiceWorker)
IPC_MESSAGE_HANDLER(ServiceWorkerMsg_SetCurrentServiceWorker,
OnSetCurrentServiceWorker)
IPC_MESSAGE_HANDLER(ServiceWorkerMsg_MessageToDocument,
@@ -104,6 +106,7 @@
DCHECK(provider_context);
DCHECK(ContainsKey(provider_contexts_, provider_context->provider_id()));
provider_contexts_.erase(provider_context->provider_id());
+ worker_to_provider_.erase(provider_context->waiting_handle_id());
worker_to_provider_.erase(provider_context->current_handle_id());
}
@@ -151,6 +154,9 @@
WebServiceWorkerImpl* ServiceWorkerDispatcher::GetServiceWorker(
const ServiceWorkerObjectInfo& info,
bool adopt_handle) {
+ if (info.handle_id == kInvalidServiceWorkerHandleId)
+ return NULL;
+
WorkerObjectMap::iterator existing_worker =
service_workers_.find(info.handle_id);
@@ -228,6 +234,33 @@
provider->second->OnServiceWorkerStateChanged(handle_id, state);
}
+void ServiceWorkerDispatcher::OnSetWaitingServiceWorker(
+ int thread_id,
+ int provider_id,
+ const ServiceWorkerObjectInfo& info) {
+ ProviderContextMap::iterator provider = provider_contexts_.find(provider_id);
+ if (provider != provider_contexts_.end()) {
+ int existing_waiting_id = provider->second->waiting_handle_id();
+ if (existing_waiting_id != info.handle_id &&
+ existing_waiting_id != kInvalidServiceWorkerHandleId) {
+ WorkerToProviderMap::iterator associated_provider =
+ worker_to_provider_.find(existing_waiting_id);
+ DCHECK(associated_provider != worker_to_provider_.end());
+ DCHECK(associated_provider->second->provider_id() == provider_id);
+ worker_to_provider_.erase(associated_provider);
+ }
+ provider->second->OnSetWaitingServiceWorker(provider_id, info);
+ if (info.handle_id != kInvalidServiceWorkerHandleId)
+ worker_to_provider_[info.handle_id] = provider->second;
+ }
+
+ ScriptClientMap::iterator found = script_clients_.find(provider_id);
+ if (found != script_clients_.end()) {
+ // Populate the .waiting field with the new worker object.
+ found->second->setWaiting(GetServiceWorker(info, false));
+ }
+}
+
void ServiceWorkerDispatcher::OnSetCurrentServiceWorker(
int thread_id,
int provider_id,
@@ -240,8 +273,8 @@
ScriptClientMap::iterator found = script_clients_.find(provider_id);
if (found != script_clients_.end()) {
- // Populate the .current field with the new worker object.
- found->second->setCurrentServiceWorker(GetServiceWorker(info, false));
+ // Populate the .controller field with the new worker object.
+ found->second->setController(GetServiceWorker(info, false));
}
}
diff --git a/content/child/service_worker/service_worker_dispatcher.h b/content/child/service_worker/service_worker_dispatcher.h
index eafc9d0..84ea387 100644
--- a/content/child/service_worker/service_worker_dispatcher.h
+++ b/content/child/service_worker/service_worker_dispatcher.h
@@ -120,6 +120,9 @@
void OnServiceWorkerStateChanged(int thread_id,
int handle_id,
blink::WebServiceWorkerState state);
+ void OnSetWaitingServiceWorker(int thread_id,
+ int provider_id,
+ const ServiceWorkerObjectInfo& info);
void OnSetCurrentServiceWorker(int thread_id,
int provider_id,
const ServiceWorkerObjectInfo& info);
diff --git a/content/child/service_worker/service_worker_message_filter.cc b/content/child/service_worker/service_worker_message_filter.cc
index ad3f4fb..71632f7 100644
--- a/content/child/service_worker/service_worker_message_filter.cc
+++ b/content/child/service_worker/service_worker_message_filter.cc
@@ -61,8 +61,10 @@
IPC_BEGIN_MESSAGE_MAP(ServiceWorkerMessageFilter, msg)
IPC_MESSAGE_HANDLER(ServiceWorkerMsg_ServiceWorkerRegistered,
OnStaleRegistered)
+ IPC_MESSAGE_HANDLER(ServiceWorkerMsg_SetWaitingServiceWorker,
+ OnStaleSetServiceWorker)
IPC_MESSAGE_HANDLER(ServiceWorkerMsg_SetCurrentServiceWorker,
- OnStaleSetCurrentServiceWorker)
+ OnStaleSetServiceWorker)
IPC_END_MESSAGE_MAP()
}
@@ -73,7 +75,7 @@
SendServiceWorkerObjectDestroyed(thread_safe_sender_, info.handle_id);
}
-void ServiceWorkerMessageFilter::OnStaleSetCurrentServiceWorker(
+void ServiceWorkerMessageFilter::OnStaleSetServiceWorker(
int thread_id,
int provider_id,
const ServiceWorkerObjectInfo& info) {
diff --git a/content/child/service_worker/service_worker_message_filter.h b/content/child/service_worker/service_worker_message_filter.h
index fcd39be..d9b4084 100644
--- a/content/child/service_worker/service_worker_message_filter.h
+++ b/content/child/service_worker/service_worker_message_filter.h
@@ -36,9 +36,9 @@
void OnStaleRegistered(int thread_id,
int request_id,
const ServiceWorkerObjectInfo& info);
- void OnStaleSetCurrentServiceWorker(int thread_id,
- int provider_id,
- const ServiceWorkerObjectInfo& info);
+ void OnStaleSetServiceWorker(int thread_id,
+ int provider_id,
+ const ServiceWorkerObjectInfo& info);
scoped_refptr<base::MessageLoopProxy> main_thread_loop_proxy_;
scoped_refptr<ThreadSafeSender> thread_safe_sender_;
diff --git a/content/child/service_worker/service_worker_provider_context.cc b/content/child/service_worker/service_worker_provider_context.cc
index d42b6d8..246a19c 100644
--- a/content/child/service_worker/service_worker_provider_context.cc
+++ b/content/child/service_worker/service_worker_provider_context.cc
@@ -36,6 +36,11 @@
}
}
+ServiceWorkerHandleReference* ServiceWorkerProviderContext::waiting() {
+ DCHECK(main_thread_loop_proxy_->RunsTasksOnCurrentThread());
+ return waiting_.get();
+}
+
ServiceWorkerHandleReference* ServiceWorkerProviderContext::current() {
DCHECK(main_thread_loop_proxy_->RunsTasksOnCurrentThread());
return current_.get();
@@ -44,14 +49,30 @@
void ServiceWorkerProviderContext::OnServiceWorkerStateChanged(
int handle_id,
blink::WebServiceWorkerState state) {
- // Currently .current is the only ServiceWorker associated to this provider.
- DCHECK_EQ(current_handle_id(), handle_id);
- current_->set_state(state);
+ ServiceWorkerHandleReference* which = NULL;
+ if (handle_id == current_handle_id()) {
+ which = current_.get();
+ } else if (handle_id == waiting_handle_id()) {
+ which = waiting_.get();
+ }
+
+ // We should only get messages for ServiceWorkers associated with
+ // this provider.
+ DCHECK(which);
+
+ which->set_state(state);
// TODO(kinuko): We can forward the message to other threads here
// when we support navigator.serviceWorker in dedicated workers.
}
+void ServiceWorkerProviderContext::OnSetWaitingServiceWorker(
+ int provider_id,
+ const ServiceWorkerObjectInfo& info) {
+ DCHECK_EQ(provider_id_, provider_id);
+ waiting_ = ServiceWorkerHandleReference::Adopt(info, thread_safe_sender_);
+}
+
void ServiceWorkerProviderContext::OnSetCurrentServiceWorker(
int provider_id,
const ServiceWorkerObjectInfo& info) {
@@ -70,4 +91,9 @@
return current_ ? current_->info().handle_id : kInvalidServiceWorkerHandleId;
}
+int ServiceWorkerProviderContext::waiting_handle_id() const {
+ DCHECK(main_thread_loop_proxy_->RunsTasksOnCurrentThread());
+ return waiting_ ? waiting_->info().handle_id : kInvalidServiceWorkerHandleId;
+}
+
} // namespace content
diff --git a/content/child/service_worker/service_worker_provider_context.h b/content/child/service_worker/service_worker_provider_context.h
index 47a3003..5fe68ae 100644
--- a/content/child/service_worker/service_worker_provider_context.h
+++ b/content/child/service_worker/service_worker_provider_context.h
@@ -40,11 +40,14 @@
// Called from ServiceWorkerDispatcher.
void OnServiceWorkerStateChanged(int handle_id,
blink::WebServiceWorkerState state);
+ void OnSetWaitingServiceWorker(int provider_id,
+ const ServiceWorkerObjectInfo& info);
void OnSetCurrentServiceWorker(int provider_id,
const ServiceWorkerObjectInfo& info);
int provider_id() const { return provider_id_; }
+ ServiceWorkerHandleReference* waiting();
// Gets the context's handle reference for .controller.
// TODO(dominicc): Rename this to "controller".
ServiceWorkerHandleReference* current();
@@ -54,6 +57,11 @@
// by a Service Worker.
int current_handle_id() const;
+ // Gets the handle ID of the waiting Service Worker, or
+ // kInvalidServiceWorkerHandleId if the provider does not have a
+ // waiting Service Worker.
+ int waiting_handle_id() const;
+
private:
friend class base::RefCounted<ServiceWorkerProviderContext>;
~ServiceWorkerProviderContext();
@@ -61,6 +69,7 @@
const int provider_id_;
scoped_refptr<base::MessageLoopProxy> main_thread_loop_proxy_;
scoped_refptr<ThreadSafeSender> thread_safe_sender_;
+ scoped_ptr<ServiceWorkerHandleReference> waiting_;
scoped_ptr<ServiceWorkerHandleReference> current_;
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderContext);
diff --git a/content/child/service_worker/web_service_worker_provider_impl.cc b/content/child/service_worker/web_service_worker_provider_impl.cc
index 8b89c43..f6ed0fc 100644
--- a/content/child/service_worker/web_service_worker_provider_impl.cc
+++ b/content/child/service_worker/web_service_worker_provider_impl.cc
@@ -47,12 +47,15 @@
// for more context)
GetDispatcher()->AddScriptClient(provider_id_, client);
- int handle_id = context_->current_handle_id();
- if (handle_id == kInvalidServiceWorkerHandleId)
- return;
+ if (context_->waiting_handle_id() != kInvalidServiceWorkerHandleId) {
+ client->setWaiting(
+ GetDispatcher()->GetServiceWorker(context_->waiting()->info(), false));
+ }
- client->setCurrentServiceWorker(
- GetDispatcher()->GetServiceWorker(context_->current()->info(), false));
+ if (context_->current_handle_id() != kInvalidServiceWorkerHandleId) {
+ client->setController(
+ GetDispatcher()->GetServiceWorker(context_->current()->info(), false));
+ }
}
void WebServiceWorkerProviderImpl::registerServiceWorker(
diff --git a/content/child/shared_worker_devtools_agent.cc b/content/child/shared_worker_devtools_agent.cc
index 853d08e..fc5a1c3 100644
--- a/content/child/shared_worker_devtools_agent.cc
+++ b/content/child/shared_worker_devtools_agent.cc
@@ -54,11 +54,12 @@
state.utf8()));
}
-void SharedWorkerDevToolsAgent::OnAttach() {
+void SharedWorkerDevToolsAgent::OnAttach(const std::string& host_id) {
webworker_->attachDevTools();
}
-void SharedWorkerDevToolsAgent::OnReattach(const std::string& state) {
+void SharedWorkerDevToolsAgent::OnReattach(const std::string& host_id,
+ const std::string& state) {
webworker_->reattachDevTools(WebString::fromUTF8(state));
}
diff --git a/content/child/shared_worker_devtools_agent.h b/content/child/shared_worker_devtools_agent.h
index c8a4655..724e2f5 100644
--- a/content/child/shared_worker_devtools_agent.h
+++ b/content/child/shared_worker_devtools_agent.h
@@ -31,8 +31,8 @@
void SaveDevToolsAgentState(const blink::WebString& state);
private:
- void OnAttach();
- void OnReattach(const std::string&);
+ void OnAttach(const std::string& host_id);
+ void OnReattach(const std::string& host_id, const std::string& state);
void OnDetach();
void OnDispatchOnInspectorBackend(const std::string& message);
void OnResumeWorkerContext();
diff --git a/content/child/threaded_data_provider.cc b/content/child/threaded_data_provider.cc
new file mode 100644
index 0000000..118b60c
--- /dev/null
+++ b/content/child/threaded_data_provider.cc
@@ -0,0 +1,289 @@
+// Copyright 2014 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 "content/child/threaded_data_provider.h"
+
+#include "content/child/child_process.h"
+#include "content/child/child_thread.h"
+#include "content/child/resource_dispatcher.h"
+#include "content/child/thread_safe_sender.h"
+#include "content/child/webthread_impl.h"
+#include "content/common/resource_messages.h"
+#include "ipc/ipc_sync_channel.h"
+#include "third_party/WebKit/public/platform/WebThread.h"
+#include "third_party/WebKit/public/platform/WebThreadedDataReceiver.h"
+
+namespace content {
+
+namespace {
+
+class DataProviderMessageFilter : public IPC::MessageFilter {
+ public:
+ DataProviderMessageFilter(
+ const scoped_refptr<base::MessageLoopProxy>& io_message_loop,
+ base::MessageLoop* main_thread_message_loop,
+ const WebThreadImpl& background_thread,
+ const base::WeakPtr<ThreadedDataProvider>&
+ background_thread_resource_provider,
+ const base::WeakPtr<ThreadedDataProvider>&
+ main_thread_resource_provider,
+ int request_id);
+
+ // IPC::ChannelProxy::MessageFilter
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE FINAL;
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE FINAL;
+
+ private:
+ virtual ~DataProviderMessageFilter() { }
+
+ void OnReceivedData(int request_id, int data_offset, int data_length,
+ int encoded_data_length);
+
+ const scoped_refptr<base::MessageLoopProxy> io_message_loop_;
+ base::MessageLoop* main_thread_message_loop_;
+ const WebThreadImpl& background_thread_;
+ // This weakptr can only be dereferenced on the background thread.
+ base::WeakPtr<ThreadedDataProvider>
+ background_thread_resource_provider_;
+ // This weakptr can only be dereferenced on the main thread.
+ base::WeakPtr<ThreadedDataProvider>
+ main_thread_resource_provider_;
+ int request_id_;
+};
+
+DataProviderMessageFilter::DataProviderMessageFilter(
+ const scoped_refptr<base::MessageLoopProxy>& io_message_loop,
+ base::MessageLoop* main_thread_message_loop,
+ const WebThreadImpl& background_thread,
+ const base::WeakPtr<ThreadedDataProvider>&
+ background_thread_resource_provider,
+ const base::WeakPtr<ThreadedDataProvider>&
+ main_thread_resource_provider,
+ int request_id)
+ : io_message_loop_(io_message_loop),
+ main_thread_message_loop_(main_thread_message_loop),
+ background_thread_(background_thread),
+ background_thread_resource_provider_(background_thread_resource_provider),
+ main_thread_resource_provider_(main_thread_resource_provider),
+ request_id_(request_id) {
+ DCHECK(main_thread_message_loop != NULL);
+}
+
+void DataProviderMessageFilter::OnFilterAdded(IPC::Sender* sender) {
+ DCHECK(io_message_loop_->BelongsToCurrentThread());
+
+ main_thread_message_loop_->PostTask(FROM_HERE,
+ base::Bind(
+ &ThreadedDataProvider::OnResourceMessageFilterAddedMainThread,
+ main_thread_resource_provider_));
+}
+
+bool DataProviderMessageFilter::OnMessageReceived(
+ const IPC::Message& message) {
+ DCHECK(io_message_loop_->BelongsToCurrentThread());
+
+ if (message.type() != ResourceMsg_DataReceived::ID)
+ return false;
+
+ int request_id;
+
+ PickleIterator iter(message);
+ if (!message.ReadInt(&iter, &request_id)) {
+ NOTREACHED() << "malformed resource message";
+ return true;
+ }
+
+ if (request_id == request_id_) {
+ ResourceMsg_DataReceived::Schema::Param arg;
+ if (ResourceMsg_DataReceived::Read(&message, &arg)) {
+ OnReceivedData(arg.a, arg.b, arg.c, arg.d);
+ return true;
+ }
+ }
+
+ return false;
+}
+
+void DataProviderMessageFilter::OnReceivedData(int request_id,
+ int data_offset,
+ int data_length,
+ int encoded_data_length) {
+ DCHECK(io_message_loop_->BelongsToCurrentThread());
+ background_thread_.message_loop()->PostTask(FROM_HERE, base::Bind(
+ &ThreadedDataProvider::OnReceivedDataOnBackgroundThread,
+ background_thread_resource_provider_,
+ data_offset, data_length, encoded_data_length));
+}
+
+} // anonymous namespace
+
+ThreadedDataProvider::ThreadedDataProvider(
+ int request_id, blink::WebThreadedDataReceiver* threaded_data_receiver,
+ linked_ptr<base::SharedMemory> shm_buffer, int shm_size)
+ : request_id_(request_id),
+ shm_buffer_(shm_buffer),
+ shm_size_(shm_size),
+ main_thread_weak_factory_(this),
+ background_thread_(
+ static_cast<WebThreadImpl&>(
+ *threaded_data_receiver->backgroundThread())),
+ ipc_channel_(ChildThread::current()->channel()),
+ threaded_data_receiver_(threaded_data_receiver),
+ resource_filter_active_(false),
+ main_thread_message_loop_(ChildThread::current()->message_loop()) {
+ DCHECK(ChildThread::current());
+ DCHECK(ipc_channel_);
+ DCHECK(threaded_data_receiver_);
+ DCHECK(main_thread_message_loop_);
+
+ background_thread_weak_factory_.reset(
+ new base::WeakPtrFactory<ThreadedDataProvider>(this));
+
+ filter_ = new DataProviderMessageFilter(
+ ChildProcess::current()->io_message_loop_proxy(),
+ main_thread_message_loop_,
+ background_thread_,
+ background_thread_weak_factory_->GetWeakPtr(),
+ main_thread_weak_factory_.GetWeakPtr(),
+ request_id);
+
+ ChildThread::current()->channel()->AddFilter(filter_);
+}
+
+ThreadedDataProvider::~ThreadedDataProvider() {
+ DCHECK(ChildThread::current());
+
+ ChildThread::current()->channel()->RemoveFilter(filter_);
+
+ delete threaded_data_receiver_;
+}
+
+void DestructOnMainThread(ThreadedDataProvider* data_provider) {
+ DCHECK(ChildThread::current());
+
+ // The ThreadedDataProvider must be destructed on the main thread to
+ // be threadsafe when removing the message filter and releasing the shared
+ // memory buffer.
+ delete data_provider;
+}
+
+void ThreadedDataProvider::Stop() {
+ DCHECK(ChildThread::current());
+
+ // Make sure we don't get called by on the main thread anymore via weak
+ // pointers we've passed to the filter.
+ main_thread_weak_factory_.InvalidateWeakPtrs();
+
+ blink::WebThread* current_background_thread =
+ threaded_data_receiver_->backgroundThread();
+
+ // We can't destroy this instance directly; we need to bounce a message over
+ // to the background thread and back to make sure nothing else will access it
+ // there, before we can destruct it. We also need to make sure the background
+ // thread is still alive, since Blink could have shut down at this point
+ // and freed the thread.
+ if (current_background_thread) {
+ // We should never end up with a different parser thread than from when the
+ // ThreadedDataProvider gets created.
+ DCHECK(current_background_thread ==
+ static_cast<WebThreadImpl*>(&background_thread_));
+ background_thread_.message_loop()->PostTask(FROM_HERE,
+ base::Bind(&ThreadedDataProvider::StopOnBackgroundThread,
+ base::Unretained(this)));
+ }
+}
+
+void ThreadedDataProvider::StopOnBackgroundThread() {
+ DCHECK(background_thread_.isCurrentThread());
+ DCHECK(background_thread_weak_factory_);
+
+ // When this happens, the provider should no longer be called on the
+ // background thread as it's about to be destroyed on the main thread.
+ // Destructing the weak pointer factory means invalidating the weak pointers
+ // which means no callbacks from the filter will happen and nothing else will
+ // use this instance on the background thread.
+ background_thread_weak_factory_.reset(NULL);
+ main_thread_message_loop_->PostTask(FROM_HERE,
+ base::Bind(&DestructOnMainThread, this));
+}
+
+void ThreadedDataProvider::OnResourceMessageFilterAddedMainThread() {
+ DCHECK(ChildThread::current());
+ DCHECK(background_thread_weak_factory_);
+
+ // We bounce this message from the I/O thread via the main thread and then
+ // to our background thread, following the same path as incoming data before
+ // our filter gets added, to make sure there's nothing still incoming.
+ background_thread_.message_loop()->PostTask(FROM_HERE,
+ base::Bind(
+ &ThreadedDataProvider::OnResourceMessageFilterAddedBackgroundThread,
+ background_thread_weak_factory_->GetWeakPtr()));
+}
+
+void ThreadedDataProvider::OnResourceMessageFilterAddedBackgroundThread() {
+ DCHECK(background_thread_.isCurrentThread());
+ resource_filter_active_ = true;
+
+ // At this point we know no more data is going to arrive from the main thread,
+ // so we can process any data we've received directly from the I/O thread
+ // in the meantime.
+ if (!queued_data_.empty()) {
+ std::vector<QueuedSharedMemoryData>::iterator iter = queued_data_.begin();
+ for (; iter != queued_data_.end(); ++iter) {
+ ForwardAndACKData(iter->data, iter->length);
+ }
+
+ queued_data_.clear();
+ }
+}
+
+void ThreadedDataProvider::OnReceivedDataOnBackgroundThread(
+ int data_offset, int data_length, int encoded_data_length) {
+ DCHECK(background_thread_.isCurrentThread());
+ DCHECK(shm_buffer_ != NULL);
+
+ CHECK_GE(shm_size_, data_offset + data_length);
+ const char* data_ptr = static_cast<char*>(shm_buffer_->memory());
+ CHECK(data_ptr);
+ CHECK(data_ptr + data_offset);
+
+ if (resource_filter_active_) {
+ ForwardAndACKData(data_ptr + data_offset, data_length);
+ } else {
+ // There's a brief interval between the point where we know the filter
+ // has been installed on the I/O thread, and when we know for sure there's
+ // no more data coming in from the main thread (from before the filter
+ // got added). If we get any data during that interval, we need to queue
+ // it until we're certain we've processed all the main thread data to make
+ // sure we forward (and ACK) everything in the right order.
+ QueuedSharedMemoryData queued_data;
+ queued_data.data = data_ptr + data_offset;
+ queued_data.length = data_length;
+ queued_data_.push_back(queued_data);
+ }
+}
+
+void ThreadedDataProvider::OnReceivedDataOnForegroundThread(
+ const char* data, int data_length, int encoded_data_length) {
+ DCHECK(ChildThread::current());
+
+ background_thread_.message_loop()->PostTask(FROM_HERE,
+ base::Bind(&ThreadedDataProvider::ForwardAndACKData,
+ base::Unretained(this),
+ data, data_length));
+}
+
+void ThreadedDataProvider::ForwardAndACKData(const char* data,
+ int data_length) {
+ DCHECK(background_thread_.isCurrentThread());
+
+ // TODO(oysteine): SiteIsolationPolicy needs to be be checked
+ // here before we pass the data to the data provider
+ // (or earlier on the I/O thread), otherwise once SiteIsolationPolicy does
+ // actual blocking as opposed to just UMA logging this will bypass it.
+ threaded_data_receiver_->acceptData(data, data_length);
+ ipc_channel_->Send(new ResourceHostMsg_DataReceived_ACK(request_id_));
+}
+
+} // namespace content
diff --git a/content/child/threaded_data_provider.h b/content/child/threaded_data_provider.h
new file mode 100644
index 0000000..223153f
--- /dev/null
+++ b/content/child/threaded_data_provider.h
@@ -0,0 +1,83 @@
+// Copyright 2014 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 CONTENT_CHILD_THREADEDDATAPROVIDER_IMPL_H_
+#define CONTENT_CHILD_THREADEDDATAPROVIDER_IMPL_H_
+
+#include "base/compiler_specific.h"
+#include "base/memory/linked_ptr.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/shared_memory.h"
+#include "base/memory/weak_ptr.h"
+#include "ipc/ipc_channel.h"
+#include "ipc/message_filter.h"
+
+namespace blink {
+class WebThreadedDataReceiver;
+}
+
+namespace IPC {
+class SyncChannel;
+}
+
+namespace webkit_glue {
+class WebThreadImpl;
+}
+
+namespace content {
+class ResourceDispatcher;
+class WebThreadImpl;
+
+class ThreadedDataProvider {
+ public:
+ ThreadedDataProvider(
+ int request_id,
+ blink::WebThreadedDataReceiver* threaded_data_receiver,
+ linked_ptr<base::SharedMemory> shm_buffer,
+ int shm_size);
+ virtual ~ThreadedDataProvider();
+
+ void Stop();
+ void OnReceivedDataOnBackgroundThread(int data_offset,
+ int data_length,
+ int encoded_data_length);
+
+ void OnReceivedDataOnForegroundThread(const char* data,
+ int data_length,
+ int encoded_data_length);
+
+ void OnResourceMessageFilterAddedMainThread();
+
+ private:
+ void StopOnBackgroundThread();
+ void OnResourceMessageFilterAddedBackgroundThread();
+ void ForwardAndACKData(const char* data, int data_length);
+
+ scoped_refptr<IPC::MessageFilter> filter_;
+ int request_id_;
+ linked_ptr<base::SharedMemory> shm_buffer_;
+ int shm_size_;
+ scoped_ptr<base::WeakPtrFactory<ThreadedDataProvider> >
+ background_thread_weak_factory_;
+ base::WeakPtrFactory<ThreadedDataProvider>
+ main_thread_weak_factory_;
+ WebThreadImpl& background_thread_;
+ IPC::SyncChannel* ipc_channel_;
+ blink::WebThreadedDataReceiver* threaded_data_receiver_;
+ bool resource_filter_active_;
+ base::MessageLoop* main_thread_message_loop_;
+
+ struct QueuedSharedMemoryData {
+ const char* data;
+ int length;
+ };
+ std::vector<QueuedSharedMemoryData> queued_data_;
+
+ DISALLOW_COPY_AND_ASSIGN(ThreadedDataProvider);
+};
+
+} // namespace content
+
+#endif // CONTENT_CHILD_THREADEDDATAPROVIDER_IMPL_H_
diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc
index 803f5e5..138963b 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -218,6 +218,8 @@
void SetDefersLoading(bool value);
void DidChangePriority(WebURLRequest::Priority new_priority,
int intra_priority_value);
+ bool AttachThreadedDataReceiver(
+ blink::WebThreadedDataReceiver* threaded_data_receiver);
void Start(const WebURLRequest& request,
SyncLoadResponse* sync_load_response);
@@ -295,6 +297,14 @@
ConvertWebKitPriorityToNetPriority(new_priority), intra_priority_value);
}
+bool WebURLLoaderImpl::Context::AttachThreadedDataReceiver(
+ blink::WebThreadedDataReceiver* threaded_data_receiver) {
+ if (bridge_)
+ return bridge_->AttachThreadedDataReceiver(threaded_data_receiver);
+
+ return false;
+}
+
void WebURLLoaderImpl::Context::Start(const WebURLRequest& request,
SyncLoadResponse* sync_load_response) {
DCHECK(!bridge_.get());
@@ -322,7 +332,7 @@
request.httpHeaderField(WebString::fromUTF8("Referer")).latin1());
const std::string& method = request.httpMethod().latin1();
- int load_flags = net::LOAD_NORMAL;
+ int load_flags = net::LOAD_NORMAL | net::LOAD_ENABLE_LOAD_TIMING;
switch (request.cachePolicy()) {
case WebURLRequest::ReloadIgnoringCacheData:
// Required by LayoutTests/http/tests/misc/refresh-headers.php
@@ -345,8 +355,6 @@
if (request.reportUploadProgress())
load_flags |= net::LOAD_ENABLE_UPLOAD_PROGRESS;
- if (request.reportLoadTiming())
- load_flags |= net::LOAD_ENABLE_LOAD_TIMING;
if (request.reportRawHeaders())
load_flags |= net::LOAD_REPORT_RAW_HEADERS;
@@ -868,4 +876,9 @@
context_->DidChangePriority(new_priority, intra_priority_value);
}
+bool WebURLLoaderImpl::attachThreadedDataReceiver(
+ blink::WebThreadedDataReceiver* threaded_data_receiver) {
+ return context_->AttachThreadedDataReceiver(threaded_data_receiver);
+}
+
} // namespace content
diff --git a/content/child/web_url_loader_impl.h b/content/child/web_url_loader_impl.h
index a2c1f3c..affe1ab 100644
--- a/content/child/web_url_loader_impl.h
+++ b/content/child/web_url_loader_impl.h
@@ -39,6 +39,8 @@
virtual void setDefersLoading(bool value);
virtual void didChangePriority(blink::WebURLRequest::Priority new_priority,
int intra_priority_value);
+ virtual bool attachThreadedDataReceiver(
+ blink::WebThreadedDataReceiver* threaded_data_receiver);
private:
class Context;
diff --git a/content/child/webcrypto/platform_crypto.h b/content/child/webcrypto/platform_crypto.h
index 0de21dc..9e95730 100644
--- a/content/child/webcrypto/platform_crypto.h
+++ b/content/child/webcrypto/platform_crypto.h
@@ -177,7 +177,7 @@
blink::WebCryptoKeyUsageMask public_key_usage_mask,
blink::WebCryptoKeyUsageMask private_key_usage_mask,
unsigned int modulus_length_bits,
- const CryptoData& public_exponent,
+ unsigned long public_exponent,
blink::WebCryptoKey* public_key,
blink::WebCryptoKey* private_key);
@@ -272,40 +272,16 @@
const blink::WebCryptoKeyAlgorithm& key_algorithm,
std::vector<uint8>* buffer);
+// Performs AES-KW encryption/decryption on the input |data|.
// Preconditions:
// * |key| is non-null
-// * |wrapping_key| is non-null
-Status WrapSymKeyAesKw(SymKey* key,
- SymKey* wrapping_key,
- std::vector<uint8>* buffer);
-
-// Unwraps (decrypts) |wrapped_key_data| using AES-KW and places the results in
-// a WebCryptoKey. Raw key data remains inside NSS. This function should be used
-// when the input |wrapped_key_data| is known to result in symmetric raw key
-// data after AES-KW decryption.
-// Preconditions:
-// * |wrapping_key| is non-null
-// * |key| is non-null
-// * |wrapped_key_data| is at least 24 bytes and a multiple of 8 bytes
-// * |algorithm.id()| is for a symmetric key algorithm.
-// * usage_mask makes sense for the algorithm.
-Status UnwrapSymKeyAesKw(const CryptoData& wrapped_key_data,
- SymKey* wrapping_key,
- const blink::WebCryptoAlgorithm& algorithm,
- bool extractable,
- blink::WebCryptoKeyUsageMask usage_mask,
- blink::WebCryptoKey* key);
-
-// Performs AES-KW decryption on the input |data|. This function should be used
-// when the input |data| does not directly represent a key and should instead be
-// interpreted as generic bytes.
-// Preconditions:
-// * |key| is non-null
-// * |data| is at least 24 bytes and a multiple of 8 bytes
+// * |data| is multiple of 8 bytes. If encrypting it is at least 16 bytes, and
+// if decrypting at least 24 bytes.
// * |buffer| is non-null.
-Status DecryptAesKw(SymKey* key,
- const CryptoData& data,
- std::vector<uint8>* buffer);
+Status EncryptDecryptAesKw(EncryptOrDecrypt mode,
+ SymKey* key,
+ const CryptoData& data,
+ std::vector<uint8>* buffer);
} // namespace platform
diff --git a/content/child/webcrypto/platform_crypto_nss.cc b/content/child/webcrypto/platform_crypto_nss.cc
index 3d0e992..11c84fc 100644
--- a/content/child/webcrypto/platform_crypto_nss.cc
+++ b/content/child/webcrypto/platform_crypto_nss.cc
@@ -531,28 +531,6 @@
}
}
-// Converts a (big-endian) WebCrypto BigInteger, with or without leading zeros,
-// to unsigned long.
-bool BigIntegerToLong(const uint8* data,
- unsigned int data_size,
- unsigned long* result) {
- // TODO(padolph): Is it correct to say that empty data is an error, or does it
- // mean value 0? See https://www.w3.org/Bugs/Public/show_bug.cgi?id=23655
- if (data_size == 0)
- return false;
-
- *result = 0;
- for (size_t i = 0; i < data_size; ++i) {
- size_t reverse_i = data_size - i - 1;
-
- if (reverse_i >= sizeof(unsigned long) && data[i])
- return false; // Too large for a long.
-
- *result |= data[i] << 8 * reverse_i;
- }
- return true;
-}
-
bool CreatePublicKeyAlgorithm(const blink::WebCryptoAlgorithm& algorithm,
SECKEYPublicKey* key,
blink::WebCryptoKeyAlgorithm* key_algorithm) {
@@ -606,29 +584,28 @@
if (*mechanism == CKM_INVALID_MECHANISM)
return Status::ErrorUnsupported();
*flags = CKF_SIGN | CKF_VERIFY;
- break;
+ return Status::Success();
}
case blink::WebCryptoAlgorithmIdAesCbc: {
*mechanism = CKM_AES_CBC;
*flags = CKF_ENCRYPT | CKF_DECRYPT;
- break;
+ return Status::Success();
}
case blink::WebCryptoAlgorithmIdAesKw: {
*mechanism = CKM_NSS_AES_KEY_WRAP;
*flags = CKF_WRAP | CKF_WRAP;
- break;
+ return Status::Success();
}
case blink::WebCryptoAlgorithmIdAesGcm: {
if (!g_nss_runtime_support.Get().IsAesGcmSupported())
return Status::ErrorUnsupported();
*mechanism = CKM_AES_GCM;
*flags = CKF_ENCRYPT | CKF_DECRYPT;
- break;
+ return Status::Success();
}
default:
return Status::ErrorUnsupported();
}
- return Status::Success();
}
Status DoUnwrapSymKeyAesKw(const CryptoData& wrapped_key_data,
@@ -905,8 +882,8 @@
blink::WebCryptoKey* key) {
DCHECK(!algorithm.isNull());
- CK_MECHANISM_TYPE mechanism;
- CK_FLAGS flags;
+ CK_MECHANISM_TYPE mechanism = CKM_INVALID_MECHANISM;
+ CK_FLAGS flags = 0;
Status status =
WebCryptoAlgorithmToNssMechFlags(algorithm, &mechanism, &flags);
if (status.IsError())
@@ -1443,7 +1420,7 @@
blink::WebCryptoKeyUsageMask public_key_usage_mask,
blink::WebCryptoKeyUsageMask private_key_usage_mask,
unsigned int modulus_length_bits,
- const CryptoData& public_exponent,
+ unsigned long public_exponent,
blink::WebCryptoKey* public_key,
blink::WebCryptoKey* private_key) {
if (algorithm.id() == blink::WebCryptoAlgorithmIdRsaOaep &&
@@ -1455,17 +1432,9 @@
if (!slot)
return Status::OperationError();
- unsigned long public_exponent_long;
- if (!BigIntegerToLong(public_exponent.bytes(),
- public_exponent.byte_length(),
- &public_exponent_long) ||
- !public_exponent_long) {
- return Status::ErrorGenerateKeyPublicExponent();
- }
-
PK11RSAGenParams rsa_gen_params;
rsa_gen_params.keySizeInBits = modulus_length_bits;
- rsa_gen_params.pe = public_exponent_long;
+ rsa_gen_params.pe = public_exponent;
// Flags are verified at the Blink layer; here the flags are set to all
// possible operations for the given key type.
@@ -1717,6 +1686,39 @@
AddOptionalAttribute(CKA_PUBLIC_EXPONENT, public_exponent, &key_template);
AddOptionalAttribute(CKA_PRIVATE_EXPONENT, private_exponent, &key_template);
+ // Manufacture a CKA_ID so the created key can be retrieved later as a
+ // SECKEYPrivateKey using FindKeyByKeyID(). Unfortunately there isn't a more
+ // direct way to do this in NSS.
+ //
+ // For consistency with other NSS key creation methods, set the CKA_ID to
+ // PK11_MakeIDFromPubKey(). There are some problems with
+ // this approach:
+ //
+ // (1) Prior to NSS 3.16.2, there is no parameter validation when creating
+ // private keys. It is therefore possible to construct a key using the
+ // known public modulus, and where all the other parameters are bogus.
+ // FindKeyByKeyID() returns the first key matching the ID. So this would
+ // effectively allow an attacker to retrieve a private key of their
+ // choice.
+ // TODO(eroman): Once NSS rolls and this is fixed, disallow RSA key
+ // import on older versions of NSS.
+ // http://crbug.com/378315
+ //
+ // (2) The ID space is shared by different key types. So theoretically
+ // possible to retrieve a key of the wrong type which has a matching
+ // CKA_ID. In practice I am told this is not likely except for small key
+ // sizes, since would require constructing keys with the same public
+ // data.
+ //
+ // (3) FindKeyByKeyID() doesn't necessarily return the object that was just
+ // created by CreateGenericObject. If the pre-existing key was
+ // provisioned with flags incompatible with WebCrypto (for instance
+ // marked sensitive) then this will break things.
+ SECItem modulus_item = MakeSECItemForBuffer(CryptoData(modulus));
+ crypto::ScopedSECItem object_id(PK11_MakeIDFromPubKey(&modulus_item));
+ AddOptionalAttribute(
+ CKA_ID, CryptoData(object_id->data, object_id->len), &key_template);
+
// Optional properties (all of these will have been specified or none).
AddOptionalAttribute(CKA_PRIME_1, prime1, &key_template);
AddOptionalAttribute(CKA_PRIME_2, prime2, &key_template);
@@ -1732,17 +1734,13 @@
if (!key_object)
return Status::OperationError();
- // The ID isn't guaranteed to be set by PKCS#11. However it is by softtoken so
- // this should work.
- SECItem object_id = {};
- if (PK11_ReadRawAttribute(
- PK11_TypeGeneric, key_object.get(), CKA_ID, &object_id) != SECSuccess)
- return Status::OperationError();
+ crypto::ScopedSECKEYPrivateKey private_key_tmp(
+ PK11_FindKeyByKeyID(slot.get(), object_id.get(), NULL));
+ // PK11_FindKeyByKeyID() may return a handle to an existing key, rather than
+ // the object created by PK11_CreateGenericObject().
crypto::ScopedSECKEYPrivateKey private_key(
- PK11_FindKeyByKeyID(slot.get(), &object_id, NULL));
-
- SECITEM_FreeItem(&object_id, PR_FALSE);
+ SECKEY_CopyPrivateKey(private_key_tmp.get()));
if (!private_key)
return Status::OperationError();
@@ -1765,7 +1763,7 @@
return Status::Success();
}
-Status WrapSymKeyAesKw(SymKey* key,
+Status WrapSymKeyAesKw(PK11SymKey* key,
SymKey* wrapping_key,
std::vector<uint8>* buffer) {
// The data size must be at least 16 bytes and a multiple of 8 bytes.
@@ -1773,13 +1771,11 @@
// keys are being wrapped in this application (which are small), a reasonable
// max limit is whatever will fit into an unsigned. For the max size test,
// note that AES Key Wrap always adds 8 bytes to the input data size.
- const unsigned int input_length = PK11_GetKeyLength(key->key());
- if (input_length < 16)
- return Status::ErrorDataTooSmall();
+ const unsigned int input_length = PK11_GetKeyLength(key);
+ DCHECK_GE(input_length, 16u);
+ DCHECK((input_length % 8) == 0);
if (input_length > UINT_MAX - 8)
return Status::ErrorDataTooLarge();
- if (input_length % 8)
- return Status::ErrorInvalidAesKwDataLength();
SECItem iv_item = MakeSECItemForBuffer(CryptoData(kAesIv, sizeof(kAesIv)));
crypto::ScopedSECItem param_item(
@@ -1794,7 +1790,7 @@
if (SECSuccess != PK11_WrapSymKey(CKM_NSS_AES_KEY_WRAP,
param_item.get(),
wrapping_key->key(),
- key->key(),
+ key,
&wrapped_key_item)) {
return Status::OperationError();
}
@@ -1804,44 +1800,6 @@
return Status::Success();
}
-Status UnwrapSymKeyAesKw(const CryptoData& wrapped_key_data,
- SymKey* wrapping_key,
- const blink::WebCryptoAlgorithm& algorithm,
- bool extractable,
- blink::WebCryptoKeyUsageMask usage_mask,
- blink::WebCryptoKey* key) {
- // Determine the proper NSS key properties from the input algorithm.
- CK_MECHANISM_TYPE mechanism;
- CK_FLAGS flags;
- Status status =
- WebCryptoAlgorithmToNssMechFlags(algorithm, &mechanism, &flags);
- if (status.IsError())
- return status;
-
- crypto::ScopedPK11SymKey unwrapped_key;
- status = DoUnwrapSymKeyAesKw(
- wrapped_key_data, wrapping_key, mechanism, flags, &unwrapped_key);
- if (status.IsError())
- return status;
-
- blink::WebCryptoKeyAlgorithm key_algorithm;
- if (!CreateSecretKeyAlgorithm(
- algorithm, PK11_GetKeyLength(unwrapped_key.get()), &key_algorithm))
- return Status::ErrorUnexpected();
-
- scoped_ptr<SymKey> key_handle;
- status = SymKey::Create(unwrapped_key.Pass(), &key_handle);
- if (status.IsError())
- return status;
-
- *key = blink::WebCryptoKey::create(key_handle.release(),
- blink::WebCryptoKeyTypeSecret,
- extractable,
- key_algorithm,
- usage_mask);
- return Status::Success();
-}
-
Status DecryptAesKw(SymKey* wrapping_key,
const CryptoData& data,
std::vector<uint8>* buffer) {
@@ -1865,6 +1823,33 @@
return Status::Success();
}
+Status EncryptAesKw(SymKey* wrapping_key,
+ const CryptoData& data,
+ std::vector<uint8>* buffer) {
+ // Due to limitations in the NSS API for the AES-KW algorithm, |data| must be
+ // temporarily viewed as a symmetric key to be wrapped (encrypted).
+ SECItem data_item = MakeSECItemForBuffer(data);
+ crypto::ScopedPK11Slot slot(PK11_GetInternalSlot());
+ crypto::ScopedPK11SymKey data_as_sym_key(PK11_ImportSymKey(slot.get(),
+ CKK_GENERIC_SECRET,
+ PK11_OriginUnwrap,
+ CKA_SIGN,
+ &data_item,
+ NULL));
+ if (!data_as_sym_key)
+ return Status::OperationError();
+
+ return WrapSymKeyAesKw(data_as_sym_key.get(), wrapping_key, buffer);
+}
+
+Status EncryptDecryptAesKw(EncryptOrDecrypt mode,
+ SymKey* wrapping_key,
+ const CryptoData& data,
+ std::vector<uint8>* buffer) {
+ return mode == ENCRYPT ? EncryptAesKw(wrapping_key, data, buffer)
+ : DecryptAesKw(wrapping_key, data, buffer);
+}
+
} // namespace platform
} // namespace webcrypto
diff --git a/content/child/webcrypto/platform_crypto_openssl.cc b/content/child/webcrypto/platform_crypto_openssl.cc
index 5c704a8..1235e51 100644
--- a/content/child/webcrypto/platform_crypto_openssl.cc
+++ b/content/child/webcrypto/platform_crypto_openssl.cc
@@ -303,7 +303,7 @@
blink::WebCryptoKeyUsageMask public_key_usage_mask,
blink::WebCryptoKeyUsageMask private_key_usage_mask,
unsigned int modulus_length_bits,
- const CryptoData& public_exponent,
+ unsigned long public_exponent,
blink::WebCryptoKey* public_key,
blink::WebCryptoKey* private_key) {
// TODO(padolph): Placeholder for OpenSSL implementation.
@@ -494,26 +494,10 @@
return Status::ErrorUnsupported();
}
-Status WrapSymKeyAesKw(SymKey* key,
- SymKey* wrapping_key,
- std::vector<uint8>* buffer) {
- // TODO(eroman): http://crbug.com/267888
- return Status::ErrorUnsupported();
-}
-
-Status UnwrapSymKeyAesKw(const CryptoData& wrapped_key_data,
- SymKey* wrapping_key,
- const blink::WebCryptoAlgorithm& algorithm,
- bool extractable,
- blink::WebCryptoKeyUsageMask usage_mask,
- blink::WebCryptoKey* key) {
- // TODO(eroman): http://crbug.com/267888
- return Status::ErrorUnsupported();
-}
-
-Status DecryptAesKw(SymKey* key,
- const CryptoData& data,
- std::vector<uint8>* buffer) {
+Status EncryptDecryptAesKw(EncryptOrDecrypt mode,
+ SymKey* key,
+ const CryptoData& data,
+ std::vector<uint8>* buffer) {
// TODO(eroman): http://crbug.com/267888
return Status::ErrorUnsupported();
}
diff --git a/content/child/webcrypto/shared_crypto.cc b/content/child/webcrypto/shared_crypto.cc
index b4d5931..65559b0 100644
--- a/content/child/webcrypto/shared_crypto.cc
+++ b/content/child/webcrypto/shared_crypto.cc
@@ -40,11 +40,13 @@
}
bool IsValidAesKeyLengthBits(unsigned int length_bits) {
- return length_bits == 128 || length_bits == 192 || length_bits == 256;
+ // 192-bit AES is disallowed.
+ return length_bits == 128 || length_bits == 256;
}
bool IsValidAesKeyLengthBytes(unsigned int length_bytes) {
- return length_bytes == 16 || length_bytes == 24 || length_bytes == 32;
+ // 192-bit AES is disallowed.
+ return length_bytes == 16 || length_bytes == 32;
}
const size_t kAesBlockSizeBytes = 16;
@@ -217,8 +219,11 @@
case blink::WebCryptoAlgorithmIdAesCbc:
case blink::WebCryptoAlgorithmIdAesGcm:
case blink::WebCryptoAlgorithmIdAesKw:
- if (!IsValidAesKeyLengthBytes(key_data.byte_length()))
- return Status::ErrorImportAesKeyLength();
+ if (!IsValidAesKeyLengthBytes(key_data.byte_length())) {
+ return key_data.byte_length() == 24
+ ? Status::ErrorAes192BitUnsupported()
+ : Status::ErrorImportAesKeyLength();
+ }
// Fallthrough intentional!
case blink::WebCryptoAlgorithmIdHmac:
return platform::ImportKeyRaw(
@@ -308,82 +313,26 @@
return true;
}
-// Validates the size of data input to AES-KW. AES-KW requires the input data
-// size to be at least 24 bytes and a multiple of 8 bytes.
-Status CheckAesKwInputSize(const CryptoData& aeskw_input_data) {
- if (aeskw_input_data.byte_length() < 24)
- return Status::ErrorDataTooSmall();
- if (aeskw_input_data.byte_length() % 8)
- return Status::ErrorInvalidAesKwDataLength();
- return Status::Success();
-}
-
-Status UnwrapKeyRaw(const CryptoData& wrapped_key_data,
- const blink::WebCryptoKey& wrapping_key,
- const blink::WebCryptoAlgorithm& wrapping_algorithm,
- const blink::WebCryptoAlgorithm& algorithm,
- bool extractable,
- blink::WebCryptoKeyUsageMask usage_mask,
- blink::WebCryptoKey* key) {
- // TODO(padolph): Handle other wrapping algorithms
- switch (wrapping_algorithm.id()) {
- case blink::WebCryptoAlgorithmIdAesKw: {
- platform::SymKey* platform_wrapping_key;
- Status status = ToPlatformSymKey(wrapping_key, &platform_wrapping_key);
- if (status.IsError())
- return status;
- status = CheckAesKwInputSize(wrapped_key_data);
- if (status.IsError())
- return status;
- return platform::UnwrapSymKeyAesKw(wrapped_key_data,
- platform_wrapping_key,
- algorithm,
- extractable,
- usage_mask,
- key);
- }
- default:
- return Status::ErrorUnsupported();
- }
-}
-
-Status WrapKeyRaw(const blink::WebCryptoKey& key_to_wrap,
- const blink::WebCryptoKey& wrapping_key,
- const blink::WebCryptoAlgorithm& wrapping_algorithm,
- std::vector<uint8>* buffer) {
- // A raw key is always a symmetric key.
- platform::SymKey* platform_key;
- Status status = ToPlatformSymKey(key_to_wrap, &platform_key);
- if (status.IsError())
- return status;
-
- // TODO(padolph): Handle other wrapping algorithms
- switch (wrapping_algorithm.id()) {
- case blink::WebCryptoAlgorithmIdAesKw: {
- platform::SymKey* platform_wrapping_key;
- status = ToPlatformSymKey(wrapping_key, &platform_wrapping_key);
- if (status.IsError())
- return status;
- return platform::WrapSymKeyAesKw(
- platform_key, platform_wrapping_key, buffer);
- }
- default:
- return Status::ErrorUnsupported();
- }
-}
-
-Status DecryptAesKw(const blink::WebCryptoAlgorithm& algorithm,
- const blink::WebCryptoKey& key,
- const CryptoData& data,
- std::vector<uint8>* buffer) {
+Status EncryptDecryptAesKw(EncryptOrDecrypt mode,
+ const blink::WebCryptoAlgorithm& algorithm,
+ const blink::WebCryptoKey& key,
+ const CryptoData& data,
+ std::vector<uint8>* buffer) {
platform::SymKey* sym_key;
Status status = ToPlatformSymKey(key, &sym_key);
if (status.IsError())
return status;
- status = CheckAesKwInputSize(data);
+
+ unsigned int min_length = mode == ENCRYPT ? 16 : 24;
+
+ if (data.byte_length() < min_length)
+ return Status::ErrorDataTooSmall();
+ if (data.byte_length() % 8)
+ return Status::ErrorInvalidAesKwDataLength();
+
if (status.IsError())
return status;
- return platform::DecryptAesKw(sym_key, data, buffer);
+ return platform::EncryptDecryptAesKw(mode, sym_key, data, buffer);
}
Status DecryptDontCheckKeyUsage(const blink::WebCryptoAlgorithm& algorithm,
@@ -400,7 +349,7 @@
case blink::WebCryptoAlgorithmIdRsaOaep:
return DecryptRsaOaep(algorithm, key, data, buffer);
case blink::WebCryptoAlgorithmIdAesKw:
- return DecryptAesKw(algorithm, key, data, buffer);
+ return EncryptDecryptAesKw(DECRYPT, algorithm, key, data, buffer);
default:
return Status::ErrorUnsupported();
}
@@ -417,6 +366,8 @@
return EncryptDecryptAesCbc(ENCRYPT, algorithm, key, data, buffer);
case blink::WebCryptoAlgorithmIdAesGcm:
return EncryptDecryptAesGcm(ENCRYPT, algorithm, key, data, buffer);
+ case blink::WebCryptoAlgorithmIdAesKw:
+ return EncryptDecryptAesKw(ENCRYPT, algorithm, key, data, buffer);
case blink::WebCryptoAlgorithmIdRsaOaep:
return EncryptRsaOaep(algorithm, key, data, buffer);
default:
@@ -601,6 +552,29 @@
return Status::Success();
}
+// Converts a (big-endian) WebCrypto BigInteger, with or without leading zeros,
+// to unsigned long.
+bool BigIntegerToLong(const uint8* data,
+ unsigned int data_size,
+ unsigned long* result) {
+ // TODO(padolph): Is it correct to say that empty data is an error, or does it
+ // mean value 0? See https://www.w3.org/Bugs/Public/show_bug.cgi?id=23655
+ if (data_size == 0)
+ return false;
+
+ *result = 0;
+ for (size_t i = 0; i < data_size; ++i) {
+ size_t reverse_i = data_size - i - 1;
+
+ if (reverse_i >= sizeof(unsigned long) && data[i])
+ return false; // Too large for a long.
+
+ *result |= data[i] << 8 * reverse_i;
+ }
+ return true;
+}
+
+
} // namespace
void Init() { platform::Init(); }
@@ -659,8 +633,11 @@
case blink::WebCryptoAlgorithmIdAesCbc:
case blink::WebCryptoAlgorithmIdAesGcm:
case blink::WebCryptoAlgorithmIdAesKw: {
- if (!IsValidAesKeyLengthBits(algorithm.aesKeyGenParams()->lengthBits()))
- return Status::ErrorGenerateKeyLength();
+ if (!IsValidAesKeyLengthBits(algorithm.aesKeyGenParams()->lengthBits())) {
+ return algorithm.aesKeyGenParams()->lengthBits() == 192
+ ? Status::ErrorAes192BitUnsupported()
+ : Status::ErrorGenerateKeyLength();
+ }
keylen_bytes = algorithm.aesKeyGenParams()->lengthBits() / 8;
break;
}
@@ -717,16 +694,20 @@
if (!params->modulusLengthBits())
return Status::ErrorGenerateRsaZeroModulus();
- CryptoData publicExponent(params->publicExponent());
- if (!publicExponent.byte_length())
+ unsigned long public_exponent = 0;
+ if (!BigIntegerToLong(params->publicExponent().data(),
+ params->publicExponent().size(),
+ &public_exponent) ||
+ (public_exponent != 3 && public_exponent != 65537)) {
return Status::ErrorGenerateKeyPublicExponent();
+ }
return platform::GenerateRsaKeyPair(algorithm,
extractable,
public_key_usage_mask,
private_key_usage_mask,
params->modulusLengthBits(),
- publicExponent,
+ public_exponent,
public_key,
private_key);
}
@@ -865,13 +846,6 @@
if (wrapping_algorithm.id() != wrapping_key.algorithm().id())
return Status::ErrorUnexpected();
- if (format == blink::WebCryptoKeyFormatRaw &&
- wrapping_algorithm.id() == blink::WebCryptoAlgorithmIdAesKw) {
- // AES-KW is a special case, due to NSS's implementation only
- // supporting C_Wrap/C_Unwrap with AES-KW
- return WrapKeyRaw(key_to_wrap, wrapping_key, wrapping_algorithm, buffer);
- }
-
return WrapKeyExportAndEncrypt(
format, key_to_wrap, wrapping_key, wrapping_algorithm, buffer);
}
@@ -897,19 +871,6 @@
if (status.IsError())
return status;
- if (format == blink::WebCryptoKeyFormatRaw &&
- wrapping_algorithm.id() == blink::WebCryptoAlgorithmIdAesKw) {
- // AES-KW is a special case, due to NSS's implementation only
- // supporting C_Wrap/C_Unwrap with AES-KW
- return UnwrapKeyRaw(wrapped_key_data,
- wrapping_key,
- wrapping_algorithm,
- algorithm,
- extractable,
- usage_mask,
- key);
- }
-
return UnwrapKeyDecryptAndImport(format,
wrapped_key_data,
wrapping_key,
diff --git a/content/child/webcrypto/shared_crypto_unittest.cc b/content/child/webcrypto/shared_crypto_unittest.cc
index 81877f6..3e3730c 100644
--- a/content/child/webcrypto/shared_crypto_unittest.cc
+++ b/content/child/webcrypto/shared_crypto_unittest.cc
@@ -90,6 +90,11 @@
memcmp(a.bytes(), b.bytes(), a.byte_length()) == 0;
}
+bool operator!=(const content::webcrypto::CryptoData& a,
+ const content::webcrypto::CryptoData& b) {
+ return !(a == b);
+}
+
namespace {
// -----------------------------------------------------------------------------
@@ -846,12 +851,12 @@
blink::WebCryptoAlgorithm algorithm =
CreateAlgorithm(blink::WebCryptoAlgorithmIdHmac);
- blink::WebCryptoAlgorithm importAlgorithm =
+ blink::WebCryptoAlgorithm import_algorithm =
CreateHmacImportAlgorithm(test_hash.id());
blink::WebCryptoKey key = ImportSecretKeyFromRaw(
test_key,
- importAlgorithm,
+ import_algorithm,
blink::WebCryptoKeyUsageSign | blink::WebCryptoKeyUsageVerify);
EXPECT_EQ(test_hash.id(), key.algorithm().hmacParams()->hash().id());
@@ -1074,7 +1079,7 @@
// Check key generation for each of AES-CBC, AES-GCM, and AES-KW, and for each
// allowed key length.
std::vector<blink::WebCryptoAlgorithm> algorithm;
- const unsigned short kKeyLength[] = {128, 192, 256};
+ const unsigned short kKeyLength[] = {128, 256};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kKeyLength); ++i) {
algorithm.push_back(CreateAesCbcKeyGenAlgorithm(kKeyLength[i]));
algorithm.push_back(CreateAesKwKeyGenAlgorithm(kKeyLength[i]));
@@ -1821,8 +1826,6 @@
// Raw keys are generated by openssl:
// % openssl rand -hex <key length bytes>
const char* const key_hex_128 = "3f1e7cd4f6f8543f6b1e16002e688623";
- const char* const key_hex_192 =
- "ed91f916dc034eba68a0f9e7f34ddd48b98bd2848109e243";
const char* const key_hex_256 =
"bd08286b81a74783fd1ccf46b7e05af84ee25ae021210074159e0c4d9d907692";
const char* const key_hex_384 =
@@ -1859,26 +1862,18 @@
{key_hex_128, aes_cbc_alg,
blink::WebCryptoKeyUsageEncrypt | blink::WebCryptoKeyUsageDecrypt,
"A128CBC"},
- // AES-CBC 192
- {key_hex_192, aes_cbc_alg, blink::WebCryptoKeyUsageEncrypt, "A192CBC"},
// AES-CBC 256
{key_hex_256, aes_cbc_alg, blink::WebCryptoKeyUsageDecrypt, "A256CBC"},
// AES-GCM 128
{key_hex_128, aes_gcm_alg,
blink::WebCryptoKeyUsageEncrypt | blink::WebCryptoKeyUsageDecrypt,
"A128GCM"},
- // AES-CGM 192
- {key_hex_192, aes_gcm_alg, blink::WebCryptoKeyUsageEncrypt, "A192GCM"},
// AES-GCM 256
{key_hex_256, aes_gcm_alg, blink::WebCryptoKeyUsageDecrypt, "A256GCM"},
// AES-KW 128
{key_hex_128, aes_kw_alg,
blink::WebCryptoKeyUsageWrapKey | blink::WebCryptoKeyUsageUnwrapKey,
"A128KW"},
- // AES-KW 192
- {key_hex_192, aes_kw_alg,
- blink::WebCryptoKeyUsageWrapKey | blink::WebCryptoKeyUsageUnwrapKey,
- "A192KW"},
// AES-KW 256
{key_hex_256, aes_kw_alg,
blink::WebCryptoKeyUsageWrapKey | blink::WebCryptoKeyUsageUnwrapKey,
@@ -2191,6 +2186,127 @@
CryptoData(exported_key_pkcs8));
}
+// Tests importing multiple RSA private keys from JWK, and then exporting to
+// PKCS8.
+//
+// This is a regression test for http://crbug.com/378315, for which importing
+// a sequence of keys from JWK could yield the wrong key. The first key would
+// be imported correctly, however every key after that would actually import
+// the first key.
+TEST_F(SharedCryptoTest, MAYBE(ImportMultipleRSAPrivateKeysJwk)) {
+ scoped_ptr<base::ListValue> key_list;
+ ASSERT_TRUE(ReadJsonTestFileToList("rsa_private_keys.json", &key_list));
+
+ // For this test to be meaningful the keys MUST be kept alive before importing
+ // new keys.
+ std::vector<blink::WebCryptoKey> live_keys;
+
+ for (size_t key_index = 0; key_index < key_list->GetSize(); ++key_index) {
+ SCOPED_TRACE(key_index);
+
+ base::DictionaryValue* key_values;
+ ASSERT_TRUE(key_list->GetDictionary(key_index, &key_values));
+
+ // Get the JWK representation of the key.
+ base::DictionaryValue* key_jwk;
+ ASSERT_TRUE(key_values->GetDictionary("jwk", &key_jwk));
+
+ // Get the PKCS8 representation of the key.
+ std::string pkcs8_hex_string;
+ ASSERT_TRUE(key_values->GetString("pkcs8", &pkcs8_hex_string));
+ std::vector<uint8> pkcs8_bytes = HexStringToBytes(pkcs8_hex_string);
+
+ // Get the modulus length for the key.
+ int modulus_length_bits = 0;
+ ASSERT_TRUE(key_values->GetInteger("modulusLength", &modulus_length_bits));
+
+ blink::WebCryptoKey private_key = blink::WebCryptoKey::createNull();
+
+ // Import the key from JWK.
+ ASSERT_EQ(
+ Status::Success(),
+ ImportKeyJwkFromDict(*key_jwk,
+ CreateRsaHashedImportAlgorithm(
+ blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5,
+ blink::WebCryptoAlgorithmIdSha256),
+ true,
+ blink::WebCryptoKeyUsageSign,
+ &private_key));
+
+ live_keys.push_back(private_key);
+
+ EXPECT_EQ(
+ modulus_length_bits,
+ static_cast<int>(
+ private_key.algorithm().rsaHashedParams()->modulusLengthBits()));
+
+ // Export to PKCS8 and verify that it matches expectation.
+ std::vector<uint8> exported_key_pkcs8;
+ ASSERT_EQ(
+ Status::Success(),
+ ExportKey(
+ blink::WebCryptoKeyFormatPkcs8, private_key, &exported_key_pkcs8));
+
+ EXPECT_BYTES_EQ(pkcs8_bytes, exported_key_pkcs8);
+ }
+}
+
+// Import an RSA private key using JWK. Next import a JWK containing the same
+// modulus, but mismatched parameters for the rest. It should NOT be possible
+// that the second import retrieves the first key. See http://crbug.com/378315
+// for how that could happen.
+TEST_F(SharedCryptoTest, MAYBE(ImportJwkExistingModulusAndInvalid)) {
+#if defined(USE_NSS)
+ if (!NSS_VersionCheck("3.16.2")) {
+ LOG(WARNING) << "Skipping test because lacks NSS support";
+ return;
+ }
+#endif
+
+ scoped_ptr<base::ListValue> key_list;
+ ASSERT_TRUE(ReadJsonTestFileToList("rsa_private_keys.json", &key_list));
+
+ // Import a 1024-bit private key.
+ base::DictionaryValue* key1_props;
+ ASSERT_TRUE(key_list->GetDictionary(1, &key1_props));
+ base::DictionaryValue* key1_jwk;
+ ASSERT_TRUE(key1_props->GetDictionary("jwk", &key1_jwk));
+
+ blink::WebCryptoKey key1 = blink::WebCryptoKey::createNull();
+ ASSERT_EQ(Status::Success(),
+ ImportKeyJwkFromDict(*key1_jwk,
+ CreateRsaHashedImportAlgorithm(
+ blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5,
+ blink::WebCryptoAlgorithmIdSha256),
+ true,
+ blink::WebCryptoKeyUsageSign,
+ &key1));
+
+ ASSERT_EQ(1024u, key1.algorithm().rsaHashedParams()->modulusLengthBits());
+
+ // Construct a JWK using the modulus of key1, but all the other fields from
+ // another key (also a 1024-bit private key).
+ base::DictionaryValue* key2_props;
+ ASSERT_TRUE(key_list->GetDictionary(5, &key2_props));
+ base::DictionaryValue* key2_jwk;
+ ASSERT_TRUE(key2_props->GetDictionary("jwk", &key2_jwk));
+ std::string modulus;
+ key1_jwk->GetString("n", &modulus);
+ key2_jwk->SetString("n", modulus);
+
+ // This should fail, as the n,e,d parameters are not consistent. It MUST NOT
+ // somehow return the key created earlier.
+ blink::WebCryptoKey key2 = blink::WebCryptoKey::createNull();
+ ASSERT_EQ(Status::OperationError(),
+ ImportKeyJwkFromDict(*key2_jwk,
+ CreateRsaHashedImportAlgorithm(
+ blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5,
+ blink::WebCryptoAlgorithmIdSha256),
+ true,
+ blink::WebCryptoKeyUsageSign,
+ &key2));
+}
+
// Import a JWK RSA private key with some optional parameters missing (q, dp,
// dq, qi).
//
@@ -2453,9 +2569,41 @@
ExportKey(blink::WebCryptoKeyFormatSpki, private_key, &output));
}
+// Try generating RSA key pairs using unsupported public exponents. Only
+// exponents of 3 and 65537 are supported. While both OpenSSL and NSS can
+// support other values, OpenSSL hangs when given invalid exponents, so use a
+// whitelist to validate the parameters.
+TEST_F(SharedCryptoTest, MAYBE(GenerateKeyPairRsaBadExponent)) {
+ const unsigned int modulus_length = 1024;
+
+ const char* const kPublicExponents[] = {
+ "11", // 17 - This is a valid public exponent, but currently disallowed.
+ "00",
+ "01",
+ "02",
+ "010000", // 65536
+ };
+
+ for (size_t i = 0; i < arraysize(kPublicExponents); ++i) {
+ SCOPED_TRACE(i);
+ blink::WebCryptoAlgorithm algorithm = CreateRsaHashedKeyGenAlgorithm(
+ blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5,
+ blink::WebCryptoAlgorithmIdSha256,
+ modulus_length,
+ HexStringToBytes(kPublicExponents[i]));
+
+ blink::WebCryptoKey public_key = blink::WebCryptoKey::createNull();
+ blink::WebCryptoKey private_key = blink::WebCryptoKey::createNull();
+
+ EXPECT_EQ(Status::ErrorGenerateKeyPublicExponent(),
+ GenerateKeyPair(
+ algorithm, true, 0, &public_key, &private_key));
+ }
+}
+
TEST_F(SharedCryptoTest, MAYBE(RsaSsaSignVerifyFailures)) {
// Import a key pair.
- blink::WebCryptoAlgorithm importAlgorithm =
+ blink::WebCryptoAlgorithm import_algorithm =
CreateRsaHashedImportAlgorithm(blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5,
blink::WebCryptoAlgorithmIdSha1);
blink::WebCryptoKey public_key = blink::WebCryptoKey::createNull();
@@ -2463,7 +2611,7 @@
ASSERT_NO_FATAL_FAILURE(
ImportRsaKeyPair(HexStringToBytes(kPublicKeySpkiDerHex),
HexStringToBytes(kPrivateKeyPkcs8DerHex),
- importAlgorithm,
+ import_algorithm,
false,
blink::WebCryptoKeyUsageVerify,
blink::WebCryptoKeyUsageSign,
@@ -2588,7 +2736,7 @@
ASSERT_TRUE(ReadJsonTestFileToList("pkcs1v15_sign.json", &tests));
// Import the key pair.
- blink::WebCryptoAlgorithm importAlgorithm =
+ blink::WebCryptoAlgorithm import_algorithm =
CreateRsaHashedImportAlgorithm(blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5,
blink::WebCryptoAlgorithmIdSha1);
blink::WebCryptoKey public_key = blink::WebCryptoKey::createNull();
@@ -2596,7 +2744,7 @@
ASSERT_NO_FATAL_FAILURE(
ImportRsaKeyPair(HexStringToBytes(kPublicKeySpkiDerHex),
HexStringToBytes(kPrivateKeyPkcs8DerHex),
- importAlgorithm,
+ import_algorithm,
false,
blink::WebCryptoKeyUsageVerify,
blink::WebCryptoKeyUsageSign,
@@ -2657,16 +2805,13 @@
// Import a 192-bit KEK
key_raw_hex_in = "c0192c6466b2370decbb62b2cfef4384544ffeb4d2fbc103";
- ASSERT_EQ(Status::Success(),
+ ASSERT_EQ(Status::ErrorAes192BitUnsupported(),
ImportKey(blink::WebCryptoKeyFormatRaw,
CryptoData(HexStringToBytes(key_raw_hex_in)),
algorithm,
true,
blink::WebCryptoKeyUsageWrapKey,
&key));
- EXPECT_EQ(Status::Success(),
- ExportKey(blink::WebCryptoKeyFormatRaw, key, &key_raw_out));
- EXPECT_BYTES_EQ_HEX(key_raw_hex_in, key_raw_out);
// Import a 256-bit Key Encryption Key (KEK)
key_raw_hex_in =
@@ -2777,8 +2922,8 @@
// Import the key to be wrapped.
blink::WebCryptoKey key = ImportSecretKeyFromRaw(
test_key,
- webcrypto::CreateAlgorithm(blink::WebCryptoAlgorithmIdAesCbc),
- blink::WebCryptoKeyUsageEncrypt);
+ CreateHmacImportAlgorithm(blink::WebCryptoAlgorithmIdSha1),
+ blink::WebCryptoKeyUsageSign);
// Wrap the key and verify the ciphertext result against the known answer.
std::vector<uint8> wrapped_key;
@@ -2798,16 +2943,16 @@
CryptoData(test_ciphertext),
wrapping_key,
wrapping_algorithm,
- webcrypto::CreateAlgorithm(blink::WebCryptoAlgorithmIdAesCbc),
+ CreateHmacImportAlgorithm(blink::WebCryptoAlgorithmIdSha1),
true,
- blink::WebCryptoKeyUsageEncrypt,
+ blink::WebCryptoKeyUsageSign,
&unwrapped_key));
EXPECT_FALSE(key.isNull());
EXPECT_TRUE(key.handle());
EXPECT_EQ(blink::WebCryptoKeyTypeSecret, key.type());
- EXPECT_EQ(blink::WebCryptoAlgorithmIdAesCbc, key.algorithm().id());
+ EXPECT_EQ(blink::WebCryptoAlgorithmIdHmac, key.algorithm().id());
EXPECT_EQ(true, key.extractable());
- EXPECT_EQ(blink::WebCryptoKeyUsageEncrypt, key.usages());
+ EXPECT_EQ(blink::WebCryptoKeyUsageSign, key.usages());
// Export the new key and compare its raw bytes with the original known key.
std::vector<uint8> raw_key;
@@ -2880,7 +3025,7 @@
ASSERT_TRUE(ReadJsonTestFileToList("aes_kw.json", &tests));
base::DictionaryValue* test;
// Use 256 bits of data with a 256-bit KEK
- ASSERT_TRUE(tests->GetDictionary(5, &test));
+ ASSERT_TRUE(tests->GetDictionary(3, &test));
const std::vector<uint8> test_kek = GetBytesFromHexString(test, "kek");
const std::vector<uint8> test_key = GetBytesFromHexString(test, "key");
const std::vector<uint8> test_ciphertext =
@@ -2933,7 +3078,7 @@
ASSERT_TRUE(ReadJsonTestFileToList("aes_kw.json", &tests));
base::DictionaryValue* test;
// Use 256 bits of data with a 256-bit KEK
- ASSERT_TRUE(tests->GetDictionary(5, &test));
+ ASSERT_TRUE(tests->GetDictionary(3, &test));
const std::vector<uint8> test_kek = GetBytesFromHexString(test, "kek");
const std::vector<uint8> test_key = GetBytesFromHexString(test, "key");
const std::vector<uint8> test_ciphertext =
@@ -3140,6 +3285,70 @@
}
}
+// AES 192-bit is not allowed: http://crbug.com/381829
+TEST_F(SharedCryptoTest, MAYBE(ImportAesCbc192Raw)) {
+ std::vector<uint8> key_raw(24, 0);
+ blink::WebCryptoKey key = blink::WebCryptoKey::createNull();
+ Status status = ImportKey(blink::WebCryptoKeyFormatRaw,
+ CryptoData(key_raw),
+ CreateAlgorithm(blink::WebCryptoAlgorithmIdAesCbc),
+ true,
+ blink::WebCryptoKeyUsageEncrypt,
+ &key);
+ ASSERT_EQ(Status::ErrorAes192BitUnsupported(), status);
+}
+
+// AES 192-bit is not allowed: http://crbug.com/381829
+TEST_F(SharedCryptoTest, MAYBE(ImportAesCbc192Jwk)) {
+ blink::WebCryptoKey key = blink::WebCryptoKey::createNull();
+
+ base::DictionaryValue dict;
+ dict.SetString("kty", "oct");
+ dict.SetString("alg", "A192CBC");
+ dict.SetString("k", "YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh");
+
+ EXPECT_EQ(
+ Status::ErrorAes192BitUnsupported(),
+ ImportKeyJwkFromDict(dict,
+ CreateAlgorithm(blink::WebCryptoAlgorithmIdAesCbc),
+ false,
+ blink::WebCryptoKeyUsageEncrypt,
+ &key));
+}
+
+// AES 192-bit is not allowed: http://crbug.com/381829
+TEST_F(SharedCryptoTest, MAYBE(GenerateAesCbc192)) {
+ blink::WebCryptoKey key = blink::WebCryptoKey::createNull();
+ Status status = GenerateSecretKey(CreateAesCbcKeyGenAlgorithm(192),
+ true,
+ blink::WebCryptoKeyUsageEncrypt,
+ &key);
+ ASSERT_EQ(Status::ErrorAes192BitUnsupported(), status);
+}
+
+// AES 192-bit is not allowed: http://crbug.com/381829
+TEST_F(SharedCryptoTest, MAYBE(UnwrapAesCbc192)) {
+ std::vector<uint8> wrapping_key_data(16, 0);
+ std::vector<uint8> wrapped_key = HexStringToBytes(
+ "1A07ACAB6C906E50883173C29441DB1DE91D34F45C435B5F99C822867FB3956F");
+
+ blink::WebCryptoKey wrapping_key =
+ ImportSecretKeyFromRaw(wrapping_key_data,
+ CreateAlgorithm(blink::WebCryptoAlgorithmIdAesKw),
+ blink::WebCryptoKeyUsageUnwrapKey);
+
+ blink::WebCryptoKey unwrapped_key = blink::WebCryptoKey::createNull();
+ ASSERT_EQ(Status::ErrorAes192BitUnsupported(),
+ UnwrapKey(blink::WebCryptoKeyFormatRaw,
+ CryptoData(wrapped_key),
+ wrapping_key,
+ CreateAlgorithm(blink::WebCryptoAlgorithmIdAesKw),
+ CreateAlgorithm(blink::WebCryptoAlgorithmIdAesCbc),
+ true,
+ blink::WebCryptoKeyUsageEncrypt,
+ &unwrapped_key));
+}
+
class SharedCryptoRsaOaepTest : public ::testing::Test {
public:
SharedCryptoRsaOaepTest() { Init(); }
diff --git a/content/child/webcrypto/status.cc b/content/child/webcrypto/status.cc
index cc2599e..5ddbf39 100644
--- a/content/child/webcrypto/status.cc
+++ b/content/child/webcrypto/status.cc
@@ -125,6 +125,11 @@
"AES key data must be 128, 192 or 256 bits");
}
+Status Status::ErrorAes192BitUnsupported() {
+ return Status(blink::WebCryptoErrorTypeNotSupported,
+ "192-bit AES keys are not supported");
+}
+
Status Status::ErrorUnexpectedKeyType() {
return Status(blink::WebCryptoErrorTypeInvalidAccess,
"The key is not of the expected type");
@@ -170,7 +175,7 @@
Status Status::ErrorGenerateKeyPublicExponent() {
return Status(blink::WebCryptoErrorTypeData,
- "The \"publicExponent\" is either empty, zero, or too large");
+ "The \"publicExponent\" must be either 3 or 65537");
}
Status Status::ErrorImportRsaEmptyModulus() {
diff --git a/content/child/webcrypto/status.h b/content/child/webcrypto/status.h
index 8dbfce6..70d97e7 100644
--- a/content/child/webcrypto/status.h
+++ b/content/child/webcrypto/status.h
@@ -124,6 +124,9 @@
// AES.
static Status ErrorImportAesKeyLength();
+ // 192-bit AES keys are valid, however unsupported.
+ static Status ErrorAes192BitUnsupported();
+
// The wrong key was used for the operation. For instance, a public key was
// used to verify a RsaSsaPkcs1v1_5 signature, or tried exporting a private
// key using spki format.
@@ -161,9 +164,8 @@
// multiple of 8 bytes, as required by RFC 3394.
static Status ErrorInvalidAesKwDataLength();
- // The "publicExponent" used to generate a key was invalid: either no bytes
- // were specified, or the number was too large to fit into an "unsigned long"
- // (implemention limitation), or the exponent was zero.
+ // The "publicExponent" used to generate a key was invalid or unsupported.
+ // Only values of 3 and 65537 are allowed.
static Status ErrorGenerateKeyPublicExponent();
// The modulus bytes were empty when importing an RSA public key.
diff --git a/content/child/webcrypto/webcrypto_impl.cc b/content/child/webcrypto/webcrypto_impl.cc
index ef0740b..6c664b1 100644
--- a/content/child/webcrypto/webcrypto_impl.cc
+++ b/content/child/webcrypto/webcrypto_impl.cc
@@ -457,7 +457,19 @@
}
void DoExportKeyReply(scoped_ptr<ExportKeyState> state) {
- CompleteWithBufferOrError(state->status, state->buffer, &state->result);
+ if (state->format != blink::WebCryptoKeyFormatJwk) {
+ CompleteWithBufferOrError(state->status, state->buffer, &state->result);
+ return;
+ }
+
+ if (state->status.IsError()) {
+ CompleteWithError(state->status, &state->result);
+ } else {
+ state->result.completeWithJson(
+ reinterpret_cast<const char*>(
+ webcrypto::Uint8VectorStart(&state->buffer)),
+ state->buffer.size());
+ }
}
void DoExportKey(scoped_ptr<ExportKeyState> passed_state) {
diff --git a/content/child/webthemeengine_impl_default.cc b/content/child/webthemeengine_impl_default.cc
index b25a167..4f78f1c 100644
--- a/content/child/webthemeengine_impl_default.cc
+++ b/content/child/webthemeengine_impl_default.cc
@@ -184,4 +184,19 @@
native_theme_extra_params);
}
+void WebThemeEngineImpl::paintStateTransition(blink::WebCanvas* canvas,
+ WebThemeEngine::Part part,
+ WebThemeEngine::State startState,
+ WebThemeEngine::State endState,
+ double progress,
+ const blink::WebRect& rect) {
+ ui::NativeTheme::instance()->PaintStateTransition(
+ canvas,
+ NativeThemePart(part),
+ NativeThemeState(startState),
+ NativeThemeState(endState),
+ progress,
+ gfx::Rect(rect));
+}
+
} // namespace content
diff --git a/content/child/webthemeengine_impl_default.h b/content/child/webthemeengine_impl_default.h
index 20f88c5..b757d44 100644
--- a/content/child/webthemeengine_impl_default.h
+++ b/content/child/webthemeengine_impl_default.h
@@ -19,6 +19,12 @@
blink::WebThemeEngine::State state,
const blink::WebRect& rect,
const blink::WebThemeEngine::ExtraParams* extra_params);
+ virtual void paintStateTransition(blink::WebCanvas* canvas,
+ blink::WebThemeEngine::Part part,
+ blink::WebThemeEngine::State startState,
+ blink::WebThemeEngine::State endState,
+ double progress,
+ const blink::WebRect& rect);
};
} // namespace content
diff --git a/content/child/webthread_impl.h b/content/child/webthread_impl.h
index 649cad8..4c81b25 100644
--- a/content/child/webthread_impl.h
+++ b/content/child/webthread_impl.h
@@ -14,7 +14,7 @@
namespace content {
-class WebThreadBase : public blink::WebThread {
+class CONTENT_EXPORT WebThreadBase : public blink::WebThread {
public:
virtual ~WebThreadBase();
@@ -33,10 +33,10 @@
TaskObserverMap task_observer_map_;
};
-class WebThreadImpl : public WebThreadBase {
+class CONTENT_EXPORT WebThreadImpl : public WebThreadBase {
public:
- CONTENT_EXPORT explicit WebThreadImpl(const char* name);
- CONTENT_EXPORT virtual ~WebThreadImpl();
+ explicit WebThreadImpl(const char* name);
+ virtual ~WebThreadImpl();
virtual void postTask(Task* task);
virtual void postDelayedTask(Task* task, long long delay_ms);
@@ -46,8 +46,9 @@
base::MessageLoop* message_loop() const { return thread_->message_loop(); }
- private:
virtual bool isCurrentThread() const OVERRIDE;
+
+ private:
scoped_ptr<base::Thread> thread_;
};
@@ -57,11 +58,11 @@
base::MessageLoopProxy* message_loop);
CONTENT_EXPORT virtual ~WebThreadImplForMessageLoop();
- virtual void postTask(Task* task);
- virtual void postDelayedTask(Task* task, long long delay_ms);
+ virtual void postTask(Task* task) OVERRIDE;
+ virtual void postDelayedTask(Task* task, long long delay_ms) OVERRIDE;
- virtual void enterRunLoop();
- virtual void exitRunLoop();
+ virtual void enterRunLoop() OVERRIDE;
+ virtual void exitRunLoop() OVERRIDE;
private:
virtual bool isCurrentThread() const OVERRIDE;
diff --git a/content/common/DEPS b/content/common/DEPS
index 7d2d0e7..388e1db 100644
--- a/content/common/DEPS
+++ b/content/common/DEPS
@@ -31,8 +31,8 @@
"+third_party/WebKit/public/platform/WebServiceWorkerState.h",
"+third_party/WebKit/public/platform/WebStorageArea.h",
"+third_party/WebKit/public/platform/WebString.h",
- "+third_party/WebKit/public/platform/linux/WebFontFamily.h",
"+third_party/WebKit/public/platform/linux/WebFontRenderStyle.h",
+ "+third_party/WebKit/public/platform/linux/WebFallbackFont.h",
"+third_party/WebKit/public/web/mac/WebScrollbarTheme.h",
"+third_party/WebKit/public/web/WebAXEnums.h",
"+third_party/WebKit/public/web/WebCompositionUnderline.h",
diff --git a/content/common/OWNERS b/content/common/OWNERS
index 3585fdb..fd688b2 100644
--- a/content/common/OWNERS
+++ b/content/common/OWNERS
@@ -21,7 +21,6 @@
# Changes to IPC messages require a security review to avoid introducing
# new sandbox escapes.
per-file *_message*.h=set noparent
-per-file *_message*.h=cdn@chromium.org
per-file *_message*.h=cevans@chromium.org
per-file *_message*.h=dcheng@chromium.org
per-file *_message*.h=inferno@chromium.org
@@ -33,7 +32,6 @@
per-file *_message*.h=tsepez@chromium.org
per-file *param_traits*.h=set noparent
-per-file *param_traits*.h=cdn@chromium.org
per-file *param_traits*.h=cevans@chromium.org
per-file *param_traits*.h=dcheng@chromium.org
per-file *param_traits*.h=inferno@chromium.org
diff --git a/content/common/appcache_messages.h b/content/common/appcache_messages.h
index 173bbef..8ad8fd5 100644
--- a/content/common/appcache_messages.h
+++ b/content/common/appcache_messages.h
@@ -9,9 +9,12 @@
#define IPC_MESSAGE_START AppCacheMsgStart
-IPC_ENUM_TRAITS_MAX_VALUE(appcache::EventID, appcache::EVENT_ID_LAST)
-IPC_ENUM_TRAITS_MAX_VALUE(appcache::Status, appcache::STATUS_LAST)
-IPC_ENUM_TRAITS_MAX_VALUE(appcache::ErrorReason, appcache::ERROR_REASON_LAST)
+IPC_ENUM_TRAITS_MAX_VALUE(appcache::AppCacheEventID,
+ appcache::APPCACHE_EVENT_ID_LAST)
+IPC_ENUM_TRAITS_MAX_VALUE(appcache::AppCacheStatus,
+ appcache::APPCACHE_STATUS_LAST)
+IPC_ENUM_TRAITS_MAX_VALUE(appcache::AppCacheErrorReason,
+ appcache::APPCACHE_ERROR_REASON_LAST)
IPC_STRUCT_TRAITS_BEGIN(appcache::AppCacheInfo)
IPC_STRUCT_TRAITS_MEMBER(manifest_url)
@@ -35,7 +38,7 @@
IPC_STRUCT_TRAITS_MEMBER(is_explicit)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(appcache::ErrorDetails)
+IPC_STRUCT_TRAITS_BEGIN(appcache::AppCacheErrorDetails)
IPC_STRUCT_TRAITS_MEMBER(message)
IPC_STRUCT_TRAITS_MEMBER(reason)
IPC_STRUCT_TRAITS_MEMBER(url)
@@ -67,7 +70,7 @@
// 'host_id' indentifies a specific document or worker
// 'document_url' the url of the main resource
// 'appcache_document_was_loaded_from' the id of the appcache the main
-// resource was loaded from or kNoCacheId
+// resource was loaded from or kAppCacheNoCacheId
// 'opt_manifest_url' the manifest url specified in the <html> tag if any
IPC_MESSAGE_CONTROL4(AppCacheHostMsg_SelectCache,
int /* host_id */,
@@ -93,7 +96,7 @@
// Returns the status of the appcache associated with host_id.
IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheHostMsg_GetStatus,
int /* host_id */,
- appcache::Status)
+ appcache::AppCacheStatus)
// Initiates an update of the appcache associated with host_id.
IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheHostMsg_StartUpdate,
@@ -123,13 +126,13 @@
// Notifies the renderer of an AppCache status change.
IPC_MESSAGE_CONTROL2(AppCacheMsg_StatusChanged,
std::vector<int> /* host_ids */,
- appcache::Status)
+ appcache::AppCacheStatus)
// Notifies the renderer of an AppCache event other than the
// progress event which has a seperate message.
IPC_MESSAGE_CONTROL2(AppCacheMsg_EventRaised,
std::vector<int> /* host_ids */,
- appcache::EventID)
+ appcache::AppCacheEventID)
// Notifies the renderer of an AppCache progress event.
IPC_MESSAGE_CONTROL4(AppCacheMsg_ProgressEventRaised,
@@ -141,7 +144,7 @@
// Notifies the renderer of an AppCache error event.
IPC_MESSAGE_CONTROL2(AppCacheMsg_ErrorEventRaised,
std::vector<int> /* host_ids */,
- appcache::ErrorDetails)
+ appcache::AppCacheErrorDetails)
// Notifies the renderer of an AppCache logging message.
IPC_MESSAGE_CONTROL3(AppCacheMsg_LogMessage,
diff --git a/content/common/browser_plugin/OWNERS b/content/common/browser_plugin/OWNERS
index 2441400..ee4b51e 100644
--- a/content/common/browser_plugin/OWNERS
+++ b/content/common/browser_plugin/OWNERS
@@ -3,7 +3,6 @@
# For security review of IPC message files.
per-file *_messages*.h=set noparent
-per-file *_messages*.h=cdn@chromium.org
per-file *_messages*.h=cevans@chromium.org
per-file *_messages*.h=dcheng@chromium.org
per-file *_messages*.h=inferno@chromium.org
diff --git a/content/common/browser_plugin/browser_plugin_constants.cc b/content/common/browser_plugin/browser_plugin_constants.cc
index ee86b05..96b4a5f 100644
--- a/content/common/browser_plugin/browser_plugin_constants.cc
+++ b/content/common/browser_plugin/browser_plugin_constants.cc
@@ -11,9 +11,6 @@
// Internal method bindings.
const char kMethodInternalAttach[] = "-internal-attach";
-// Internal events.
-const char kEventInternalInstanceIDAllocated[] = "instanceid-allocated";
-
// Attributes.
const char kAttributeAllowTransparency[] = "allowtransparency";
const char kAttributeAutoSize[] = "autosize";
@@ -27,14 +24,9 @@
const char kAttributeSrc[] = "src";
// Parameters/properties on events.
-const char kPersistPrefix[] = "persist:";
const char kWindowID[] = "windowId";
// Error messages.
-const char kErrorAlreadyNavigated[] =
- "The object has already navigated, so its partition cannot be changed.";
-const char kErrorInvalidPartition[] =
- "Invalid partition attribute.";
const char kErrorCannotRemovePartition[] =
"Cannot remove partition attribute after navigating.";
diff --git a/content/common/browser_plugin/browser_plugin_constants.h b/content/common/browser_plugin/browser_plugin_constants.h
index 973cad3..7c408d3 100644
--- a/content/common/browser_plugin/browser_plugin_constants.h
+++ b/content/common/browser_plugin/browser_plugin_constants.h
@@ -12,9 +12,6 @@
// Internal method bindings.
extern const char kMethodInternalAttach[];
-// Internal events
-extern const char kEventInternalInstanceIDAllocated[];
-
// Attributes.
extern const char kAttributeAllowTransparency[];
extern const char kAttributeAutoSize[];
@@ -28,12 +25,9 @@
extern const char kAttributeSrc[];
// Parameters/properties on events.
-extern const char kPersistPrefix[];
extern const char kWindowID[];
// Error messages.
-extern const char kErrorAlreadyNavigated[];
-extern const char kErrorInvalidPartition[];
extern const char kErrorCannotRemovePartition[];
// Other.
diff --git a/content/common/browser_plugin/browser_plugin_messages.h b/content/common/browser_plugin/browser_plugin_messages.h
index 32e8f29..74cb01d 100644
--- a/content/common/browser_plugin/browser_plugin_messages.h
+++ b/content/common/browser_plugin/browser_plugin_messages.h
@@ -45,8 +45,8 @@
IPC_STRUCT_BEGIN(BrowserPluginHostMsg_ResizeGuest_Params)
// Indicates whether the parameters have been populated or not.
IPC_STRUCT_MEMBER(bool, size_changed)
- // The new rect of the guest view area.
- IPC_STRUCT_MEMBER(gfx::Rect, view_rect)
+ // The new size of guest view.
+ IPC_STRUCT_MEMBER(gfx::Size, view_size)
// Indicates the scale factor of the embedder WebView.
IPC_STRUCT_MEMBER(float, scale_factor)
// Indicates a request for a full repaint of the page.
@@ -56,21 +56,14 @@
IPC_STRUCT_END()
IPC_STRUCT_BEGIN(BrowserPluginHostMsg_Attach_Params)
- IPC_STRUCT_MEMBER(std::string, storage_partition_id)
- IPC_STRUCT_MEMBER(bool, persist_storage)
IPC_STRUCT_MEMBER(bool, focused)
IPC_STRUCT_MEMBER(bool, visible)
IPC_STRUCT_MEMBER(bool, opaque)
- IPC_STRUCT_MEMBER(std::string, src)
IPC_STRUCT_MEMBER(GURL, embedder_frame_url)
IPC_STRUCT_MEMBER(BrowserPluginHostMsg_AutoSize_Params, auto_size_params)
IPC_STRUCT_MEMBER(BrowserPluginHostMsg_ResizeGuest_Params,
resize_guest_params)
-IPC_STRUCT_END()
-
-IPC_STRUCT_BEGIN(BrowserPluginMsg_Attach_ACK_Params)
- IPC_STRUCT_MEMBER(std::string, storage_partition_id)
- IPC_STRUCT_MEMBER(bool, persist_storage)
+ IPC_STRUCT_MEMBER(gfx::Point, origin)
IPC_STRUCT_END()
IPC_STRUCT_BEGIN(BrowserPluginMsg_UpdateRect_Params)
@@ -94,12 +87,6 @@
// -----------------------------------------------------------------------------
// These messages are from the embedder to the browser process.
-// This message is sent to the browser process to request an instance ID.
-// |request_id| is used by BrowserPluginEmbedder to route the response back
-// to its origin.
-IPC_MESSAGE_ROUTED1(BrowserPluginHostMsg_AllocateInstanceID,
- int /* request_id */)
-
// This message is sent from BrowserPlugin to BrowserPluginGuest to issue an
// edit command.
IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_ExecuteEditCommand,
@@ -164,15 +151,6 @@
gfx::Rect /* guest_window_rect */,
IPC::WebInputEventPointer /* event */)
-// A BrowserPlugin sends this to BrowserPluginEmbedder (browser process) when it
-// wants to navigate to a given src URL. If a guest WebContents already exists,
-// it will navigate that WebContents. If not, it will create the WebContents,
-// associate it with the BrowserPluginGuest, and navigate it to the requested
-// URL.
-IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_NavigateGuest,
- int /* instance_id*/,
- std::string /* src */)
-
IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_CopyFromCompositingSurfaceAck,
int /* instance_id */,
int /* request_id */,
@@ -233,19 +211,9 @@
// -----------------------------------------------------------------------------
// These messages are from the browser process to the embedder.
-// This message is sent from the browser process to the embedder render process
-// in response to a request to allocate an instance ID. The |request_id| is used
-// to route the response to the requestor.
-IPC_MESSAGE_ROUTED2(BrowserPluginMsg_AllocateInstanceID_ACK,
- int /* request_id */,
- int /* instance_id */)
-
// This message is sent in response to a completed attachment of a guest
-// to a BrowserPlugin. This message carries information about the guest
-// that is used to update the attributes of the browser plugin.
-IPC_MESSAGE_CONTROL2(BrowserPluginMsg_Attach_ACK,
- int /* instance_id */,
- BrowserPluginMsg_Attach_ACK_Params /* params */)
+// to a BrowserPlugin.
+IPC_MESSAGE_CONTROL1(BrowserPluginMsg_Attach_ACK, int /* instance_id */);
// Once the swapped out guest RenderView has been created in the embedder render
// process, the browser process informs the embedder of its routing ID.
diff --git a/content/common/cc_messages.h b/content/common/cc_messages.h
index 8a4dcfe..a2eaa63 100644
--- a/content/common/cc_messages.h
+++ b/content/common/cc_messages.h
@@ -25,6 +25,7 @@
#include "cc/resources/resource_format.h"
#include "cc/resources/returned_resource.h"
#include "cc/resources/transferable_resource.h"
+#include "cc/surfaces/surface_id.h"
#include "content/common/content_export.h"
#include "gpu/ipc/gpu_command_buffer_traits.h"
#include "ipc/ipc_message_macros.h"
@@ -139,6 +140,10 @@
IPC_STRUCT_TRAITS_MEMBER(index)
IPC_STRUCT_TRAITS_END()
+IPC_STRUCT_TRAITS_BEGIN(cc::SurfaceId)
+IPC_STRUCT_TRAITS_MEMBER(id)
+IPC_STRUCT_TRAITS_END()
+
IPC_STRUCT_TRAITS_BEGIN(cc::DrawQuad)
IPC_STRUCT_TRAITS_MEMBER(material)
IPC_STRUCT_TRAITS_MEMBER(rect)
diff --git a/content/common/cc_messages_unittest.cc b/content/common/cc_messages_unittest.cc
index e840596..3d4499d 100644
--- a/content/common/cc_messages_unittest.cc
+++ b/content/common/cc_messages_unittest.cc
@@ -403,7 +403,7 @@
scoped_ptr<DrawQuad> streamvideo_cmp = streamvideo_in->Copy(
streamvideo_in->shared_quad_state);
- int arbitrary_surface_id = 3;
+ cc::SurfaceId arbitrary_surface_id(3);
scoped_ptr<SurfaceDrawQuad> surface_in = SurfaceDrawQuad::Create();
surface_in->SetAll(shared_state3_in,
arbitrary_rect2,
diff --git a/content/common/child_process_messages.h b/content/common/child_process_messages.h
index da76e02..9b44b93 100644
--- a/content/common/child_process_messages.h
+++ b/content/common/child_process_messages.h
@@ -67,9 +67,15 @@
IPC_STRUCT_TRAITS_END()
#endif
+IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferId)
+ IPC_STRUCT_TRAITS_MEMBER(primary_id)
+ IPC_STRUCT_TRAITS_MEMBER(secondary_id)
+IPC_STRUCT_TRAITS_END()
+
IPC_STRUCT_TRAITS_BEGIN(gfx::GpuMemoryBufferHandle)
IPC_STRUCT_TRAITS_MEMBER(type)
IPC_STRUCT_TRAITS_MEMBER(handle)
+ IPC_STRUCT_TRAITS_MEMBER(global_id)
#if defined(OS_MACOSX)
IPC_STRUCT_TRAITS_MEMBER(io_surface_id)
#endif
diff --git a/content/common/child_process_sandbox_support_impl_linux.cc b/content/common/child_process_sandbox_support_impl_linux.cc
index c0edcfc..8c3c259 100644
--- a/content/common/child_process_sandbox_support_impl_linux.cc
+++ b/content/common/child_process_sandbox_support_impl_linux.cc
@@ -15,18 +15,18 @@
#include "base/sys_byteorder.h"
#include "content/common/sandbox_linux/sandbox_linux.h"
#include "content/common/zygote_commands_linux.h"
-#include "third_party/WebKit/public/platform/linux/WebFontFamily.h"
+#include "third_party/WebKit/public/platform/linux/WebFallbackFont.h"
#include "third_party/WebKit/public/platform/linux/WebFontRenderStyle.h"
namespace content {
-void GetFontFamilyForCharacter(int32_t character,
- const char* preferred_locale,
- blink::WebFontFamily* family) {
+void GetFallbackFontForCharacter(int32_t character,
+ const char* preferred_locale,
+ blink::WebFallbackFont* fallbackFont) {
TRACE_EVENT0("sandbox_ipc", "GetFontFamilyForCharacter");
Pickle request;
- request.WriteInt(LinuxSandbox::METHOD_GET_FONT_FAMILY_FOR_CHAR);
+ request.WriteInt(LinuxSandbox::METHOD_GET_FALLBACK_FONT_FOR_CHAR);
request.WriteInt(character);
request.WriteString(preferred_locale);
@@ -35,17 +35,23 @@
sizeof(buf), NULL, request);
std::string family_name;
+ std::string filename;
+ int ttcIndex = 0;
bool isBold = false;
bool isItalic = false;
if (n != -1) {
Pickle reply(reinterpret_cast<char*>(buf), n);
PickleIterator pickle_iter(reply);
if (reply.ReadString(&pickle_iter, &family_name) &&
+ reply.ReadString(&pickle_iter, &filename) &&
+ reply.ReadInt(&pickle_iter, &ttcIndex) &&
reply.ReadBool(&pickle_iter, &isBold) &&
reply.ReadBool(&pickle_iter, &isItalic)) {
- family->name = family_name;
- family->isBold = isBold;
- family->isItalic = isItalic;
+ fallbackFont->name = family_name;
+ fallbackFont->filename = filename;
+ fallbackFont->ttcIndex = ttcIndex;
+ fallbackFont->isBold = isBold;
+ fallbackFont->isItalic = isItalic;
}
}
}
diff --git a/content/common/child_process_sandbox_support_impl_linux.h b/content/common/child_process_sandbox_support_impl_linux.h
index 556652f..2bbf76e 100644
--- a/content/common/child_process_sandbox_support_impl_linux.h
+++ b/content/common/child_process_sandbox_support_impl_linux.h
@@ -10,7 +10,7 @@
#include "content/public/common/content_descriptors.h"
namespace blink {
-struct WebFontFamily;
+struct WebFallbackFont;
struct WebFontRenderStyle;
}
@@ -23,9 +23,9 @@
//
// Returns: a font family instance.
// The instance has an empty font name if the request could not be satisfied.
-void GetFontFamilyForCharacter(const int32_t character,
+void GetFallbackFontForCharacter(const int32_t character,
const char* preferred_locale,
- blink::WebFontFamily* family);
+ blink::WebFallbackFont* family);
void GetRenderStyleForStrike(const char* family, int sizeAndStyle,
blink::WebFontRenderStyle* out);
diff --git a/content/common/content_message_generator.h b/content/common/content_message_generator.h
index dd0f096..e18ddfe 100644
--- a/content/common/content_message_generator.h
+++ b/content/common/content_message_generator.h
@@ -31,6 +31,7 @@
#include "content/common/indexed_db/indexed_db_messages.h"
#include "content/common/input_messages.h"
#include "content/common/java_bridge_messages.h"
+#include "content/common/media/aec_dump_messages.h"
#include "content/common/media/audio_messages.h"
// TODO(xhwang): Move this to a new ifdef block.
#include "content/common/media/cdm_messages.h"
diff --git a/content/common/devtools_messages.h b/content/common/devtools_messages.h
index 1084948..3e14864 100644
--- a/content/common/devtools_messages.h
+++ b/content/common/devtools_messages.h
@@ -62,11 +62,13 @@
// These are messages sent from DevToolsClient to DevToolsAgent through the
// browser.
// Tells agent that there is a client host connected to it.
-IPC_MESSAGE_ROUTED0(DevToolsAgentMsg_Attach)
+IPC_MESSAGE_ROUTED1(DevToolsAgentMsg_Attach,
+ std::string /* host_id */)
// Tells agent that a client host was disconnected from another agent and
// connected to this one.
-IPC_MESSAGE_ROUTED1(DevToolsAgentMsg_Reattach,
+IPC_MESSAGE_ROUTED2(DevToolsAgentMsg_Reattach,
+ std::string /* host_id */,
std::string /* agent_state */)
// Tells agent that there is no longer a client host connected to it.
@@ -77,7 +79,8 @@
std::string /* message */)
// Inspect element with the given coordinates.
-IPC_MESSAGE_ROUTED2(DevToolsAgentMsg_InspectElement,
+IPC_MESSAGE_ROUTED3(DevToolsAgentMsg_InspectElement,
+ std::string /* host_id */,
int /* x */,
int /* y */)
diff --git a/content/common/dom_storage/OWNERS b/content/common/dom_storage/OWNERS
index c890839..8f41e3d 100644
--- a/content/common/dom_storage/OWNERS
+++ b/content/common/dom_storage/OWNERS
@@ -4,7 +4,6 @@
# Changes to IPC messages require a security review to avoid introducing
# new sandbox escapes.
per-file *_messages*.h=set noparent
-per-file *_messages*.h=cdn@chromium.org
per-file *_messages*.h=cevans@chromium.org
per-file *_messages*.h=dcheng@chromium.org
per-file *_messages*.h=inferno@chromium.org
diff --git a/content/common/fileapi/OWNERS b/content/common/fileapi/OWNERS
index 2dc5ad3..2c20f11 100644
--- a/content/common/fileapi/OWNERS
+++ b/content/common/fileapi/OWNERS
@@ -5,7 +5,6 @@
# For security review of IPC message files.
per-file *_messages*.h=set noparent
-per-file *_messages*.h=cdn@chromium.org
per-file *_messages*.h=cevans@chromium.org
per-file *_messages*.h=dcheng@chromium.org
per-file *_messages*.h=inferno@chromium.org
diff --git a/content/common/fileapi/file_system_util_unittest.cc b/content/common/fileapi/file_system_util_unittest.cc
index 61dac02..a82dc90 100644
--- a/content/common/fileapi/file_system_util_unittest.cc
+++ b/content/common/fileapi/file_system_util_unittest.cc
@@ -10,7 +10,9 @@
using fileapi::CrackIsolatedFileSystemName;
using fileapi::FileSystemType;
+using fileapi::GetExternalFileSystemRootURIString;
using fileapi::GetIsolatedFileSystemName;
+using fileapi::GetIsolatedFileSystemRootURIString;
using fileapi::ValidateIsolatedFileSystemId;
using fileapi::VirtualPath;
@@ -281,5 +283,26 @@
EXPECT_FALSE(ValidateIsolatedFileSystemId(kSpaceId));
}
+TEST_F(FileSystemUtilTest, GetIsolatedFileSystemRootURIString) {
+ const GURL kOriginURL("http://foo");
+ // Percents must be escaped, otherwise they will be unintentionally unescaped.
+ const std::string kFileSystemId = "A%20B";
+ const std::string kRootName = "C%20D";
+
+ const std::string url_string =
+ GetIsolatedFileSystemRootURIString(kOriginURL, kFileSystemId, kRootName);
+ EXPECT_EQ("filesystem:http://foo/isolated/A%2520B/C%2520D/", url_string);
+}
+
+TEST_F(FileSystemUtilTest, GetExternalFileSystemRootURIString) {
+ const GURL kOriginURL("http://foo");
+ // Percents must be escaped, otherwise they will be unintentionally unescaped.
+ const std::string kMountName = "X%20Y";
+
+ const std::string url_string =
+ GetExternalFileSystemRootURIString(kOriginURL, kMountName);
+ EXPECT_EQ("filesystem:http://foo/external/X%2520Y/", url_string);
+}
+
} // namespace
} // namespace content
diff --git a/content/common/font_cache_dispatcher_win.cc b/content/common/font_cache_dispatcher_win.cc
index 3043079..2181a08 100644
--- a/content/common/font_cache_dispatcher_win.cc
+++ b/content/common/font_cache_dispatcher_win.cc
@@ -10,7 +10,6 @@
#include "base/logging.h"
#include "base/strings/string16.h"
#include "content/common/child_process_messages.h"
-#include "ipc/ipc_channel.h"
namespace content {
namespace {
@@ -136,14 +135,14 @@
}
FontCacheDispatcher::FontCacheDispatcher()
- : channel_(NULL) {
+ : sender_(NULL) {
}
FontCacheDispatcher::~FontCacheDispatcher() {
}
-void FontCacheDispatcher::OnFilterAdded(IPC::Channel* channel) {
- channel_ = channel;
+void FontCacheDispatcher::OnFilterAdded(IPC::Sender* sender) {
+ sender_ = sender;
}
bool FontCacheDispatcher::OnMessageReceived(const IPC::Message& message) {
@@ -158,12 +157,12 @@
}
void FontCacheDispatcher::OnChannelClosing() {
- channel_ = NULL;
+ sender_ = NULL;
}
bool FontCacheDispatcher::Send(IPC::Message* message) {
- if (channel_)
- return channel_->Send(message);
+ if (sender_)
+ return sender_->Send(message);
delete message;
return false;
diff --git a/content/common/font_cache_dispatcher_win.h b/content/common/font_cache_dispatcher_win.h
index c1f4ebf..913f857 100644
--- a/content/common/font_cache_dispatcher_win.h
+++ b/content/common/font_cache_dispatcher_win.h
@@ -12,10 +12,6 @@
#include "ipc/ipc_sender.h"
#include "ipc/message_filter.h"
-namespace IPC {
-class Channel;
-}
-
namespace content {
// Dispatches messages used for font caching on Windows. This is needed because
@@ -31,7 +27,7 @@
private:
// IPC::MessageFilter implementation:
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void OnChannelClosing() OVERRIDE;
@@ -39,7 +35,7 @@
void OnPreCacheFont(const LOGFONT& font);
void OnReleaseCachedFonts();
- IPC::Channel* channel_;
+ IPC::Sender* sender_;
DISALLOW_COPY_AND_ASSIGN(FontCacheDispatcher);
};
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
index 2fd20c7..6db0b9d 100644
--- a/content/common/frame_messages.h
+++ b/content/common/frame_messages.h
@@ -358,6 +358,11 @@
// RenderFrame object it is associated with.
IPC_MESSAGE_ROUTED0(FrameMsg_DeleteProxy)
+// Request the text surrounding the selection with a |max_length|. The response
+// will be sent via FrameHostMsg_TextSurroundingSelectionResponse.
+IPC_MESSAGE_ROUTED1(FrameMsg_TextSurroundingSelectionRequest,
+ size_t /* max_length */)
+
// -----------------------------------------------------------------------------
// Messages sent from the renderer to the browser.
@@ -607,3 +612,10 @@
IPC_MESSAGE_ROUTED1(FrameHostMsg_MediaPausedNotification,
int64 /* player_cookie, distinguishes instances */)
+
+// Response for FrameMsg_TextSurroundingSelectionRequest, |startOffset| and
+// |endOffset| are the offsets of the selection in the returned |content|.
+IPC_MESSAGE_ROUTED3(FrameHostMsg_TextSurroundingSelectionResponse,
+ base::string16, /* content */
+ size_t, /* startOffset */
+ size_t /* endOffset */)
diff --git a/content/common/gpu/OWNERS b/content/common/gpu/OWNERS
index 1422f9b..6164538 100644
--- a/content/common/gpu/OWNERS
+++ b/content/common/gpu/OWNERS
@@ -5,9 +5,11 @@
# GPU memory buffer implementations.
per-file *gpu_memory_buffer*=reveman@chromium.org
+# GPU memory manager.
+per-file *gpu_memory_manager*=ccameron@chromium.org
+
# For security review of IPC message files.
per-file *_messages*.h=set noparent
-per-file *_messages*.h=cdn@chromium.org
per-file *_messages*.h=cevans@chromium.org
per-file *_messages*.h=dcheng@chromium.org
per-file *_messages*.h=inferno@chromium.org
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc
index e2bd974..44453df 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.cc
+++ b/content/common/gpu/client/command_buffer_proxy_impl.cc
@@ -459,12 +459,16 @@
scoped_ptr<media::VideoDecodeAccelerator>
CommandBufferProxyImpl::CreateVideoDecoder() {
+ if (!channel_)
+ return scoped_ptr<media::VideoDecodeAccelerator>();
return scoped_ptr<media::VideoDecodeAccelerator>(
new GpuVideoDecodeAcceleratorHost(channel_, this));
}
scoped_ptr<media::VideoEncodeAccelerator>
CommandBufferProxyImpl::CreateVideoEncoder() {
+ if (!channel_)
+ return scoped_ptr<media::VideoEncodeAccelerator>();
return scoped_ptr<media::VideoEncodeAccelerator>(
new GpuVideoEncodeAcceleratorHost(channel_, this));
}
diff --git a/content/common/gpu/client/gpu_memory_buffer_factory_host.h b/content/common/gpu/client/gpu_memory_buffer_factory_host.h
new file mode 100644
index 0000000..6dfd58b
--- /dev/null
+++ b/content/common/gpu/client/gpu_memory_buffer_factory_host.h
@@ -0,0 +1,37 @@
+// Copyright 2014 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 CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_
+#define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_
+
+#include "base/callback.h"
+
+namespace gfx {
+class Size;
+struct GpuMemoryBufferHandle;
+}
+
+namespace content {
+
+class CONTENT_EXPORT GpuMemoryBufferFactoryHost {
+ public:
+ typedef base::Callback<void(const gfx::GpuMemoryBufferHandle& handle)>
+ CreateGpuMemoryBufferCallback;
+
+ virtual void CreateGpuMemoryBuffer(
+ const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ unsigned internalformat,
+ unsigned usage,
+ const CreateGpuMemoryBufferCallback& callback) = 0;
+ virtual void DestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
+ int32 sync_point) = 0;
+
+ protected:
+ virtual ~GpuMemoryBufferFactoryHost() {}
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_FACTORY_HOST_H_
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index 6262ed5..727bb89 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -77,24 +77,24 @@
scoped_refptr<base::MessageLoopProxy> message_loop)
: preemption_state_(IDLE),
gpu_channel_(gpu_channel),
- channel_(NULL),
+ sender_(NULL),
sync_point_manager_(sync_point_manager),
message_loop_(message_loop),
messages_forwarded_to_channel_(0),
a_stub_is_descheduled_(false) {}
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE {
- DCHECK(!channel_);
- channel_ = channel;
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE {
+ DCHECK(!sender_);
+ sender_ = sender;
}
virtual void OnFilterRemoved() OVERRIDE {
- DCHECK(channel_);
- channel_ = NULL;
+ DCHECK(sender_);
+ sender_ = NULL;
}
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE {
- DCHECK(channel_);
+ DCHECK(sender_);
bool handled = false;
if (message.type() == GpuCommandBufferMsg_RetireSyncPoint::ID) {
@@ -148,7 +148,7 @@
}
bool Send(IPC::Message* message) {
- return channel_->Send(message);
+ return sender_->Send(message);
}
protected:
@@ -359,7 +359,7 @@
// NOTE: this weak pointer is never dereferenced on the IO thread, it's only
// passed through - therefore the WeakPtr assumptions are respected.
base::WeakPtr<GpuChannel> gpu_channel_;
- IPC::Channel* channel_;
+ IPC::Sender* sender_;
scoped_refptr<SyncPointManager> sync_point_manager_;
scoped_refptr<base::MessageLoopProxy> message_loop_;
scoped_refptr<gpu::PreemptionFlag> preempting_flag_;
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc
index 3e056e5..899da86 100644
--- a/content/common/gpu/gpu_channel_manager.cc
+++ b/content/common/gpu/gpu_channel_manager.cc
@@ -110,6 +110,8 @@
OnCreateViewCommandBuffer)
IPC_MESSAGE_HANDLER(GpuMsg_CreateImage, OnCreateImage)
IPC_MESSAGE_HANDLER(GpuMsg_DeleteImage, OnDeleteImage)
+ IPC_MESSAGE_HANDLER(GpuMsg_CreateGpuMemoryBuffer, OnCreateGpuMemoryBuffer)
+ IPC_MESSAGE_HANDLER(GpuMsg_DestroyGpuMemoryBuffer, OnDestroyGpuMemoryBuffer)
IPC_MESSAGE_HANDLER(GpuMsg_LoadedShader, OnLoadedShader)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -255,6 +257,19 @@
}
}
+void GpuChannelManager::OnCreateGpuMemoryBuffer(
+ const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ unsigned internalformat,
+ unsigned usage) {
+ Send(new GpuHostMsg_GpuMemoryBufferCreated(gfx::GpuMemoryBufferHandle()));
+}
+
+void GpuChannelManager::OnDestroyGpuMemoryBuffer(
+ const gfx::GpuMemoryBufferHandle& handle,
+ int32 sync_point) {
+}
+
void GpuChannelManager::OnLoadedShader(std::string program_proto) {
if (program_cache())
program_cache()->LoadProgram(program_proto);
diff --git a/content/common/gpu/gpu_channel_manager.h b/content/common/gpu/gpu_channel_manager.h
index b6667be..73b4e59 100644
--- a/content/common/gpu/gpu_channel_manager.h
+++ b/content/common/gpu/gpu_channel_manager.h
@@ -28,6 +28,7 @@
namespace gfx {
class GLShareGroup;
+struct GpuMemoryBufferHandle;
}
namespace gpu {
@@ -127,6 +128,12 @@
void OnDeleteImage(int32 client_id, int32 image_id, int32 sync_point);
void OnDeleteImageSyncPointRetired(ImageOperation*);
void OnLoadedShader(std::string shader);
+ void OnCreateGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ unsigned internalformat,
+ unsigned usage);
+ void OnDestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
+ int32 sync_point);
void OnLoseAllContexts();
diff --git a/content/common/gpu/gpu_memory_manager.cc b/content/common/gpu/gpu_memory_manager.cc
index 9df7b58..7937ea1 100644
--- a/content/common/gpu/gpu_memory_manager.cc
+++ b/content/common/gpu/gpu_memory_manager.cc
@@ -35,16 +35,6 @@
*total_size += (new_size - old_size);
}
-template<typename T>
-T RoundUp(T n, T mul) {
- return ((n + mul - 1) / mul) * mul;
-}
-
-template<typename T>
-T RoundDown(T n, T mul) {
- return (n / mul) * mul;
-}
-
}
GpuMemoryManager::GpuMemoryManager(
@@ -52,54 +42,14 @@
uint64 max_surfaces_with_frontbuffer_soft_limit)
: channel_manager_(channel_manager),
manage_immediate_scheduled_(false),
+ disable_schedule_manage_(false),
max_surfaces_with_frontbuffer_soft_limit_(
max_surfaces_with_frontbuffer_soft_limit),
- priority_cutoff_(MemoryAllocation::CUTOFF_ALLOW_EVERYTHING),
- bytes_available_gpu_memory_(0),
- bytes_available_gpu_memory_overridden_(false),
- bytes_minimum_per_client_(0),
- bytes_default_per_client_(0),
+ client_hard_limit_bytes_(0),
bytes_allocated_managed_current_(0),
bytes_allocated_unmanaged_current_(0),
- bytes_allocated_historical_max_(0),
- bytes_allocated_unmanaged_high_(0),
- bytes_allocated_unmanaged_low_(0),
- bytes_unmanaged_limit_step_(kBytesAllocatedUnmanagedStep),
- disable_schedule_manage_(false)
-{
- CommandLine* command_line = CommandLine::ForCurrentProcess();
-
- // Use a more conservative memory allocation policy on Linux and Mac because
- // the platform is unstable when under memory pressure.
- // http://crbug.com/145600 (Linux)
- // http://crbug.com/141377 (Mac)
-#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
- priority_cutoff_ = MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE;
-#endif
-
-#if defined(OS_ANDROID)
- bytes_default_per_client_ = 8 * 1024 * 1024;
- bytes_minimum_per_client_ = 8 * 1024 * 1024;
-#elif defined(OS_CHROMEOS)
- bytes_default_per_client_ = 64 * 1024 * 1024;
- bytes_minimum_per_client_ = 4 * 1024 * 1024;
-#elif defined(OS_MACOSX)
- bytes_default_per_client_ = 128 * 1024 * 1024;
- bytes_minimum_per_client_ = 128 * 1024 * 1024;
-#else
- bytes_default_per_client_ = 64 * 1024 * 1024;
- bytes_minimum_per_client_ = 64 * 1024 * 1024;
-#endif
-
- if (command_line->HasSwitch(switches::kForceGpuMemAvailableMb)) {
- base::StringToUint64(
- command_line->GetSwitchValueASCII(switches::kForceGpuMemAvailableMb),
- &bytes_available_gpu_memory_);
- bytes_available_gpu_memory_ *= 1024 * 1024;
- bytes_available_gpu_memory_overridden_ = true;
- } else
- bytes_available_gpu_memory_ = GetDefaultAvailableGpuMemory();
-}
+ bytes_allocated_historical_max_(0)
+{ }
GpuMemoryManager::~GpuMemoryManager() {
DCHECK(tracking_groups_.empty());
@@ -110,61 +60,21 @@
DCHECK(!bytes_allocated_unmanaged_current_);
}
-uint64 GpuMemoryManager::GetAvailableGpuMemory() const {
- // Allow unmanaged allocations to over-subscribe by at most (high_ - low_)
- // before restricting managed (compositor) memory based on unmanaged usage.
- if (bytes_allocated_unmanaged_low_ > bytes_available_gpu_memory_)
- return 0;
- return bytes_available_gpu_memory_ - bytes_allocated_unmanaged_low_;
-}
-
-uint64 GpuMemoryManager::GetDefaultAvailableGpuMemory() const {
-#if defined(OS_ANDROID)
- return 16 * 1024 * 1024;
-#elif defined(OS_CHROMEOS)
- return 1024 * 1024 * 1024;
-#else
- return 256 * 1024 * 1024;
-#endif
-}
-
-uint64 GpuMemoryManager::GetMaximumTotalGpuMemory() const {
-#if defined(OS_ANDROID)
- return 256 * 1024 * 1024;
-#else
- return 1024 * 1024 * 1024;
-#endif
-}
-
-uint64 GpuMemoryManager::GetMaximumClientAllocation() const {
-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
- return bytes_available_gpu_memory_;
-#else
- // This is to avoid allowing a single page on to use a full 256MB of memory
- // (the current total limit). Long-scroll pages will hit this limit,
- // resulting in instability on some platforms (e.g, issue 141377).
- return bytes_available_gpu_memory_ / 2;
-#endif
-}
-
-uint64 GpuMemoryManager::CalcAvailableFromGpuTotal(uint64 total_gpu_memory) {
-#if defined(OS_ANDROID)
- // We don't need to reduce the total on Android, since
- // the total is an estimate to begin with.
- return total_gpu_memory;
-#else
- // Allow Chrome to use 75% of total GPU memory, or all-but-64MB of GPU
- // memory, whichever is less.
- return std::min(3 * total_gpu_memory / 4, total_gpu_memory - 64*1024*1024);
-#endif
-}
-
void GpuMemoryManager::UpdateAvailableGpuMemory() {
- // If the amount of video memory to use was specified at the command
- // line, never change it.
- if (bytes_available_gpu_memory_overridden_)
+ // If the value was overridden on the command line, use the specified value.
+ static bool client_hard_limit_bytes_overridden =
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kForceGpuMemAvailableMb);
+ if (client_hard_limit_bytes_overridden) {
+ base::StringToUint64(
+ CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kForceGpuMemAvailableMb),
+ &client_hard_limit_bytes_);
+ client_hard_limit_bytes_ *= 1024 * 1024;
return;
+ }
+#if defined(OS_ANDROID)
// On non-Android, we use an operating system query when possible.
// We do not have a reliable concept of multiple GPUs existing in
// a system, so just be safe and go with the minimum encountered.
@@ -188,30 +98,17 @@
}
}
- if (!bytes_min)
- return;
-
- bytes_available_gpu_memory_ = CalcAvailableFromGpuTotal(bytes_min);
-
- // Never go below the default allocation
- bytes_available_gpu_memory_ = std::max(bytes_available_gpu_memory_,
- GetDefaultAvailableGpuMemory());
-
- // Never go above the maximum.
- bytes_available_gpu_memory_ = std::min(bytes_available_gpu_memory_,
- GetMaximumTotalGpuMemory());
-}
-
-void GpuMemoryManager::UpdateUnmanagedMemoryLimits() {
- // Set the limit to be [current_, current_ + step_ / 4), with the endpoints
- // of the intervals rounded down and up to the nearest step_, to avoid
- // thrashing the interval.
- bytes_allocated_unmanaged_high_ = RoundUp(
- bytes_allocated_unmanaged_current_ + bytes_unmanaged_limit_step_ / 4,
- bytes_unmanaged_limit_step_);
- bytes_allocated_unmanaged_low_ = RoundDown(
- bytes_allocated_unmanaged_current_,
- bytes_unmanaged_limit_step_);
+ client_hard_limit_bytes_ = bytes_min;
+ // Clamp the observed value to a specific range on Android.
+ client_hard_limit_bytes_ = std::max(client_hard_limit_bytes_,
+ static_cast<uint64>(16 * 1024 * 1024));
+ client_hard_limit_bytes_ = std::min(client_hard_limit_bytes_,
+ static_cast<uint64>(256 * 1024 * 1024));
+#else
+ // Ignore what the system said and give all clients the same maximum
+ // allocation on desktop platforms.
+ client_hard_limit_bytes_ = 256 * 1024 * 1024;
+#endif
}
void GpuMemoryManager::ScheduleManage(
@@ -263,14 +160,8 @@
GetCurrentUsage());
}
- // If we've gone past our current limit on unmanaged memory, schedule a
- // re-manage to take int account the unmanaged memory.
- if (bytes_allocated_unmanaged_current_ >= bytes_allocated_unmanaged_high_)
- ScheduleManage(kScheduleManageNow);
- if (bytes_allocated_unmanaged_current_ < bytes_allocated_unmanaged_low_)
- ScheduleManage(kScheduleManageLater);
-
- if (GetCurrentUsage() > bytes_allocated_historical_max_) {
+ if (GetCurrentUsage() > bytes_allocated_historical_max_ +
+ kBytesAllocatedUnmanagedStep) {
bytes_allocated_historical_max_ = GetCurrentUsage();
// If we're blowing into new memory usage territory, spam the browser
// process with the most up-to-date information about our memory usage.
@@ -319,27 +210,8 @@
void GpuMemoryManager::SetClientStateManagedMemoryStats(
GpuMemoryManagerClientState* client_state,
- const ManagedMemoryStats& stats)
-{
- client_state->managed_memory_stats_ = stats;
-
- // If this is the first time that stats have been received for this
- // client, use them immediately.
- if (!client_state->managed_memory_stats_received_) {
- client_state->managed_memory_stats_received_ = true;
- ScheduleManage(kScheduleManageNow);
- return;
- }
-
- // If these statistics sit outside of the range that we used in our
- // computation of memory allocations then recompute the allocations.
- if (client_state->managed_memory_stats_.bytes_nice_to_have >
- client_state->bytes_nicetohave_limit_high_) {
- ScheduleManage(kScheduleManageNow);
- } else if (client_state->managed_memory_stats_.bytes_nice_to_have <
- client_state->bytes_nicetohave_limit_low_) {
- ScheduleManage(kScheduleManageLater);
- }
+ const ManagedMemoryStats& stats) {
+ // TODO(ccameron): delete this from the full stack.
}
uint64 GpuMemoryManager::GetClientMemoryUsage(
@@ -395,9 +267,6 @@
// Update the amount of GPU memory available on the system.
UpdateAvailableGpuMemory();
- // Update the limit on unmanaged memory.
- UpdateUnmanagedMemoryLimits();
-
// Determine which clients are "hibernated" (which determines the
// distribution of frontbuffers and memory among clients that don't have
// surfaces).
@@ -412,243 +281,7 @@
SendUmaStatsToBrowser();
}
-// static
-uint64 GpuMemoryManager::ComputeCap(
- std::vector<uint64> bytes, uint64 bytes_sum_limit)
-{
- size_t bytes_size = bytes.size();
- uint64 bytes_sum = 0;
-
- if (bytes_size == 0)
- return std::numeric_limits<uint64>::max();
-
- // Sort and add up all entries
- std::sort(bytes.begin(), bytes.end());
- for (size_t i = 0; i < bytes_size; ++i)
- bytes_sum += bytes[i];
-
- // As we go through the below loop, let bytes_partial_sum be the
- // sum of bytes[0] + ... + bytes[bytes_size - i - 1]
- uint64 bytes_partial_sum = bytes_sum;
-
- // Try using each entry as a cap, and see where we get cut off.
- for (size_t i = 0; i < bytes_size; ++i) {
- // Try limiting cap to bytes[bytes_size - i - 1]
- uint64 test_cap = bytes[bytes_size - i - 1];
- uint64 bytes_sum_with_test_cap = i * test_cap + bytes_partial_sum;
-
- // If that fits, raise test_cap to give an even distribution to the
- // last i entries.
- if (bytes_sum_with_test_cap <= bytes_sum_limit) {
- if (i == 0)
- return std::numeric_limits<uint64>::max();
- else
- return test_cap + (bytes_sum_limit - bytes_sum_with_test_cap) / i;
- } else {
- bytes_partial_sum -= test_cap;
- }
- }
-
- // If we got here, then we can't fully accommodate any of the clients,
- // so distribute bytes_sum_limit evenly.
- return bytes_sum_limit / bytes_size;
-}
-
-uint64 GpuMemoryManager::ComputeClientAllocationWhenVisible(
- GpuMemoryManagerClientState* client_state,
- uint64 bytes_above_required_cap,
- uint64 bytes_above_minimum_cap,
- uint64 bytes_overall_cap) {
- ManagedMemoryStats* stats = &client_state->managed_memory_stats_;
-
- if (!client_state->managed_memory_stats_received_)
- return GetDefaultClientAllocation();
-
- uint64 bytes_required = 9 * stats->bytes_required / 8;
- bytes_required = std::min(bytes_required, GetMaximumClientAllocation());
- bytes_required = std::max(bytes_required, GetMinimumClientAllocation());
-
- uint64 bytes_nicetohave = 4 * stats->bytes_nice_to_have / 3;
- bytes_nicetohave = std::min(bytes_nicetohave, GetMaximumClientAllocation());
- bytes_nicetohave = std::max(bytes_nicetohave, GetMinimumClientAllocation());
- bytes_nicetohave = std::max(bytes_nicetohave, bytes_required);
-
- uint64 allocation = GetMinimumClientAllocation();
- allocation += std::min(bytes_required - GetMinimumClientAllocation(),
- bytes_above_minimum_cap);
- allocation += std::min(bytes_nicetohave - bytes_required,
- bytes_above_required_cap);
- allocation = std::min(allocation,
- bytes_overall_cap);
- return allocation;
-}
-
-void GpuMemoryManager::ComputeVisibleSurfacesAllocations() {
- uint64 bytes_available_total = GetAvailableGpuMemory();
- uint64 bytes_above_required_cap = std::numeric_limits<uint64>::max();
- uint64 bytes_above_minimum_cap = std::numeric_limits<uint64>::max();
- uint64 bytes_overall_cap_visible = GetMaximumClientAllocation();
-
- // Compute memory usage at three levels
- // - painting everything that is nicetohave for visible clients
- // - painting only what that is visible
- // - giving every client the minimum allocation
- uint64 bytes_nicetohave_visible = 0;
- uint64 bytes_required_visible = 0;
- uint64 bytes_minimum_visible = 0;
- for (ClientStateList::const_iterator it = clients_visible_mru_.begin();
- it != clients_visible_mru_.end();
- ++it) {
- GpuMemoryManagerClientState* client_state = *it;
- client_state->bytes_allocation_ideal_nicetohave_ =
- ComputeClientAllocationWhenVisible(
- client_state,
- bytes_above_required_cap,
- bytes_above_minimum_cap,
- bytes_overall_cap_visible);
- client_state->bytes_allocation_ideal_required_ =
- ComputeClientAllocationWhenVisible(
- client_state,
- 0,
- bytes_above_minimum_cap,
- bytes_overall_cap_visible);
- client_state->bytes_allocation_ideal_minimum_ =
- ComputeClientAllocationWhenVisible(
- client_state,
- 0,
- 0,
- bytes_overall_cap_visible);
-
- bytes_nicetohave_visible +=
- client_state->bytes_allocation_ideal_nicetohave_;
- bytes_required_visible +=
- client_state->bytes_allocation_ideal_required_;
- bytes_minimum_visible +=
- client_state->bytes_allocation_ideal_minimum_;
- }
-
- // Determine which of those three points we can satisfy, and limit
- // bytes_above_required_cap and bytes_above_minimum_cap to not go
- // over the limit.
- if (bytes_minimum_visible > bytes_available_total) {
- bytes_above_required_cap = 0;
- bytes_above_minimum_cap = 0;
- } else if (bytes_required_visible > bytes_available_total) {
- std::vector<uint64> bytes_to_fit;
- for (ClientStateList::const_iterator it = clients_visible_mru_.begin();
- it != clients_visible_mru_.end();
- ++it) {
- GpuMemoryManagerClientState* client_state = *it;
- bytes_to_fit.push_back(client_state->bytes_allocation_ideal_required_ -
- client_state->bytes_allocation_ideal_minimum_);
- }
- bytes_above_required_cap = 0;
- bytes_above_minimum_cap = ComputeCap(
- bytes_to_fit, bytes_available_total - bytes_minimum_visible);
- } else if (bytes_nicetohave_visible > bytes_available_total) {
- std::vector<uint64> bytes_to_fit;
- for (ClientStateList::const_iterator it = clients_visible_mru_.begin();
- it != clients_visible_mru_.end();
- ++it) {
- GpuMemoryManagerClientState* client_state = *it;
- bytes_to_fit.push_back(client_state->bytes_allocation_ideal_nicetohave_ -
- client_state->bytes_allocation_ideal_required_);
- }
- bytes_above_required_cap = ComputeCap(
- bytes_to_fit, bytes_available_total - bytes_required_visible);
- bytes_above_minimum_cap = std::numeric_limits<uint64>::max();
- }
-
- // Given those computed limits, set the actual memory allocations for the
- // visible clients, tracking the largest allocation and the total allocation
- // for future use.
- uint64 bytes_allocated_visible = 0;
- uint64 bytes_allocated_max_client_allocation = 0;
- for (ClientStateList::const_iterator it = clients_visible_mru_.begin();
- it != clients_visible_mru_.end();
- ++it) {
- GpuMemoryManagerClientState* client_state = *it;
- client_state->bytes_allocation_when_visible_ =
- ComputeClientAllocationWhenVisible(
- client_state,
- bytes_above_required_cap,
- bytes_above_minimum_cap,
- bytes_overall_cap_visible);
- bytes_allocated_visible += client_state->bytes_allocation_when_visible_;
- bytes_allocated_max_client_allocation = std::max(
- bytes_allocated_max_client_allocation,
- client_state->bytes_allocation_when_visible_);
- }
-
- // Set the limit for nonvisible clients for when they become visible.
- // Use the same formula, with a lowered overall cap in case any of the
- // currently-nonvisible clients are much more resource-intensive than any
- // of the existing clients.
- uint64 bytes_overall_cap_nonvisible = bytes_allocated_max_client_allocation;
- if (bytes_available_total > bytes_allocated_visible) {
- bytes_overall_cap_nonvisible +=
- bytes_available_total - bytes_allocated_visible;
- }
- bytes_overall_cap_nonvisible = std::min(bytes_overall_cap_nonvisible,
- GetMaximumClientAllocation());
- for (ClientStateList::const_iterator it = clients_nonvisible_mru_.begin();
- it != clients_nonvisible_mru_.end();
- ++it) {
- GpuMemoryManagerClientState* client_state = *it;
- client_state->bytes_allocation_when_visible_ =
- ComputeClientAllocationWhenVisible(
- client_state,
- bytes_above_required_cap,
- bytes_above_minimum_cap,
- bytes_overall_cap_nonvisible);
- }
-}
-
-void GpuMemoryManager::DistributeRemainingMemoryToVisibleSurfaces() {
- uint64 bytes_available_total = GetAvailableGpuMemory();
- uint64 bytes_allocated_total = 0;
-
- for (ClientStateList::const_iterator it = clients_visible_mru_.begin();
- it != clients_visible_mru_.end();
- ++it) {
- GpuMemoryManagerClientState* client_state = *it;
- bytes_allocated_total += client_state->bytes_allocation_when_visible_;
- }
-
- if (bytes_allocated_total >= bytes_available_total)
- return;
-
- std::vector<uint64> bytes_extra_requests;
- for (ClientStateList::const_iterator it = clients_visible_mru_.begin();
- it != clients_visible_mru_.end();
- ++it) {
- GpuMemoryManagerClientState* client_state = *it;
- CHECK(GetMaximumClientAllocation() >=
- client_state->bytes_allocation_when_visible_);
- uint64 bytes_extra = GetMaximumClientAllocation() -
- client_state->bytes_allocation_when_visible_;
- bytes_extra_requests.push_back(bytes_extra);
- }
- uint64 bytes_extra_cap = ComputeCap(
- bytes_extra_requests, bytes_available_total - bytes_allocated_total);
- for (ClientStateList::const_iterator it = clients_visible_mru_.begin();
- it != clients_visible_mru_.end();
- ++it) {
- GpuMemoryManagerClientState* client_state = *it;
- uint64 bytes_extra = GetMaximumClientAllocation() -
- client_state->bytes_allocation_when_visible_;
- client_state->bytes_allocation_when_visible_ += std::min(
- bytes_extra, bytes_extra_cap);
- }
-}
-
void GpuMemoryManager::AssignSurfacesAllocations() {
- // Compute allocation when for all clients.
- ComputeVisibleSurfacesAllocations();
-
- // Distribute the remaining memory to visible clients.
- DistributeRemainingMemoryToVisibleSurfaces();
-
// Send that allocation to the clients.
ClientStateList clients = clients_visible_mru_;
clients.insert(clients.end(),
@@ -659,19 +292,23 @@
++it) {
GpuMemoryManagerClientState* client_state = *it;
- // Re-assign memory limits to this client when its "nice to have" bucket
- // grows or shrinks by 1/4.
- client_state->bytes_nicetohave_limit_high_ =
- 5 * client_state->managed_memory_stats_.bytes_nice_to_have / 4;
- client_state->bytes_nicetohave_limit_low_ =
- 3 * client_state->managed_memory_stats_.bytes_nice_to_have / 4;
-
// Populate and send the allocation to the client
MemoryAllocation allocation;
-
- allocation.bytes_limit_when_visible =
- client_state->bytes_allocation_when_visible_;
- allocation.priority_cutoff_when_visible = priority_cutoff_;
+ allocation.bytes_limit_when_visible = client_hard_limit_bytes_;
+#if defined(OS_ANDROID)
+ // On Android, because there is only one visible tab at any time, allow
+ // that renderer to cache as much as it can.
+ allocation.priority_cutoff_when_visible =
+ MemoryAllocation::CUTOFF_ALLOW_EVERYTHING;
+#else
+ // On desktop platforms, instruct the renderers to cache only a smaller
+ // set, to play nice with other renderers and other applications. If this
+ // if not done, then the system can become unstable.
+ // http://crbug.com/145600 (Linux)
+ // http://crbug.com/141377 (Mac)
+ allocation.priority_cutoff_when_visible =
+ MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE;
+#endif
client_state->client_->SetMemoryAllocation(allocation);
client_state->client_->SuggestHaveFrontBuffer(!client_state->hibernated_);
@@ -686,8 +323,7 @@
MemoryAllocation allocation;
if (!client_state->hibernated_) {
- allocation.bytes_limit_when_visible =
- GetMinimumClientAllocation();
+ allocation.bytes_limit_when_visible = client_hard_limit_bytes_;
allocation.priority_cutoff_when_visible =
MemoryAllocation::CUTOFF_ALLOW_EVERYTHING;
}
@@ -744,7 +380,7 @@
GPUMemoryUmaStats params;
params.bytes_allocated_current = GetCurrentUsage();
params.bytes_allocated_max = bytes_allocated_historical_max_;
- params.bytes_limit = bytes_available_gpu_memory_;
+ params.bytes_limit = client_hard_limit_bytes_;
params.client_count = clients_visible_mru_.size() +
clients_nonvisible_mru_.size() +
clients_nonsurface_.size();
diff --git a/content/common/gpu/gpu_memory_manager.h b/content/common/gpu/gpu_memory_manager.h
index 8a166c2..83d344f 100644
--- a/content/common/gpu/gpu_memory_manager.h
+++ b/content/common/gpu/gpu_memory_manager.h
@@ -63,11 +63,8 @@
base::ProcessId pid, gpu::gles2::MemoryTracker* memory_tracker);
uint64 GetClientMemoryUsage(const GpuMemoryManagerClient* client) const;
-
- // The maximum and minimum amount of memory that a client may be assigned.
- uint64 GetMaximumClientAllocation() const;
- uint64 GetMinimumClientAllocation() const {
- return bytes_minimum_per_client_;
+ uint64 GetMaximumClientAllocation() const {
+ return client_hard_limit_bytes_;
}
private:
@@ -118,46 +115,9 @@
void AssignSurfacesAllocations();
void AssignNonSurfacesAllocations();
- // Math helper function to compute the maximum value of cap such that
- // sum_i min(bytes[i], cap) <= bytes_sum_limit
- static uint64 ComputeCap(std::vector<uint64> bytes, uint64 bytes_sum_limit);
-
- // Compute the allocation for clients when visible and not visible.
- void ComputeVisibleSurfacesAllocations();
- void DistributeRemainingMemoryToVisibleSurfaces();
-
- // Compute the budget for a client. Allow at most bytes_above_required_cap
- // bytes above client_state's required level. Allow at most
- // bytes_above_minimum_cap bytes above client_state's minimum level. Allow
- // at most bytes_overall_cap bytes total.
- uint64 ComputeClientAllocationWhenVisible(
- GpuMemoryManagerClientState* client_state,
- uint64 bytes_above_required_cap,
- uint64 bytes_above_minimum_cap,
- uint64 bytes_overall_cap);
-
// Update the amount of GPU memory we think we have in the system, based
// on what the stubs' contexts report.
void UpdateAvailableGpuMemory();
- void UpdateUnmanagedMemoryLimits();
-
- // The amount of video memory which is available for allocation.
- uint64 GetAvailableGpuMemory() const;
-
- // Minimum value of available GPU memory, no matter how little the GPU
- // reports. This is the default value.
- uint64 GetDefaultAvailableGpuMemory() const;
-
- // Maximum cap on total GPU memory, no matter how much the GPU reports.
- uint64 GetMaximumTotalGpuMemory() const;
-
- // The default amount of memory that a client is assigned, if it has not
- // reported any memory usage stats yet.
- uint64 GetDefaultClientAllocation() const {
- return bytes_default_per_client_;
- }
-
- static uint64 CalcAvailableFromGpuTotal(uint64 total_gpu_memory);
// Send memory usage stats to the browser process.
void SendUmaStatsToBrowser();
@@ -193,22 +153,6 @@
// Interfaces for testing
void TestingDisableScheduleManage() { disable_schedule_manage_ = true; }
- void TestingSetAvailableGpuMemory(uint64 bytes) {
- bytes_available_gpu_memory_ = bytes;
- bytes_available_gpu_memory_overridden_ = true;
- }
-
- void TestingSetMinimumClientAllocation(uint64 bytes) {
- bytes_minimum_per_client_ = bytes;
- }
-
- void TestingSetDefaultClientAllocation(uint64 bytes) {
- bytes_default_per_client_ = bytes;
- }
-
- void TestingSetUnmanagedLimitStep(uint64 bytes) {
- bytes_unmanaged_limit_step_ = bytes;
- }
GpuChannelManager* channel_manager_;
@@ -225,36 +169,18 @@
base::CancelableClosure delayed_manage_callback_;
bool manage_immediate_scheduled_;
+ bool disable_schedule_manage_;
uint64 max_surfaces_with_frontbuffer_soft_limit_;
- // The priority cutoff used for all renderers.
- gpu::MemoryAllocation::PriorityCutoff priority_cutoff_;
-
- // The maximum amount of memory that may be allocated for GPU resources
- uint64 bytes_available_gpu_memory_;
- bool bytes_available_gpu_memory_overridden_;
-
- // The minimum and default allocations for a single client.
- uint64 bytes_minimum_per_client_;
- uint64 bytes_default_per_client_;
+ // The maximum amount of memory that may be allocated for a single client.
+ uint64 client_hard_limit_bytes_;
// The current total memory usage, and historical maximum memory usage
uint64 bytes_allocated_managed_current_;
uint64 bytes_allocated_unmanaged_current_;
uint64 bytes_allocated_historical_max_;
- // If bytes_allocated_unmanaged_current_ leaves the interval [low_, high_),
- // then ScheduleManage to take the change into account.
- uint64 bytes_allocated_unmanaged_high_;
- uint64 bytes_allocated_unmanaged_low_;
-
- // Update bytes_allocated_unmanaged_low/high_ in intervals of step_.
- uint64 bytes_unmanaged_limit_step_;
-
- // Used to disable automatic changes to Manage() in testing.
- bool disable_schedule_manage_;
-
DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager);
};
diff --git a/content/common/gpu/gpu_memory_manager_client.cc b/content/common/gpu/gpu_memory_manager_client.cc
index a31510a..ec4a990 100644
--- a/content/common/gpu/gpu_memory_manager_client.cc
+++ b/content/common/gpu/gpu_memory_manager_client.cc
@@ -20,13 +20,6 @@
has_surface_(has_surface),
visible_(visible),
list_iterator_valid_(false),
- managed_memory_stats_received_(false),
- bytes_nicetohave_limit_low_(0),
- bytes_nicetohave_limit_high_(0),
- bytes_allocation_when_visible_(0),
- bytes_allocation_ideal_nicetohave_(0),
- bytes_allocation_ideal_required_(0),
- bytes_allocation_ideal_minimum_(0),
hibernated_(false) {
}
diff --git a/content/common/gpu/gpu_memory_manager_client.h b/content/common/gpu/gpu_memory_manager_client.h
index 3a941e2..ab20f41 100644
--- a/content/common/gpu/gpu_memory_manager_client.h
+++ b/content/common/gpu/gpu_memory_manager_client.h
@@ -81,25 +81,6 @@
std::list<GpuMemoryManagerClientState*>::iterator list_iterator_;
bool list_iterator_valid_;
- // Statistics about memory usage.
- gpu::ManagedMemoryStats managed_memory_stats_;
- bool managed_memory_stats_received_;
-
- // When managed_memory_stats_.bytes_nicetohave leaves the range
- // [low_, high_], then re-adjust memory limits.
- uint64 bytes_nicetohave_limit_low_;
- uint64 bytes_nicetohave_limit_high_;
-
- // The allocation for this client, used transiently during memory policy
- // calculation.
- uint64 bytes_allocation_when_visible_;
-
- // The ideal allocation for this client for three performance levels, used
- // transiently during memory policy calculation.
- uint64 bytes_allocation_ideal_nicetohave_;
- uint64 bytes_allocation_ideal_required_;
- uint64 bytes_allocation_ideal_minimum_;
-
// Set to disable allocating a frontbuffer or to disable allocations
// for clients that don't have surfaces.
bool hibernated_;
diff --git a/content/common/gpu/gpu_memory_manager_unittest.cc b/content/common/gpu/gpu_memory_manager_unittest.cc
index c735e4f..42c3941 100644
--- a/content/common/gpu/gpu_memory_manager_unittest.cc
+++ b/content/common/gpu/gpu_memory_manager_unittest.cc
@@ -190,13 +190,11 @@
}
bool IsAllocationForegroundForSurfaceNo(
const MemoryAllocation& alloc) {
- return alloc.bytes_limit_when_visible ==
- GetMinimumClientAllocation();
+ return alloc.bytes_limit_when_visible != 0;
}
bool IsAllocationBackgroundForSurfaceNo(
const MemoryAllocation& alloc) {
- return alloc.bytes_limit_when_visible ==
- GetMinimumClientAllocation();
+ return alloc.bytes_limit_when_visible != 0;
}
bool IsAllocationHibernatedForSurfaceNo(
const MemoryAllocation& alloc) {
@@ -208,28 +206,6 @@
memmgr_.Manage();
}
- uint64 CalcAvailableFromGpuTotal(uint64 bytes) {
- return GpuMemoryManager::CalcAvailableFromGpuTotal(bytes);
- }
-
- uint64 CalcAvailableClamped(uint64 bytes) {
- bytes = std::max(bytes, memmgr_.GetDefaultAvailableGpuMemory());
- bytes = std::min(bytes, memmgr_.GetMaximumTotalGpuMemory());
- return bytes;
- }
-
- uint64 GetAvailableGpuMemory() {
- return memmgr_.GetAvailableGpuMemory();
- }
-
- uint64 GetMaximumClientAllocation() {
- return memmgr_.GetMaximumClientAllocation();
- }
-
- uint64 GetMinimumClientAllocation() {
- return memmgr_.GetMinimumClientAllocation();
- }
-
void SetClientStats(
FakeClient* client,
uint64 required,
@@ -453,160 +429,4 @@
EXPECT_TRUE(IsAllocationHibernatedForSurfaceNo(stub4.allocation_));
}
-// Test GpuMemoryManager::UpdateAvailableGpuMemory functionality
-TEST_F(GpuMemoryManagerTest, TestUpdateAvailableGpuMemory) {
- FakeClient stub1(&memmgr_, GenerateUniqueSurfaceId(), true),
- stub2(&memmgr_, GenerateUniqueSurfaceId(), false),
- stub3(&memmgr_, GenerateUniqueSurfaceId(), true),
- stub4(&memmgr_, GenerateUniqueSurfaceId(), false);
- // We take the lowest GPU's total memory as the limit
- uint64 expected = 400 * 1024 * 1024;
- stub1.SetTotalGpuMemory(expected); // GPU Memory
- stub2.SetTotalGpuMemory(expected - 1024 * 1024); // Smaller but not visible.
- stub3.SetTotalGpuMemory(expected + 1024 * 1024); // Visible but larger.
- stub4.SetTotalGpuMemory(expected + 1024 * 1024); // Not visible and larger.
- Manage();
- uint64 bytes_expected = CalcAvailableFromGpuTotal(expected);
- EXPECT_EQ(GetAvailableGpuMemory(), CalcAvailableClamped(bytes_expected));
-}
-
-// Test GpuMemoryManager Stub Memory Stats functionality:
-// Creates various surface/non-surface stubs and switches stub visibility and
-// tests to see that stats data structure values are correct.
-TEST_F(GpuMemoryManagerTest, StubMemoryStatsForLastManageTests) {
- ClientAssignmentCollector::ClientMemoryStatMap stats;
-
- Manage();
- stats = ClientAssignmentCollector::GetClientStatsForLastManage();
- EXPECT_EQ(stats.size(), 0ul);
-
- FakeClient stub1(&memmgr_, GenerateUniqueSurfaceId(), true);
- Manage();
- stats = ClientAssignmentCollector::GetClientStatsForLastManage();
- uint64 stub1allocation1 =
- stats[&stub1].allocation.bytes_limit_when_visible;
-
- EXPECT_EQ(stats.size(), 1ul);
- EXPECT_GT(stub1allocation1, 0ul);
-
- FakeClient stub2(&memmgr_, &stub1);
- Manage();
- stats = ClientAssignmentCollector::GetClientStatsForLastManage();
- EXPECT_EQ(stats.count(&stub1), 1ul);
- uint64 stub1allocation2 =
- stats[&stub1].allocation.bytes_limit_when_visible;
- EXPECT_EQ(stats.count(&stub2), 1ul);
- uint64 stub2allocation2 =
- stats[&stub2].allocation.bytes_limit_when_visible;
-
- EXPECT_EQ(stats.size(), 2ul);
- EXPECT_GT(stub1allocation2, 0ul);
- EXPECT_GT(stub2allocation2, 0ul);
- if (stub1allocation2 != GetMaximumClientAllocation())
- EXPECT_LT(stub1allocation2, stub1allocation1);
-
- FakeClient stub3(&memmgr_, GenerateUniqueSurfaceId(), true);
- Manage();
- stats = ClientAssignmentCollector::GetClientStatsForLastManage();
- uint64 stub1allocation3 =
- stats[&stub1].allocation.bytes_limit_when_visible;
- uint64 stub2allocation3 =
- stats[&stub2].allocation.bytes_limit_when_visible;
- uint64 stub3allocation3 =
- stats[&stub3].allocation.bytes_limit_when_visible;
-
- EXPECT_EQ(stats.size(), 3ul);
- EXPECT_GT(stub1allocation3, 0ul);
- EXPECT_GT(stub2allocation3, 0ul);
- EXPECT_GT(stub3allocation3, 0ul);
- if (stub1allocation3 != GetMaximumClientAllocation())
- EXPECT_LT(stub1allocation3, stub1allocation2);
-
- stub1.SetVisible(false);
-
- Manage();
- stats = ClientAssignmentCollector::GetClientStatsForLastManage();
- uint64 stub1allocation4 =
- stats[&stub1].allocation.bytes_limit_when_visible;
- uint64 stub2allocation4 =
- stats[&stub2].allocation.bytes_limit_when_visible;
- uint64 stub3allocation4 =
- stats[&stub3].allocation.bytes_limit_when_visible;
-
- EXPECT_EQ(stats.size(), 3ul);
- EXPECT_GT(stub1allocation4, 0ul);
- EXPECT_GE(stub2allocation4, 0ul);
- EXPECT_GT(stub3allocation4, 0ul);
- if (stub3allocation3 != GetMaximumClientAllocation())
- EXPECT_GT(stub3allocation4, stub3allocation3);
-}
-
-// Test tracking of unmanaged (e.g, WebGL) memory.
-TEST_F(GpuMemoryManagerTest, UnmanagedTracking) {
- // Set memory manager constants for this test
- memmgr_.TestingSetAvailableGpuMemory(64);
- memmgr_.TestingSetMinimumClientAllocation(8);
- memmgr_.TestingSetUnmanagedLimitStep(16);
-
- FakeClient stub1(&memmgr_, GenerateUniqueSurfaceId(), true);
-
- // Expect that the one stub get its nicetohave level.
- SetClientStats(&stub1, 16, 32);
- Manage();
- EXPECT_GE(stub1.BytesWhenVisible(), 32u);
-
- // Now allocate some unmanaged memory and make sure the amount
- // goes down.
- memmgr_.TrackMemoryAllocatedChange(
- stub1.tracking_group_.get(),
- 0,
- 48,
- gpu::gles2::MemoryTracker::kUnmanaged);
- Manage();
- EXPECT_LT(stub1.BytesWhenVisible(), 24u);
-
- // Now allocate the entire FB worth of unmanaged memory, and
- // make sure that we stay stuck at the minimum tab allocation.
- memmgr_.TrackMemoryAllocatedChange(
- stub1.tracking_group_.get(),
- 48,
- 64,
- gpu::gles2::MemoryTracker::kUnmanaged);
- Manage();
- EXPECT_EQ(stub1.BytesWhenVisible(), 8u);
-
- // Far-oversubscribe the entire FB, and make sure we stay at
- // the minimum allocation, and don't blow up.
- memmgr_.TrackMemoryAllocatedChange(
- stub1.tracking_group_.get(),
- 64,
- 999,
- gpu::gles2::MemoryTracker::kUnmanaged);
- Manage();
- EXPECT_EQ(stub1.BytesWhenVisible(), 8u);
-
- // Delete all tracked memory so we don't hit leak checks.
- memmgr_.TrackMemoryAllocatedChange(
- stub1.tracking_group_.get(),
- 999,
- 0,
- gpu::gles2::MemoryTracker::kUnmanaged);
-}
-
-// Test the default allocation levels are used.
-TEST_F(GpuMemoryManagerTest, DefaultAllocation) {
- // Set memory manager constants for this test
- memmgr_.TestingSetAvailableGpuMemory(64);
- memmgr_.TestingSetMinimumClientAllocation(8);
- memmgr_.TestingSetDefaultClientAllocation(16);
-
- FakeClient stub1(&memmgr_, GenerateUniqueSurfaceId(), true);
-
- // Expect that a client which has not sent stats receive at
- // least the default allocation.
- Manage();
- EXPECT_GE(stub1.BytesWhenVisible(),
- memmgr_.GetDefaultClientAllocation());
-}
-
} // namespace content
diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h
index 9e320e0..bd7a5d6 100644
--- a/content/common/gpu/gpu_messages.h
+++ b/content/common/gpu/gpu_messages.h
@@ -282,6 +282,18 @@
int32, /* image_id */
int32 /* sync_point */)
+// Tells the GPU process to create a new gpu memory buffer for |handle|.
+IPC_MESSAGE_CONTROL4(GpuMsg_CreateGpuMemoryBuffer,
+ gfx::GpuMemoryBufferHandle, /* handle */
+ gfx::Size, /* size */
+ unsigned, /* internalformat */
+ unsigned /* usage */)
+
+// Tells the GPU process to destroy buffer.
+IPC_MESSAGE_CONTROL2(GpuMsg_DestroyGpuMemoryBuffer,
+ gfx::GpuMemoryBufferHandle, /* handle */
+ int32 /* sync_point */)
+
// Tells the GPU process to create a context for collecting graphics card
// information.
IPC_MESSAGE_CONTROL0(GpuMsg_CollectGraphicsInfo)
@@ -368,6 +380,10 @@
IPC_MESSAGE_CONTROL1(GpuHostMsg_ImageCreated,
gfx::Size /* size */)
+// Response from GPU to a GpuMsg_CreateGpuMemoryBuffer message.
+IPC_MESSAGE_CONTROL1(GpuHostMsg_GpuMemoryBufferCreated,
+ gfx::GpuMemoryBufferHandle /* handle */)
+
// Response from GPU to a GpuMsg_CollectGraphicsInfo.
IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected,
gpu::GPUInfo /* GPU logging stats */)
diff --git a/content/common/gpu/image_transport_surface_fbo_mac.cc b/content/common/gpu/image_transport_surface_fbo_mac.cc
new file mode 100644
index 0000000..79ec8db
--- /dev/null
+++ b/content/common/gpu/image_transport_surface_fbo_mac.cc
@@ -0,0 +1,345 @@
+// Copyright 2014 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 "content/common/gpu/image_transport_surface_fbo_mac.h"
+
+#include "content/common/gpu/gpu_messages.h"
+#include "content/common/gpu/image_transport_surface_iosurface_mac.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/gl/gl_context.h"
+#include "ui/gl/gl_implementation.h"
+#include "ui/gl/gl_surface_osmesa.h"
+
+namespace content {
+
+ImageTransportSurfaceFBO::ImageTransportSurfaceFBO(
+ StorageProvider* storage_provider,
+ GpuChannelManager* manager,
+ GpuCommandBufferStub* stub,
+ gfx::PluginWindowHandle handle)
+ : storage_provider_(storage_provider),
+ backbuffer_suggested_allocation_(true),
+ frontbuffer_suggested_allocation_(true),
+ fbo_id_(0),
+ texture_id_(0),
+ depth_stencil_renderbuffer_id_(0),
+ has_complete_framebuffer_(false),
+ context_(NULL),
+ scale_factor_(1.f),
+ made_current_(false),
+ is_swap_buffers_pending_(false),
+ did_unschedule_(false) {
+ helper_.reset(new ImageTransportHelper(this, manager, stub, handle));
+}
+
+ImageTransportSurfaceFBO::~ImageTransportSurfaceFBO() {
+}
+
+bool ImageTransportSurfaceFBO::Initialize() {
+ // Only support IOSurfaces if the GL implementation is the native desktop GL.
+ // IO surfaces will not work with, for example, OSMesa software renderer
+ // GL contexts.
+ if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL &&
+ gfx::GetGLImplementation() != gfx::kGLImplementationAppleGL)
+ return false;
+
+ if (!helper_->Initialize())
+ return false;
+
+ helper_->stub()->AddDestructionObserver(this);
+ return true;
+}
+
+void ImageTransportSurfaceFBO::Destroy() {
+ DestroyFramebuffer();
+
+ helper_->Destroy();
+}
+
+bool ImageTransportSurfaceFBO::DeferDraws() {
+ // The command buffer hit a draw/clear command that could clobber the
+ // IOSurface in use by an earlier SwapBuffers. If a Swap is pending, abort
+ // processing of the command by returning true and unschedule until the Swap
+ // Ack arrives.
+ if(did_unschedule_)
+ return true; // Still unscheduled, so just return true.
+ if (is_swap_buffers_pending_) {
+ did_unschedule_ = true;
+ helper_->SetScheduled(false);
+ return true;
+ }
+ return false;
+}
+
+bool ImageTransportSurfaceFBO::IsOffscreen() {
+ return false;
+}
+
+bool ImageTransportSurfaceFBO::OnMakeCurrent(gfx::GLContext* context) {
+ context_ = context;
+
+ if (made_current_)
+ return true;
+
+ OnResize(gfx::Size(1, 1), 1.f);
+
+ made_current_ = true;
+ return true;
+}
+
+unsigned int ImageTransportSurfaceFBO::GetBackingFrameBufferObject() {
+ return fbo_id_;
+}
+
+bool ImageTransportSurfaceFBO::SetBackbufferAllocation(bool allocation) {
+ if (backbuffer_suggested_allocation_ == allocation)
+ return true;
+ backbuffer_suggested_allocation_ = allocation;
+ AdjustBufferAllocation();
+ return true;
+}
+
+void ImageTransportSurfaceFBO::SetFrontbufferAllocation(bool allocation) {
+ if (frontbuffer_suggested_allocation_ == allocation)
+ return;
+ frontbuffer_suggested_allocation_ = allocation;
+ AdjustBufferAllocation();
+}
+
+void ImageTransportSurfaceFBO::AdjustBufferAllocation() {
+ // On mac, the frontbuffer and backbuffer are the same buffer. The buffer is
+ // free'd when both the browser and gpu processes have Unref'd the IOSurface.
+ if (!backbuffer_suggested_allocation_ &&
+ !frontbuffer_suggested_allocation_ &&
+ has_complete_framebuffer_) {
+ DestroyFramebuffer();
+ helper_->Suspend();
+ } else if (backbuffer_suggested_allocation_ && !has_complete_framebuffer_) {
+ CreateFramebuffer();
+ }
+}
+
+bool ImageTransportSurfaceFBO::SwapBuffers() {
+ DCHECK(backbuffer_suggested_allocation_);
+ if (!frontbuffer_suggested_allocation_)
+ return true;
+ glFlush();
+
+ GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params;
+ params.surface_handle = storage_provider_->GetSurfaceHandle();
+ params.size = GetSize();
+ params.scale_factor = scale_factor_;
+ params.latency_info.swap(latency_info_);
+ helper_->SendAcceleratedSurfaceBuffersSwapped(params);
+
+ DCHECK(!is_swap_buffers_pending_);
+ is_swap_buffers_pending_ = true;
+ return true;
+}
+
+bool ImageTransportSurfaceFBO::PostSubBuffer(
+ int x, int y, int width, int height) {
+ DCHECK(backbuffer_suggested_allocation_);
+ if (!frontbuffer_suggested_allocation_)
+ return true;
+ glFlush();
+
+ GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params params;
+ params.surface_handle = storage_provider_->GetSurfaceHandle();
+ params.x = x;
+ params.y = y;
+ params.width = width;
+ params.height = height;
+ params.surface_size = GetSize();
+ params.surface_scale_factor = scale_factor_;
+ params.latency_info.swap(latency_info_);
+ helper_->SendAcceleratedSurfacePostSubBuffer(params);
+
+ DCHECK(!is_swap_buffers_pending_);
+ is_swap_buffers_pending_ = true;
+ return true;
+}
+
+bool ImageTransportSurfaceFBO::SupportsPostSubBuffer() {
+ return true;
+}
+
+gfx::Size ImageTransportSurfaceFBO::GetSize() {
+ return size_;
+}
+
+void* ImageTransportSurfaceFBO::GetHandle() {
+ return NULL;
+}
+
+void* ImageTransportSurfaceFBO::GetDisplay() {
+ return NULL;
+}
+
+void ImageTransportSurfaceFBO::OnBufferPresented(
+ const AcceleratedSurfaceMsg_BufferPresented_Params& params) {
+ DCHECK(is_swap_buffers_pending_);
+
+ context_->share_group()->SetRendererID(params.renderer_id);
+ is_swap_buffers_pending_ = false;
+ if (did_unschedule_) {
+ did_unschedule_ = false;
+ helper_->SetScheduled(true);
+ }
+}
+
+void ImageTransportSurfaceFBO::OnResize(gfx::Size size,
+ float scale_factor) {
+ // This trace event is used in gpu_feature_browsertest.cc - the test will need
+ // to be updated if this event is changed or moved.
+ TRACE_EVENT2("gpu", "ImageTransportSurfaceFBO::OnResize",
+ "old_width", size_.width(), "new_width", size.width());
+ // Caching |context_| from OnMakeCurrent. It should still be current.
+ DCHECK(context_->IsCurrent(this));
+
+ size_ = size;
+ scale_factor_ = scale_factor;
+
+ CreateFramebuffer();
+}
+
+void ImageTransportSurfaceFBO::SetLatencyInfo(
+ const std::vector<ui::LatencyInfo>& latency_info) {
+ for (size_t i = 0; i < latency_info.size(); i++)
+ latency_info_.push_back(latency_info[i]);
+}
+
+void ImageTransportSurfaceFBO::WakeUpGpu() {
+ NOTIMPLEMENTED();
+}
+
+void ImageTransportSurfaceFBO::OnWillDestroyStub() {
+ helper_->stub()->RemoveDestructionObserver(this);
+ Destroy();
+}
+
+void ImageTransportSurfaceFBO::DestroyFramebuffer() {
+ // If we have resources to destroy, then make sure that we have a current
+ // context which we can use to delete the resources.
+ if (context_ || fbo_id_ || texture_id_ || depth_stencil_renderbuffer_id_) {
+ DCHECK(gfx::GLContext::GetCurrent() == context_);
+ DCHECK(context_->IsCurrent(this));
+ DCHECK(CGLGetCurrentContext());
+ }
+
+ if (fbo_id_) {
+ glDeleteFramebuffersEXT(1, &fbo_id_);
+ fbo_id_ = 0;
+ }
+
+ if (texture_id_) {
+ glDeleteTextures(1, &texture_id_);
+ texture_id_ = 0;
+ }
+
+ if (depth_stencil_renderbuffer_id_) {
+ glDeleteRenderbuffersEXT(1, &depth_stencil_renderbuffer_id_);
+ depth_stencil_renderbuffer_id_ = 0;
+ }
+
+ storage_provider_->FreeColorBufferStorage();
+
+ has_complete_framebuffer_ = false;
+}
+
+void ImageTransportSurfaceFBO::CreateFramebuffer() {
+ gfx::Size new_rounded_size = storage_provider_->GetRoundedSize(size_);
+
+ // Only recreate surface when the rounded up size has changed.
+ if (has_complete_framebuffer_ && new_rounded_size == rounded_size_)
+ return;
+
+ // This trace event is used in gpu_feature_browsertest.cc - the test will need
+ // to be updated if this event is changed or moved.
+ TRACE_EVENT2("gpu", "ImageTransportSurfaceFBO::CreateFramebuffer",
+ "width", new_rounded_size.width(),
+ "height", new_rounded_size.height());
+
+ rounded_size_ = new_rounded_size;
+
+ // GL_TEXTURE_RECTANGLE_ARB is the best supported render target on
+ // Mac OS X and is required for IOSurface interoperability.
+ GLint previous_texture_id = 0;
+ glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE_ARB, &previous_texture_id);
+
+ // Free the old IO Surface first to reduce memory fragmentation.
+ DestroyFramebuffer();
+
+ glGenFramebuffersEXT(1, &fbo_id_);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo_id_);
+
+ glGenTextures(1, &texture_id_);
+
+ glBindTexture(GL_TEXTURE_RECTANGLE_ARB, texture_id_);
+ glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_RECTANGLE_ARB,
+ GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_RECTANGLE_ARB,
+ GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+ glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,
+ GL_COLOR_ATTACHMENT0_EXT,
+ GL_TEXTURE_RECTANGLE_ARB,
+ texture_id_,
+ 0);
+
+ // Search through the provided attributes; if the caller has
+ // requested a stencil buffer, try to get one.
+
+ int32 stencil_bits =
+ helper_->stub()->GetRequestedAttribute(EGL_STENCIL_SIZE);
+ if (stencil_bits > 0) {
+ // Create and bind the stencil buffer
+ bool has_packed_depth_stencil =
+ GLSurface::ExtensionsContain(
+ reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS)),
+ "GL_EXT_packed_depth_stencil");
+
+ if (has_packed_depth_stencil) {
+ glGenRenderbuffersEXT(1, &depth_stencil_renderbuffer_id_);
+ glBindRenderbufferEXT(GL_RENDERBUFFER_EXT,
+ depth_stencil_renderbuffer_id_);
+ glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH24_STENCIL8_EXT,
+ rounded_size_.width(), rounded_size_.height());
+ glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT,
+ GL_STENCIL_ATTACHMENT_EXT,
+ GL_RENDERBUFFER_EXT,
+ depth_stencil_renderbuffer_id_);
+ }
+
+ // If we asked for stencil but the extension isn't present,
+ // it's OK to silently fail; subsequent code will/must check
+ // for the presence of a stencil buffer before attempting to
+ // do stencil-based operations.
+ }
+
+ bool allocated_color_buffer = storage_provider_->AllocateColorBufferStorage(
+ static_cast<CGLContextObj>(context_->GetHandle()),
+ rounded_size_);
+ if (!allocated_color_buffer) {
+ DLOG(ERROR) << "Failed to allocate color buffer storage.";
+ DestroyFramebuffer();
+ return;
+ }
+
+ GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
+ if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
+ DLOG(ERROR) << "Framebuffer was incomplete: " << status;
+ DestroyFramebuffer();
+ return;
+ }
+
+ has_complete_framebuffer_ = true;
+
+ glBindTexture(GL_TEXTURE_RECTANGLE_ARB, previous_texture_id);
+ // The FBO remains bound for this GL context.
+}
+
+} // namespace content
diff --git a/content/common/gpu/image_transport_surface_fbo_mac.h b/content/common/gpu/image_transport_surface_fbo_mac.h
new file mode 100644
index 0000000..1302cfe
--- /dev/null
+++ b/content/common/gpu/image_transport_surface_fbo_mac.h
@@ -0,0 +1,124 @@
+// Copyright 2014 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 CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_FBO_MAC_H_
+#define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_FBO_MAC_H_
+
+#include "base/mac/scoped_cftyperef.h"
+#include "base/memory/scoped_ptr.h"
+#include "content/common/gpu/gpu_command_buffer_stub.h"
+#include "content/common/gpu/image_transport_surface.h"
+#include "ui/gl/gl_bindings.h"
+
+namespace content {
+
+// We are backed by an offscreen surface for the purposes of creating
+// a context, but use FBOs to render to texture. The texture may be backed by
+// an IOSurface, or it may be presented to the screen via a CALayer, depending
+// on the StorageProvider class specified.
+class ImageTransportSurfaceFBO
+ : public gfx::GLSurface,
+ public ImageTransportSurface,
+ public GpuCommandBufferStub::DestructionObserver {
+ public:
+ // The interface through which storage for the color buffer of the FBO is
+ // allocated.
+ class StorageProvider {
+ public:
+ virtual ~StorageProvider() {}
+ // IOSurfaces cause too much address space fragmentation if they are
+ // allocated on every resize. This gets a rounded size for allocation.
+ virtual gfx::Size GetRoundedSize(gfx::Size size) = 0;
+
+ // Allocate the storage for the color buffer. The specified context is
+ // current, and there is a texture bound to GL_TEXTURE_RECTANGLE_ARB.
+ virtual bool AllocateColorBufferStorage(
+ CGLContextObj context, gfx::Size size) = 0;
+
+ // Free the storage allocated in the AllocateColorBufferStorage call. The
+ // GL texture that was bound has already been deleted by the caller.
+ virtual void FreeColorBufferStorage() = 0;
+
+ // Retrieve the handle for the surface to send to the browser process to
+ // display.
+ virtual uint64 GetSurfaceHandle() const = 0;
+ };
+
+ ImageTransportSurfaceFBO(StorageProvider* storage_provider,
+ GpuChannelManager* manager,
+ GpuCommandBufferStub* stub,
+ gfx::PluginWindowHandle handle);
+
+ // GLSurface implementation
+ virtual bool Initialize() OVERRIDE;
+ virtual void Destroy() OVERRIDE;
+ virtual bool DeferDraws() OVERRIDE;
+ virtual bool IsOffscreen() OVERRIDE;
+ virtual bool SwapBuffers() OVERRIDE;
+ virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
+ virtual bool SupportsPostSubBuffer() OVERRIDE;
+ virtual gfx::Size GetSize() OVERRIDE;
+ virtual void* GetHandle() OVERRIDE;
+ virtual void* GetDisplay() OVERRIDE;
+ virtual bool OnMakeCurrent(gfx::GLContext* context) OVERRIDE;
+ virtual unsigned int GetBackingFrameBufferObject() OVERRIDE;
+ virtual bool SetBackbufferAllocation(bool allocated) OVERRIDE;
+ virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE;
+
+ protected:
+ // ImageTransportSurface implementation
+ virtual void OnBufferPresented(
+ const AcceleratedSurfaceMsg_BufferPresented_Params& params) OVERRIDE;
+ virtual void OnResize(gfx::Size size, float scale_factor) OVERRIDE;
+ virtual void SetLatencyInfo(
+ const std::vector<ui::LatencyInfo>&) OVERRIDE;
+ virtual void WakeUpGpu() OVERRIDE;
+
+ // GpuCommandBufferStub::DestructionObserver implementation.
+ virtual void OnWillDestroyStub() OVERRIDE;
+
+ private:
+ virtual ~ImageTransportSurfaceFBO() OVERRIDE;
+
+ void AdjustBufferAllocation();
+ void DestroyFramebuffer();
+ void CreateFramebuffer();
+
+ scoped_ptr<StorageProvider> storage_provider_;
+
+ // Tracks the current buffer allocation state.
+ bool backbuffer_suggested_allocation_;
+ bool frontbuffer_suggested_allocation_;
+
+ uint32 fbo_id_;
+ GLuint texture_id_;
+ GLuint depth_stencil_renderbuffer_id_;
+ bool has_complete_framebuffer_;
+
+ // Weak pointer to the context that this was last made current to.
+ gfx::GLContext* context_;
+
+ gfx::Size size_;
+ gfx::Size rounded_size_;
+ float scale_factor_;
+
+ // Whether or not we've successfully made the surface current once.
+ bool made_current_;
+
+ // Whether a SwapBuffers is pending.
+ bool is_swap_buffers_pending_;
+
+ // Whether we unscheduled command buffer because of pending SwapBuffers.
+ bool did_unschedule_;
+
+ std::vector<ui::LatencyInfo> latency_info_;
+
+ scoped_ptr<ImageTransportHelper> helper_;
+
+ DISALLOW_COPY_AND_ASSIGN(ImageTransportSurfaceFBO);
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_MAC_H_
diff --git a/content/common/gpu/image_transport_surface_iosurface_mac.cc b/content/common/gpu/image_transport_surface_iosurface_mac.cc
new file mode 100644
index 0000000..5d0dded
--- /dev/null
+++ b/content/common/gpu/image_transport_surface_iosurface_mac.cc
@@ -0,0 +1,109 @@
+// Copyright 2014 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 "content/common/gpu/image_transport_surface_iosurface_mac.h"
+
+#include "content/common/gpu/gpu_messages.h"
+
+namespace content {
+namespace {
+
+// IOSurface dimensions will be rounded up to a multiple of this value in order
+// to reduce memory thrashing during resize. This must be a power of 2.
+const uint32 kIOSurfaceDimensionRoundup = 64;
+
+int RoundUpSurfaceDimension(int number) {
+ DCHECK(number >= 0);
+ // Cast into unsigned space for portable bitwise ops.
+ uint32 unsigned_number = static_cast<uint32>(number);
+ uint32 roundup_sub_1 = kIOSurfaceDimensionRoundup - 1;
+ unsigned_number = (unsigned_number + roundup_sub_1) & ~roundup_sub_1;
+ return static_cast<int>(unsigned_number);
+}
+
+void AddBooleanValue(CFMutableDictionaryRef dictionary,
+ const CFStringRef key,
+ bool value) {
+ CFDictionaryAddValue(dictionary, key,
+ (value ? kCFBooleanTrue : kCFBooleanFalse));
+}
+
+void AddIntegerValue(CFMutableDictionaryRef dictionary,
+ const CFStringRef key,
+ int32 value) {
+ base::ScopedCFTypeRef<CFNumberRef> number(
+ CFNumberCreate(NULL, kCFNumberSInt32Type, &value));
+ CFDictionaryAddValue(dictionary, key, number.get());
+}
+
+} // namespace
+
+IOSurfaceStorageProvider::IOSurfaceStorageProvider() {}
+
+IOSurfaceStorageProvider::~IOSurfaceStorageProvider() {
+ DCHECK(!io_surface_);
+}
+
+gfx::Size IOSurfaceStorageProvider::GetRoundedSize(gfx::Size size) {
+ return gfx::Size(RoundUpSurfaceDimension(size.width()),
+ RoundUpSurfaceDimension(size.height()));
+}
+
+bool IOSurfaceStorageProvider::AllocateColorBufferStorage(
+ CGLContextObj context,
+ gfx::Size size) {
+ // Allocate a new IOSurface, which is the GPU resource that can be
+ // shared across processes.
+ base::ScopedCFTypeRef<CFMutableDictionaryRef> properties;
+ properties.reset(CFDictionaryCreateMutable(kCFAllocatorDefault,
+ 0,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks));
+ AddIntegerValue(properties,
+ kIOSurfaceWidth,
+ size.width());
+ AddIntegerValue(properties,
+ kIOSurfaceHeight,
+ size.height());
+ AddIntegerValue(properties,
+ kIOSurfaceBytesPerElement, 4);
+ AddBooleanValue(properties,
+ kIOSurfaceIsGlobal, true);
+ // I believe we should be able to unreference the IOSurfaces without
+ // synchronizing with the browser process because they are
+ // ultimately reference counted by the operating system.
+ io_surface_.reset(IOSurfaceCreate(properties));
+ io_surface_handle_ = IOSurfaceGetID(io_surface_);
+
+ // Don't think we need to identify a plane.
+ GLuint plane = 0;
+ CGLError cglerror = CGLTexImageIOSurface2D(
+ context,
+ GL_TEXTURE_RECTANGLE_ARB,
+ GL_RGBA,
+ size.width(),
+ size.height(),
+ GL_BGRA,
+ GL_UNSIGNED_INT_8_8_8_8_REV,
+ io_surface_.get(),
+ plane);
+ if (cglerror != kCGLNoError) {
+ DLOG(ERROR) << "CGLTexImageIOSurface2D failed with CGL error: " << cglerror;
+ return false;
+ }
+
+ glFlush();
+ return true;
+}
+
+void IOSurfaceStorageProvider::FreeColorBufferStorage() {
+ io_surface_.reset();
+ io_surface_handle_ = 0;
+}
+
+uint64 IOSurfaceStorageProvider::GetSurfaceHandle() const {
+ return io_surface_handle_;
+}
+
+} // namespace content
diff --git a/content/common/gpu/image_transport_surface_iosurface_mac.h b/content/common/gpu/image_transport_surface_iosurface_mac.h
new file mode 100644
index 0000000..ccd0a4c
--- /dev/null
+++ b/content/common/gpu/image_transport_surface_iosurface_mac.h
@@ -0,0 +1,41 @@
+// Copyright 2014 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 CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_IOSURFACE_MAC_H_
+#define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_IOSURFACE_MAC_H_
+
+#include "content/common/gpu/image_transport_surface_fbo_mac.h"
+#include "ui/gl/gl_bindings.h"
+
+// Note that this must be included after gl_bindings.h to avoid conflicts.
+#include <OpenGL/CGLIOSurface.h>
+
+namespace content {
+
+// Allocate IOSurface-backed storage for an FBO image transport surface.
+class IOSurfaceStorageProvider
+ : public ImageTransportSurfaceFBO::StorageProvider {
+ public:
+ IOSurfaceStorageProvider();
+ virtual ~IOSurfaceStorageProvider();
+
+ // ImageTransportSurfaceFBO::StorageProvider implementation:
+ virtual gfx::Size GetRoundedSize(gfx::Size size) OVERRIDE;
+ virtual bool AllocateColorBufferStorage(
+ CGLContextObj context, gfx::Size size) OVERRIDE;
+ virtual void FreeColorBufferStorage() OVERRIDE;
+ virtual uint64 GetSurfaceHandle() const OVERRIDE;
+
+ private:
+ base::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
+
+ // The id of |io_surface_| or 0 if that's NULL.
+ IOSurfaceID io_surface_handle_;
+
+ DISALLOW_COPY_AND_ASSIGN(IOSurfaceStorageProvider);
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_MAC_H_
diff --git a/content/common/gpu/image_transport_surface_mac.cc b/content/common/gpu/image_transport_surface_mac.cc
deleted file mode 100644
index 8341716..0000000
--- a/content/common/gpu/image_transport_surface_mac.cc
+++ /dev/null
@@ -1,548 +0,0 @@
-// Copyright (c) 2012 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 "content/common/gpu/image_transport_surface.h"
-
-#include "base/mac/scoped_cftyperef.h"
-#include "base/memory/scoped_ptr.h"
-#include "content/common/gpu/gpu_command_buffer_stub.h"
-#include "content/common/gpu/gpu_messages.h"
-#include "ui/gfx/native_widget_types.h"
-#include "ui/gl/gl_bindings.h"
-#include "ui/gl/gl_context.h"
-#include "ui/gl/gl_implementation.h"
-#include "ui/gl/gl_surface_cgl.h"
-#include "ui/gl/gl_surface_osmesa.h"
-
-// Note that this must be included after gl_bindings.h to avoid conflicts.
-#include <OpenGL/CGLIOSurface.h>
-
-namespace content {
-namespace {
-
-// IOSurface dimensions will be rounded up to a multiple of this value in order
-// to reduce memory thrashing during resize. This must be a power of 2.
-const uint32 kIOSurfaceDimensionRoundup = 64;
-
-int RoundUpSurfaceDimension(int number) {
- DCHECK(number >= 0);
- // Cast into unsigned space for portable bitwise ops.
- uint32 unsigned_number = static_cast<uint32>(number);
- uint32 roundup_sub_1 = kIOSurfaceDimensionRoundup - 1;
- unsigned_number = (unsigned_number + roundup_sub_1) & ~roundup_sub_1;
- return static_cast<int>(unsigned_number);
-}
-
-// We are backed by an offscreen surface for the purposes of creating
-// a context, but use FBOs to render to texture backed IOSurface
-class IOSurfaceImageTransportSurface
- : public gfx::NoOpGLSurfaceCGL,
- public ImageTransportSurface,
- public GpuCommandBufferStub::DestructionObserver {
- public:
- IOSurfaceImageTransportSurface(GpuChannelManager* manager,
- GpuCommandBufferStub* stub,
- gfx::PluginWindowHandle handle);
-
- // GLSurface implementation
- virtual bool Initialize() OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool DeferDraws() OVERRIDE;
- virtual bool IsOffscreen() OVERRIDE;
- virtual bool SwapBuffers() OVERRIDE;
- virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
- virtual bool SupportsPostSubBuffer() OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual bool OnMakeCurrent(gfx::GLContext* context) OVERRIDE;
- virtual unsigned int GetBackingFrameBufferObject() OVERRIDE;
- virtual bool SetBackbufferAllocation(bool allocated) OVERRIDE;
- virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE;
-
- protected:
- // ImageTransportSurface implementation
- virtual void OnBufferPresented(
- const AcceleratedSurfaceMsg_BufferPresented_Params& params) OVERRIDE;
- virtual void OnResize(gfx::Size size, float scale_factor) OVERRIDE;
- virtual void SetLatencyInfo(
- const std::vector<ui::LatencyInfo>&) OVERRIDE;
- virtual void WakeUpGpu() OVERRIDE;
-
- // GpuCommandBufferStub::DestructionObserver implementation.
- virtual void OnWillDestroyStub() OVERRIDE;
-
- private:
- virtual ~IOSurfaceImageTransportSurface() OVERRIDE;
-
- void AdjustBufferAllocation();
- void UnrefIOSurface();
- void CreateIOSurface();
-
- // Tracks the current buffer allocation state.
- bool backbuffer_suggested_allocation_;
- bool frontbuffer_suggested_allocation_;
-
- uint32 fbo_id_;
- GLuint texture_id_;
- GLuint depth_stencil_renderbuffer_id_;
-
- base::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
-
- // The id of |io_surface_| or 0 if that's NULL.
- uint64 io_surface_handle_;
-
- // Weak pointer to the context that this was last made current to.
- gfx::GLContext* context_;
-
- gfx::Size size_;
- gfx::Size rounded_size_;
- float scale_factor_;
-
- // Whether or not we've successfully made the surface current once.
- bool made_current_;
-
- // Whether a SwapBuffers is pending.
- bool is_swap_buffers_pending_;
-
- // Whether we unscheduled command buffer because of pending SwapBuffers.
- bool did_unschedule_;
-
- std::vector<ui::LatencyInfo> latency_info_;
-
- scoped_ptr<ImageTransportHelper> helper_;
-
- DISALLOW_COPY_AND_ASSIGN(IOSurfaceImageTransportSurface);
-};
-
-void AddBooleanValue(CFMutableDictionaryRef dictionary,
- const CFStringRef key,
- bool value) {
- CFDictionaryAddValue(dictionary, key,
- (value ? kCFBooleanTrue : kCFBooleanFalse));
-}
-
-void AddIntegerValue(CFMutableDictionaryRef dictionary,
- const CFStringRef key,
- int32 value) {
- base::ScopedCFTypeRef<CFNumberRef> number(
- CFNumberCreate(NULL, kCFNumberSInt32Type, &value));
- CFDictionaryAddValue(dictionary, key, number.get());
-}
-
-IOSurfaceImageTransportSurface::IOSurfaceImageTransportSurface(
- GpuChannelManager* manager,
- GpuCommandBufferStub* stub,
- gfx::PluginWindowHandle handle)
- : gfx::NoOpGLSurfaceCGL(gfx::Size(1, 1)),
- backbuffer_suggested_allocation_(true),
- frontbuffer_suggested_allocation_(true),
- fbo_id_(0),
- texture_id_(0),
- depth_stencil_renderbuffer_id_(0),
- io_surface_handle_(0),
- context_(NULL),
- scale_factor_(1.f),
- made_current_(false),
- is_swap_buffers_pending_(false),
- did_unschedule_(false) {
- helper_.reset(new ImageTransportHelper(this, manager, stub, handle));
-}
-
-IOSurfaceImageTransportSurface::~IOSurfaceImageTransportSurface() {
-}
-
-bool IOSurfaceImageTransportSurface::Initialize() {
- // Only support IOSurfaces if the GL implementation is the native desktop GL.
- // IO surfaces will not work with, for example, OSMesa software renderer
- // GL contexts.
- if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL &&
- gfx::GetGLImplementation() != gfx::kGLImplementationAppleGL)
- return false;
-
- if (!helper_->Initialize())
- return false;
-
- if (!NoOpGLSurfaceCGL::Initialize()) {
- helper_->Destroy();
- return false;
- }
-
- helper_->stub()->AddDestructionObserver(this);
- return true;
-}
-
-void IOSurfaceImageTransportSurface::Destroy() {
- UnrefIOSurface();
-
- helper_->Destroy();
- NoOpGLSurfaceCGL::Destroy();
-}
-
-bool IOSurfaceImageTransportSurface::DeferDraws() {
- // The command buffer hit a draw/clear command that could clobber the
- // IOSurface in use by an earlier SwapBuffers. If a Swap is pending, abort
- // processing of the command by returning true and unschedule until the Swap
- // Ack arrives.
- if(did_unschedule_)
- return true; // Still unscheduled, so just return true.
- if (is_swap_buffers_pending_) {
- did_unschedule_ = true;
- helper_->SetScheduled(false);
- return true;
- }
- return false;
-}
-
-bool IOSurfaceImageTransportSurface::IsOffscreen() {
- return false;
-}
-
-bool IOSurfaceImageTransportSurface::OnMakeCurrent(gfx::GLContext* context) {
- context_ = context;
-
- if (made_current_)
- return true;
-
- OnResize(gfx::Size(1, 1), 1.f);
-
- made_current_ = true;
- return true;
-}
-
-unsigned int IOSurfaceImageTransportSurface::GetBackingFrameBufferObject() {
- return fbo_id_;
-}
-
-bool IOSurfaceImageTransportSurface::SetBackbufferAllocation(bool allocation) {
- if (backbuffer_suggested_allocation_ == allocation)
- return true;
- backbuffer_suggested_allocation_ = allocation;
- AdjustBufferAllocation();
- return true;
-}
-
-void IOSurfaceImageTransportSurface::SetFrontbufferAllocation(bool allocation) {
- if (frontbuffer_suggested_allocation_ == allocation)
- return;
- frontbuffer_suggested_allocation_ = allocation;
- AdjustBufferAllocation();
-}
-
-void IOSurfaceImageTransportSurface::AdjustBufferAllocation() {
- // On mac, the frontbuffer and backbuffer are the same buffer. The buffer is
- // free'd when both the browser and gpu processes have Unref'd the IOSurface.
- if (!backbuffer_suggested_allocation_ &&
- !frontbuffer_suggested_allocation_ &&
- io_surface_.get()) {
- UnrefIOSurface();
- helper_->Suspend();
- } else if (backbuffer_suggested_allocation_ && !io_surface_) {
- CreateIOSurface();
- }
-}
-
-bool IOSurfaceImageTransportSurface::SwapBuffers() {
- DCHECK(backbuffer_suggested_allocation_);
- if (!frontbuffer_suggested_allocation_)
- return true;
- glFlush();
-
- GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params;
- params.surface_handle = io_surface_handle_;
- params.size = GetSize();
- params.scale_factor = scale_factor_;
- params.latency_info.swap(latency_info_);
- helper_->SendAcceleratedSurfaceBuffersSwapped(params);
-
- DCHECK(!is_swap_buffers_pending_);
- is_swap_buffers_pending_ = true;
- return true;
-}
-
-bool IOSurfaceImageTransportSurface::PostSubBuffer(
- int x, int y, int width, int height) {
- DCHECK(backbuffer_suggested_allocation_);
- if (!frontbuffer_suggested_allocation_)
- return true;
- glFlush();
-
- GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params params;
- params.surface_handle = io_surface_handle_;
- params.x = x;
- params.y = y;
- params.width = width;
- params.height = height;
- params.surface_size = GetSize();
- params.surface_scale_factor = scale_factor_;
- params.latency_info.swap(latency_info_);
- helper_->SendAcceleratedSurfacePostSubBuffer(params);
-
- DCHECK(!is_swap_buffers_pending_);
- is_swap_buffers_pending_ = true;
- return true;
-}
-
-bool IOSurfaceImageTransportSurface::SupportsPostSubBuffer() {
- return true;
-}
-
-gfx::Size IOSurfaceImageTransportSurface::GetSize() {
- return size_;
-}
-
-void IOSurfaceImageTransportSurface::OnBufferPresented(
- const AcceleratedSurfaceMsg_BufferPresented_Params& params) {
- DCHECK(is_swap_buffers_pending_);
-
- context_->share_group()->SetRendererID(params.renderer_id);
- is_swap_buffers_pending_ = false;
- if (did_unschedule_) {
- did_unschedule_ = false;
- helper_->SetScheduled(true);
- }
-}
-
-void IOSurfaceImageTransportSurface::OnResize(gfx::Size size,
- float scale_factor) {
- // This trace event is used in gpu_feature_browsertest.cc - the test will need
- // to be updated if this event is changed or moved.
- TRACE_EVENT2("gpu", "IOSurfaceImageTransportSurface::OnResize",
- "old_width", size_.width(), "new_width", size.width());
- // Caching |context_| from OnMakeCurrent. It should still be current.
- DCHECK(context_->IsCurrent(this));
-
- size_ = size;
- scale_factor_ = scale_factor;
-
- CreateIOSurface();
-}
-
-void IOSurfaceImageTransportSurface::SetLatencyInfo(
- const std::vector<ui::LatencyInfo>& latency_info) {
- for (size_t i = 0; i < latency_info.size(); i++)
- latency_info_.push_back(latency_info[i]);
-}
-
-void IOSurfaceImageTransportSurface::WakeUpGpu() {
- NOTIMPLEMENTED();
-}
-
-void IOSurfaceImageTransportSurface::OnWillDestroyStub() {
- helper_->stub()->RemoveDestructionObserver(this);
- Destroy();
-}
-
-void IOSurfaceImageTransportSurface::UnrefIOSurface() {
- // If we have resources to destroy, then make sure that we have a current
- // context which we can use to delete the resources.
- if (context_ || fbo_id_ || texture_id_ || depth_stencil_renderbuffer_id_) {
- DCHECK(gfx::GLContext::GetCurrent() == context_);
- DCHECK(context_->IsCurrent(this));
- DCHECK(CGLGetCurrentContext());
- }
-
- if (fbo_id_) {
- glDeleteFramebuffersEXT(1, &fbo_id_);
- fbo_id_ = 0;
- }
-
- if (texture_id_) {
- glDeleteTextures(1, &texture_id_);
- texture_id_ = 0;
- }
-
- if (depth_stencil_renderbuffer_id_) {
- glDeleteRenderbuffersEXT(1, &depth_stencil_renderbuffer_id_);
- depth_stencil_renderbuffer_id_ = 0;
- }
-
- io_surface_.reset();
- io_surface_handle_ = 0;
-}
-
-void IOSurfaceImageTransportSurface::CreateIOSurface() {
- gfx::Size new_rounded_size(RoundUpSurfaceDimension(size_.width()),
- RoundUpSurfaceDimension(size_.height()));
-
- // Only recreate surface when the rounded up size has changed.
- if (io_surface_.get() && new_rounded_size == rounded_size_)
- return;
-
- // This trace event is used in gpu_feature_browsertest.cc - the test will need
- // to be updated if this event is changed or moved.
- TRACE_EVENT2("gpu", "IOSurfaceImageTransportSurface::CreateIOSurface",
- "width", new_rounded_size.width(),
- "height", new_rounded_size.height());
-
- rounded_size_ = new_rounded_size;
-
- GLint previous_texture_id = 0;
- glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE_ARB, &previous_texture_id);
-
- // Free the old IO Surface first to reduce memory fragmentation.
- UnrefIOSurface();
-
- glGenFramebuffersEXT(1, &fbo_id_);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo_id_);
-
- glGenTextures(1, &texture_id_);
-
- // GL_TEXTURE_RECTANGLE_ARB is the best supported render target on
- // Mac OS X and is required for IOSurface interoperability.
- GLenum target = GL_TEXTURE_RECTANGLE_ARB;
- glBindTexture(target, texture_id_);
- glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
- glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,
- GL_COLOR_ATTACHMENT0_EXT,
- target,
- texture_id_,
- 0);
-
-
- // Search through the provided attributes; if the caller has
- // requested a stencil buffer, try to get one.
-
- int32 stencil_bits =
- helper_->stub()->GetRequestedAttribute(EGL_STENCIL_SIZE);
- if (stencil_bits > 0) {
- // Create and bind the stencil buffer
- bool has_packed_depth_stencil =
- GLSurface::ExtensionsContain(
- reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS)),
- "GL_EXT_packed_depth_stencil");
-
- if (has_packed_depth_stencil) {
- glGenRenderbuffersEXT(1, &depth_stencil_renderbuffer_id_);
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT,
- depth_stencil_renderbuffer_id_);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH24_STENCIL8_EXT,
- rounded_size_.width(), rounded_size_.height());
- glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT,
- GL_STENCIL_ATTACHMENT_EXT,
- GL_RENDERBUFFER_EXT,
- depth_stencil_renderbuffer_id_);
- }
-
- // If we asked for stencil but the extension isn't present,
- // it's OK to silently fail; subsequent code will/must check
- // for the presence of a stencil buffer before attempting to
- // do stencil-based operations.
- }
-
- // Allocate a new IOSurface, which is the GPU resource that can be
- // shared across processes.
- base::ScopedCFTypeRef<CFMutableDictionaryRef> properties;
- properties.reset(CFDictionaryCreateMutable(kCFAllocatorDefault,
- 0,
- &kCFTypeDictionaryKeyCallBacks,
- &kCFTypeDictionaryValueCallBacks));
- AddIntegerValue(properties,
- kIOSurfaceWidth,
- rounded_size_.width());
- AddIntegerValue(properties,
- kIOSurfaceHeight,
- rounded_size_.height());
- AddIntegerValue(properties,
- kIOSurfaceBytesPerElement, 4);
- AddBooleanValue(properties,
- kIOSurfaceIsGlobal, true);
- // I believe we should be able to unreference the IOSurfaces without
- // synchronizing with the browser process because they are
- // ultimately reference counted by the operating system.
- io_surface_.reset(IOSurfaceCreate(properties));
- io_surface_handle_ = IOSurfaceGetID(io_surface_);
-
- // Don't think we need to identify a plane.
- GLuint plane = 0;
- CGLError cglerror =
- CGLTexImageIOSurface2D(
- static_cast<CGLContextObj>(context_->GetHandle()),
- target,
- GL_RGBA,
- rounded_size_.width(),
- rounded_size_.height(),
- GL_BGRA,
- GL_UNSIGNED_INT_8_8_8_8_REV,
- io_surface_.get(),
- plane);
- if (cglerror != kCGLNoError) {
- UnrefIOSurface();
- return;
- }
-
- glFlush();
-
- GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
- if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
- DLOG(ERROR) << "Framebuffer was incomplete: " << status;
- UnrefIOSurface();
- return;
- }
-
- glBindTexture(target, previous_texture_id);
- // The FBO remains bound for this GL context.
-}
-
-// A subclass of GLSurfaceOSMesa that doesn't print an error message when
-// SwapBuffers() is called.
-class DRTSurfaceOSMesa : public gfx::GLSurfaceOSMesa {
- public:
- // Size doesn't matter, the surface is resized to the right size later.
- DRTSurfaceOSMesa() : GLSurfaceOSMesa(GL_RGBA, gfx::Size(1, 1)) {}
-
- // Implement a subset of GLSurface.
- virtual bool SwapBuffers() OVERRIDE;
-
- private:
- virtual ~DRTSurfaceOSMesa() {}
- DISALLOW_COPY_AND_ASSIGN(DRTSurfaceOSMesa);
-};
-
-bool DRTSurfaceOSMesa::SwapBuffers() {
- return true;
-}
-
-bool g_allow_os_mesa = false;
-
-} // namespace
-
-// static
-scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface(
- GpuChannelManager* manager,
- GpuCommandBufferStub* stub,
- const gfx::GLSurfaceHandle& surface_handle) {
- DCHECK(surface_handle.transport_type == gfx::NATIVE_DIRECT ||
- surface_handle.transport_type == gfx::NATIVE_TRANSPORT);
-
- switch (gfx::GetGLImplementation()) {
- case gfx::kGLImplementationDesktopGL:
- case gfx::kGLImplementationAppleGL:
- return scoped_refptr<gfx::GLSurface>(new IOSurfaceImageTransportSurface(
- manager, stub, surface_handle.handle));
-
- default:
- // Content shell in DRT mode spins up a gpu process which needs an
- // image transport surface, but that surface isn't used to read pixel
- // baselines. So this is mostly a dummy surface.
- if (!g_allow_os_mesa) {
- NOTREACHED();
- return scoped_refptr<gfx::GLSurface>();
- }
- scoped_refptr<gfx::GLSurface> surface(new DRTSurfaceOSMesa());
- if (!surface.get() || !surface->Initialize())
- return surface;
- return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface(
- manager, stub, surface.get()));
- }
-}
-
-// static
-void ImageTransportSurface::SetAllowOSMesaForTesting(bool allow) {
- g_allow_os_mesa = allow;
-}
-
-} // namespace content
diff --git a/content/common/gpu/image_transport_surface_mac.mm b/content/common/gpu/image_transport_surface_mac.mm
new file mode 100644
index 0000000..9ab2272
--- /dev/null
+++ b/content/common/gpu/image_transport_surface_mac.mm
@@ -0,0 +1,74 @@
+// Copyright 2014 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 "content/common/gpu/image_transport_surface_fbo_mac.h"
+
+#include "content/common/gpu/gpu_messages.h"
+#include "content/common/gpu/image_transport_surface_iosurface_mac.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/gl/gl_context.h"
+#include "ui/gl/gl_implementation.h"
+#include "ui/gl/gl_surface_osmesa.h"
+
+namespace content {
+namespace {
+
+// A subclass of GLSurfaceOSMesa that doesn't print an error message when
+// SwapBuffers() is called.
+class DRTSurfaceOSMesa : public gfx::GLSurfaceOSMesa {
+ public:
+ // Size doesn't matter, the surface is resized to the right size later.
+ DRTSurfaceOSMesa() : GLSurfaceOSMesa(GL_RGBA, gfx::Size(1, 1)) {}
+
+ // Implement a subset of GLSurface.
+ virtual bool SwapBuffers() OVERRIDE;
+
+ private:
+ virtual ~DRTSurfaceOSMesa() {}
+ DISALLOW_COPY_AND_ASSIGN(DRTSurfaceOSMesa);
+};
+
+bool DRTSurfaceOSMesa::SwapBuffers() {
+ return true;
+}
+
+bool g_allow_os_mesa = false;
+
+} // namespace
+
+// static
+scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface(
+ GpuChannelManager* manager,
+ GpuCommandBufferStub* stub,
+ const gfx::GLSurfaceHandle& surface_handle) {
+ DCHECK(surface_handle.transport_type == gfx::NATIVE_DIRECT ||
+ surface_handle.transport_type == gfx::NATIVE_TRANSPORT);
+
+ switch (gfx::GetGLImplementation()) {
+ case gfx::kGLImplementationDesktopGL:
+ case gfx::kGLImplementationAppleGL:
+ return scoped_refptr<gfx::GLSurface>(new ImageTransportSurfaceFBO(
+ new IOSurfaceStorageProvider, manager, stub, surface_handle.handle));
+ default:
+ // Content shell in DRT mode spins up a gpu process which needs an
+ // image transport surface, but that surface isn't used to read pixel
+ // baselines. So this is mostly a dummy surface.
+ if (!g_allow_os_mesa) {
+ NOTREACHED();
+ return scoped_refptr<gfx::GLSurface>();
+ }
+ scoped_refptr<gfx::GLSurface> surface(new DRTSurfaceOSMesa());
+ if (!surface.get() || !surface->Initialize())
+ return surface;
+ return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface(
+ manager, stub, surface.get()));
+ }
+}
+
+// static
+void ImageTransportSurface::SetAllowOSMesaForTesting(bool allow) {
+ g_allow_os_mesa = allow;
+}
+
+} // namespace content
diff --git a/content/common/gpu/media/OWNERS b/content/common/gpu/media/OWNERS
index ee59834..76f86d1 100644
--- a/content/common/gpu/media/OWNERS
+++ b/content/common/gpu/media/OWNERS
@@ -1,7 +1,6 @@
acolwell@chromium.org
dalecurtis@chromium.org
ddorwin@chromium.org
-fischman@chromium.org
scherkus@chromium.org
shadi@chromium.org
vrk@chromium.org
diff --git a/content/common/gpu/media/android_video_decode_accelerator.cc b/content/common/gpu/media/android_video_decode_accelerator.cc
index d84c28f..f72e1b2 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.cc
+++ b/content/common/gpu/media/android_video_decode_accelerator.cc
@@ -514,6 +514,10 @@
delete this;
}
+bool AndroidVideoDecodeAccelerator::CanDecodeOnIOThread() {
+ return false;
+}
+
void AndroidVideoDecodeAccelerator::RequestPictureBuffers() {
client_->ProvidePictureBuffers(kNumPictureBuffers, size_, GL_TEXTURE_2D);
}
diff --git a/content/common/gpu/media/android_video_decode_accelerator.h b/content/common/gpu/media/android_video_decode_accelerator.h
index cc963c8..0e02ce4 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.h
+++ b/content/common/gpu/media/android_video_decode_accelerator.h
@@ -15,7 +15,6 @@
#include "base/threading/thread_checker.h"
#include "base/timer/timer.h"
#include "content/common/content_export.h"
-#include "content/common/gpu/media/video_decode_accelerator_impl.h"
#include "gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
#include "media/base/android/media_codec_bridge.h"
@@ -30,7 +29,7 @@
// This class decodes the input encoded stream by using Android's MediaCodec
// class. http://developer.android.com/reference/android/media/MediaCodec.html
class CONTENT_EXPORT AndroidVideoDecodeAccelerator
- : public VideoDecodeAcceleratorImpl {
+ : public media::VideoDecodeAccelerator {
public:
// Does not take ownership of |client| which must outlive |*this|.
AndroidVideoDecodeAccelerator(
@@ -47,6 +46,7 @@
virtual void Flush() OVERRIDE;
virtual void Reset() OVERRIDE;
virtual void Destroy() OVERRIDE;
+ virtual bool CanDecodeOnIOThread() OVERRIDE;
private:
enum State {
diff --git a/content/common/gpu/media/dxva_video_decode_accelerator.cc b/content/common/gpu/media/dxva_video_decode_accelerator.cc
index be15bb8..2e667d0 100644
--- a/content/common/gpu/media/dxva_video_decode_accelerator.cc
+++ b/content/common/gpu/media/dxva_video_decode_accelerator.cc
@@ -19,7 +19,6 @@
#include "base/command_line.h"
#include "base/debug/trace_event.h"
#include "base/logging.h"
-#include "base/memory/scoped_handle.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/shared_memory.h"
#include "base/message_loop/message_loop.h"
@@ -622,6 +621,10 @@
delete this;
}
+bool DXVAVideoDecodeAccelerator::CanDecodeOnIOThread() {
+ return false;
+}
+
bool DXVAVideoDecodeAccelerator::InitDecoder(media::VideoCodecProfile profile) {
if (profile < media::H264PROFILE_MIN || profile > media::H264PROFILE_MAX)
return false;
diff --git a/content/common/gpu/media/dxva_video_decode_accelerator.h b/content/common/gpu/media/dxva_video_decode_accelerator.h
index 7bff907..74ca599 100644
--- a/content/common/gpu/media/dxva_video_decode_accelerator.h
+++ b/content/common/gpu/media/dxva_video_decode_accelerator.h
@@ -18,7 +18,6 @@
#include "base/threading/non_thread_safe.h"
#include "base/win/scoped_comptr.h"
#include "content/common/content_export.h"
-#include "content/common/gpu/media/video_decode_accelerator_impl.h"
#include "media/video/video_decode_accelerator.h"
interface IMFSample;
@@ -31,7 +30,7 @@
// This class lives on a single thread and DCHECKs that it is never accessed
// from any other.
class CONTENT_EXPORT DXVAVideoDecodeAccelerator
- : public VideoDecodeAcceleratorImpl,
+ : public media::VideoDecodeAccelerator,
NON_EXPORTED_BASE(public base::NonThreadSafe) {
public:
enum State {
@@ -57,6 +56,7 @@
virtual void Flush() OVERRIDE;
virtual void Reset() OVERRIDE;
virtual void Destroy() OVERRIDE;
+ virtual bool CanDecodeOnIOThread() OVERRIDE;
private:
typedef void* EGLConfig;
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc
index ab97618..0d315da 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -26,6 +26,8 @@
#if defined(OS_WIN)
#include "base/win/windows_version.h"
#include "content/common/gpu/media/dxva_video_decode_accelerator.h"
+#elif defined(OS_MACOSX)
+#include "content/common/gpu/media/vt_video_decode_accelerator.h"
#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11)
#include "content/common/gpu/media/v4l2_video_decode_accelerator.h"
#include "content/common/gpu/media/v4l2_video_device.h"
@@ -33,6 +35,8 @@
#include "content/common/gpu/media/vaapi_video_decode_accelerator.h"
#include "ui/gl/gl_context_glx.h"
#include "ui/gl/gl_implementation.h"
+#elif defined(USE_OZONE)
+#include "media/ozone/media_ozone_platform.h"
#elif defined(OS_ANDROID)
#include "content/common/gpu/media/android_video_decode_accelerator.h"
#endif
@@ -72,12 +76,12 @@
MessageFilter(GpuVideoDecodeAccelerator* owner, int32 host_route_id)
: owner_(owner), host_route_id_(host_route_id) {}
- virtual void OnChannelError() OVERRIDE { channel_ = NULL; }
+ virtual void OnChannelError() OVERRIDE { sender_ = NULL; }
- virtual void OnChannelClosing() OVERRIDE { channel_ = NULL; }
+ virtual void OnChannelClosing() OVERRIDE { sender_ = NULL; }
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE {
- channel_ = channel;
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE {
+ sender_ = sender;
}
virtual void OnFilterRemoved() OVERRIDE {
@@ -99,11 +103,11 @@
bool SendOnIOThread(IPC::Message* message) {
DCHECK(!message->is_sync());
- if (!channel_) {
+ if (!sender_) {
delete message;
return false;
}
- return channel_->Send(message);
+ return sender_->Send(message);
}
protected:
@@ -112,8 +116,8 @@
private:
GpuVideoDecodeAccelerator* owner_;
int32 host_route_id_;
- // The channel to which this filter was added.
- IPC::Channel* channel_;
+ // The sender to which this filter was added.
+ IPC::Sender* sender_;
};
GpuVideoDecodeAccelerator::GpuVideoDecodeAccelerator(
@@ -251,6 +255,10 @@
DVLOG(0) << "Initializing DXVA HW decoder for windows.";
video_decode_accelerator_.reset(
new DXVAVideoDecodeAccelerator(make_context_current_));
+#elif defined(OS_MACOSX)
+ video_decode_accelerator_.reset(new VTVideoDecodeAccelerator(
+ static_cast<CGLContextObj>(
+ stub_->decoder()->GetGLContext()->GetHandle())));
#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11)
scoped_ptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder);
if (!device.get()) {
@@ -275,6 +283,15 @@
static_cast<gfx::GLContextGLX*>(stub_->decoder()->GetGLContext());
video_decode_accelerator_.reset(new VaapiVideoDecodeAccelerator(
glx_context->display(), make_context_current_));
+#elif defined(USE_OZONE)
+ media::MediaOzonePlatform* platform =
+ media::MediaOzonePlatform::GetInstance();
+ video_decode_accelerator_.reset(platform->CreateVideoDecodeAccelerator(
+ make_context_current_));
+ if (!video_decode_accelerator_) {
+ SendCreateDecoderReply(init_done_msg, false);
+ return;
+ }
#elif defined(OS_ANDROID)
video_decode_accelerator_.reset(new AndroidVideoDecodeAccelerator(
stub_->decoder()->AsWeakPtr(),
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.h b/content/common/gpu/media/gpu_video_decode_accelerator.h
index a93559e..05d9fb0 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.h
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.h
@@ -13,7 +13,6 @@
#include "base/memory/shared_memory.h"
#include "base/synchronization/waitable_event.h"
#include "content/common/gpu/gpu_command_buffer_stub.h"
-#include "content/common/gpu/media/video_decode_accelerator_impl.h"
#include "gpu/command_buffer/service/texture_manager.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_sender.h"
@@ -98,7 +97,7 @@
GpuCommandBufferStub* stub_;
// The underlying VideoDecodeAccelerator.
- scoped_ptr<VideoDecodeAcceleratorImpl> video_decode_accelerator_;
+ scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_;
// Callback for making the relevant context current for GL calls.
// Returns false if failed.
diff --git a/content/common/gpu/media/gpu_video_encode_accelerator.cc b/content/common/gpu/media/gpu_video_encode_accelerator.cc
index c29a015..12c7b10 100644
--- a/content/common/gpu/media/gpu_video_encode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_encode_accelerator.cc
@@ -149,7 +149,7 @@
DCHECK(stub_);
stub_->channel()->RemoveRoute(host_route_id_);
stub_->RemoveDestructionObserver(this);
-
+ encoder_.reset();
delete this;
}
diff --git a/content/common/gpu/media/rendering_helper.cc b/content/common/gpu/media/rendering_helper.cc
index 76d29d1..4b7bb19 100644
--- a/content/common/gpu/media/rendering_helper.cc
+++ b/content/common/gpu/media/rendering_helper.cc
@@ -4,6 +4,10 @@
#include "content/common/gpu/media/rendering_helper.h"
+#include <algorithm>
+#include <numeric>
+#include <vector>
+
#include "base/bind.h"
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/message_loop/message_loop.h"
@@ -14,17 +18,18 @@
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface.h"
+#if defined(OS_WIN)
+#include <windows.h>
+#endif
+
#if defined(USE_X11)
#include "ui/gfx/x/x11_types.h"
#endif
#ifdef GL_VARIANT_GLX
-typedef GLXWindow NativeWindowType;
struct XFreeDeleter {
void operator()(void* x) const { ::XFree(x); }
};
-#else // EGL
-typedef EGLNativeWindowType NativeWindowType;
#endif
// Helper for Shader creation.
@@ -64,56 +69,44 @@
#endif
RenderingHelper::RenderingHelper() {
+#if defined(GL_VARIANT_EGL)
+ gl_surface_ = EGL_NO_SURFACE;
+#endif
+
+#if defined(OS_WIN)
+ window_ = NULL;
+#else
+ x_window_ = (Window)0;
+#endif
+
Clear();
}
RenderingHelper::~RenderingHelper() {
- CHECK_EQ(window_dimensions_.size(), 0U) <<
- "Must call UnInitialize before dtor.";
+ CHECK_EQ(clients_.size(), 0U) << "Must call UnInitialize before dtor.";
Clear();
}
-void RenderingHelper::MakeCurrent(int window_id) {
-#if GL_VARIANT_GLX
- if (window_id < 0) {
- CHECK(glXMakeContextCurrent(x_display_, GLX_NONE, GLX_NONE, NULL));
- } else {
- CHECK(glXMakeContextCurrent(
- x_display_, x_windows_[window_id], x_windows_[window_id], gl_context_));
- }
-#else // EGL
- if (window_id < 0) {
- CHECK(eglMakeCurrent(gl_display_, EGL_NO_SURFACE, EGL_NO_SURFACE,
- EGL_NO_CONTEXT)) << eglGetError();
- } else {
- CHECK(eglMakeCurrent(gl_display_, gl_surfaces_[window_id],
- gl_surfaces_[window_id], gl_context_))
- << eglGetError();
- }
-#endif
-}
-
void RenderingHelper::Initialize(const RenderingHelperParams& params,
base::WaitableEvent* done) {
- // Use window_dimensions_.size() != 0 as a proxy for the class having already
- // been Initialize()'d, and UnInitialize() before continuing.
- if (window_dimensions_.size()) {
+ // Use cients_.size() != 0 as a proxy for the class having already been
+ // Initialize()'d, and UnInitialize() before continuing.
+ if (clients_.size()) {
base::WaitableEvent done(false, false);
UnInitialize(&done);
done.Wait();
}
+ frame_duration_ = params.rendering_fps > 0
+ ? base::TimeDelta::FromSeconds(1) / params.rendering_fps
+ : base::TimeDelta();
+
gfx::InitializeStaticGLBindings(kGLImplementation);
scoped_refptr<gfx::GLContextStubWithExtensions> stub_context(
new gfx::GLContextStubWithExtensions());
- CHECK_GT(params.window_dimensions.size(), 0U);
- CHECK_EQ(params.frame_dimensions.size(), params.window_dimensions.size());
- window_dimensions_ = params.window_dimensions;
- frame_dimensions_ = params.frame_dimensions;
render_as_thumbnails_ = params.render_as_thumbnails;
message_loop_ = base::MessageLoop::current();
- CHECK_GT(params.num_windows, 0);
#if GL_VARIANT_GLX
x_display_ = gfx::GetXDisplay();
@@ -142,20 +135,26 @@
stub_context->SetGLVersionString(
reinterpret_cast<const char*>(glGetString(GL_VERSION)));
+ Screen* screen = DefaultScreenOfDisplay(x_display_);
+ screen_size_ = gfx::Size(XWidthOfScreen(screen), XHeightOfScreen(screen));
#else // EGL
EGLNativeDisplayType native_display;
#if defined(OS_WIN)
native_display = EGL_DEFAULT_DISPLAY;
+ screen_size_ =
+ gfx::Size(GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
#else
x_display_ = gfx::GetXDisplay();
CHECK(x_display_);
native_display = x_display_;
-#endif
+ Screen* screen = DefaultScreenOfDisplay(x_display_);
+ screen_size_ = gfx::Size(XWidthOfScreen(screen), XHeightOfScreen(screen));
+#endif
gl_display_ = eglGetDisplay(native_display);
CHECK(gl_display_);
- CHECK(eglInitialize(gl_display_, NULL, NULL)) << glGetError();
+ CHECK(eglInitialize(gl_display_, NULL, NULL)) << eglGetError();
static EGLint rgba8888[] = {
EGL_RED_SIZE, 8,
@@ -181,64 +180,76 @@
stub_context->SetGLVersionString(
reinterpret_cast<const char*>(glGetString(GL_VERSION)));
#endif
-
- // Per-window/surface X11 & EGL initialization.
- for (int i = 0; i < params.num_windows; ++i) {
- // Arrange X windows whimsically, with some padding.
- int j = i % window_dimensions_.size();
- int width = window_dimensions_[j].width();
- int height = window_dimensions_[j].height();
- CHECK_GT(width, 0);
- CHECK_GT(height, 0);
- int top_left_x = (width + 20) * (i % 4);
- int top_left_y = (height + 12) * (i % 3);
+ clients_ = params.clients;
+ CHECK_GT(clients_.size(), 0U);
+ LayoutRenderingAreas();
#if defined(OS_WIN)
- NativeWindowType window =
- CreateWindowEx(0, L"Static", L"VideoDecodeAcceleratorTest",
- WS_OVERLAPPEDWINDOW | WS_VISIBLE, top_left_x,
- top_left_y, width, height, NULL, NULL, NULL,
- NULL);
- CHECK(window != NULL);
- windows_.push_back(window);
+ window_ = CreateWindowEx(0,
+ L"Static",
+ L"VideoDecodeAcceleratorTest",
+ WS_OVERLAPPEDWINDOW | WS_VISIBLE,
+ 0,
+ 0,
+ screen_size_.width(),
+ screen_size_.height(),
+ NULL,
+ NULL,
+ NULL,
+ NULL);
+ CHECK(window_ != NULL);
#else
- int depth = DefaultDepth(x_display_, DefaultScreen(x_display_));
+ int depth = DefaultDepth(x_display_, DefaultScreen(x_display_));
#if defined(GL_VARIANT_GLX)
- CHECK_EQ(depth, x_visual_->depth);
+ CHECK_EQ(depth, x_visual_->depth);
#endif
- XSetWindowAttributes window_attributes;
- window_attributes.background_pixel =
- BlackPixel(x_display_, DefaultScreen(x_display_));
- window_attributes.override_redirect = true;
+ XSetWindowAttributes window_attributes;
+ window_attributes.background_pixel =
+ BlackPixel(x_display_, DefaultScreen(x_display_));
+ window_attributes.override_redirect = true;
- NativeWindowType window = XCreateWindow(
- x_display_, DefaultRootWindow(x_display_),
- top_left_x, top_left_y, width, height,
- 0 /* border width */,
- depth, CopyFromParent /* class */, CopyFromParent /* visual */,
- (CWBackPixel | CWOverrideRedirect), &window_attributes);
- XStoreName(x_display_, window, "VideoDecodeAcceleratorTest");
- XSelectInput(x_display_, window, ExposureMask);
- XMapWindow(x_display_, window);
- x_windows_.push_back(window);
+ x_window_ = XCreateWindow(x_display_,
+ DefaultRootWindow(x_display_),
+ 0,
+ 0,
+ screen_size_.width(),
+ screen_size_.height(),
+ 0 /* border width */,
+ depth,
+ CopyFromParent /* class */,
+ CopyFromParent /* visual */,
+ (CWBackPixel | CWOverrideRedirect),
+ &window_attributes);
+ XStoreName(x_display_, x_window_, "VideoDecodeAcceleratorTest");
+ XSelectInput(x_display_, x_window_, ExposureMask);
+ XMapWindow(x_display_, x_window_);
#endif
#if GL_VARIANT_EGL
- EGLSurface egl_surface =
- eglCreateWindowSurface(gl_display_, egl_config, window, NULL);
- gl_surfaces_.push_back(egl_surface);
- CHECK_NE(egl_surface, EGL_NO_SURFACE);
+#if defined(OS_WIN)
+ gl_surface_ =
+ eglCreateWindowSurface(gl_display_, egl_config, window_, NULL);
+#else
+ gl_surface_ =
+ eglCreateWindowSurface(gl_display_, egl_config, x_window_, NULL);
#endif
- MakeCurrent(i);
- }
+ CHECK_NE(gl_surface_, EGL_NO_SURFACE);
+#endif
+
+#if GL_VARIANT_GLX
+ CHECK(glXMakeContextCurrent(x_display_, x_window_, x_window_, gl_context_));
+#else // EGL
+ CHECK(eglMakeCurrent(gl_display_, gl_surface_, gl_surface_, gl_context_))
+ << eglGetError();
+#endif
// Must be done after a context is made current.
gfx::InitializeDynamicGLBindings(kGLImplementation, stub_context.get());
if (render_as_thumbnails_) {
- CHECK_EQ(window_dimensions_.size(), 1U);
+ CHECK_EQ(clients_.size(), 1U);
GLint max_texture_size;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
@@ -355,11 +366,17 @@
int tc_location = glGetAttribLocation(program_, "in_tc");
glEnableVertexAttribArray(tc_location);
glVertexAttribPointer(tc_location, 2, GL_FLOAT, GL_FALSE, 0, kTextureCoords);
+
+ if (frame_duration_ != base::TimeDelta()) {
+ render_timer_.Start(
+ FROM_HERE, frame_duration_, this, &RenderingHelper::RenderContent);
+ }
done->Signal();
}
void RenderingHelper::UnInitialize(base::WaitableEvent* done) {
CHECK_EQ(base::MessageLoop::current(), message_loop_);
+ render_timer_.Stop();
if (render_as_thumbnails_) {
glDeleteTextures(1, &thumbnails_texture_id_);
glDeleteFramebuffersEXT(1, &thumbnails_fbo_id_);
@@ -368,10 +385,11 @@
glXDestroyContext(x_display_, gl_context_);
#else // EGL
- MakeCurrent(-1);
+ CHECK(eglMakeCurrent(
+ gl_display_, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT))
+ << eglGetError();
CHECK(eglDestroyContext(gl_display_, gl_context_));
- for (size_t i = 0; i < gl_surfaces_.size(); ++i)
- CHECK(eglDestroySurface(gl_display_, gl_surfaces_[i]));
+ CHECK(eglDestroySurface(gl_display_, gl_surface_));
CHECK(eglTerminate(gl_display_));
#endif
gfx::ClearGLBindings();
@@ -379,27 +397,28 @@
done->Signal();
}
-void RenderingHelper::CreateTexture(int window_id,
- uint32 texture_target,
+void RenderingHelper::CreateTexture(uint32 texture_target,
uint32* texture_id,
+ const gfx::Size& size,
base::WaitableEvent* done) {
if (base::MessageLoop::current() != message_loop_) {
- message_loop_->PostTask(
- FROM_HERE,
- base::Bind(&RenderingHelper::CreateTexture, base::Unretained(this),
- window_id, texture_target, texture_id, done));
+ message_loop_->PostTask(FROM_HERE,
+ base::Bind(&RenderingHelper::CreateTexture,
+ base::Unretained(this),
+ texture_target,
+ texture_id,
+ size,
+ done));
return;
}
- MakeCurrent(window_id);
glGenTextures(1, texture_id);
glBindTexture(texture_target, *texture_id);
- int dimensions_id = window_id % frame_dimensions_.size();
if (texture_target == GL_TEXTURE_2D) {
glTexImage2D(GL_TEXTURE_2D,
0,
GL_RGBA,
- frame_dimensions_[dimensions_id].width(),
- frame_dimensions_[dimensions_id].height(),
+ size.width(),
+ size.height(),
0,
GL_RGBA,
GL_UNSIGNED_BYTE,
@@ -411,77 +430,47 @@
glTexParameteri(texture_target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(texture_target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR);
- CHECK(texture_id_to_surface_index_.insert(
- std::make_pair(*texture_id, window_id)).second);
done->Signal();
}
-void RenderingHelper::RenderTexture(uint32 texture_target, uint32 texture_id) {
+// Helper function to set GL viewport.
+static inline void GLSetViewPort(const gfx::Rect& area) {
+ glViewport(area.x(), area.y(), area.width(), area.height());
+ glScissor(area.x(), area.y(), area.width(), area.height());
+}
+
+void RenderingHelper::RenderThumbnail(uint32 texture_target,
+ uint32 texture_id) {
CHECK_EQ(base::MessageLoop::current(), message_loop_);
- size_t window_id = texture_id_to_surface_index_[texture_id];
- MakeCurrent(window_id);
+ const int width = thumbnail_size_.width();
+ const int height = thumbnail_size_.height();
+ const int thumbnails_in_row = thumbnails_fbo_size_.width() / width;
+ const int thumbnails_in_column = thumbnails_fbo_size_.height() / height;
+ const int row = (frame_count_ / thumbnails_in_row) % thumbnails_in_column;
+ const int col = frame_count_ % thumbnails_in_row;
- int dimensions_id = window_id % window_dimensions_.size();
- int width = window_dimensions_[dimensions_id].width();
- int height = window_dimensions_[dimensions_id].height();
+ gfx::Rect area(col * width, row * height, width, height);
- if (render_as_thumbnails_) {
- glBindFramebufferEXT(GL_FRAMEBUFFER, thumbnails_fbo_id_);
- const int thumbnails_in_row =
- thumbnails_fbo_size_.width() / thumbnail_size_.width();
- const int thumbnails_in_column =
- thumbnails_fbo_size_.height() / thumbnail_size_.height();
- const int row = (frame_count_ / thumbnails_in_row) % thumbnails_in_column;
- const int col = frame_count_ % thumbnails_in_row;
- const int x = col * thumbnail_size_.width();
- const int y = row * thumbnail_size_.height();
+ glUniform1i(glGetUniformLocation(program_, "tex_flip"), 0);
+ glBindFramebufferEXT(GL_FRAMEBUFFER, thumbnails_fbo_id_);
+ GLSetViewPort(area);
+ RenderTexture(texture_target, texture_id);
+ glBindFramebufferEXT(GL_FRAMEBUFFER, 0);
+ ++frame_count_;
+}
- glViewport(x, y, thumbnail_size_.width(), thumbnail_size_.height());
- glScissor(x, y, thumbnail_size_.width(), thumbnail_size_.height());
- glUniform1i(glGetUniformLocation(program_, "tex_flip"), 0);
- } else {
- glViewport(0, 0, width, height);
- glScissor(0, 0, width, height);
- glUniform1i(glGetUniformLocation(program_, "tex_flip"), 1);
- }
-
- // Unbound texture samplers default to (0, 0, 0, 1). Use this fact to switch
- // between GL_TEXTURE_2D and GL_TEXTURE_EXTERNAL_OES as appopriate.
+void RenderingHelper::RenderTexture(uint32 texture_target, uint32 texture_id) {
+ // The ExternalOES sampler is bound to GL_TEXTURE1 and the Texture2D sampler
+ // is bound to GL_TEXTURE0.
if (texture_target == GL_TEXTURE_2D) {
glActiveTexture(GL_TEXTURE0 + 0);
- glBindTexture(GL_TEXTURE_2D, texture_id);
- glActiveTexture(GL_TEXTURE0 + 1);
- glBindTexture(texture_target, 0);
} else if (texture_target == GL_TEXTURE_EXTERNAL_OES) {
- glActiveTexture(GL_TEXTURE0 + 0);
- glBindTexture(GL_TEXTURE_2D, 0);
glActiveTexture(GL_TEXTURE0 + 1);
- glBindTexture(texture_target, texture_id);
}
+ glBindTexture(texture_target, texture_id);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ glBindTexture(texture_target, 0);
CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR);
-
- ++frame_count_;
-
- if (render_as_thumbnails_) {
- // Copy from FBO to screen
- glUniform1i(glGetUniformLocation(program_, "tex_flip"), 1);
- glBindFramebufferEXT(GL_FRAMEBUFFER, 0);
- glViewport(0, 0, width, height);
- glScissor(0, 0, width, height);
- glActiveTexture(GL_TEXTURE0 + 0);
- glBindTexture(GL_TEXTURE_2D, thumbnails_texture_id_);
- glActiveTexture(GL_TEXTURE0 + 1);
- glBindTexture(texture_target, 0);
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
- }
-
-#if GL_VARIANT_GLX
- glXSwapBuffers(x_display_, x_windows_[window_id]);
-#else // EGL
- eglSwapBuffers(gl_display_, gl_surfaces_[window_id]);
- CHECK_EQ(static_cast<int>(eglGetError()), EGL_SUCCESS);
-#endif
}
void RenderingHelper::DeleteTexture(uint32 texture_id) {
@@ -500,14 +489,12 @@
}
void RenderingHelper::Clear() {
- window_dimensions_.clear();
- frame_dimensions_.clear();
- texture_id_to_surface_index_.clear();
+ clients_.clear();
message_loop_ = NULL;
gl_context_ = NULL;
#if GL_VARIANT_EGL
gl_display_ = EGL_NO_DISPLAY;
- gl_surfaces_.clear();
+ gl_surface_ = EGL_NO_SURFACE;
#endif
render_as_thumbnails_ = false;
frame_count_ = 0;
@@ -515,19 +502,19 @@
thumbnails_texture_id_ = 0;
#if defined(OS_WIN)
- for (size_t i = 0; i < windows_.size(); ++i) {
- DestroyWindow(windows_[i]);
+ if (window_) {
+ DestroyWindow(window_);
+ window_ = NULL;
}
- windows_.clear();
#else
// Destroy resources acquired in Initialize, in reverse-acquisition order.
- for (size_t i = 0; i < x_windows_.size(); ++i) {
- CHECK(XUnmapWindow(x_display_, x_windows_[i]));
- CHECK(XDestroyWindow(x_display_, x_windows_[i]));
+ if (x_window_) {
+ CHECK(XUnmapWindow(x_display_, x_window_));
+ CHECK(XDestroyWindow(x_display_, x_window_));
+ x_window_ = (Window)0;
}
// Mimic newly created object.
x_display_ = NULL;
- x_windows_.clear();
#endif
}
@@ -567,4 +554,82 @@
done->Signal();
}
+void RenderingHelper::RenderContent() {
+ glUniform1i(glGetUniformLocation(program_, "tex_flip"), 1);
+
+ if (render_as_thumbnails_) {
+ // In render_as_thumbnails_ mode, we render the FBO content on the
+ // screen instead of the decoded textures.
+ GLSetViewPort(render_areas_[0]);
+ RenderTexture(GL_TEXTURE_2D, thumbnails_texture_id_);
+ } else {
+ for (size_t i = 0; i < clients_.size(); ++i) {
+ if (clients_[i]) {
+ GLSetViewPort(render_areas_[i]);
+ clients_[i]->RenderContent(this);
+ }
+ }
+ }
+
+#if GL_VARIANT_GLX
+ glXSwapBuffers(x_display_, x_window_);
+#else // EGL
+ eglSwapBuffers(gl_display_, gl_surface_);
+ CHECK_EQ(static_cast<int>(eglGetError()), EGL_SUCCESS);
+#endif
+}
+
+// Helper function for the LayoutRenderingAreas(). The |lengths| are the
+// heights(widths) of the rows(columns). It scales the elements in
+// |lengths| proportionally so that the sum of them equal to |total_length|.
+// It also outputs the coordinates of the rows(columns) to |offsets|.
+static void ScaleAndCalculateOffsets(std::vector<int>* lengths,
+ std::vector<int>* offsets,
+ int total_length) {
+ int sum = std::accumulate(lengths->begin(), lengths->end(), 0);
+ for (size_t i = 0; i < lengths->size(); ++i) {
+ lengths->at(i) = lengths->at(i) * total_length / sum;
+ offsets->at(i) = (i == 0) ? 0 : offsets->at(i - 1) + lengths->at(i - 1);
+ }
+}
+
+void RenderingHelper::LayoutRenderingAreas() {
+ // Find the number of colums and rows.
+ // The smallest n * n or n * (n + 1) > number of clients.
+ size_t cols = sqrt(clients_.size() - 1) + 1;
+ size_t rows = (clients_.size() + cols - 1) / cols;
+
+ // Find the widths and heights of the grid.
+ std::vector<int> widths(cols);
+ std::vector<int> heights(rows);
+ std::vector<int> offset_x(cols);
+ std::vector<int> offset_y(rows);
+
+ for (size_t i = 0; i < clients_.size(); ++i) {
+ const gfx::Size& window_size = clients_[i]->GetWindowSize();
+ widths[i % cols] = std::max(widths[i % cols], window_size.width());
+ heights[i / cols] = std::max(heights[i / cols], window_size.height());
+ }
+
+ ScaleAndCalculateOffsets(&widths, &offset_x, screen_size_.width());
+ ScaleAndCalculateOffsets(&heights, &offset_y, screen_size_.height());
+
+ // Put each render_area_ in the center of each cell.
+ render_areas_.clear();
+ for (size_t i = 0; i < clients_.size(); ++i) {
+ const gfx::Size& window_size = clients_[i]->GetWindowSize();
+ float scale =
+ std::min(static_cast<float>(widths[i % cols]) / window_size.width(),
+ static_cast<float>(heights[i / cols]) / window_size.height());
+
+ // Don't scale up the texture.
+ scale = std::min(1.0f, scale);
+
+ size_t w = scale * window_size.width();
+ size_t h = scale * window_size.height();
+ size_t x = offset_x[i % cols] + (widths[i % cols] - w) / 2;
+ size_t y = offset_y[i / cols] + (heights[i / cols] - h) / 2;
+ render_areas_.push_back(gfx::Rect(x, y, w, h));
+ }
+}
} // namespace content
diff --git a/content/common/gpu/media/rendering_helper.h b/content/common/gpu/media/rendering_helper.h
index 36b4924..597184c 100644
--- a/content/common/gpu/media/rendering_helper.h
+++ b/content/common/gpu/media/rendering_helper.h
@@ -9,7 +9,10 @@
#include <vector>
#include "base/basictypes.h"
-#include "ui/gfx/size.h"
+#include "base/time/time.h"
+#include "base/timer/timer.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/geometry/size.h"
#include "ui/gl/gl_bindings.h"
namespace base {
@@ -27,31 +30,26 @@
namespace content {
-struct RenderingHelperParams {
- RenderingHelperParams();
- ~RenderingHelperParams();
-
- bool suppress_swap_to_display;
- int num_windows;
- // Dimensions of window(s) created for displaying frames. In the
- // case of thumbnail rendering, these won't match the frame dimensions.
- std::vector<gfx::Size> window_dimensions;
- // Dimensions of video frame texture(s).
- std::vector<gfx::Size> frame_dimensions;
- // Whether the frames are rendered as scaled thumbnails within a
- // larger FBO that is in turn rendered to the window.
- bool render_as_thumbnails;
- // The size of the FBO containing all visible thumbnails.
- gfx::Size thumbnails_page_size;
- // The size of each thumbnail within the FBO.
- gfx::Size thumbnail_size;
-};
+struct RenderingHelperParams;
// Creates and draws textures used by the video decoder.
// This class is not thread safe and thus all the methods of this class
// (except for ctor/dtor) ensure they're being run on a single thread.
class RenderingHelper {
public:
+ // Interface for the content provider of the RenderingHelper.
+ class Client {
+ public:
+ // Callback to tell client to render the content.
+ virtual void RenderContent(RenderingHelper* helper) = 0;
+
+ // Callback to get the desired window size of the client.
+ virtual const gfx::Size& GetWindowSize() = 0;
+
+ protected:
+ virtual ~Client() {}
+ };
+
RenderingHelper();
~RenderingHelper();
@@ -62,14 +60,19 @@
// Undo the effects of Initialize() and signal |*done|.
void UnInitialize(base::WaitableEvent* done);
- // Return a newly-created GLES2 texture id rendering to a specific window, and
+ // Return a newly-created GLES2 texture id of the specified size, and
// signal |*done|.
- void CreateTexture(int window_id,
- uint32 texture_target,
+ void CreateTexture(uint32 texture_target,
uint32* texture_id,
+ const gfx::Size& size,
base::WaitableEvent* done);
- // Render |texture_id| to the screen using target |texture_target|.
+ // Render thumbnail in the |texture_id| to the FBO buffer using target
+ // |texture_target|.
+ void RenderThumbnail(uint32 texture_target, uint32 texture_id);
+
+ // Render |texture_id| to the current view port of the screen using target
+ // |texture_target|.
void RenderTexture(uint32 texture_target, uint32 texture_id);
// Delete |texture_id|.
@@ -90,31 +93,37 @@
private:
void Clear();
- // Make window_id's surface current w/ the GL context, or release the context
- // if |window_id < 0|.
- void MakeCurrent(int window_id);
+ void RenderContent();
+ void LayoutRenderingAreas();
+
+ // Timer to trigger the RenderContent() repeatly.
+ base::RepeatingTimer<RenderingHelper> render_timer_;
base::MessageLoop* message_loop_;
- std::vector<gfx::Size> window_dimensions_;
- std::vector<gfx::Size> frame_dimensions_;
NativeContextType gl_context_;
- std::map<uint32, int> texture_id_to_surface_index_;
#if defined(GL_VARIANT_EGL)
EGLDisplay gl_display_;
- std::vector<EGLSurface> gl_surfaces_;
+ EGLSurface gl_surface_;
#else
XVisualInfo* x_visual_;
#endif
#if defined(OS_WIN)
- std::vector<HWND> windows_;
+ HWND window_;
#else
Display* x_display_;
- std::vector<Window> x_windows_;
+ Window x_window_;
#endif
+ gfx::Size screen_size_;
+
+ // The rendering area of each window on the screen.
+ std::vector<gfx::Rect> render_areas_;
+
+ std::vector<base::WeakPtr<Client> > clients_;
+
bool render_as_thumbnails_;
int frame_count_;
GLuint thumbnails_fbo_id_;
@@ -122,10 +131,29 @@
gfx::Size thumbnails_fbo_size_;
gfx::Size thumbnail_size_;
GLuint program_;
+ base::TimeDelta frame_duration_;
DISALLOW_COPY_AND_ASSIGN(RenderingHelper);
};
+struct RenderingHelperParams {
+ RenderingHelperParams();
+ ~RenderingHelperParams();
+
+ // The rendering FPS.
+ int rendering_fps;
+
+ // The clients who provide the content for rendering.
+ std::vector<base::WeakPtr<RenderingHelper::Client> > clients;
+
+ // Whether the frames are rendered as scaled thumbnails within a
+ // larger FBO that is in turn rendered to the window.
+ bool render_as_thumbnails;
+ // The size of the FBO containing all visible thumbnails.
+ gfx::Size thumbnails_page_size;
+ // The size of each thumbnail within the FBO.
+ gfx::Size thumbnail_size;
+};
} // namespace content
#endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_
diff --git a/content/common/gpu/media/v4l2_video_decode_accelerator.h b/content/common/gpu/media/v4l2_video_decode_accelerator.h
index b372c3a..e3d553d 100644
--- a/content/common/gpu/media/v4l2_video_decode_accelerator.h
+++ b/content/common/gpu/media/v4l2_video_decode_accelerator.h
@@ -19,10 +19,10 @@
#include "base/threading/thread.h"
#include "content/common/content_export.h"
#include "content/common/gpu/media/v4l2_video_device.h"
-#include "content/common/gpu/media/video_decode_accelerator_impl.h"
#include "media/base/limits.h"
#include "media/base/video_decoder_config.h"
#include "media/video/picture.h"
+#include "media/video/video_decode_accelerator.h"
#include "ui/gfx/size.h"
#include "ui/gl/gl_bindings.h"
@@ -73,7 +73,7 @@
// subtle races (esp. if we get Reset() in the meantime), we block the decoder
// thread while we wait for AssignPictureBuffers from the client.
class CONTENT_EXPORT V4L2VideoDecodeAccelerator
- : public VideoDecodeAcceleratorImpl {
+ : public media::VideoDecodeAccelerator {
public:
V4L2VideoDecodeAccelerator(
EGLDisplay egl_display,
@@ -95,8 +95,6 @@
virtual void Flush() OVERRIDE;
virtual void Reset() OVERRIDE;
virtual void Destroy() OVERRIDE;
-
- // VideoDecodeAcceleratorImpl implementation.
virtual bool CanDecodeOnIOThread() OVERRIDE;
private:
diff --git a/content/common/gpu/media/va.sigs b/content/common/gpu/media/va.sigs
index b276504..b3cea38 100644
--- a/content/common/gpu/media/va.sigs
+++ b/content/common/gpu/media/va.sigs
@@ -1,10 +1,10 @@
-# Copyright 2014 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.
+// Copyright 2014 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.
-#------------------------------------------------
-# Functions from libva used in chromium code.
-#------------------------------------------------
+//------------------------------------------------
+// Functions from libva used in chromium code.
+//------------------------------------------------
VAStatus vaBeginPicture(VADisplay dpy, VAContextID context, VASurfaceID render_target);
VAStatus vaCreateBuffer(VADisplay dpy, VAContextID context, VABufferType type, unsigned int size, unsigned int num_elements, void *data, VABufferID *buf_id);
VAStatus vaCreateConfig(VADisplay dpy, VAProfile profile, VAEntrypoint entrypoint, VAConfigAttrib *attrib_list, int num_attribs, VAConfigID *config_id);
@@ -31,8 +31,8 @@
VAStatus vaUnmapBuffer(VADisplay dpy, VABufferID buf_id);
-#------------------------------------------------
-# Functions from libva-x11 used in chromium code.
-#------------------------------------------------
+//------------------------------------------------
+// Functions from libva-x11 used in chromium code.
+//------------------------------------------------
VADisplay vaGetDisplay(Display *dpy);
VAStatus vaPutSurface(VADisplay dpy, VASurfaceID surface, Drawable draw, short srcx, short srcy, unsigned short srcw, unsigned short srch, short destx, short desty, unsigned short destw, unsigned short desth, VARectangle *cliprects, unsigned int number_cliprects, unsigned int flags);
diff --git a/content/common/gpu/media/vaapi_video_decode_accelerator.cc b/content/common/gpu/media/vaapi_video_decode_accelerator.cc
index 4b2c49e..b68f5d4 100644
--- a/content/common/gpu/media/vaapi_video_decode_accelerator.cc
+++ b/content/common/gpu/media/vaapi_video_decode_accelerator.cc
@@ -895,15 +895,13 @@
client_ptr_factory_.reset();
weak_this_factory_.InvalidateWeakPtrs();
+ // Signal all potential waiters on the decoder_thread_, let them early-exit,
+ // as we've just moved to the kDestroying state, and wait for all tasks
+ // to finish.
+ input_ready_.Signal();
+ surfaces_available_.Signal();
{
base::AutoUnlock auto_unlock(lock_);
- // Post a dummy task to the decoder_thread_ to ensure it is drained.
- base::WaitableEvent waiter(false, false);
- decoder_thread_proxy_->PostTask(FROM_HERE, base::Bind(
- &base::WaitableEvent::Signal, base::Unretained(&waiter)));
- input_ready_.Signal();
- surfaces_available_.Signal();
- waiter.Wait();
decoder_thread_.Stop();
}
@@ -916,4 +914,8 @@
delete this;
}
+bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() {
+ return false;
+}
+
} // namespace content
diff --git a/content/common/gpu/media/vaapi_video_decode_accelerator.h b/content/common/gpu/media/vaapi_video_decode_accelerator.h
index 37b9c7f..2bde3e0 100644
--- a/content/common/gpu/media/vaapi_video_decode_accelerator.h
+++ b/content/common/gpu/media/vaapi_video_decode_accelerator.h
@@ -25,7 +25,6 @@
#include "content/common/content_export.h"
#include "content/common/gpu/media/vaapi_h264_decoder.h"
#include "content/common/gpu/media/vaapi_wrapper.h"
-#include "content/common/gpu/media/video_decode_accelerator_impl.h"
#include "media/base/bitstream_buffer.h"
#include "media/video/picture.h"
#include "media/video/video_decode_accelerator.h"
@@ -42,7 +41,7 @@
// stopped during |this->Destroy()|, so any tasks posted to the decoder thread
// can assume |*this| is still alive. See |weak_this_| below for more details.
class CONTENT_EXPORT VaapiVideoDecodeAccelerator
- : public VideoDecodeAcceleratorImpl {
+ : public media::VideoDecodeAccelerator {
public:
VaapiVideoDecodeAccelerator(
Display* x_display,
@@ -59,6 +58,7 @@
virtual void Flush() OVERRIDE;
virtual void Reset() OVERRIDE;
virtual void Destroy() OVERRIDE;
+ virtual bool CanDecodeOnIOThread() OVERRIDE;
private:
// Notify the client that an error has occurred and decoding cannot continue.
diff --git a/content/common/gpu/media/video_decode_accelerator_impl.cc b/content/common/gpu/media/video_decode_accelerator_impl.cc
deleted file mode 100644
index a3ae393..0000000
--- a/content/common/gpu/media/video_decode_accelerator_impl.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-// 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 "content/common/gpu/media/video_decode_accelerator_impl.h"
-
-namespace content {
-
-VideoDecodeAcceleratorImpl::VideoDecodeAcceleratorImpl() {}
-
-bool VideoDecodeAcceleratorImpl::CanDecodeOnIOThread() { return false; }
-
-VideoDecodeAcceleratorImpl::~VideoDecodeAcceleratorImpl() {}
-
-} // namespace content
diff --git a/content/common/gpu/media/video_decode_accelerator_impl.h b/content/common/gpu/media/video_decode_accelerator_impl.h
deleted file mode 100644
index c0762a0..0000000
--- a/content/common/gpu/media/video_decode_accelerator_impl.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// 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 CONTENT_COMMON_GPU_MEDIA_VIDEO_DECODE_ACCELERATOR_IMPL_H_
-#define CONTENT_COMMON_GPU_MEDIA_VIDEO_DECODE_ACCELERATOR_IMPL_H_
-
-#include "content/common/content_export.h"
-#include "media/video/video_decode_accelerator.h"
-
-namespace content {
-
-class CONTENT_EXPORT VideoDecodeAcceleratorImpl
- : public media::VideoDecodeAccelerator {
- public:
- VideoDecodeAcceleratorImpl();
-
- // Returns true if VDA::Decode and VDA::Client callbacks can run on the IO
- // thread. Otherwise they will run on the GPU child thread. The purpose of
- // running Decode on the IO thread is to reduce decode latency. Note Decode
- // should return as soon as possible and not block on the IO thread. Also,
- // PictureReady should be run on the child thread if a picture is delivered
- // the first time so it can be cleared.
- virtual bool CanDecodeOnIOThread();
-
- protected:
- virtual ~VideoDecodeAcceleratorImpl();
-};
-
-} // namespace content
-
-namespace base {
-
-template <class T>
-struct DefaultDeleter;
-
-// Specialize DefaultDeleter so that scoped_ptr<VideoDecodeAcceleratorImpl>
-// always uses "Destroy()" instead of trying to use the destructor.
-template <>
-struct DefaultDeleter<content::VideoDecodeAcceleratorImpl> {
- public:
- inline void operator()(void* video_decode_accelerator) const {
- static_cast<content::VideoDecodeAcceleratorImpl*>(video_decode_accelerator)
- ->Destroy();
- }
-};
-
-} // namespace base
-
-#endif // CONTENT_COMMON_GPU_MEDIA_VIDEO_DECODE_ACCELERATOR_IMPL_H_
diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc
index b733a46..58e0e99 100644
--- a/content/common/gpu/media/video_decode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
@@ -99,10 +99,7 @@
const base::FilePath::CharType* g_output_log = NULL;
// The value is set by the switch "--rendering_fps".
-double g_rendering_fps = 0;
-
-// Disable rendering, the value is set by the switch "--disable_rendering".
-bool g_disable_rendering = false;
+double g_rendering_fps = 60;
// Magic constants for differentiating the reasons for NotifyResetDone being
// called.
@@ -145,10 +142,6 @@
std::string data_str;
};
-// Presumed minimal display size.
-// We subtract one pixel from the width because some ARM chromebooks do not
-// support two fullscreen app running at the same time. See crbug.com/270064.
-const gfx::Size kThumbnailsDisplaySize(1366 - 1, 768);
const gfx::Size kThumbnailsPageSize(1600, 1200);
const gfx::Size kThumbnailSize(160, 120);
const int kMD5StringLength = 32;
@@ -196,156 +189,11 @@
CS_MAX, // Must be last entry.
};
-// A wrapper client that throttles the PictureReady callbacks to a given rate.
-// It may drops or queues frame to deliver them on time.
-class ThrottlingVDAClient : public VideoDecodeAccelerator::Client,
- public base::SupportsWeakPtr<ThrottlingVDAClient> {
- public:
- // Callback invoked whan the picture is dropped and should be reused for
- // the decoder again.
- typedef base::Callback<void(int32 picture_buffer_id)> ReusePictureCB;
-
- ThrottlingVDAClient(VideoDecodeAccelerator::Client* client,
- double fps,
- ReusePictureCB reuse_picture_cb);
- virtual ~ThrottlingVDAClient();
-
- // VideoDecodeAccelerator::Client implementation
- virtual void ProvidePictureBuffers(uint32 requested_num_of_buffers,
- const gfx::Size& dimensions,
- uint32 texture_target) OVERRIDE;
- virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE;
- virtual void PictureReady(const media::Picture& picture) OVERRIDE;
- virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) OVERRIDE;
- virtual void NotifyFlushDone() OVERRIDE;
- virtual void NotifyResetDone() OVERRIDE;
- virtual void NotifyError(VideoDecodeAccelerator::Error error) OVERRIDE;
-
- int num_decoded_frames() { return num_decoded_frames_; }
-
- private:
-
- void CallClientPictureReady(int version);
-
- VideoDecodeAccelerator::Client* client_;
- ReusePictureCB reuse_picture_cb_;
- base::TimeTicks next_frame_delivered_time_;
- base::TimeDelta frame_duration_;
-
- int num_decoded_frames_;
- int stream_version_;
- std::deque<media::Picture> pending_pictures_;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(ThrottlingVDAClient);
-};
-
-ThrottlingVDAClient::ThrottlingVDAClient(VideoDecodeAccelerator::Client* client,
- double fps,
- ReusePictureCB reuse_picture_cb)
- : client_(client),
- reuse_picture_cb_(reuse_picture_cb),
- num_decoded_frames_(0),
- stream_version_(0) {
- CHECK(client_);
- CHECK_GT(fps, 0);
- frame_duration_ = base::TimeDelta::FromSeconds(1) / fps;
-}
-
-ThrottlingVDAClient::~ThrottlingVDAClient() {}
-
-void ThrottlingVDAClient::ProvidePictureBuffers(uint32 requested_num_of_buffers,
- const gfx::Size& dimensions,
- uint32 texture_target) {
- client_->ProvidePictureBuffers(
- requested_num_of_buffers, dimensions, texture_target);
-}
-
-void ThrottlingVDAClient::DismissPictureBuffer(int32 picture_buffer_id) {
- client_->DismissPictureBuffer(picture_buffer_id);
-}
-
-void ThrottlingVDAClient::PictureReady(const media::Picture& picture) {
- ++num_decoded_frames_;
-
- if (pending_pictures_.empty()) {
- base::TimeDelta delay =
- next_frame_delivered_time_.is_null()
- ? base::TimeDelta()
- : next_frame_delivered_time_ - base::TimeTicks::Now();
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&ThrottlingVDAClient::CallClientPictureReady,
- AsWeakPtr(),
- stream_version_),
- delay);
- }
- pending_pictures_.push_back(picture);
-}
-
-void ThrottlingVDAClient::CallClientPictureReady(int version) {
- // Just return if we have reset the decoder
- if (version != stream_version_)
- return;
-
- base::TimeTicks now = base::TimeTicks::Now();
-
- if (next_frame_delivered_time_.is_null())
- next_frame_delivered_time_ = now;
-
- if (next_frame_delivered_time_ + frame_duration_ < now) {
- // Too late, drop the frame
- reuse_picture_cb_.Run(pending_pictures_.front().picture_buffer_id());
- } else {
- client_->PictureReady(pending_pictures_.front());
- }
-
- pending_pictures_.pop_front();
- next_frame_delivered_time_ += frame_duration_;
- if (!pending_pictures_.empty()) {
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&ThrottlingVDAClient::CallClientPictureReady,
- AsWeakPtr(),
- stream_version_),
- next_frame_delivered_time_ - base::TimeTicks::Now());
- }
-}
-
-void ThrottlingVDAClient::NotifyEndOfBitstreamBuffer(
- int32 bitstream_buffer_id) {
- client_->NotifyEndOfBitstreamBuffer(bitstream_buffer_id);
-}
-
-void ThrottlingVDAClient::NotifyFlushDone() {
- if (!pending_pictures_.empty()) {
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&ThrottlingVDAClient::NotifyFlushDone,
- base::Unretained(this)),
- next_frame_delivered_time_ - base::TimeTicks::Now());
- return;
- }
- client_->NotifyFlushDone();
-}
-
-void ThrottlingVDAClient::NotifyResetDone() {
- ++stream_version_;
- while (!pending_pictures_.empty()) {
- reuse_picture_cb_.Run(pending_pictures_.front().picture_buffer_id());
- pending_pictures_.pop_front();
- }
- next_frame_delivered_time_ = base::TimeTicks();
- client_->NotifyResetDone();
-}
-
-void ThrottlingVDAClient::NotifyError(VideoDecodeAccelerator::Error error) {
- client_->NotifyError(error);
-}
-
// Client that can accept callbacks from a VideoDecodeAccelerator and is used by
// the TESTs below.
class GLRenderingVDAClient
: public VideoDecodeAccelerator::Client,
+ public RenderingHelper::Client,
public base::SupportsWeakPtr<GLRenderingVDAClient> {
public:
// Doesn't take ownership of |rendering_helper| or |note|, which must outlive
@@ -359,15 +207,12 @@
// calls have been made, N>=0 means interpret as ClientState.
// Both |reset_after_frame_num| & |delete_decoder_state| apply only to the
// last play-through (governed by |num_play_throughs|).
- // |rendering_fps| indicates the target rendering fps. 0 means no target fps
- // and it would render as fast as possible.
- // |suppress_rendering| indicates GL rendering is suppressed or not.
+ // |suppress_rendering| indicates GL rendering is supressed or not.
// After |delay_reuse_after_frame_num| frame has been delivered, the client
// will start delaying the call to ReusePictureBuffer() for kReuseDelay.
// |decode_calls_per_second| is the number of VDA::Decode calls per second.
// If |decode_calls_per_second| > 0, |num_in_flight_decodes| must be 1.
GLRenderingVDAClient(RenderingHelper* rendering_helper,
- int rendering_window_id,
ClientStateNotification<ClientState>* note,
const std::string& encoded_data,
int num_in_flight_decodes,
@@ -377,10 +222,10 @@
int frame_width,
int frame_height,
media::VideoCodecProfile profile,
- double rendering_fps,
bool suppress_rendering,
int delay_reuse_after_frame_num,
- int decode_calls_per_second);
+ int decode_calls_per_second,
+ bool render_as_thumbnails);
virtual ~GLRenderingVDAClient();
void CreateAndStartDecoder();
@@ -397,6 +242,10 @@
virtual void NotifyResetDone() OVERRIDE;
virtual void NotifyError(VideoDecodeAccelerator::Error error) OVERRIDE;
+ // RenderingHelper::Client implementation.
+ virtual void RenderContent(RenderingHelper*) OVERRIDE;
+ virtual const gfx::Size& GetWindowSize() OVERRIDE;
+
void OutputFrameDeliveryTimes(base::File* output);
void NotifyFrameDropped(int32 picture_buffer_id);
@@ -405,7 +254,7 @@
int num_done_bitstream_buffers() { return num_done_bitstream_buffers_; }
int num_skipped_fragments() { return num_skipped_fragments_; }
int num_queued_fragments() { return num_queued_fragments_; }
- int num_decoded_frames();
+ int num_decoded_frames() { return num_decoded_frames_; }
double frames_per_second();
// Return the median of the decode time of all decoded frames.
base::TimeDelta decode_time_median();
@@ -416,6 +265,7 @@
void SetState(ClientState new_state);
void FinishInitialization();
+ void ReturnPicture(int32 picture_buffer_id);
// Delete the associated decoder helper.
void DeleteDecoder();
@@ -436,7 +286,7 @@
void DecodeNextFragment();
RenderingHelper* rendering_helper_;
- int rendering_window_id_;
+ gfx::Size frame_size_;
std::string encoded_data_;
const int num_in_flight_decodes_;
int outstanding_decodes_;
@@ -462,20 +312,21 @@
bool suppress_rendering_;
std::vector<base::TimeTicks> frame_delivery_times_;
int delay_reuse_after_frame_num_;
- scoped_ptr<ThrottlingVDAClient> throttling_client_;
// A map from bitstream buffer id to the decode start time of the buffer.
std::map<int, base::TimeTicks> decode_start_time_;
// The decode time of all decoded frames.
std::vector<base::TimeDelta> decode_time_;
// The number of VDA::Decode calls per second. This is to simulate webrtc.
int decode_calls_per_second_;
+ bool render_as_thumbnails_;
+ bool pending_picture_updated_;
+ std::deque<int32> pending_picture_buffer_ids_;
DISALLOW_IMPLICIT_CONSTRUCTORS(GLRenderingVDAClient);
};
GLRenderingVDAClient::GLRenderingVDAClient(
RenderingHelper* rendering_helper,
- int rendering_window_id,
ClientStateNotification<ClientState>* note,
const std::string& encoded_data,
int num_in_flight_decodes,
@@ -485,12 +336,12 @@
int frame_width,
int frame_height,
media::VideoCodecProfile profile,
- double rendering_fps,
bool suppress_rendering,
int delay_reuse_after_frame_num,
- int decode_calls_per_second)
+ int decode_calls_per_second,
+ bool render_as_thumbnails)
: rendering_helper_(rendering_helper),
- rendering_window_id_(rendering_window_id),
+ frame_size_(frame_width, frame_height),
encoded_data_(encoded_data),
num_in_flight_decodes_(num_in_flight_decodes),
outstanding_decodes_(0),
@@ -508,10 +359,11 @@
texture_target_(0),
suppress_rendering_(suppress_rendering),
delay_reuse_after_frame_num_(delay_reuse_after_frame_num),
- decode_calls_per_second_(decode_calls_per_second) {
+ decode_calls_per_second_(decode_calls_per_second),
+ render_as_thumbnails_(render_as_thumbnails),
+ pending_picture_updated_(true) {
CHECK_GT(num_in_flight_decodes, 0);
CHECK_GT(num_play_throughs, 0);
- CHECK_GE(rendering_fps, 0);
// |num_in_flight_decodes_| is unsupported if |decode_calls_per_second_| > 0.
if (decode_calls_per_second_ > 0)
CHECK_EQ(1, num_in_flight_decodes_);
@@ -520,13 +372,6 @@
profile_ = (profile != media::VIDEO_CODEC_PROFILE_UNKNOWN
? profile
: media::H264PROFILE_BASELINE);
-
- if (rendering_fps > 0)
- throttling_client_.reset(new ThrottlingVDAClient(
- this,
- rendering_fps,
- base::Bind(&GLRenderingVDAClient::NotifyFrameDropped,
- base::Unretained(this))));
}
GLRenderingVDAClient::~GLRenderingVDAClient() {
@@ -544,10 +389,6 @@
VideoDecodeAccelerator::Client* client = this;
base::WeakPtr<VideoDecodeAccelerator::Client> weak_client = AsWeakPtr();
- if (throttling_client_) {
- client = throttling_client_.get();
- weak_client = throttling_client_->AsWeakPtr();
- }
#if defined(OS_WIN)
decoder_.reset(
new DXVAVideoDecodeAccelerator(base::Bind(&DoNothingReturnTrue)));
@@ -597,7 +438,7 @@
uint32 texture_id;
base::WaitableEvent done(false, false);
rendering_helper_->CreateTexture(
- rendering_window_id_, texture_target_, &texture_id, &done);
+ texture_target_, &texture_id, dimensions, &done);
done.Wait();
CHECK(outstanding_texture_ids_.insert(texture_id).second);
media::PictureBuffer* buffer =
@@ -618,6 +459,42 @@
picture_buffers_by_id_.erase(it);
}
+void GLRenderingVDAClient::RenderContent(RenderingHelper*) {
+ CHECK(!render_as_thumbnails_);
+
+ // No decoded texture for rendering yet, just skip.
+ if (pending_picture_buffer_ids_.size() == 0)
+ return;
+
+ int32 buffer_id = pending_picture_buffer_ids_.front();
+ media::PictureBuffer* picture_buffer = picture_buffers_by_id_[buffer_id];
+
+ CHECK(picture_buffer);
+ if (!pending_picture_updated_) {
+ // Frame dropped, just redraw the last texture.
+ rendering_helper_->RenderTexture(texture_target_,
+ picture_buffer->texture_id());
+ return;
+ }
+
+ base::TimeTicks now = base::TimeTicks::Now();
+ frame_delivery_times_.push_back(now);
+
+ rendering_helper_->RenderTexture(texture_target_,
+ picture_buffer->texture_id());
+
+ if (pending_picture_buffer_ids_.size() == 1) {
+ pending_picture_updated_ = false;
+ } else {
+ pending_picture_buffer_ids_.pop_front();
+ ReturnPicture(buffer_id);
+ }
+}
+
+const gfx::Size& GLRenderingVDAClient::GetWindowSize() {
+ return render_as_thumbnails_ ? kThumbnailsPageSize : frame_size_;
+}
+
void GLRenderingVDAClient::PictureReady(const media::Picture& picture) {
// We shouldn't be getting pictures delivered after Reset has completed.
CHECK_LT(state_, CS_RESET);
@@ -626,7 +503,6 @@
return;
base::TimeTicks now = base::TimeTicks::Now();
- frame_delivery_times_.push_back(now);
// Save the decode time of this picture.
std::map<int, base::TimeTicks>::iterator it =
decode_start_time_.find(picture.bitstream_buffer_id());
@@ -640,7 +516,7 @@
// Mid-stream reset applies only to the last play-through per constructor
// comment.
if (remaining_play_throughs_ == 1 &&
- reset_after_frame_num_ == num_decoded_frames()) {
+ reset_after_frame_num_ == num_decoded_frames_) {
reset_after_frame_num_ = MID_STREAM_RESET;
decoder_->Reset();
// Re-start decoding from the beginning of the stream to avoid needing to
@@ -648,23 +524,40 @@
encoded_data_next_pos_to_decode_ = 0;
}
- media::PictureBuffer* picture_buffer =
- picture_buffers_by_id_[picture.picture_buffer_id()];
- CHECK(picture_buffer);
- if (!suppress_rendering_) {
- rendering_helper_->RenderTexture(texture_target_,
- picture_buffer->texture_id());
+ if (render_as_thumbnails_) {
+ frame_delivery_times_.push_back(now);
+ media::PictureBuffer* picture_buffer =
+ picture_buffers_by_id_[picture.picture_buffer_id()];
+ CHECK(picture_buffer);
+ rendering_helper_->RenderThumbnail(texture_target_,
+ picture_buffer->texture_id());
+ ReturnPicture(picture.picture_buffer_id());
+ } else if (!suppress_rendering_) {
+ // Keep the picture for rendering.
+ pending_picture_buffer_ids_.push_back(picture.picture_buffer_id());
+ if (pending_picture_buffer_ids_.size() > 1 && !pending_picture_updated_) {
+ ReturnPicture(pending_picture_buffer_ids_.front());
+ pending_picture_buffer_ids_.pop_front();
+ pending_picture_updated_ = true;
+ }
+ } else {
+ frame_delivery_times_.push_back(now);
+ ReturnPicture(picture.picture_buffer_id());
}
+}
- if (num_decoded_frames() > delay_reuse_after_frame_num_) {
+void GLRenderingVDAClient::ReturnPicture(int32 picture_buffer_id) {
+ if (decoder_deleted())
+ return;
+ if (num_decoded_frames_ > delay_reuse_after_frame_num_) {
base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&VideoDecodeAccelerator::ReusePictureBuffer,
weak_decoder_factory_->GetWeakPtr(),
- picture.picture_buffer_id()),
+ picture_buffer_id),
kReuseDelay);
} else {
- decoder_->ReusePictureBuffer(picture.picture_buffer_id());
+ decoder_->ReusePictureBuffer(picture_buffer_id);
}
}
@@ -683,6 +576,7 @@
void GLRenderingVDAClient::NotifyFlushDone() {
if (decoder_deleted())
return;
+
SetState(CS_FLUSHED);
--remaining_play_throughs_;
DCHECK_GE(remaining_play_throughs_, 0);
@@ -696,6 +590,13 @@
if (decoder_deleted())
return;
+ // Clear pending_pictures and reuse them.
+ while (!pending_picture_buffer_ids_.empty()) {
+ decoder_->ReusePictureBuffer(pending_picture_buffer_ids_.front());
+ pending_picture_buffer_ids_.pop_front();
+ }
+ pending_picture_updated_ = true;
+
if (reset_after_frame_num_ == MID_STREAM_RESET) {
reset_after_frame_num_ = END_OF_STREAM_RESET;
DecodeNextFragment();
@@ -938,14 +839,9 @@
}
}
-int GLRenderingVDAClient::num_decoded_frames() {
- return throttling_client_ ? throttling_client_->num_decoded_frames()
- : num_decoded_frames_;
-}
-
double GLRenderingVDAClient::frames_per_second() {
base::TimeDelta delta = frame_delivery_times_.back() - initialize_done_ticks_;
- return num_decoded_frames() / delta.InSecondsF();
+ return num_decoded_frames_ / delta.InSecondsF();
}
base::TimeDelta GLRenderingVDAClient::decode_time_median() {
@@ -1199,34 +1095,22 @@
UpdateTestVideoFileParams(
num_concurrent_decoders, reset_point, &test_video_files_);
- // Suppress GL rendering for all tests when the "--disable_rendering" is set.
- const bool suppress_rendering = g_disable_rendering;
+ // Suppress GL rendering for all tests when the "--rendering_fps" is 0.
+ const bool suppress_rendering = g_rendering_fps == 0;
std::vector<ClientStateNotification<ClientState>*>
notes(num_concurrent_decoders, NULL);
std::vector<GLRenderingVDAClient*> clients(num_concurrent_decoders, NULL);
RenderingHelperParams helper_params;
- helper_params.num_windows = num_concurrent_decoders;
+ helper_params.rendering_fps = g_rendering_fps;
helper_params.render_as_thumbnails = render_as_thumbnails;
if (render_as_thumbnails) {
// Only one decoder is supported with thumbnail rendering
CHECK_EQ(num_concurrent_decoders, 1U);
- gfx::Size frame_size(test_video_files_[0]->width,
- test_video_files_[0]->height);
- helper_params.frame_dimensions.push_back(frame_size);
- helper_params.window_dimensions.push_back(kThumbnailsDisplaySize);
helper_params.thumbnails_page_size = kThumbnailsPageSize;
helper_params.thumbnail_size = kThumbnailSize;
- } else {
- for (size_t index = 0; index < test_video_files_.size(); ++index) {
- gfx::Size frame_size(test_video_files_[index]->width,
- test_video_files_[index]->height);
- helper_params.frame_dimensions.push_back(frame_size);
- helper_params.window_dimensions.push_back(frame_size);
- }
}
- InitializeRenderingHelper(helper_params);
// First kick off all the decoders.
for (size_t index = 0; index < num_concurrent_decoders; ++index) {
@@ -1244,7 +1128,6 @@
GLRenderingVDAClient* client =
new GLRenderingVDAClient(&rendering_helper_,
- index,
note,
video_file->data_str,
num_in_flight_decodes,
@@ -1254,14 +1137,21 @@
video_file->width,
video_file->height,
video_file->profile,
- g_rendering_fps,
suppress_rendering,
delay_after_frame_num,
- 0);
- clients[index] = client;
+ 0,
+ render_as_thumbnails);
- CreateAndStartDecoder(client, note);
+ clients[index] = client;
+ helper_params.clients.push_back(client->AsWeakPtr());
}
+
+ InitializeRenderingHelper(helper_params);
+
+ for (size_t index = 0; index < num_concurrent_decoders; ++index) {
+ CreateAndStartDecoder(clients[index], notes[index]);
+ }
+
// Then wait for all the decodes to finish.
// Only check performance & correctness later if we play through only once.
bool skip_performance_and_correctness_checks = num_play_throughs > 1;
@@ -1478,19 +1368,15 @@
// second.
TEST_F(VideoDecodeAcceleratorTest, TestDecodeTimeMedian) {
RenderingHelperParams helper_params;
- helper_params.num_windows = 1;
+
+ // Disable rendering by setting the rendering_fps = 0.
+ helper_params.rendering_fps = 0;
helper_params.render_as_thumbnails = false;
- gfx::Size frame_size(test_video_files_[0]->width,
- test_video_files_[0]->height);
- helper_params.frame_dimensions.push_back(frame_size);
- helper_params.window_dimensions.push_back(frame_size);
- InitializeRenderingHelper(helper_params);
ClientStateNotification<ClientState>* note =
new ClientStateNotification<ClientState>();
GLRenderingVDAClient* client =
new GLRenderingVDAClient(&rendering_helper_,
- 0,
note,
test_video_files_[0]->data_str,
1,
@@ -1500,10 +1386,12 @@
test_video_files_[0]->width,
test_video_files_[0]->height,
test_video_files_[0]->profile,
- g_rendering_fps,
true,
std::numeric_limits<int>::max(),
- kWebRtcDecodeCallsPerSecond);
+ kWebRtcDecodeCallsPerSecond,
+ false /* render_as_thumbnail */);
+ helper_params.clients.push_back(client->AsWeakPtr());
+ InitializeRenderingHelper(helper_params);
CreateAndStartDecoder(client, note);
WaitUntilDecodeFinish(note);
@@ -1561,8 +1449,9 @@
CHECK(base::StringToDouble(input, &content::g_rendering_fps));
continue;
}
+ // TODO(owenlin): Remove this flag once it is not used in autotest.
if (it->first == "disable_rendering") {
- content::g_disable_rendering = true;
+ content::g_rendering_fps = 0;
continue;
}
if (it->first == "v" || it->first == "vmodule")
diff --git a/content/common/gpu/media/video_encode_accelerator_unittest.cc b/content/common/gpu/media/video_encode_accelerator_unittest.cc
index b50e902..5f60634 100644
--- a/content/common/gpu/media/video_encode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_encode_accelerator_unittest.cc
@@ -533,7 +533,7 @@
// Calculate the number of frames in the input stream by dividing its length
// in bytes by frame size in bytes.
- CHECK_EQ(test_stream_.input_file.length() % input_buffer_size_, 0)
+ CHECK_EQ(test_stream_.input_file.length() % input_buffer_size_, 0U)
<< "Stream byte size is not a product of calculated frame byte size";
num_frames_in_stream_ = test_stream_.input_file.length() / input_buffer_size_;
CHECK_GT(num_frames_in_stream_, 0UL);
@@ -881,7 +881,7 @@
Tuple7<int, bool, int, bool, bool, bool, bool> > {};
TEST_P(VideoEncodeAcceleratorTest, TestSimpleEncode) {
- const int num_concurrent_encoders = GetParam().a;
+ const size_t num_concurrent_encoders = GetParam().a;
const bool save_to_file = GetParam().b;
const unsigned int keyframe_period = GetParam().c;
const bool force_bitrate = GetParam().d;
@@ -896,13 +896,13 @@
mid_stream_bitrate_switch, mid_stream_framerate_switch, &test_streams);
ScopedVector<ClientStateNotification<ClientState> > notes;
- // The clients can only be deleted after the encoder threads are stopped.
ScopedVector<VEAClient> clients;
- ScopedVector<base::Thread> encoder_threads;
+ base::Thread encoder_thread("EncoderThread");
+ ASSERT_TRUE(encoder_thread.Start());
- // Create all the encoders.
- for (int i = 0; i < num_concurrent_encoders; i++) {
- int test_stream_index = i % test_streams.size();
+ // Create all encoders.
+ for (size_t i = 0; i < num_concurrent_encoders; i++) {
+ size_t test_stream_index = i % test_streams.size();
// Disregard save_to_file if we didn't get an output filename.
bool encoder_save_to_file =
(save_to_file &&
@@ -916,29 +916,35 @@
force_bitrate,
test_perf));
- // Initialize the encoder thread.
- char thread_name[32];
- sprintf(thread_name, "EncoderThread%d", i);
- base::Thread* encoder_thread = new base::Thread(thread_name);
- encoder_thread->Start();
- encoder_thread->message_loop()->PostTask(
+ encoder_thread.message_loop()->PostTask(
FROM_HERE,
base::Bind(&VEAClient::CreateEncoder,
base::Unretained(clients.back())));
- encoder_threads.push_back(encoder_thread);
}
- // Wait all the encoders to finish.
- for (int i = 0; i < num_concurrent_encoders; i++) {
- ASSERT_EQ(notes[i]->Wait(), CS_ENCODER_SET);
- ASSERT_EQ(notes[i]->Wait(), CS_INITIALIZED);
- ASSERT_EQ(notes[i]->Wait(), CS_ENCODING);
- ASSERT_EQ(notes[i]->Wait(), CS_FINISHED);
- encoder_threads[i]->message_loop()->PostTask(
+ // All encoders must pass through states in this order.
+ enum ClientState state_transitions[] = {CS_ENCODER_SET, CS_INITIALIZED,
+ CS_ENCODING, CS_FINISHED};
+
+ // Wait for all encoders to go through all states and finish.
+ // Do this by waiting for all encoders to advance to state n before checking
+ // state n+1, to verify that they are able to operate concurrently.
+ // It also simulates the real-world usage better, as the main thread, on which
+ // encoders are created/destroyed, is a single GPU Process ChildThread.
+ // Moreover, we can't have proper multithreading on X11, so this could cause
+ // hard to debug issues there, if there were multiple "ChildThreads".
+ for (size_t state_no = 0; state_no < arraysize(state_transitions); ++state_no)
+ for (size_t i = 0; i < num_concurrent_encoders; i++)
+ ASSERT_EQ(notes[i]->Wait(), state_transitions[state_no]);
+
+ for (size_t i = 0; i < num_concurrent_encoders; ++i) {
+ encoder_thread.message_loop()->PostTask(
FROM_HERE,
base::Bind(&VEAClient::DestroyEncoder, base::Unretained(clients[i])));
- encoder_threads[i]->Stop();
}
+
+ // This ensures all tasks have finished.
+ encoder_thread.Stop();
}
INSTANTIATE_TEST_CASE_P(
diff --git a/content/common/gpu/media/vt_video_decode_accelerator.cc b/content/common/gpu/media/vt_video_decode_accelerator.cc
new file mode 100644
index 0000000..59251d2
--- /dev/null
+++ b/content/common/gpu/media/vt_video_decode_accelerator.cc
@@ -0,0 +1,63 @@
+// Copyright 2014 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 "content/common/gpu/media/vt_video_decode_accelerator.h"
+
+namespace content {
+
+VTVideoDecodeAccelerator::VTVideoDecodeAccelerator(CGLContextObj cgl_context)
+ : loop_proxy_(base::MessageLoopProxy::current()),
+ cgl_context_(cgl_context),
+ client_(NULL),
+ weak_this_factory_(this) {
+}
+
+VTVideoDecodeAccelerator::~VTVideoDecodeAccelerator() {
+}
+
+bool VTVideoDecodeAccelerator::Initialize(
+ media::VideoCodecProfile profile,
+ Client* client) {
+ DCHECK(CalledOnValidThread());
+ DVLOG(2) << __FUNCTION__;
+ client_ = client;
+
+ // Only H.264 is supported.
+ if (profile < media::H264PROFILE_MIN || profile > media::H264PROFILE_MAX)
+ return false;
+
+ // Prevent anyone from using VTVideoDecoder for now. http://crbug.com/133828
+ return false;
+}
+
+void VTVideoDecodeAccelerator::Decode(const media::BitstreamBuffer& bitstream) {
+ DCHECK(CalledOnValidThread());
+}
+
+void VTVideoDecodeAccelerator::AssignPictureBuffers(
+ const std::vector<media::PictureBuffer>& pictures) {
+ DCHECK(CalledOnValidThread());
+}
+
+void VTVideoDecodeAccelerator::ReusePictureBuffer(int32_t picture_id) {
+ DCHECK(CalledOnValidThread());
+}
+
+void VTVideoDecodeAccelerator::Flush() {
+ DCHECK(CalledOnValidThread());
+}
+
+void VTVideoDecodeAccelerator::Reset() {
+ DCHECK(CalledOnValidThread());
+}
+
+void VTVideoDecodeAccelerator::Destroy() {
+ DCHECK(CalledOnValidThread());
+}
+
+bool VTVideoDecodeAccelerator::CanDecodeOnIOThread() {
+ return false;
+}
+
+} // namespace content
diff --git a/content/common/gpu/media/vt_video_decode_accelerator.h b/content/common/gpu/media/vt_video_decode_accelerator.h
new file mode 100644
index 0000000..5b5d8be
--- /dev/null
+++ b/content/common/gpu/media/vt_video_decode_accelerator.h
@@ -0,0 +1,56 @@
+// Copyright 2014 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 CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_
+#define CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_
+
+#include <stdint.h>
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
+#include "base/message_loop/message_loop.h"
+#include "base/message_loop/message_loop_proxy.h"
+#include "media/video/video_decode_accelerator.h"
+#include "ui/gl/gl_context_cgl.h"
+
+namespace content {
+
+// (Stub of a) VideoToolbox.framework implementation of the
+// VideoDecodeAccelerator interface for Mac OS X.
+class VTVideoDecodeAccelerator
+ : public media::VideoDecodeAccelerator,
+ public base::NonThreadSafe {
+ public:
+ explicit VTVideoDecodeAccelerator(CGLContextObj cgl_context);
+ virtual ~VTVideoDecodeAccelerator();
+
+ // VideoDecodeAccelerator implementation.
+ virtual bool Initialize(
+ media::VideoCodecProfile profile,
+ Client* client) OVERRIDE;
+ virtual void Decode(const media::BitstreamBuffer& bitstream) OVERRIDE;
+ virtual void AssignPictureBuffers(
+ const std::vector<media::PictureBuffer>& pictures) OVERRIDE;
+ virtual void ReusePictureBuffer(int32_t picture_id) OVERRIDE;
+ virtual void Flush() OVERRIDE;
+ virtual void Reset() OVERRIDE;
+ virtual void Destroy() OVERRIDE;
+ virtual bool CanDecodeOnIOThread() OVERRIDE;
+
+ private:
+ scoped_refptr<base::MessageLoopProxy> loop_proxy_;
+ CGLContextObj cgl_context_;
+ media::VideoDecodeAccelerator::Client* client_;
+
+ // Member variables should appear before the WeakPtrFactory, to ensure
+ // that any WeakPtrs to Controller are invalidated before its members
+ // variable's destructors are executed, rendering them invalid.
+ base::WeakPtrFactory<VTVideoDecodeAccelerator> weak_this_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(VTVideoDecodeAccelerator);
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_
diff --git a/content/common/indexed_db/OWNERS b/content/common/indexed_db/OWNERS
index 53e405c..c7ad25e 100644
--- a/content/common/indexed_db/OWNERS
+++ b/content/common/indexed_db/OWNERS
@@ -1,12 +1,11 @@
dgrogan@chromium.org
-hans@chromium.org
michaeln@chromium.org
jsbell@chromium.org
-alecflett@chromium.org
+ericu@chromium.org
+cmumford@chromium.org
# For security review of IPC message files.
per-file *_messages*.h=set noparent
-per-file *_messages*.h=cdn@chromium.org
per-file *_messages*.h=cevans@chromium.org
per-file *_messages*.h=dcheng@chromium.org
per-file *_messages*.h=inferno@chromium.org
diff --git a/content/common/indexed_db/indexed_db_key.h b/content/common/indexed_db/indexed_db_key.h
index 44b288d..848a930 100644
--- a/content/common/indexed_db/indexed_db_key.h
+++ b/content/common/indexed_db/indexed_db_key.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_
#define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_
+#include <string>
#include <vector>
#include "base/basictypes.h"
diff --git a/content/common/indexed_db/indexed_db_key_path.h b/content/common/indexed_db/indexed_db_key_path.h
index ec5e861..b9387a4 100644
--- a/content/common/indexed_db/indexed_db_key_path.h
+++ b/content/common/indexed_db/indexed_db_key_path.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_PATH_H_
#define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_PATH_H_
+#include <string>
#include <vector>
#include "base/logging.h"
diff --git a/content/common/indexed_db/indexed_db_messages.h b/content/common/indexed_db/indexed_db_messages.h
index ac3fa2b..558d09a 100644
--- a/content/common/indexed_db/indexed_db_messages.h
+++ b/content/common/indexed_db/indexed_db_messages.h
@@ -4,6 +4,7 @@
// Message definition file, included multiple times, hence no include guard.
+#include <string>
#include <utility>
#include <vector>
@@ -418,10 +419,10 @@
// WebIDBCursor::advance() message.
IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_CursorAdvance,
- int32, /* ipc_cursor_id */
- int32, /* ipc_thread_id */
- int32, /* ipc_callbacks_id */
- unsigned long) /* count */
+ int32, /* ipc_cursor_id */
+ int32, /* ipc_thread_id */
+ int32, /* ipc_callbacks_id */
+ uint32) /* count */
// WebIDBCursor::continue() message.
IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_CursorContinue,
diff --git a/content/common/indexed_db/indexed_db_param_traits.h b/content/common/indexed_db/indexed_db_param_traits.h
index 9d684a4..c091c3a 100644
--- a/content/common/indexed_db/indexed_db_param_traits.h
+++ b/content/common/indexed_db/indexed_db_param_traits.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_PARAM_TRAITS_H_
#define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_PARAM_TRAITS_H_
+#include <string>
+
#include "ipc/ipc_message.h"
#include "ipc/ipc_param_traits.h"
@@ -40,6 +42,6 @@
static void Log(const param_type& p, std::string* l);
};
-} // namespace IPC
+} // namespace IPC
#endif // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_PARAM_TRAITS_H_
diff --git a/content/common/media/OWNERS b/content/common/media/OWNERS
index f922bca..9314814 100644
--- a/content/common/media/OWNERS
+++ b/content/common/media/OWNERS
@@ -1,7 +1,6 @@
acolwell@chromium.org
dalecurtis@chromium.org
ddorwin@chromium.org
-fischman@chromium.org
scherkus@chromium.org
shadi@chromium.org
tommi@chromium.org
@@ -11,7 +10,6 @@
# For security review of IPC message files.
per-file *_messages*.h=set noparent
-per-file *_messages*.h=cdn@chromium.org
per-file *_messages*.h=cevans@chromium.org
per-file *_messages*.h=dcheng@chromium.org
per-file *_messages*.h=inferno@chromium.org
@@ -23,7 +21,6 @@
per-file *_messages*.h=tsepez@chromium.org
per-file *_param_traits.*=set noparent
-per-file *_param_traits.*=cdn@chromium.org
per-file *_param_traits.*=cevans@chromium.org
per-file *_param_traits.*=dcheng@chromium.org
per-file *_param_traits.*=inferno@chromium.org
diff --git a/content/common/media/aec_dump_messages.h b/content/common/media/aec_dump_messages.h
new file mode 100644
index 0000000..0f98f27
--- /dev/null
+++ b/content/common/media/aec_dump_messages.h
@@ -0,0 +1,36 @@
+// Copyright 2014 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.
+
+// IPC messages for the AEC dump.
+// Multiply-included message file, hence no include guard.
+
+#include "content/common/content_export.h"
+#include "ipc/ipc_message_macros.h"
+#include "ipc/ipc_platform_file.h"
+
+#undef IPC_MESSAGE_EXPORT
+#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
+#define IPC_MESSAGE_START AecDumpMsgStart
+
+// Messages sent from the browser to the renderer.
+
+// The browser hands over a file handle to the consumer in the renderer
+// identified by |id| to use for AEC dump.
+IPC_MESSAGE_CONTROL2(AecDumpMsg_EnableAecDump,
+ int /* id */,
+ IPC::PlatformFileForTransit /* file_handle */)
+
+// Tell the renderer to disable AEC dump in all consumers.
+IPC_MESSAGE_CONTROL0(AecDumpMsg_DisableAecDump)
+
+// Messages sent from the renderer to the browser.
+
+// Registers a consumer with the browser. The consumer will then get a file
+// handle when the dump is enabled.
+IPC_MESSAGE_CONTROL1(AecDumpMsg_RegisterAecDumpConsumer,
+ int /* id */)
+
+// Unregisters a consumer with the browser.
+IPC_MESSAGE_CONTROL1(AecDumpMsg_UnregisterAecDumpConsumer,
+ int /* id */)
diff --git a/content/common/media/media_player_messages_android.h b/content/common/media/media_player_messages_android.h
index b1b4af4..4548f0b 100644
--- a/content/common/media/media_player_messages_android.h
+++ b/content/common/media/media_player_messages_android.h
@@ -62,6 +62,17 @@
IPC_ENUM_TRAITS(MediaPlayerHostMsg_Initialize_Type)
+// Parameters to describe a media player
+IPC_STRUCT_BEGIN(MediaPlayerHostMsg_Initialize_Params)
+ IPC_STRUCT_MEMBER(MediaPlayerHostMsg_Initialize_Type, type)
+ IPC_STRUCT_MEMBER(base::SharedMemoryHandle, metafile_data_handle)
+ IPC_STRUCT_MEMBER(int, player_id)
+ IPC_STRUCT_MEMBER(int, demuxer_client_id)
+ IPC_STRUCT_MEMBER(GURL, url)
+ IPC_STRUCT_MEMBER(GURL, first_party_for_cookies)
+ IPC_STRUCT_MEMBER(GURL, frame_url)
+IPC_STRUCT_END()
+
// Chrome for Android seek message sequence is:
// 1. Renderer->Browser MediaPlayerHostMsg_Seek
// This is the beginning of actual seek flow in response to web app requests
@@ -198,25 +209,10 @@
IPC_MESSAGE_ROUTED1(MediaPlayerHostMsg_DestroyMediaPlayer,
int /* player_id */)
-// Destroy all the players.
-IPC_MESSAGE_ROUTED0(MediaPlayerHostMsg_DestroyAllMediaPlayers)
-
-// Initialize a media player object with the given type and player_id. The other
-// parameters are used depending on the type of player.
-//
-// url: the URL to load when initializing a URL player.
-//
-// first_party_for_cookies: the cookie store to use when loading a URL.
-//
-// demuxer_client_id: the demuxer associated with this player when initializing
-// a media source player.
-IPC_MESSAGE_ROUTED5(
+// Initialize a media player object.
+IPC_MESSAGE_ROUTED1(
MediaPlayerHostMsg_Initialize,
- MediaPlayerHostMsg_Initialize_Type /* type */,
- int /* player_id */,
- GURL /* url */,
- GURL /* first_party_for_cookies */,
- int /* demuxer_client_id */)
+ MediaPlayerHostMsg_Initialize_Params);
// Pause the player.
IPC_MESSAGE_ROUTED2(MediaPlayerHostMsg_Pause,
diff --git a/content/common/media/media_stream_messages.h b/content/common/media/media_stream_messages.h
index 0afa9ec..0d33170 100644
--- a/content/common/media/media_stream_messages.h
+++ b/content/common/media/media_stream_messages.h
@@ -101,15 +101,6 @@
int /* request id */,
content::StreamDeviceInfoArray /* device_list */)
-// The browser hands over a file handle to the renderer to use for AEC dump.
-// TODO(grunell): This should not belong to media stream. Change when
-// refactoring MediaStreamDependencyFactory.
-IPC_MESSAGE_CONTROL1(MediaStreamMsg_EnableAecDump,
- IPC::PlatformFileForTransit /* file_handle */)
-
-// Tell the renderer to disable AEC dump.
-IPC_MESSAGE_CONTROL0(MediaStreamMsg_DisableAecDump)
-
// Messages sent from the renderer to the browser.
// Request a new media stream.
@@ -135,15 +126,14 @@
int /* request id */,
GURL /* origin */)
-
// Request to enumerate devices.
-// Used by Pepper.
-// TODO(vrk,wjia): Move this to pepper code.
-IPC_MESSAGE_CONTROL4(MediaStreamHostMsg_EnumerateDevices,
+// Used by Pepper and WebRTC.
+IPC_MESSAGE_CONTROL5(MediaStreamHostMsg_EnumerateDevices,
int /* render view id */,
int /* request id */,
content::MediaStreamType /* type */,
- GURL /* security origin */)
+ GURL /* security origin */,
+ bool /* hide_labels_if_no_access */)
// Request to stop enumerating devices.
IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_CancelEnumerateDevices,
diff --git a/content/common/media/midi_messages.h b/content/common/media/midi_messages.h
index f46f201..599f42c 100644
--- a/content/common/media/midi_messages.h
+++ b/content/common/media/midi_messages.h
@@ -29,15 +29,13 @@
// Messages for IPC between MidiDispatcher and MidiDispatcherHost.
// Renderer request to browser for using system exclusive messages.
-IPC_MESSAGE_CONTROL4(MidiHostMsg_RequestSysExPermission,
- int /* routing id */,
- int /* client id */,
- GURL /* origin */,
- bool /* user_gesture */)
+IPC_MESSAGE_ROUTED3(MidiHostMsg_RequestSysExPermission,
+ int /* client id */,
+ GURL /* origin */,
+ bool /* user_gesture */)
// Renderer request to browser for canceling a previous permission request.
-IPC_MESSAGE_CONTROL3(MidiHostMsg_CancelSysExPermissionRequest,
- int /* render_view_id */,
+IPC_MESSAGE_ROUTED2(MidiHostMsg_CancelSysExPermissionRequest,
int /* bridge_id */,
GURL /* GURL of the frame */)
@@ -45,7 +43,7 @@
IPC_MESSAGE_ROUTED2(MidiMsg_SysExPermissionApproved,
int /* client id */,
- bool /* success */)
+ bool /* is_allowed */)
// Messages for IPC between MidiMessageFilter and MidiHost.
diff --git a/content/common/mojo/OWNERS b/content/common/mojo/OWNERS
index 182689f..988215d 100644
--- a/content/common/mojo/OWNERS
+++ b/content/common/mojo/OWNERS
@@ -1,7 +1,6 @@
# Changes to IPC messages require a security review to avoid introducing
# new sandbox escapes.
per-file *_message*.h=set noparent
-per-file *_message*.h=cdn@chromium.org
per-file *_message*.h=cevans@chromium.org
per-file *_message*.h=dcheng@chromium.org
per-file *_message*.h=inferno@chromium.org
@@ -13,7 +12,6 @@
per-file *_message*.h=tsepez@chromium.org
per-file *param_traits*.h=set noparent
-per-file *param_traits*.h=cdn@chromium.org
per-file *param_traits*.h=cevans@chromium.org
per-file *param_traits*.h=dcheng@chromium.org
per-file *param_traits*.h=inferno@chromium.org
diff --git a/content/common/plugin_list_win.cc b/content/common/plugin_list_win.cc
index dfc1711..e7d4b4b 100644
--- a/content/common/plugin_list_win.cc
+++ b/content/common/plugin_list_win.cc
@@ -463,9 +463,13 @@
}
}
-#if !defined(ARCH_CPU_X86_64)
- // The plugin in question could be a 64 bit plugin which we cannot load.
base::FilePath plugin_path(info.path);
+#if defined(ARCH_CPU_X86_64)
+ // The plugin in question could be a 32 bit plugin which we cannot load.
+ if (IsValid32BitImage(base::MakeAbsoluteFilePath(plugin_path)))
+ return false;
+#else
+ // The plugin in question could be a 64 bit plugin which we cannot load.
if (!IsValid32BitImage(base::MakeAbsoluteFilePath(plugin_path)))
return false;
#endif
diff --git a/content/common/resource_messages.h b/content/common/resource_messages.h
index 86a9134..dc83e5a 100644
--- a/content/common/resource_messages.h
+++ b/content/common/resource_messages.h
@@ -167,7 +167,7 @@
IPC_STRUCT_MEMBER(uint32, request_context)
// Indicates which frame (or worker context) the request is being loaded into,
- // or kNoHostId.
+ // or kAppCacheNoHostId.
IPC_STRUCT_MEMBER(int, appcache_host_id)
// Indicates which frame (or worker context) the request is being loaded into,
diff --git a/content/common/sandbox_init_mac.cc b/content/common/sandbox_init_mac.cc
index fb3894c..d6f2112 100644
--- a/content/common/sandbox_init_mac.cc
+++ b/content/common/sandbox_init_mac.cc
@@ -76,4 +76,7 @@
return InitializeSandbox(sandbox_type, allowed_dir);
}
+extern const char kBootstrapPortNameForNPAPIPlugins[] =
+ "org.chromium.sandbox.real_bootstrap_server";
+
} // namespace content
diff --git a/content/common/sandbox_init_mac.h b/content/common/sandbox_init_mac.h
index d59fbf8..5407081 100644
--- a/content/common/sandbox_init_mac.h
+++ b/content/common/sandbox_init_mac.h
@@ -15,6 +15,14 @@
// returned.
bool InitializeSandbox();
+// The bootstrap server name of the real bootstrap port. This is never used
+// with bootstrap_register, but is instead used with a POLICY_SUBSTITUTE_PORT
+// in the bootstrap sandbox. In child processes, the the launchd/bootstrap
+// sandbox will have replaced the bootstrap port with one controlled by the
+// interception server. This server name can be used to request the original
+// server, from the browser, in NPAPI plugins.
+extern const char kBootstrapPortNameForNPAPIPlugins[];
+
} // namespace content
#endif // CONTENT_COMMON_SANDBOX_INIT_MAC_H_
diff --git a/content/common/sandbox_linux/sandbox_linux.h b/content/common/sandbox_linux/sandbox_linux.h
index d42fde3..6e4f8b3 100644
--- a/content/common/sandbox_linux/sandbox_linux.h
+++ b/content/common/sandbox_linux/sandbox_linux.h
@@ -33,7 +33,7 @@
// This isn't the full list, values < 32 are reserved for methods called from
// Skia.
enum LinuxSandboxIPCMethods {
- METHOD_GET_FONT_FAMILY_FOR_CHAR = 32,
+ METHOD_GET_FALLBACK_FONT_FOR_CHAR = 32,
METHOD_LOCALTIME = 33,
DEPRECATED_METHOD_GET_CHILD_WITH_INODE = 34,
METHOD_GET_STYLE_FOR_STRIKE = 35,
diff --git a/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc b/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc
index 8a6fa72..820b18b 100644
--- a/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc
+++ b/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc
@@ -42,9 +42,9 @@
// Make sure that seccomp-bpf does not get disabled by mistake. Also make sure
// that we think twice about this when adding a new architecture.
-#if !defined(ARCH_CPU_MIPS_FAMILY)
+#if !defined(ARCH_CPU_MIPS_FAMILY) && !defined(ARCH_CPU_ARM64)
#error "Seccomp-bpf disabled on supported architecture!"
-#endif // !defined(ARCH_CPU_MIPS_FAMILY)
+#endif // !defined(ARCH_CPU_MIPS_FAMILY) && !defined(ARCH_CPU_ARM64)
#endif //
diff --git a/content/common/sandbox_mac.mm b/content/common/sandbox_mac.mm
index f4ea8d5..9e508df 100644
--- a/content/common/sandbox_mac.mm
+++ b/content/common/sandbox_mac.mm
@@ -57,6 +57,7 @@
{ SANDBOX_TYPE_UTILITY, IDR_UTILITY_SANDBOX_PROFILE },
{ SANDBOX_TYPE_GPU, IDR_GPU_SANDBOX_PROFILE },
{ SANDBOX_TYPE_PPAPI, IDR_PPAPI_SANDBOX_PROFILE },
+ { SANDBOX_TYPE_NPAPI, -1 },
};
COMPILE_ASSERT(arraysize(kDefaultSandboxTypeToResourceIDMapping) == \
diff --git a/content/common/sandbox_mac_unittest_helper.mm b/content/common/sandbox_mac_unittest_helper.mm
index 2d38544..5b767b5 100644
--- a/content/common/sandbox_mac_unittest_helper.mm
+++ b/content/common/sandbox_mac_unittest_helper.mm
@@ -56,6 +56,9 @@
for(int i = static_cast<int>(SANDBOX_TYPE_FIRST_TYPE);
i < SANDBOX_TYPE_AFTER_LAST_TYPE;
++i) {
+ // This sandbox type is not enforced using a Seatbelt policy.
+ if (i == SANDBOX_TYPE_NPAPI)
+ continue;
if (!RunTestInSandbox(static_cast<SandboxType>(i),
test_name, test_data)) {
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc
index 355305e..18b30e2 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -333,7 +333,6 @@
#endif // NDEBUG
AddGenericDllEvictionPolicy(policy);
-
return true;
}
@@ -496,10 +495,14 @@
sandbox::JobLevel job_level,
uint32 ui_exceptions,
sandbox::TargetPolicy* policy) {
- if (ShouldSetJobLevel(cmd_line))
+ if (ShouldSetJobLevel(cmd_line)) {
+#ifdef _WIN64
+ policy->SetJobMemoryLimit(4ULL * 1024 * 1024 * 1024);
+#endif
policy->SetJobLevel(job_level, ui_exceptions);
- else
+ } else {
policy->SetJobLevel(sandbox::JOB_NONE, 0);
+ }
}
// TODO(jschuh): Need get these restrictions applied to NaCl and Pepper.
@@ -564,7 +567,7 @@
// 2670838, so a Win7 check is sufficient. We do not currently attempt to
// support Vista, where SP2 and the Platform Update are required.
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- return command_line.HasSwitch(switches::kEnableDirectWrite) &&
+ return !command_line.HasSwitch(switches::kDisableDirectWrite) &&
base::win::GetVersion() >= base::win::VERSION_WIN7;
}
@@ -610,8 +613,13 @@
type_str == switches::kRendererProcess &&
browser_command_line.HasSwitch(
switches::kEnableWin32kRendererLockDown)) {
- mitigations |= sandbox::MITIGATION_WIN32K_DISABLE;
- }
+ if (policy->AddRule(sandbox::TargetPolicy::SUBSYS_WIN32K_LOCKDOWN,
+ sandbox::TargetPolicy::FAKE_USER_GDI_INIT,
+ NULL) != sandbox::SBOX_ALL_OK) {
+ return 0;
+ }
+ mitigations |= sandbox::MITIGATION_WIN32K_DISABLE;
+ }
if (policy->SetProcessMitigations(mitigations) != sandbox::SBOX_ALL_OK)
return 0;
diff --git a/content/common/screen_orientation_messages.h b/content/common/screen_orientation_messages.h
index 5a845e7..b7336d6 100644
--- a/content/common/screen_orientation_messages.h
+++ b/content/common/screen_orientation_messages.h
@@ -29,6 +29,7 @@
// The browser process informs the renderer process that the screen orientation
// has changed. |orientation| contains the new screen orientation in degrees.
+// TODO(mlamouri): we could probably get rid of it.
IPC_MESSAGE_CONTROL1(ScreenOrientationMsg_OrientationChange,
blink::WebScreenOrientationType /* orientation */ )
@@ -36,28 +37,28 @@
// the lock actually succeeded. The message includes the new |angle| and |type|
// of orientation. The |request_id| passed when receiving the request is passed
// back so the renderer process can associate the response to the right request.
-IPC_MESSAGE_CONTROL3(ScreenOrientationMsg_LockSuccess,
- int, /* request_id */
- unsigned, /* angle */
- blink::WebScreenOrientationType /* type */)
+IPC_MESSAGE_ROUTED3(ScreenOrientationMsg_LockSuccess,
+ int, /* request_id */
+ unsigned, /* angle */
+ blink::WebScreenOrientationType /* type */)
// The browser process' response to a ScreenOrientationHostMsg_LockRequest when
// the lock actually failed. The message includes the |error| type. The
// |request_id| passed when receiving the request is passed back so the renderer
// process can associate the response to the right request.
-IPC_MESSAGE_CONTROL2(ScreenOrientationMsg_LockError,
- int, /* request_id */
- blink::WebLockOrientationCallback::ErrorType /* error */);
+IPC_MESSAGE_ROUTED2(ScreenOrientationMsg_LockError,
+ int, /* request_id */
+ blink::WebLockOrientationCallback::ErrorType /* error */);
// The renderer process requests the browser process to lock the screen
// orientation to the specified |orientations|. The request contains a
// |request_id| that will have to be passed back to the renderer process when
// notifying about a success or error (see ScreenOrientationMsg_LockError and
// ScreenOrientationMsg_LockSuccess).
-IPC_MESSAGE_CONTROL2(ScreenOrientationHostMsg_LockRequest,
- blink::WebScreenOrientationLockType, /* orientation */
- int /* request_id */)
+IPC_MESSAGE_ROUTED2(ScreenOrientationHostMsg_LockRequest,
+ blink::WebScreenOrientationLockType, /* orientation */
+ int /* request_id */)
// The renderer process requests the browser process to unlock the screen
// orientation.
-IPC_MESSAGE_CONTROL0(ScreenOrientationHostMsg_Unlock)
+IPC_MESSAGE_ROUTED0(ScreenOrientationHostMsg_Unlock)
diff --git a/content/common/service_worker/OWNERS b/content/common/service_worker/OWNERS
index d2af716..98927dc 100644
--- a/content/common/service_worker/OWNERS
+++ b/content/common/service_worker/OWNERS
@@ -7,7 +7,6 @@
# Changes to IPC messages require a security review to avoid introducing
# new sandbox escapes.
per-file *_messages*.h=set noparent
-per-file *_messages*.h=cdn@chromium.org
per-file *_messages*.h=cevans@chromium.org
per-file *_messages*.h=dcheng@chromium.org
per-file *_messages*.h=inferno@chromium.org
diff --git a/content/common/service_worker/service_worker_messages.h b/content/common/service_worker/service_worker_messages.h
index 5e6dc87..0b0cb4e 100644
--- a/content/common/service_worker/service_worker_messages.h
+++ b/content/common/service_worker/service_worker_messages.h
@@ -110,6 +110,8 @@
content::ServiceWorkerResponse)
IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_SyncEventFinished,
int /* request_id */)
+IPC_MESSAGE_ROUTED1(ServiceWorkerHostMsg_PushEventFinished,
+ int /* request_id */)
// Asks the browser to retrieve documents controlled by the sender
// ServiceWorker.
@@ -155,6 +157,13 @@
int /* handle_id */,
blink::WebServiceWorkerState)
+// Tells the child process to set the waiting ServiceWorker for the given
+// provider.
+IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_SetWaitingServiceWorker,
+ int /* thread_id */,
+ int /* provider_id */,
+ content::ServiceWorkerObjectInfo)
+
// Tells the child process to set the current ServiceWorker for the given
// provider.
IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_SetCurrentServiceWorker,
@@ -181,6 +190,9 @@
content::ServiceWorkerFetchRequest)
IPC_MESSAGE_CONTROL1(ServiceWorkerMsg_SyncEvent,
int /* request_id */)
+IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_PushEvent,
+ int /* request_id */,
+ std::string /* data */)
IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_MessageToWorker,
base::string16 /* message */,
std::vector<int> /* sent_message_port_ids */,
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index 5505194..3815910 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -363,6 +363,9 @@
// The type of input field
IPC_STRUCT_MEMBER(ui::TextInputType, type)
+ // The mode of input field
+ IPC_STRUCT_MEMBER(ui::TextInputMode, mode)
+
// The value of the input field
IPC_STRUCT_MEMBER(std::string, value)
@@ -686,6 +689,11 @@
std::string /* host */,
double /* zoom_level */)
+// Set the zoom level for a particular render view.
+IPC_MESSAGE_ROUTED2(ViewMsg_SetZoomLevelForView,
+ bool /* uses_temporary_zoom_level */,
+ double /* zoom_level */)
+
// Change encoding of page in the renderer.
IPC_MESSAGE_ROUTED1(ViewMsg_SetPageEncoding,
std::string /*new encoding name*/)
@@ -837,10 +845,9 @@
// This message is sent only if the worker successfully loaded the script.
IPC_MESSAGE_ROUTED0(ViewMsg_WorkerConnected)
-// Tells the renderer that the network state has changed so that
-// navigator.onLine and navigator.connection can be updated.
-IPC_MESSAGE_CONTROL2(ViewMsg_NetworkStateChanged,
- bool /* is_online */,
+// Tells the renderer that the network type has changed so that navigator.onLine
+// and navigator.connection can be updated.
+IPC_MESSAGE_CONTROL1(ViewMsg_NetworkTypeChanged,
net::NetworkChangeNotifier::ConnectionType /* type */)
// Reply to ViewHostMsg_OpenChannelToPpapiBroker
@@ -1288,11 +1295,6 @@
// ViewHostMsg_DidChangeScrollOffset works properly in this case.
IPC_MESSAGE_ROUTED0(ViewHostMsg_DidChangeScrollOffset)
-// Notifies that the pinned-to-side state of the content changed.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame,
- bool /* pinned_to_left */,
- bool /* pinned_to_right */)
-
// Notifies whether there are JavaScript touch event handlers or not.
IPC_MESSAGE_ROUTED1(ViewHostMsg_HasTouchEventHandlers,
bool /* has_handlers */)
@@ -1420,11 +1422,6 @@
IPC_MESSAGE_ROUTED1(ViewHostMsg_OpenDateTimeDialog,
ViewHostMsg_DateTimeDialogValue_Params /* value */)
-IPC_MESSAGE_ROUTED3(ViewHostMsg_TextInputTypeChanged,
- ui::TextInputType /* TextInputType of the focused node */,
- ui::TextInputMode /* TextInputMode of the focused node */,
- bool /* can_compose_inline in the focused node */)
-
// Required for updating text input state.
IPC_MESSAGE_ROUTED1(ViewHostMsg_TextInputStateChanged,
ViewHostMsg_TextInputState_Params /* input state params */)
@@ -1685,11 +1682,6 @@
// Instructs the browser to start plugin IME.
IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme)
-// Notifies that the scrollbars-visible state of the content changed.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_DidChangeScrollbarsForMainFrame,
- bool /* has_horizontal_scrollbar */,
- bool /* has_vertical_scrollbar */)
-
#elif defined(OS_WIN)
// Request that the given font characters be loaded by the browser so it's
// cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
diff --git a/content/common_aidl.target.darwin-arm.mk b/content/common_aidl.target.darwin-arm.mk
index 4d9dd27..da8ffb8 100644
--- a/content/common_aidl.target.darwin-arm.mk
+++ b/content/common_aidl.target.darwin-arm.mk
@@ -16,7 +16,7 @@
### Generated for rule "content_content_gyp_common_aidl_target_compile_aidl":
-# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/darwin/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
+# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/darwin/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
@@ -35,20 +35,10 @@
mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/darwin/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/IChildProcessService.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java"
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl $(PWD)/prebuilts/sdk/18/framework.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/common.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/Referrer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/CleanupReference.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/ContentSwitches.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/VibrationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SpeechRecognition.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ResourceExtractor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JavascriptInterface.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationEntry.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/HandleView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopup.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/CursorController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationHistory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewStatics.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PepperPluginManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentMain.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentApplication.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/darwin/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java"
-
-
GYP_GENERATED_OUTPUTS := \
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java
+ $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
@@ -112,6 +102,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -140,6 +131,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -208,6 +200,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -237,6 +230,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/common_aidl.target.darwin-arm64.mk b/content/common_aidl.target.darwin-arm64.mk
index 5c8f1b3..26c7fc0 100644
--- a/content/common_aidl.target.darwin-arm64.mk
+++ b/content/common_aidl.target.darwin-arm64.mk
@@ -16,7 +16,7 @@
### Generated for rule "content_content_gyp_common_aidl_target_compile_aidl":
-# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/darwin/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
+# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/darwin/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
@@ -35,20 +35,10 @@
mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/darwin/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/IChildProcessService.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java"
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl $(PWD)/prebuilts/sdk/18/framework.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/common.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/Referrer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/CleanupReference.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/ContentSwitches.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/VibrationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SpeechRecognition.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ResourceExtractor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JavascriptInterface.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationEntry.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/HandleView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopup.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/CursorController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationHistory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewStatics.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PepperPluginManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentMain.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentApplication.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/darwin/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java"
-
-
GYP_GENERATED_OUTPUTS := \
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java
+ $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
@@ -102,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -130,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -187,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -216,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/common_aidl.target.darwin-mips.mk b/content/common_aidl.target.darwin-mips.mk
index be580da..279da5b 100644
--- a/content/common_aidl.target.darwin-mips.mk
+++ b/content/common_aidl.target.darwin-mips.mk
@@ -16,7 +16,7 @@
### Generated for rule "content_content_gyp_common_aidl_target_compile_aidl":
-# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/darwin/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
+# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/darwin/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
@@ -35,20 +35,10 @@
mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/darwin/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/IChildProcessService.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java"
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl $(PWD)/prebuilts/sdk/18/framework.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/common.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/Referrer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/CleanupReference.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/ContentSwitches.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/VibrationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SpeechRecognition.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ResourceExtractor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JavascriptInterface.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationEntry.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/HandleView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopup.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/CursorController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationHistory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewStatics.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PepperPluginManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentMain.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentApplication.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/darwin/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java"
-
-
GYP_GENERATED_OUTPUTS := \
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java
+ $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
@@ -106,6 +96,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -134,6 +125,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -196,6 +188,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -225,6 +218,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/common_aidl.target.darwin-x86.mk b/content/common_aidl.target.darwin-x86.mk
index 72ed952..d8afe8e 100644
--- a/content/common_aidl.target.darwin-x86.mk
+++ b/content/common_aidl.target.darwin-x86.mk
@@ -16,7 +16,7 @@
### Generated for rule "content_content_gyp_common_aidl_target_compile_aidl":
-# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/darwin/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
+# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/darwin/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
@@ -35,20 +35,10 @@
mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/darwin/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/IChildProcessService.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java"
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl $(PWD)/prebuilts/sdk/18/framework.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/common.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/Referrer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/CleanupReference.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/ContentSwitches.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/VibrationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SpeechRecognition.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ResourceExtractor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JavascriptInterface.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationEntry.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/HandleView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopup.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/CursorController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationHistory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewStatics.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PepperPluginManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentMain.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentApplication.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/darwin/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java"
-
-
GYP_GENERATED_OUTPUTS := \
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java
+ $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
@@ -107,6 +97,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -135,6 +126,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -197,6 +189,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -226,6 +219,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/common_aidl.target.darwin-x86_64.mk b/content/common_aidl.target.darwin-x86_64.mk
index a845937..e823059 100644
--- a/content/common_aidl.target.darwin-x86_64.mk
+++ b/content/common_aidl.target.darwin-x86_64.mk
@@ -16,7 +16,7 @@
### Generated for rule "content_content_gyp_common_aidl_target_compile_aidl":
-# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/darwin/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
+# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/darwin/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
@@ -35,20 +35,10 @@
mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/darwin/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/IChildProcessService.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java"
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl $(PWD)/prebuilts/sdk/18/framework.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/common.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/Referrer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/CleanupReference.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/ContentSwitches.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/VibrationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SpeechRecognition.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ResourceExtractor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JavascriptInterface.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationEntry.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/HandleView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopup.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/CursorController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationHistory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewStatics.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PepperPluginManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentMain.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentApplication.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/darwin/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java"
-
-
GYP_GENERATED_OUTPUTS := \
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java
+ $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
@@ -106,6 +96,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -134,6 +125,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -195,6 +187,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -224,6 +217,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/common_aidl.target.linux-arm.mk b/content/common_aidl.target.linux-arm.mk
index cc90b10..917b2f9 100644
--- a/content/common_aidl.target.linux-arm.mk
+++ b/content/common_aidl.target.linux-arm.mk
@@ -16,7 +16,7 @@
### Generated for rule "content_content_gyp_common_aidl_target_compile_aidl":
-# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/linux/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
+# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/linux/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
@@ -35,20 +35,10 @@
mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/linux/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/IChildProcessService.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java"
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl $(PWD)/prebuilts/sdk/18/framework.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/common.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/Referrer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/CleanupReference.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/ContentSwitches.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/VibrationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SpeechRecognition.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ResourceExtractor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JavascriptInterface.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationEntry.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/HandleView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopup.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/CursorController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationHistory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewStatics.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PepperPluginManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentMain.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentApplication.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/linux/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java"
-
-
GYP_GENERATED_OUTPUTS := \
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java
+ $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
@@ -112,6 +102,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -140,6 +131,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -208,6 +200,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -237,6 +230,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/common_aidl.target.linux-arm64.mk b/content/common_aidl.target.linux-arm64.mk
index 25a513e..59a00e5 100644
--- a/content/common_aidl.target.linux-arm64.mk
+++ b/content/common_aidl.target.linux-arm64.mk
@@ -16,7 +16,7 @@
### Generated for rule "content_content_gyp_common_aidl_target_compile_aidl":
-# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/linux/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
+# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/linux/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
@@ -35,20 +35,10 @@
mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/linux/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/IChildProcessService.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java"
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl $(PWD)/prebuilts/sdk/18/framework.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/common.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/Referrer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/CleanupReference.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/ContentSwitches.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/VibrationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SpeechRecognition.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ResourceExtractor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JavascriptInterface.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationEntry.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/HandleView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopup.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/CursorController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationHistory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewStatics.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PepperPluginManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentMain.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentApplication.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/linux/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java"
-
-
GYP_GENERATED_OUTPUTS := \
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java
+ $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
@@ -102,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -130,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -187,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -216,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/common_aidl.target.linux-mips.mk b/content/common_aidl.target.linux-mips.mk
index 88c7032..aef621d 100644
--- a/content/common_aidl.target.linux-mips.mk
+++ b/content/common_aidl.target.linux-mips.mk
@@ -16,7 +16,7 @@
### Generated for rule "content_content_gyp_common_aidl_target_compile_aidl":
-# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/linux/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
+# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/linux/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
@@ -35,20 +35,10 @@
mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/linux/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/IChildProcessService.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java"
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl $(PWD)/prebuilts/sdk/18/framework.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/common.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/Referrer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/CleanupReference.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/ContentSwitches.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/VibrationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SpeechRecognition.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ResourceExtractor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JavascriptInterface.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationEntry.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/HandleView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopup.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/CursorController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationHistory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewStatics.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PepperPluginManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentMain.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentApplication.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/linux/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java"
-
-
GYP_GENERATED_OUTPUTS := \
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java
+ $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
@@ -106,6 +96,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -134,6 +125,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -196,6 +188,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -225,6 +218,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/common_aidl.target.linux-x86.mk b/content/common_aidl.target.linux-x86.mk
index cfc77aa..43030c2 100644
--- a/content/common_aidl.target.linux-x86.mk
+++ b/content/common_aidl.target.linux-x86.mk
@@ -16,7 +16,7 @@
### Generated for rule "content_content_gyp_common_aidl_target_compile_aidl":
-# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/linux/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
+# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/linux/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
@@ -35,20 +35,10 @@
mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/linux/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/IChildProcessService.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java"
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl $(PWD)/prebuilts/sdk/18/framework.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/common.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/Referrer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/CleanupReference.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/ContentSwitches.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/VibrationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SpeechRecognition.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ResourceExtractor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JavascriptInterface.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationEntry.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/HandleView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopup.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/CursorController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationHistory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewStatics.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PepperPluginManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentMain.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentApplication.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/linux/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java"
-
-
GYP_GENERATED_OUTPUTS := \
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java
+ $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
@@ -107,6 +97,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -135,6 +126,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -197,6 +189,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -226,6 +219,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/common_aidl.target.linux-x86_64.mk b/content/common_aidl.target.linux-x86_64.mk
index c8d8bf6..8d9bfa8 100644
--- a/content/common_aidl.target.linux-x86_64.mk
+++ b/content/common_aidl.target.linux-x86_64.mk
@@ -16,7 +16,7 @@
### Generated for rule "content_content_gyp_common_aidl_target_compile_aidl":
-# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/linux/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
+# "{'inputs': ['$(PWD)/prebuilts/sdk/18/framework.aidl', 'public/android/java/src/org/chromium/content/common/common.aidl', 'public/android/java/src/org/chromium/content_public/Referrer.java', 'public/android/java/src/org/chromium/content_public/browser/NavigationController.java', 'public/android/java/src/org/chromium/content_public/browser/WebContents.java', 'public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java', 'public/android/java/src/org/chromium/content/common/CleanupReference.java', 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.java', 'public/android/java/src/org/chromium/content/common/ContentSwitches.java', 'public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java', 'public/android/java/src/org/chromium/content/browser/ContentSettings.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java', 'public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java', 'public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java', 'public/android/java/src/org/chromium/content/browser/DownloadInfo.java', 'public/android/java/src/org/chromium/content/browser/VibrationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java', 'public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java', 'public/android/java/src/org/chromium/content/browser/PopupZoomer.java', 'public/android/java/src/org/chromium/content/browser/SpeechRecognition.java', 'public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java', 'public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/ResourceExtractor.java', 'public/android/java/src/org/chromium/content/browser/LoadUrlParams.java', 'public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java', 'public/android/java/src/org/chromium/content/browser/ContentView.java', 'public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java', 'public/android/java/src/org/chromium/content/browser/BrowserStartupController.java', 'public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java', 'public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java', 'public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java', 'public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java', 'public/android/java/src/org/chromium/content/browser/ContentViewCore.java', 'public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java', 'public/android/java/src/org/chromium/content/browser/DownloadController.java', 'public/android/java/src/org/chromium/content/browser/ContentViewClient.java', 'public/android/java/src/org/chromium/content/browser/DeviceSensors.java', 'public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java', 'public/android/java/src/org/chromium/content/browser/DeviceUtils.java', 'public/android/java/src/org/chromium/content/browser/JavascriptInterface.java', 'public/android/java/src/org/chromium/content/browser/BindingManager.java', 'public/android/java/src/org/chromium/content/browser/ContentVideoView.java', 'public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java', 'public/android/java/src/org/chromium/content/browser/NavigationEntry.java', 'public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java', 'public/android/java/src/org/chromium/content/browser/PositionObserver.java', 'public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPicker.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java', 'public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java', 'public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java', 'public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java', 'public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/HandleView.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadList.java', 'public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopup.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPicker.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java', 'public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java', 'public/android/java/src/org/chromium/content/browser/input/CursorController.java', 'public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java', 'public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java', 'public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java', 'public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java', 'public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java', 'public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java', 'public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java', 'public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java', 'public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java', 'public/android/java/src/org/chromium/content/browser/RenderCoordinates.java', 'public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java', 'public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java', 'public/android/java/src/org/chromium/content/browser/NavigationHistory.java', 'public/android/java/src/org/chromium/content/browser/NavigationClient.java', 'public/android/java/src/org/chromium/content/browser/ContentViewStatics.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java', 'public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java', 'public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java', 'public/android/java/src/org/chromium/content/browser/PepperPluginManager.java', 'public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java', 'public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java', 'public/android/java/src/org/chromium/content/app/ChildProcessService.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java', 'public/android/java/src/org/chromium/content/app/ContentMain.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java', 'public/android/java/src/org/chromium/content/app/ContentApplication.java', 'public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java', 'public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java'], 'extension': 'aidl', 'rule_sources': ['public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl', 'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl'], 'rule_name': 'compile_aidl', 'outputs': ['$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java'], 'action': ['$(PWD)/prebuilts/sdk/tools/linux/aidl', '-p$(PWD)/prebuilts/sdk/18/framework.aidl', '-ppublic/android/java/src/org/chromium/content/common/common.aidl', '-Ipublic/android/java/src', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/common_aidl/aidl/%(INPUT_ROOT)s.java']}":
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_local_path := $(LOCAL_PATH)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
@@ -35,20 +35,10 @@
mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/linux/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/IChildProcessService.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java"
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java: $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl $(PWD)/prebuilts/sdk/18/framework.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/common.aidl $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/Referrer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/NavigationController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/WebContents.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/CleanupReference.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/common/ContentSwitches.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanAccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/JellyBeanBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/KitKatBrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PowerSaveBlocker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/VibrationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TimeZoneMonitor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SpeechRecognition.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentReadbackHandler.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationListener.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ResourceExtractor.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/InterstitialPageDelegateAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BatteryStatusManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewLegacy.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/CipherFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/crypto/ByteArrayGenerator.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DownloadController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/DeviceUtils.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/JavascriptInterface.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TracingControllerAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationEntry.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadDevice.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ChromeDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeChooserAndroid.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/HandleView.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MultiFieldTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateDialogNormalizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopup.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimePickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestionListAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupAdapter.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/DateTimeSuggestion.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/CursorController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/WeekPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InputDialogContainer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/MonthPickerDialog.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/TwoFieldDatePicker.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/InsertionHandleController.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/input/GamepadMappings.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/MediaDrmCredentialManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/FileDescriptorInfo.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/BindingManagerImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/TouchEventSynthesizer.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationHistory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/NavigationClient.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ContentViewStatics.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnectionImpl.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/PepperPluginManager.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/browser/ViewPositionObserver.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService10.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService8.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService9.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService2.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService6.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService4.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService12.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService3.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService1.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService5.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService0.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentMain.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService7.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/ContentApplication.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService11.java $(LOCAL_PATH)/content/public/android/java/src/org/chromium/content/app/PrivilegedProcessService2.java $(GYP_TARGET_DEPENDENCIES)
- mkdir -p $(gyp_shared_intermediate_dir)/common_aidl/aidl; cd $(gyp_local_path)/content; "$(PWD)/prebuilts/sdk/tools/linux/aidl" "-p$(PWD)/prebuilts/sdk/18/framework.aidl" -ppublic/android/java/src/org/chromium/content/common/common.aidl -Ipublic/android/java/src public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl "$(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java"
-
-
GYP_GENERATED_OUTPUTS := \
$(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessCallback.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java \
- $(gyp_shared_intermediate_dir)/common_aidl/aidl/SurfaceWrapper.java
+ $(gyp_shared_intermediate_dir)/common_aidl/aidl/IChildProcessService.java
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
@@ -106,6 +96,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -134,6 +125,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -195,6 +187,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -224,6 +217,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content.gni b/content/content.gni
new file mode 100644
index 0000000..cd1b86e
--- /dev/null
+++ b/content/content.gni
@@ -0,0 +1,12 @@
+# Copyright 2014 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.
+
+if (is_win) {
+ directxsdk_exists =
+ (exec_script("//build/dir_exists.py",
+ [ rebase_path("//third_party/directxsdk", root_build_dir) ],
+ "trim string") == "True")
+} else {
+ directxsdk_exists = false
+}
diff --git a/content/content.gyp b/content/content.gyp
index b9ecad5..cb0353a 100644
--- a/content/content.gyp
+++ b/content/content.gyp
@@ -371,7 +371,6 @@
'sources': [
'public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl',
'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl',
- 'public/android/java/src/org/chromium/content/common/SurfaceWrapper.aidl',
],
'includes': [ '../build/java_aidl.gypi' ],
},
diff --git a/content/content_app_both.target.darwin-arm.mk b/content/content_app_both.target.darwin-arm.mk
index c0ea608..f700cbf 100644
--- a/content/content_app_both.target.darwin-arm.mk
+++ b/content/content_app_both.target.darwin-arm.mk
@@ -90,6 +90,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -113,11 +114,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -141,6 +142,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -161,7 +163,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -230,6 +231,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -253,11 +255,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -282,6 +284,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -302,7 +305,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_app_both.target.darwin-arm64.mk b/content/content_app_both.target.darwin-arm64.mk
index ba1eeaf..7e65372 100644
--- a/content/content_app_both.target.darwin-arm64.mk
+++ b/content/content_app_both.target.darwin-arm64.mk
@@ -80,6 +80,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -103,11 +104,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -131,6 +132,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -151,7 +153,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -209,6 +210,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -232,11 +234,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -261,6 +263,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -281,7 +284,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_app_both.target.darwin-mips.mk b/content/content_app_both.target.darwin-mips.mk
index 843d847..a0a37aa 100644
--- a/content/content_app_both.target.darwin-mips.mk
+++ b/content/content_app_both.target.darwin-mips.mk
@@ -84,6 +84,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -107,11 +108,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -135,6 +136,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -155,7 +157,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -218,6 +219,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -241,11 +243,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -270,6 +272,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -290,7 +293,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_app_both.target.darwin-x86.mk b/content/content_app_both.target.darwin-x86.mk
index e780cbb..34dba96 100644
--- a/content/content_app_both.target.darwin-x86.mk
+++ b/content/content_app_both.target.darwin-x86.mk
@@ -85,6 +85,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -107,11 +108,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -135,6 +136,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -155,7 +157,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -218,6 +219,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -240,11 +242,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -269,6 +271,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -289,7 +292,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_app_both.target.darwin-x86_64.mk b/content/content_app_both.target.darwin-x86_64.mk
index 09767c1..a2c068c 100644
--- a/content/content_app_both.target.darwin-x86_64.mk
+++ b/content/content_app_both.target.darwin-x86_64.mk
@@ -84,6 +84,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -107,11 +108,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -135,6 +136,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -155,7 +157,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -217,6 +218,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -240,11 +242,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -269,6 +271,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -289,7 +292,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_app_both.target.linux-arm.mk b/content/content_app_both.target.linux-arm.mk
index c0ea608..f700cbf 100644
--- a/content/content_app_both.target.linux-arm.mk
+++ b/content/content_app_both.target.linux-arm.mk
@@ -90,6 +90,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -113,11 +114,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -141,6 +142,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -161,7 +163,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -230,6 +231,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -253,11 +255,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -282,6 +284,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -302,7 +305,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_app_both.target.linux-arm64.mk b/content/content_app_both.target.linux-arm64.mk
index ba1eeaf..7e65372 100644
--- a/content/content_app_both.target.linux-arm64.mk
+++ b/content/content_app_both.target.linux-arm64.mk
@@ -80,6 +80,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -103,11 +104,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -131,6 +132,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -151,7 +153,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -209,6 +210,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -232,11 +234,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -261,6 +263,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -281,7 +284,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_app_both.target.linux-mips.mk b/content/content_app_both.target.linux-mips.mk
index 843d847..a0a37aa 100644
--- a/content/content_app_both.target.linux-mips.mk
+++ b/content/content_app_both.target.linux-mips.mk
@@ -84,6 +84,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -107,11 +108,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -135,6 +136,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -155,7 +157,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -218,6 +219,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -241,11 +243,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -270,6 +272,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -290,7 +293,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_app_both.target.linux-x86.mk b/content/content_app_both.target.linux-x86.mk
index e780cbb..34dba96 100644
--- a/content/content_app_both.target.linux-x86.mk
+++ b/content/content_app_both.target.linux-x86.mk
@@ -85,6 +85,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -107,11 +108,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -135,6 +136,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -155,7 +157,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -218,6 +219,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -240,11 +242,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -269,6 +271,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -289,7 +292,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_app_both.target.linux-x86_64.mk b/content/content_app_both.target.linux-x86_64.mk
index 09767c1..a2c068c 100644
--- a/content/content_app_both.target.linux-x86_64.mk
+++ b/content/content_app_both.target.linux-x86_64.mk
@@ -84,6 +84,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -107,11 +108,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -135,6 +136,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -155,7 +157,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -217,6 +218,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -240,11 +242,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -269,6 +271,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -289,7 +292,6 @@
$(LOCAL_PATH)/third_party/skia/include/ports \
$(LOCAL_PATH)/third_party/skia/include/utils \
$(LOCAL_PATH)/skia/ext \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_browser.gypi b/content/content_browser.gypi
index cb4e417..5281722 100644
--- a/content/content_browser.gypi
+++ b/content/content_browser.gypi
@@ -32,6 +32,8 @@
# have to export the blink header settings so that relative paths in these
# headers resolve correctly.
'../third_party/WebKit/public/blink_headers.gyp:blink_headers',
+ # The public render_widget_host.h needs to re-export skia defines.
+ '../skia/skia.gyp:skia',
],
'include_dirs': [
'..',
@@ -51,6 +53,8 @@
'public/browser/android/synchronous_compositor_client.h',
'public/browser/android/synchronous_compositor.cc',
'public/browser/android/synchronous_compositor.h',
+ 'public/browser/android/ui_resource_client_android.h',
+ 'public/browser/android/ui_resource_provider.h',
'public/browser/ax_event_notification_details.cc',
'public/browser/ax_event_notification_details.h',
'public/browser/blob_handle.h',
@@ -117,7 +121,6 @@
'public/browser/favicon_status.h',
'public/browser/file_descriptor_info.h',
'public/browser/font_list_async.h',
- 'public/browser/geolocation_permission_context.h',
'public/browser/geolocation_provider.h',
'public/browser/global_request_id.h',
'public/browser/gpu_data_manager.h',
@@ -306,6 +309,8 @@
'browser/android/tracing_controller_android.h',
'browser/android/web_contents_observer_android.cc',
'browser/android/web_contents_observer_android.h',
+ 'browser/android/ui_resource_provider_impl.cc',
+ 'browser/android/ui_resource_provider_impl.h',
'browser/appcache/appcache_dispatcher_host.cc',
'browser/appcache/appcache_dispatcher_host.h',
'browser/appcache/appcache_frontend_proxy.cc',
@@ -323,6 +328,8 @@
'browser/battery_status/battery_status_message_filter.h',
'browser/battery_status/battery_status_service.cc',
'browser/battery_status/battery_status_service.h',
+ 'browser/bootstrap_sandbox_mac.cc',
+ 'browser/bootstrap_sandbox_mac.h',
'browser/browser_child_process_host_impl.cc',
'browser/browser_child_process_host_impl.h',
'browser/browser_context.cc',
@@ -358,45 +365,6 @@
'browser/child_process_launcher.h',
'browser/child_process_security_policy_impl.cc',
'browser/child_process_security_policy_impl.h',
- 'browser/compositor/browser_compositor_output_surface.cc',
- 'browser/compositor/browser_compositor_output_surface.h',
- 'browser/compositor/browser_compositor_output_surface_proxy.cc',
- 'browser/compositor/browser_compositor_output_surface_proxy.h',
- 'browser/compositor/browser_compositor_view_mac.mm',
- 'browser/compositor/browser_compositor_view_mac.h',
- 'browser/compositor/delegated_frame_host.cc',
- 'browser/compositor/delegated_frame_host.h',
- 'browser/compositor/gpu_process_transport_factory.cc',
- 'browser/compositor/gpu_process_transport_factory.h',
- 'browser/compositor/image_transport_factory.cc',
- 'browser/compositor/image_transport_factory.h',
- 'browser/compositor/no_transport_image_transport_factory.cc',
- 'browser/compositor/no_transport_image_transport_factory.h',
- 'browser/compositor/onscreen_display_client.cc',
- 'browser/compositor/onscreen_display_client.h',
- 'browser/compositor/overlay_candidate_validator_ozone.cc',
- 'browser/compositor/overlay_candidate_validator_ozone.h',
- 'browser/compositor/owned_mailbox.h',
- 'browser/compositor/owned_mailbox.cc',
- 'browser/compositor/reflector_impl.cc',
- 'browser/compositor/reflector_impl.h',
- 'browser/compositor/resize_lock.cc',
- 'browser/compositor/resize_lock.h',
- 'browser/compositor/gpu_browser_compositor_output_surface.cc',
- 'browser/compositor/gpu_browser_compositor_output_surface.h',
- 'browser/compositor/software_browser_compositor_output_surface.cc',
- 'browser/compositor/software_browser_compositor_output_surface.h',
- 'browser/compositor/software_output_device_mac.mm',
- 'browser/compositor/software_output_device_mac.h',
- 'browser/compositor/software_output_device_ozone.cc',
- 'browser/compositor/software_output_device_ozone.h',
- 'browser/compositor/software_output_device_win.cc',
- 'browser/compositor/software_output_device_win.h',
- 'browser/compositor/software_output_device_x11.cc',
- 'browser/compositor/software_output_device_x11.h',
- 'browser/compositor/surface_display_output_surface.cc',
- 'browser/compositor/surface_display_output_surface.h',
- 'browser/context_factory.cc',
'browser/cross_site_request_manager.cc',
'browser/cross_site_request_manager.h',
'browser/devtools/devtools_agent_host_impl.cc',
@@ -692,6 +660,8 @@
'browser/indexed_db/indexed_db_blob_info.h',
'browser/indexed_db/indexed_db_callbacks.cc',
'browser/indexed_db/indexed_db_callbacks.h',
+ 'browser/indexed_db/indexed_db_class_factory.cc',
+ 'browser/indexed_db/indexed_db_class_factory.h',
'browser/indexed_db/indexed_db_connection.cc',
'browser/indexed_db/indexed_db_connection.h',
'browser/indexed_db/indexed_db_context_impl.cc',
@@ -789,8 +759,6 @@
'browser/media/android/media_drm_credential_manager.h',
'browser/media/android/media_resource_getter_impl.cc',
'browser/media/android/media_resource_getter_impl.h',
- 'browser/media/android/media_web_contents_observer.cc',
- 'browser/media/android/media_web_contents_observer.h',
'browser/media/capture/audio_mirroring_manager.cc',
'browser/media/capture/audio_mirroring_manager.h',
'browser/media/capture/content_video_capture_device_core.cc',
@@ -813,6 +781,10 @@
'browser/media/media_internals_proxy.h',
'browser/media/media_internals_ui.cc',
'browser/media/media_internals_ui.h',
+ 'browser/media/midi_dispatcher_host.cc',
+ 'browser/media/midi_dispatcher_host.h',
+ 'browser/media/midi_host.cc',
+ 'browser/media/midi_host.h',
'browser/media/webrtc_identity_store.cc',
'browser/media/webrtc_identity_store.h',
'browser/media/webrtc_identity_store_backend.cc',
@@ -835,17 +807,6 @@
'browser/net/view_http_cache_job_factory.h',
'browser/notification_service_impl.cc',
'browser/notification_service_impl.h',
- 'browser/pepper_flash_settings_helper_impl.cc',
- 'browser/pepper_flash_settings_helper_impl.h',
- 'browser/plugin_data_remover_impl.cc',
- 'browser/plugin_data_remover_impl.h',
- 'browser/plugin_loader_posix.cc',
- 'browser/plugin_loader_posix.h',
- 'browser/plugin_process_host.cc',
- 'browser/plugin_process_host.h',
- 'browser/plugin_process_host_mac.cc',
- 'browser/plugin_service_impl.cc',
- 'browser/plugin_service_impl.h',
'browser/power_monitor_message_broadcaster.cc',
'browser/power_monitor_message_broadcaster.h',
'browser/power_profiler/power_data_provider.h',
@@ -863,8 +824,6 @@
'browser/power_save_blocker_ozone.cc',
'browser/power_save_blocker_win.cc',
'browser/power_save_blocker_x11.cc',
- 'browser/ppapi_plugin_process_host.cc',
- 'browser/ppapi_plugin_process_host.h',
'browser/profiler_controller_impl.cc',
'browser/profiler_controller_impl.h',
'browser/profiler_message_filter.cc',
@@ -964,20 +923,6 @@
'browser/renderer_host/input/web_input_event_util.h',
'browser/renderer_host/input/web_input_event_util_posix.cc',
'browser/renderer_host/input/web_input_event_util_posix.h',
- 'browser/renderer_host/java/java_bound_object.cc',
- 'browser/renderer_host/java/java_bound_object.h',
- 'browser/renderer_host/java/java_bridge_channel_host.cc',
- 'browser/renderer_host/java/java_bridge_channel_host.h',
- 'browser/renderer_host/java/java_bridge_dispatcher_host.cc',
- 'browser/renderer_host/java/java_bridge_dispatcher_host.h',
- 'browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc',
- 'browser/renderer_host/java/java_bridge_dispatcher_host_manager.h',
- 'browser/renderer_host/java/java_method.cc',
- 'browser/renderer_host/java/java_method.h',
- 'browser/renderer_host/java/java_type.cc',
- 'browser/renderer_host/java/java_type.h',
- 'browser/renderer_host/java/jni_helper.cc',
- 'browser/renderer_host/java/jni_helper.h',
'browser/renderer_host/legacy_render_widget_host_win.cc',
'browser/renderer_host/legacy_render_widget_host_win.h',
'browser/renderer_host/media/audio_input_device_manager.cc',
@@ -1004,10 +949,6 @@
'browser/renderer_host/media/media_stream_track_metrics_host.h',
'browser/renderer_host/media/media_stream_ui_proxy.cc',
'browser/renderer_host/media/media_stream_ui_proxy.h',
- 'browser/renderer_host/media/midi_dispatcher_host.cc',
- 'browser/renderer_host/media/midi_dispatcher_host.h',
- 'browser/renderer_host/media/midi_host.cc',
- 'browser/renderer_host/media/midi_host.h',
'browser/renderer_host/media/video_capture_buffer_pool.cc',
'browser/renderer_host/media/video_capture_buffer_pool.h',
'browser/renderer_host/media/video_capture_controller.cc',
@@ -1028,63 +969,6 @@
'browser/renderer_host/overscroll_controller.cc',
'browser/renderer_host/overscroll_controller.h',
'browser/renderer_host/overscroll_controller_delegate.h',
- 'browser/renderer_host/pepper/browser_ppapi_host_impl.cc',
- 'browser/renderer_host/pepper/browser_ppapi_host_impl.h',
- 'browser/renderer_host/pepper/content_browser_pepper_host_factory.cc',
- 'browser/renderer_host/pepper/content_browser_pepper_host_factory.h',
- 'browser/renderer_host/pepper/pepper_browser_font_singleton_host.cc',
- 'browser/renderer_host/pepper/pepper_browser_font_singleton_host.h',
- 'browser/renderer_host/pepper/pepper_external_file_ref_backend.cc',
- 'browser/renderer_host/pepper/pepper_external_file_ref_backend.h',
- 'browser/renderer_host/pepper/pepper_file_io_host.cc',
- 'browser/renderer_host/pepper/pepper_file_io_host.h',
- 'browser/renderer_host/pepper/pepper_file_ref_host.cc',
- 'browser/renderer_host/pepper/pepper_file_ref_host.h',
- 'browser/renderer_host/pepper/pepper_file_system_browser_host.cc',
- 'browser/renderer_host/pepper/pepper_file_system_browser_host.h',
- 'browser/renderer_host/pepper/pepper_flash_file_message_filter.cc',
- 'browser/renderer_host/pepper/pepper_flash_file_message_filter.h',
- 'browser/renderer_host/pepper/pepper_gamepad_host.cc',
- 'browser/renderer_host/pepper/pepper_gamepad_host.h',
- 'browser/renderer_host/pepper/pepper_host_resolver_message_filter.cc',
- 'browser/renderer_host/pepper/pepper_host_resolver_message_filter.h',
- 'browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc',
- 'browser/renderer_host/pepper/pepper_internal_file_ref_backend.h',
- 'browser/renderer_host/pepper/pepper_lookup_request.h',
- 'browser/renderer_host/pepper/pepper_message_filter.cc',
- 'browser/renderer_host/pepper/pepper_message_filter.h',
- 'browser/renderer_host/pepper/pepper_network_monitor_host.cc',
- 'browser/renderer_host/pepper/pepper_network_monitor_host.h',
- 'browser/renderer_host/pepper/pepper_network_proxy_host.cc',
- 'browser/renderer_host/pepper/pepper_network_proxy_host.h',
- 'browser/renderer_host/pepper/pepper_print_settings_manager.cc',
- 'browser/renderer_host/pepper/pepper_print_settings_manager.h',
- 'browser/renderer_host/pepper/pepper_printing_host.cc',
- 'browser/renderer_host/pepper/pepper_printing_host.h',
- 'browser/renderer_host/pepper/pepper_renderer_connection.cc',
- 'browser/renderer_host/pepper/pepper_renderer_connection.h',
- 'browser/renderer_host/pepper/pepper_security_helper.cc',
- 'browser/renderer_host/pepper/pepper_security_helper.h',
- 'browser/renderer_host/pepper/pepper_socket_utils.cc',
- 'browser/renderer_host/pepper/pepper_socket_utils.h',
- 'browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc',
- 'browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.h',
- 'browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc',
- 'browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h',
- 'browser/renderer_host/pepper/pepper_truetype_font_list.h',
- 'browser/renderer_host/pepper/pepper_truetype_font_list_android.cc',
- 'browser/renderer_host/pepper/pepper_truetype_font_list_host.cc',
- 'browser/renderer_host/pepper/pepper_truetype_font_list_host.h',
- 'browser/renderer_host/pepper/pepper_truetype_font_list_ozone.cc',
- 'browser/renderer_host/pepper/pepper_truetype_font_list_pango.cc',
- 'browser/renderer_host/pepper/pepper_truetype_font_list_mac.mm',
- 'browser/renderer_host/pepper/pepper_truetype_font_list_win.cc',
- 'browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc',
- 'browser/renderer_host/pepper/pepper_udp_socket_message_filter.h',
- 'browser/renderer_host/pepper/quota_reservation.cc',
- 'browser/renderer_host/pepper/quota_reservation.h',
- 'browser/renderer_host/pepper/ssl_context_helper.cc',
- 'browser/renderer_host/pepper/ssl_context_helper.h',
'browser/renderer_host/popup_menu_helper_mac.h',
'browser/renderer_host/popup_menu_helper_mac.mm',
'browser/renderer_host/render_message_filter.cc',
@@ -1182,6 +1066,8 @@
'browser/service_worker/service_worker_fetch_dispatcher.h',
'browser/service_worker/service_worker_handle.cc',
'browser/service_worker/service_worker_handle.h',
+ 'browser/service_worker/service_worker_histograms.cc',
+ 'browser/service_worker/service_worker_histograms.h',
'browser/service_worker/service_worker_info.cc',
'browser/service_worker/service_worker_info.h',
'browser/service_worker/service_worker_internals_ui.cc',
@@ -1396,6 +1282,166 @@
'<(SHARED_INTERMEDIATE_DIR)/content/browser/devtools/devtools_protocol_constants.cc',
'<(SHARED_INTERMEDIATE_DIR)/content/browser/devtools/devtools_protocol_constants.h',
],
+ 'android_browser_sources': [
+ 'browser/renderer_host/java/gin_java_bound_object.h',
+ 'browser/renderer_host/java/gin_java_method_invocation_helper.cc',
+ 'browser/renderer_host/java/gin_java_method_invocation_helper.h',
+ 'browser/renderer_host/java/gin_java_script_to_java_types_coercion.cc',
+ 'browser/renderer_host/java/gin_java_script_to_java_types_coercion.h',
+ 'browser/renderer_host/java/java_bound_object.cc',
+ 'browser/renderer_host/java/java_bound_object.h',
+ 'browser/renderer_host/java/java_bridge_channel_host.cc',
+ 'browser/renderer_host/java/java_bridge_channel_host.h',
+ 'browser/renderer_host/java/java_bridge_dispatcher_host.cc',
+ 'browser/renderer_host/java/java_bridge_dispatcher_host.h',
+ 'browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc',
+ 'browser/renderer_host/java/java_bridge_dispatcher_host_manager.h',
+ 'browser/renderer_host/java/java_method.cc',
+ 'browser/renderer_host/java/java_method.h',
+ 'browser/renderer_host/java/java_type.cc',
+ 'browser/renderer_host/java/java_type.h',
+ 'browser/renderer_host/java/jni_helper.cc',
+ 'browser/renderer_host/java/jni_helper.h',
+ ],
+ 'webrtc_browser_sources': [
+ 'browser/media/webrtc_internals.cc',
+ 'browser/media/webrtc_internals.h',
+ 'browser/media/webrtc_internals_message_handler.cc',
+ 'browser/media/webrtc_internals_message_handler.h',
+ 'browser/media/webrtc_internals_ui.cc',
+ 'browser/media/webrtc_internals_ui.h',
+ 'browser/media/webrtc_internals_ui_observer.h',
+ 'browser/renderer_host/media/peer_connection_tracker_host.cc',
+ 'browser/renderer_host/media/peer_connection_tracker_host.h',
+ 'browser/renderer_host/media/webrtc_identity_service_host.cc',
+ 'browser/renderer_host/media/webrtc_identity_service_host.h',
+ 'browser/renderer_host/p2p/socket_host.cc',
+ 'browser/renderer_host/p2p/socket_host.h',
+ 'browser/renderer_host/p2p/socket_host_tcp.cc',
+ 'browser/renderer_host/p2p/socket_host_tcp.h',
+ 'browser/renderer_host/p2p/socket_host_tcp_server.cc',
+ 'browser/renderer_host/p2p/socket_host_tcp_server.h',
+ 'browser/renderer_host/p2p/socket_host_throttler.cc',
+ 'browser/renderer_host/p2p/socket_host_throttler.h',
+ 'browser/renderer_host/p2p/socket_host_udp.cc',
+ 'browser/renderer_host/p2p/socket_host_udp.h',
+ 'browser/renderer_host/p2p/socket_dispatcher_host.cc',
+ 'browser/renderer_host/p2p/socket_dispatcher_host.h',
+ ],
+ 'compositor_browser_sources': [
+ 'browser/compositor/browser_compositor_output_surface.cc',
+ 'browser/compositor/browser_compositor_output_surface.h',
+ 'browser/compositor/browser_compositor_output_surface_proxy.cc',
+ 'browser/compositor/browser_compositor_output_surface_proxy.h',
+ 'browser/compositor/browser_compositor_view_mac.mm',
+ 'browser/compositor/browser_compositor_view_mac.h',
+ 'browser/compositor/delegated_frame_host.cc',
+ 'browser/compositor/delegated_frame_host.h',
+ 'browser/compositor/gpu_process_transport_factory.cc',
+ 'browser/compositor/gpu_process_transport_factory.h',
+ 'browser/compositor/image_transport_factory.cc',
+ 'browser/compositor/image_transport_factory.h',
+ 'browser/compositor/no_transport_image_transport_factory.cc',
+ 'browser/compositor/no_transport_image_transport_factory.h',
+ 'browser/compositor/onscreen_display_client.cc',
+ 'browser/compositor/onscreen_display_client.h',
+ 'browser/compositor/overlay_candidate_validator_ozone.cc',
+ 'browser/compositor/overlay_candidate_validator_ozone.h',
+ 'browser/compositor/owned_mailbox.h',
+ 'browser/compositor/owned_mailbox.cc',
+ 'browser/compositor/reflector_impl.cc',
+ 'browser/compositor/reflector_impl.h',
+ 'browser/compositor/resize_lock.cc',
+ 'browser/compositor/resize_lock.h',
+ 'browser/compositor/gpu_browser_compositor_output_surface.cc',
+ 'browser/compositor/gpu_browser_compositor_output_surface.h',
+ 'browser/compositor/software_browser_compositor_output_surface.cc',
+ 'browser/compositor/software_browser_compositor_output_surface.h',
+ 'browser/compositor/software_output_device_mac.mm',
+ 'browser/compositor/software_output_device_mac.h',
+ 'browser/compositor/software_output_device_ozone.cc',
+ 'browser/compositor/software_output_device_ozone.h',
+ 'browser/compositor/software_output_device_win.cc',
+ 'browser/compositor/software_output_device_win.h',
+ 'browser/compositor/software_output_device_x11.cc',
+ 'browser/compositor/software_output_device_x11.h',
+ 'browser/compositor/surface_display_output_surface.cc',
+ 'browser/compositor/surface_display_output_surface.h',
+ 'browser/context_factory.cc',
+ ],
+ 'plugin_browser_sources': [
+ 'browser/pepper_flash_settings_helper_impl.cc',
+ 'browser/pepper_flash_settings_helper_impl.h',
+ 'browser/plugin_data_remover_impl.cc',
+ 'browser/plugin_data_remover_impl.h',
+ 'browser/plugin_loader_posix.cc',
+ 'browser/plugin_loader_posix.h',
+ 'browser/plugin_process_host.cc',
+ 'browser/plugin_process_host.h',
+ 'browser/plugin_process_host_mac.cc',
+ 'browser/plugin_service_impl.cc',
+ 'browser/plugin_service_impl.h',
+ 'browser/ppapi_plugin_process_host.cc',
+ 'browser/ppapi_plugin_process_host.h',
+ 'browser/renderer_host/pepper/browser_ppapi_host_impl.cc',
+ 'browser/renderer_host/pepper/browser_ppapi_host_impl.h',
+ 'browser/renderer_host/pepper/content_browser_pepper_host_factory.cc',
+ 'browser/renderer_host/pepper/content_browser_pepper_host_factory.h',
+ 'browser/renderer_host/pepper/pepper_browser_font_singleton_host.cc',
+ 'browser/renderer_host/pepper/pepper_browser_font_singleton_host.h',
+ 'browser/renderer_host/pepper/pepper_external_file_ref_backend.cc',
+ 'browser/renderer_host/pepper/pepper_external_file_ref_backend.h',
+ 'browser/renderer_host/pepper/pepper_file_io_host.cc',
+ 'browser/renderer_host/pepper/pepper_file_io_host.h',
+ 'browser/renderer_host/pepper/pepper_file_ref_host.cc',
+ 'browser/renderer_host/pepper/pepper_file_ref_host.h',
+ 'browser/renderer_host/pepper/pepper_file_system_browser_host.cc',
+ 'browser/renderer_host/pepper/pepper_file_system_browser_host.h',
+ 'browser/renderer_host/pepper/pepper_flash_file_message_filter.cc',
+ 'browser/renderer_host/pepper/pepper_flash_file_message_filter.h',
+ 'browser/renderer_host/pepper/pepper_gamepad_host.cc',
+ 'browser/renderer_host/pepper/pepper_gamepad_host.h',
+ 'browser/renderer_host/pepper/pepper_host_resolver_message_filter.cc',
+ 'browser/renderer_host/pepper/pepper_host_resolver_message_filter.h',
+ 'browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc',
+ 'browser/renderer_host/pepper/pepper_internal_file_ref_backend.h',
+ 'browser/renderer_host/pepper/pepper_lookup_request.h',
+ 'browser/renderer_host/pepper/pepper_message_filter.cc',
+ 'browser/renderer_host/pepper/pepper_message_filter.h',
+ 'browser/renderer_host/pepper/pepper_network_monitor_host.cc',
+ 'browser/renderer_host/pepper/pepper_network_monitor_host.h',
+ 'browser/renderer_host/pepper/pepper_network_proxy_host.cc',
+ 'browser/renderer_host/pepper/pepper_network_proxy_host.h',
+ 'browser/renderer_host/pepper/pepper_printing_host.cc',
+ 'browser/renderer_host/pepper/pepper_printing_host.h',
+ 'browser/renderer_host/pepper/pepper_print_settings_manager.cc',
+ 'browser/renderer_host/pepper/pepper_print_settings_manager.h',
+ 'browser/renderer_host/pepper/pepper_renderer_connection.cc',
+ 'browser/renderer_host/pepper/pepper_renderer_connection.h',
+ 'browser/renderer_host/pepper/pepper_security_helper.cc',
+ 'browser/renderer_host/pepper/pepper_security_helper.h',
+ 'browser/renderer_host/pepper/pepper_socket_utils.cc',
+ 'browser/renderer_host/pepper/pepper_socket_utils.h',
+ 'browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc',
+ 'browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.h',
+ 'browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc',
+ 'browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h',
+ 'browser/renderer_host/pepper/pepper_truetype_font_list_android.cc',
+ 'browser/renderer_host/pepper/pepper_truetype_font_list.h',
+ 'browser/renderer_host/pepper/pepper_truetype_font_list_host.cc',
+ 'browser/renderer_host/pepper/pepper_truetype_font_list_host.h',
+ 'browser/renderer_host/pepper/pepper_truetype_font_list_mac.mm',
+ 'browser/renderer_host/pepper/pepper_truetype_font_list_ozone.cc',
+ 'browser/renderer_host/pepper/pepper_truetype_font_list_pango.cc',
+ 'browser/renderer_host/pepper/pepper_truetype_font_list_win.cc',
+ 'browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc',
+ 'browser/renderer_host/pepper/pepper_udp_socket_message_filter.h',
+ 'browser/renderer_host/pepper/quota_reservation.cc',
+ 'browser/renderer_host/pepper/quota_reservation.h',
+ 'browser/renderer_host/pepper/ssl_context_helper.cc',
+ 'browser/renderer_host/pepper/ssl_context_helper.h',
+ 'public/browser/plugin_service.h',
+ ],
},
'sources': [
'<@(public_browser_sources)',
@@ -1481,7 +1527,7 @@
'../third_party/WebKit/public/blink.gyp:blink',
],
}],
- ['OS!="mac" and OS!="ios"', {
+ ['OS!="ios"', {
'dependencies': [
'../sandbox/sandbox.gyp:sandbox',
],
@@ -1501,29 +1547,7 @@
'../jingle/jingle.gyp:jingle_glue',
],
'sources': [
- 'browser/media/webrtc_internals.cc',
- 'browser/media/webrtc_internals.h',
- 'browser/media/webrtc_internals_message_handler.cc',
- 'browser/media/webrtc_internals_message_handler.h',
- 'browser/media/webrtc_internals_ui.cc',
- 'browser/media/webrtc_internals_ui.h',
- 'browser/media/webrtc_internals_ui_observer.h',
- 'browser/renderer_host/media/peer_connection_tracker_host.cc',
- 'browser/renderer_host/media/peer_connection_tracker_host.h',
- 'browser/renderer_host/media/webrtc_identity_service_host.cc',
- 'browser/renderer_host/media/webrtc_identity_service_host.h',
- 'browser/renderer_host/p2p/socket_host.cc',
- 'browser/renderer_host/p2p/socket_host.h',
- 'browser/renderer_host/p2p/socket_host_tcp.cc',
- 'browser/renderer_host/p2p/socket_host_tcp.h',
- 'browser/renderer_host/p2p/socket_host_tcp_server.cc',
- 'browser/renderer_host/p2p/socket_host_tcp_server.h',
- 'browser/renderer_host/p2p/socket_host_throttler.cc',
- 'browser/renderer_host/p2p/socket_host_throttler.h',
- 'browser/renderer_host/p2p/socket_host_udp.cc',
- 'browser/renderer_host/p2p/socket_host_udp.h',
- 'browser/renderer_host/p2p/socket_dispatcher_host.cc',
- 'browser/renderer_host/p2p/socket_dispatcher_host.h',
+ '<@(webrtc_browser_sources)',
],
}],
['enable_webrtc==1 and OS=="linux"', {
@@ -1628,17 +1652,20 @@
],
},
'sources/': [
- ['exclude', '^browser/battery_status/battery_status_manager_default.cc$'],
- ['exclude', '^browser/device_sensors/data_fetcher_shared_memory_default.cc$'],
+ ['exclude', '^browser/battery_status/battery_status_manager_default\\.cc$'],
+ ['exclude', '^browser/device_sensors/data_fetcher_shared_memory_default\\.cc$'],
['exclude', '^browser/geolocation/network_location_provider\\.(cc|h)$'],
['exclude', '^browser/geolocation/network_location_request\\.(cc|h)$'],
- ['exclude', '^browser/tracing/tracing_ui'],
+ ['exclude', '^browser/tracing/tracing_ui\\.(cc|h)$'],
['exclude', '^browser/speech/'],
['include', '^browser/speech/speech_recognition_dispatcher_host\\.(cc|h)$'],
['include', '^browser/speech/speech_recognition_manager_impl\\.(cc|h)$'],
['include', '^browser/speech/speech_recognizer\\.h$'],
['include', '^browser/speech/speech_recognizer_impl_android\\.(cc|h)$'],
],
+ 'sources': [
+ '<@(android_browser_sources)',
+ ],
'sources!': [
'browser/browser_ipc_logging.cc',
'browser/font_list_async.cc',
@@ -1647,11 +1674,6 @@
'browser/geolocation/wifi_data_provider_common.cc',
'browser/renderer_host/native_web_keyboard_event.cc',
]
- }, { # OS!="android"
- 'sources/': [
- ['exclude', '^browser/renderer_host/java/'],
- ['exclude', '^browser/speech/speech_recognizer_impl_android\\.(cc|h)'],
- ],
}],
['OS=="mac"', {
'sources/': [
@@ -1705,10 +1727,9 @@
'dependencies': [
'../ui/compositor/compositor.gyp:compositor',
],
+ 'sources': [ '<@(compositor_browser_sources)' ],
}, {
'sources/': [
- ['exclude', '^browser/compositor/'],
- ['exclude', '^browser/context_factory.cc'],
['exclude', '^public/browser/context_factory.h'],
]
}],
@@ -1717,23 +1738,8 @@
'../ppapi/ppapi_internal.gyp:ppapi_ipc',
'../ppapi/ppapi_internal.gyp:ppapi_shared',
],
- }, { # enable_plugins==0
- 'sources!': [
- 'browser/pepper_flash_settings_helper_impl.cc',
- 'browser/pepper_flash_settings_helper_impl.h',
- 'browser/plugin_data_remover_impl.cc',
- 'browser/plugin_data_remover_impl.h',
- 'browser/plugin_loader_posix.cc',
- 'browser/plugin_loader_posix.h',
- 'browser/plugin_process_host.cc',
- 'browser/plugin_process_host.h',
- 'browser/plugin_service_impl.cc',
- 'browser/plugin_service_impl.h',
- 'browser/ppapi_plugin_process_host.cc',
- 'public/browser/plugin_service.h',
- ],
- 'sources/': [
- ['exclude', '^browser/renderer_host/pepper/'],
+ 'sources': [
+ '<@(plugin_browser_sources)',
],
}],
['input_speech==1', {
@@ -1760,5 +1766,14 @@
'browser/geolocation/wifi_data_provider_linux.cc',
],
}],
+ ['enable_browser_cdms==1', {
+ 'sources': [
+ 'browser/media/cdm/browser_cdm_manager.cc',
+ 'browser/media/cdm/browser_cdm_manager.h',
+ # This works on Android because enable_browser_cdms==1 on Android.
+ 'browser/media/media_web_contents_observer.cc',
+ 'browser/media/media_web_contents_observer.h',
+ ],
+ }],
],
}
diff --git a/content/content_browser.target.darwin-arm.mk b/content/content_browser.target.darwin-arm.mk
index f77ef9c..ec5044e 100644
--- a/content/content_browser.target.darwin-arm.mk
+++ b/content/content_browser.target.darwin-arm.mk
@@ -120,6 +120,7 @@
content/browser/android/surface_texture_peer_browser_impl.cc \
content/browser/android/tracing_controller_android.cc \
content/browser/android/web_contents_observer_android.cc \
+ content/browser/android/ui_resource_provider_impl.cc \
content/browser/appcache/appcache_dispatcher_host.cc \
content/browser/appcache/appcache_frontend_proxy.cc \
content/browser/appcache/appcache_interceptor.cc \
@@ -264,6 +265,7 @@
content/browser/indexed_db/indexed_db_backing_store.cc \
content/browser/indexed_db/indexed_db_blob_info.cc \
content/browser/indexed_db/indexed_db_callbacks.cc \
+ content/browser/indexed_db/indexed_db_class_factory.cc \
content/browser/indexed_db/indexed_db_connection.cc \
content/browser/indexed_db/indexed_db_context_impl.cc \
content/browser/indexed_db/indexed_db_cursor.cc \
@@ -309,7 +311,6 @@
content/browser/media/android/browser_media_player_manager.cc \
content/browser/media/android/media_drm_credential_manager.cc \
content/browser/media/android/media_resource_getter_impl.cc \
- content/browser/media/android/media_web_contents_observer.cc \
content/browser/media/capture/audio_mirroring_manager.cc \
content/browser/media/capture/content_video_capture_device_core.cc \
content/browser/media/capture/video_capture_oracle.cc \
@@ -321,6 +322,8 @@
content/browser/media/media_internals_handler.cc \
content/browser/media/media_internals_proxy.cc \
content/browser/media/media_internals_ui.cc \
+ content/browser/media/midi_dispatcher_host.cc \
+ content/browser/media/midi_host.cc \
content/browser/media/webrtc_identity_store.cc \
content/browser/media/webrtc_identity_store_backend.cc \
content/browser/message_port_message_filter.cc \
@@ -373,13 +376,6 @@
content/browser/renderer_host/input/web_input_event_builders_android.cc \
content/browser/renderer_host/input/web_input_event_util.cc \
content/browser/renderer_host/input/web_input_event_util_posix.cc \
- content/browser/renderer_host/java/java_bound_object.cc \
- content/browser/renderer_host/java/java_bridge_channel_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
- content/browser/renderer_host/java/java_method.cc \
- content/browser/renderer_host/java/java_type.cc \
- content/browser/renderer_host/java/jni_helper.cc \
content/browser/renderer_host/media/audio_input_device_manager.cc \
content/browser/renderer_host/media/audio_input_renderer_host.cc \
content/browser/renderer_host/media/audio_input_sync_writer.cc \
@@ -391,8 +387,6 @@
content/browser/renderer_host/media/media_stream_manager.cc \
content/browser/renderer_host/media/media_stream_track_metrics_host.cc \
content/browser/renderer_host/media/media_stream_ui_proxy.cc \
- content/browser/renderer_host/media/midi_dispatcher_host.cc \
- content/browser/renderer_host/media/midi_host.cc \
content/browser/renderer_host/media/video_capture_buffer_pool.cc \
content/browser/renderer_host/media/video_capture_controller.cc \
content/browser/renderer_host/media/video_capture_controller_event_handler.cc \
@@ -433,6 +427,7 @@
content/browser/service_worker/service_worker_dispatcher_host.cc \
content/browser/service_worker/service_worker_fetch_dispatcher.cc \
content/browser/service_worker/service_worker_handle.cc \
+ content/browser/service_worker/service_worker_histograms.cc \
content/browser/service_worker/service_worker_info.cc \
content/browser/service_worker/service_worker_internals_ui.cc \
content/browser/service_worker/service_worker_job_coordinator.cc \
@@ -514,7 +509,18 @@
content/browser/renderer_host/p2p/socket_host_tcp_server.cc \
content/browser/renderer_host/p2p/socket_host_throttler.cc \
content/browser/renderer_host/p2p/socket_host_udp.cc \
- content/browser/renderer_host/p2p/socket_dispatcher_host.cc
+ content/browser/renderer_host/p2p/socket_dispatcher_host.cc \
+ content/browser/renderer_host/java/gin_java_method_invocation_helper.cc \
+ content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.cc \
+ content/browser/renderer_host/java/java_bound_object.cc \
+ content/browser/renderer_host/java/java_bridge_channel_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
+ content/browser/renderer_host/java/java_method.cc \
+ content/browser/renderer_host/java/java_type.cc \
+ content/browser/renderer_host/java/jni_helper.cc \
+ content/browser/media/cdm/browser_cdm_manager.cc \
+ content/browser/media/media_web_contents_observer.cc
# Flags passed to both C and C++ files.
@@ -569,6 +575,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -591,11 +598,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -636,6 +643,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -657,7 +665,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
@@ -755,6 +762,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -777,11 +785,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -823,6 +831,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -844,7 +853,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
diff --git a/content/content_browser.target.darwin-arm64.mk b/content/content_browser.target.darwin-arm64.mk
index 187bd05..9f47ec6 100644
--- a/content/content_browser.target.darwin-arm64.mk
+++ b/content/content_browser.target.darwin-arm64.mk
@@ -120,6 +120,7 @@
content/browser/android/surface_texture_peer_browser_impl.cc \
content/browser/android/tracing_controller_android.cc \
content/browser/android/web_contents_observer_android.cc \
+ content/browser/android/ui_resource_provider_impl.cc \
content/browser/appcache/appcache_dispatcher_host.cc \
content/browser/appcache/appcache_frontend_proxy.cc \
content/browser/appcache/appcache_interceptor.cc \
@@ -264,6 +265,7 @@
content/browser/indexed_db/indexed_db_backing_store.cc \
content/browser/indexed_db/indexed_db_blob_info.cc \
content/browser/indexed_db/indexed_db_callbacks.cc \
+ content/browser/indexed_db/indexed_db_class_factory.cc \
content/browser/indexed_db/indexed_db_connection.cc \
content/browser/indexed_db/indexed_db_context_impl.cc \
content/browser/indexed_db/indexed_db_cursor.cc \
@@ -309,7 +311,6 @@
content/browser/media/android/browser_media_player_manager.cc \
content/browser/media/android/media_drm_credential_manager.cc \
content/browser/media/android/media_resource_getter_impl.cc \
- content/browser/media/android/media_web_contents_observer.cc \
content/browser/media/capture/audio_mirroring_manager.cc \
content/browser/media/capture/content_video_capture_device_core.cc \
content/browser/media/capture/video_capture_oracle.cc \
@@ -321,6 +322,8 @@
content/browser/media/media_internals_handler.cc \
content/browser/media/media_internals_proxy.cc \
content/browser/media/media_internals_ui.cc \
+ content/browser/media/midi_dispatcher_host.cc \
+ content/browser/media/midi_host.cc \
content/browser/media/webrtc_identity_store.cc \
content/browser/media/webrtc_identity_store_backend.cc \
content/browser/message_port_message_filter.cc \
@@ -373,13 +376,6 @@
content/browser/renderer_host/input/web_input_event_builders_android.cc \
content/browser/renderer_host/input/web_input_event_util.cc \
content/browser/renderer_host/input/web_input_event_util_posix.cc \
- content/browser/renderer_host/java/java_bound_object.cc \
- content/browser/renderer_host/java/java_bridge_channel_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
- content/browser/renderer_host/java/java_method.cc \
- content/browser/renderer_host/java/java_type.cc \
- content/browser/renderer_host/java/jni_helper.cc \
content/browser/renderer_host/media/audio_input_device_manager.cc \
content/browser/renderer_host/media/audio_input_renderer_host.cc \
content/browser/renderer_host/media/audio_input_sync_writer.cc \
@@ -391,8 +387,6 @@
content/browser/renderer_host/media/media_stream_manager.cc \
content/browser/renderer_host/media/media_stream_track_metrics_host.cc \
content/browser/renderer_host/media/media_stream_ui_proxy.cc \
- content/browser/renderer_host/media/midi_dispatcher_host.cc \
- content/browser/renderer_host/media/midi_host.cc \
content/browser/renderer_host/media/video_capture_buffer_pool.cc \
content/browser/renderer_host/media/video_capture_controller.cc \
content/browser/renderer_host/media/video_capture_controller_event_handler.cc \
@@ -433,6 +427,7 @@
content/browser/service_worker/service_worker_dispatcher_host.cc \
content/browser/service_worker/service_worker_fetch_dispatcher.cc \
content/browser/service_worker/service_worker_handle.cc \
+ content/browser/service_worker/service_worker_histograms.cc \
content/browser/service_worker/service_worker_info.cc \
content/browser/service_worker/service_worker_internals_ui.cc \
content/browser/service_worker/service_worker_job_coordinator.cc \
@@ -514,7 +509,18 @@
content/browser/renderer_host/p2p/socket_host_tcp_server.cc \
content/browser/renderer_host/p2p/socket_host_throttler.cc \
content/browser/renderer_host/p2p/socket_host_udp.cc \
- content/browser/renderer_host/p2p/socket_dispatcher_host.cc
+ content/browser/renderer_host/p2p/socket_dispatcher_host.cc \
+ content/browser/renderer_host/java/gin_java_method_invocation_helper.cc \
+ content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.cc \
+ content/browser/renderer_host/java/java_bound_object.cc \
+ content/browser/renderer_host/java/java_bridge_channel_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
+ content/browser/renderer_host/java/java_method.cc \
+ content/browser/renderer_host/java/java_type.cc \
+ content/browser/renderer_host/java/jni_helper.cc \
+ content/browser/media/cdm/browser_cdm_manager.cc \
+ content/browser/media/media_web_contents_observer.cc
# Flags passed to both C and C++ files.
@@ -559,6 +565,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -581,11 +588,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -626,6 +633,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -647,7 +655,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
@@ -734,6 +741,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -756,11 +764,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -802,6 +810,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -823,7 +832,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
diff --git a/content/content_browser.target.darwin-mips.mk b/content/content_browser.target.darwin-mips.mk
index b039e10..5581c4d 100644
--- a/content/content_browser.target.darwin-mips.mk
+++ b/content/content_browser.target.darwin-mips.mk
@@ -120,6 +120,7 @@
content/browser/android/surface_texture_peer_browser_impl.cc \
content/browser/android/tracing_controller_android.cc \
content/browser/android/web_contents_observer_android.cc \
+ content/browser/android/ui_resource_provider_impl.cc \
content/browser/appcache/appcache_dispatcher_host.cc \
content/browser/appcache/appcache_frontend_proxy.cc \
content/browser/appcache/appcache_interceptor.cc \
@@ -264,6 +265,7 @@
content/browser/indexed_db/indexed_db_backing_store.cc \
content/browser/indexed_db/indexed_db_blob_info.cc \
content/browser/indexed_db/indexed_db_callbacks.cc \
+ content/browser/indexed_db/indexed_db_class_factory.cc \
content/browser/indexed_db/indexed_db_connection.cc \
content/browser/indexed_db/indexed_db_context_impl.cc \
content/browser/indexed_db/indexed_db_cursor.cc \
@@ -309,7 +311,6 @@
content/browser/media/android/browser_media_player_manager.cc \
content/browser/media/android/media_drm_credential_manager.cc \
content/browser/media/android/media_resource_getter_impl.cc \
- content/browser/media/android/media_web_contents_observer.cc \
content/browser/media/capture/audio_mirroring_manager.cc \
content/browser/media/capture/content_video_capture_device_core.cc \
content/browser/media/capture/video_capture_oracle.cc \
@@ -321,6 +322,8 @@
content/browser/media/media_internals_handler.cc \
content/browser/media/media_internals_proxy.cc \
content/browser/media/media_internals_ui.cc \
+ content/browser/media/midi_dispatcher_host.cc \
+ content/browser/media/midi_host.cc \
content/browser/media/webrtc_identity_store.cc \
content/browser/media/webrtc_identity_store_backend.cc \
content/browser/message_port_message_filter.cc \
@@ -373,13 +376,6 @@
content/browser/renderer_host/input/web_input_event_builders_android.cc \
content/browser/renderer_host/input/web_input_event_util.cc \
content/browser/renderer_host/input/web_input_event_util_posix.cc \
- content/browser/renderer_host/java/java_bound_object.cc \
- content/browser/renderer_host/java/java_bridge_channel_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
- content/browser/renderer_host/java/java_method.cc \
- content/browser/renderer_host/java/java_type.cc \
- content/browser/renderer_host/java/jni_helper.cc \
content/browser/renderer_host/media/audio_input_device_manager.cc \
content/browser/renderer_host/media/audio_input_renderer_host.cc \
content/browser/renderer_host/media/audio_input_sync_writer.cc \
@@ -391,8 +387,6 @@
content/browser/renderer_host/media/media_stream_manager.cc \
content/browser/renderer_host/media/media_stream_track_metrics_host.cc \
content/browser/renderer_host/media/media_stream_ui_proxy.cc \
- content/browser/renderer_host/media/midi_dispatcher_host.cc \
- content/browser/renderer_host/media/midi_host.cc \
content/browser/renderer_host/media/video_capture_buffer_pool.cc \
content/browser/renderer_host/media/video_capture_controller.cc \
content/browser/renderer_host/media/video_capture_controller_event_handler.cc \
@@ -433,6 +427,7 @@
content/browser/service_worker/service_worker_dispatcher_host.cc \
content/browser/service_worker/service_worker_fetch_dispatcher.cc \
content/browser/service_worker/service_worker_handle.cc \
+ content/browser/service_worker/service_worker_histograms.cc \
content/browser/service_worker/service_worker_info.cc \
content/browser/service_worker/service_worker_internals_ui.cc \
content/browser/service_worker/service_worker_job_coordinator.cc \
@@ -514,7 +509,18 @@
content/browser/renderer_host/p2p/socket_host_tcp_server.cc \
content/browser/renderer_host/p2p/socket_host_throttler.cc \
content/browser/renderer_host/p2p/socket_host_udp.cc \
- content/browser/renderer_host/p2p/socket_dispatcher_host.cc
+ content/browser/renderer_host/p2p/socket_dispatcher_host.cc \
+ content/browser/renderer_host/java/gin_java_method_invocation_helper.cc \
+ content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.cc \
+ content/browser/renderer_host/java/java_bound_object.cc \
+ content/browser/renderer_host/java/java_bridge_channel_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
+ content/browser/renderer_host/java/java_method.cc \
+ content/browser/renderer_host/java/java_type.cc \
+ content/browser/renderer_host/java/jni_helper.cc \
+ content/browser/media/cdm/browser_cdm_manager.cc \
+ content/browser/media/media_web_contents_observer.cc
# Flags passed to both C and C++ files.
@@ -563,6 +569,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -585,11 +592,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -630,6 +637,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -651,7 +659,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
@@ -743,6 +750,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -765,11 +773,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -811,6 +819,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -832,7 +841,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
diff --git a/content/content_browser.target.darwin-x86.mk b/content/content_browser.target.darwin-x86.mk
index 522f354..dc677de 100644
--- a/content/content_browser.target.darwin-x86.mk
+++ b/content/content_browser.target.darwin-x86.mk
@@ -120,6 +120,7 @@
content/browser/android/surface_texture_peer_browser_impl.cc \
content/browser/android/tracing_controller_android.cc \
content/browser/android/web_contents_observer_android.cc \
+ content/browser/android/ui_resource_provider_impl.cc \
content/browser/appcache/appcache_dispatcher_host.cc \
content/browser/appcache/appcache_frontend_proxy.cc \
content/browser/appcache/appcache_interceptor.cc \
@@ -264,6 +265,7 @@
content/browser/indexed_db/indexed_db_backing_store.cc \
content/browser/indexed_db/indexed_db_blob_info.cc \
content/browser/indexed_db/indexed_db_callbacks.cc \
+ content/browser/indexed_db/indexed_db_class_factory.cc \
content/browser/indexed_db/indexed_db_connection.cc \
content/browser/indexed_db/indexed_db_context_impl.cc \
content/browser/indexed_db/indexed_db_cursor.cc \
@@ -309,7 +311,6 @@
content/browser/media/android/browser_media_player_manager.cc \
content/browser/media/android/media_drm_credential_manager.cc \
content/browser/media/android/media_resource_getter_impl.cc \
- content/browser/media/android/media_web_contents_observer.cc \
content/browser/media/capture/audio_mirroring_manager.cc \
content/browser/media/capture/content_video_capture_device_core.cc \
content/browser/media/capture/video_capture_oracle.cc \
@@ -321,6 +322,8 @@
content/browser/media/media_internals_handler.cc \
content/browser/media/media_internals_proxy.cc \
content/browser/media/media_internals_ui.cc \
+ content/browser/media/midi_dispatcher_host.cc \
+ content/browser/media/midi_host.cc \
content/browser/media/webrtc_identity_store.cc \
content/browser/media/webrtc_identity_store_backend.cc \
content/browser/message_port_message_filter.cc \
@@ -373,13 +376,6 @@
content/browser/renderer_host/input/web_input_event_builders_android.cc \
content/browser/renderer_host/input/web_input_event_util.cc \
content/browser/renderer_host/input/web_input_event_util_posix.cc \
- content/browser/renderer_host/java/java_bound_object.cc \
- content/browser/renderer_host/java/java_bridge_channel_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
- content/browser/renderer_host/java/java_method.cc \
- content/browser/renderer_host/java/java_type.cc \
- content/browser/renderer_host/java/jni_helper.cc \
content/browser/renderer_host/media/audio_input_device_manager.cc \
content/browser/renderer_host/media/audio_input_renderer_host.cc \
content/browser/renderer_host/media/audio_input_sync_writer.cc \
@@ -391,8 +387,6 @@
content/browser/renderer_host/media/media_stream_manager.cc \
content/browser/renderer_host/media/media_stream_track_metrics_host.cc \
content/browser/renderer_host/media/media_stream_ui_proxy.cc \
- content/browser/renderer_host/media/midi_dispatcher_host.cc \
- content/browser/renderer_host/media/midi_host.cc \
content/browser/renderer_host/media/video_capture_buffer_pool.cc \
content/browser/renderer_host/media/video_capture_controller.cc \
content/browser/renderer_host/media/video_capture_controller_event_handler.cc \
@@ -433,6 +427,7 @@
content/browser/service_worker/service_worker_dispatcher_host.cc \
content/browser/service_worker/service_worker_fetch_dispatcher.cc \
content/browser/service_worker/service_worker_handle.cc \
+ content/browser/service_worker/service_worker_histograms.cc \
content/browser/service_worker/service_worker_info.cc \
content/browser/service_worker/service_worker_internals_ui.cc \
content/browser/service_worker/service_worker_job_coordinator.cc \
@@ -514,7 +509,18 @@
content/browser/renderer_host/p2p/socket_host_tcp_server.cc \
content/browser/renderer_host/p2p/socket_host_throttler.cc \
content/browser/renderer_host/p2p/socket_host_udp.cc \
- content/browser/renderer_host/p2p/socket_dispatcher_host.cc
+ content/browser/renderer_host/p2p/socket_dispatcher_host.cc \
+ content/browser/renderer_host/java/gin_java_method_invocation_helper.cc \
+ content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.cc \
+ content/browser/renderer_host/java/java_bound_object.cc \
+ content/browser/renderer_host/java/java_bridge_channel_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
+ content/browser/renderer_host/java/java_method.cc \
+ content/browser/renderer_host/java/java_type.cc \
+ content/browser/renderer_host/java/jni_helper.cc \
+ content/browser/media/cdm/browser_cdm_manager.cc \
+ content/browser/media/media_web_contents_observer.cc
# Flags passed to both C and C++ files.
@@ -564,6 +570,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -585,11 +592,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -630,6 +637,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -651,7 +659,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
@@ -743,6 +750,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -764,11 +772,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -810,6 +818,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -831,7 +840,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
diff --git a/content/content_browser.target.darwin-x86_64.mk b/content/content_browser.target.darwin-x86_64.mk
index 7c93c79..fd557b3 100644
--- a/content/content_browser.target.darwin-x86_64.mk
+++ b/content/content_browser.target.darwin-x86_64.mk
@@ -120,6 +120,7 @@
content/browser/android/surface_texture_peer_browser_impl.cc \
content/browser/android/tracing_controller_android.cc \
content/browser/android/web_contents_observer_android.cc \
+ content/browser/android/ui_resource_provider_impl.cc \
content/browser/appcache/appcache_dispatcher_host.cc \
content/browser/appcache/appcache_frontend_proxy.cc \
content/browser/appcache/appcache_interceptor.cc \
@@ -264,6 +265,7 @@
content/browser/indexed_db/indexed_db_backing_store.cc \
content/browser/indexed_db/indexed_db_blob_info.cc \
content/browser/indexed_db/indexed_db_callbacks.cc \
+ content/browser/indexed_db/indexed_db_class_factory.cc \
content/browser/indexed_db/indexed_db_connection.cc \
content/browser/indexed_db/indexed_db_context_impl.cc \
content/browser/indexed_db/indexed_db_cursor.cc \
@@ -309,7 +311,6 @@
content/browser/media/android/browser_media_player_manager.cc \
content/browser/media/android/media_drm_credential_manager.cc \
content/browser/media/android/media_resource_getter_impl.cc \
- content/browser/media/android/media_web_contents_observer.cc \
content/browser/media/capture/audio_mirroring_manager.cc \
content/browser/media/capture/content_video_capture_device_core.cc \
content/browser/media/capture/video_capture_oracle.cc \
@@ -321,6 +322,8 @@
content/browser/media/media_internals_handler.cc \
content/browser/media/media_internals_proxy.cc \
content/browser/media/media_internals_ui.cc \
+ content/browser/media/midi_dispatcher_host.cc \
+ content/browser/media/midi_host.cc \
content/browser/media/webrtc_identity_store.cc \
content/browser/media/webrtc_identity_store_backend.cc \
content/browser/message_port_message_filter.cc \
@@ -373,13 +376,6 @@
content/browser/renderer_host/input/web_input_event_builders_android.cc \
content/browser/renderer_host/input/web_input_event_util.cc \
content/browser/renderer_host/input/web_input_event_util_posix.cc \
- content/browser/renderer_host/java/java_bound_object.cc \
- content/browser/renderer_host/java/java_bridge_channel_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
- content/browser/renderer_host/java/java_method.cc \
- content/browser/renderer_host/java/java_type.cc \
- content/browser/renderer_host/java/jni_helper.cc \
content/browser/renderer_host/media/audio_input_device_manager.cc \
content/browser/renderer_host/media/audio_input_renderer_host.cc \
content/browser/renderer_host/media/audio_input_sync_writer.cc \
@@ -391,8 +387,6 @@
content/browser/renderer_host/media/media_stream_manager.cc \
content/browser/renderer_host/media/media_stream_track_metrics_host.cc \
content/browser/renderer_host/media/media_stream_ui_proxy.cc \
- content/browser/renderer_host/media/midi_dispatcher_host.cc \
- content/browser/renderer_host/media/midi_host.cc \
content/browser/renderer_host/media/video_capture_buffer_pool.cc \
content/browser/renderer_host/media/video_capture_controller.cc \
content/browser/renderer_host/media/video_capture_controller_event_handler.cc \
@@ -433,6 +427,7 @@
content/browser/service_worker/service_worker_dispatcher_host.cc \
content/browser/service_worker/service_worker_fetch_dispatcher.cc \
content/browser/service_worker/service_worker_handle.cc \
+ content/browser/service_worker/service_worker_histograms.cc \
content/browser/service_worker/service_worker_info.cc \
content/browser/service_worker/service_worker_internals_ui.cc \
content/browser/service_worker/service_worker_job_coordinator.cc \
@@ -514,7 +509,18 @@
content/browser/renderer_host/p2p/socket_host_tcp_server.cc \
content/browser/renderer_host/p2p/socket_host_throttler.cc \
content/browser/renderer_host/p2p/socket_host_udp.cc \
- content/browser/renderer_host/p2p/socket_dispatcher_host.cc
+ content/browser/renderer_host/p2p/socket_dispatcher_host.cc \
+ content/browser/renderer_host/java/gin_java_method_invocation_helper.cc \
+ content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.cc \
+ content/browser/renderer_host/java/java_bound_object.cc \
+ content/browser/renderer_host/java/java_bridge_channel_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
+ content/browser/renderer_host/java/java_method.cc \
+ content/browser/renderer_host/java/java_type.cc \
+ content/browser/renderer_host/java/jni_helper.cc \
+ content/browser/media/cdm/browser_cdm_manager.cc \
+ content/browser/media/media_web_contents_observer.cc
# Flags passed to both C and C++ files.
@@ -563,6 +569,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -585,11 +592,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -630,6 +637,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -651,7 +659,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
@@ -742,6 +749,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -764,11 +772,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -810,6 +818,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -831,7 +840,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
diff --git a/content/content_browser.target.linux-arm.mk b/content/content_browser.target.linux-arm.mk
index f77ef9c..ec5044e 100644
--- a/content/content_browser.target.linux-arm.mk
+++ b/content/content_browser.target.linux-arm.mk
@@ -120,6 +120,7 @@
content/browser/android/surface_texture_peer_browser_impl.cc \
content/browser/android/tracing_controller_android.cc \
content/browser/android/web_contents_observer_android.cc \
+ content/browser/android/ui_resource_provider_impl.cc \
content/browser/appcache/appcache_dispatcher_host.cc \
content/browser/appcache/appcache_frontend_proxy.cc \
content/browser/appcache/appcache_interceptor.cc \
@@ -264,6 +265,7 @@
content/browser/indexed_db/indexed_db_backing_store.cc \
content/browser/indexed_db/indexed_db_blob_info.cc \
content/browser/indexed_db/indexed_db_callbacks.cc \
+ content/browser/indexed_db/indexed_db_class_factory.cc \
content/browser/indexed_db/indexed_db_connection.cc \
content/browser/indexed_db/indexed_db_context_impl.cc \
content/browser/indexed_db/indexed_db_cursor.cc \
@@ -309,7 +311,6 @@
content/browser/media/android/browser_media_player_manager.cc \
content/browser/media/android/media_drm_credential_manager.cc \
content/browser/media/android/media_resource_getter_impl.cc \
- content/browser/media/android/media_web_contents_observer.cc \
content/browser/media/capture/audio_mirroring_manager.cc \
content/browser/media/capture/content_video_capture_device_core.cc \
content/browser/media/capture/video_capture_oracle.cc \
@@ -321,6 +322,8 @@
content/browser/media/media_internals_handler.cc \
content/browser/media/media_internals_proxy.cc \
content/browser/media/media_internals_ui.cc \
+ content/browser/media/midi_dispatcher_host.cc \
+ content/browser/media/midi_host.cc \
content/browser/media/webrtc_identity_store.cc \
content/browser/media/webrtc_identity_store_backend.cc \
content/browser/message_port_message_filter.cc \
@@ -373,13 +376,6 @@
content/browser/renderer_host/input/web_input_event_builders_android.cc \
content/browser/renderer_host/input/web_input_event_util.cc \
content/browser/renderer_host/input/web_input_event_util_posix.cc \
- content/browser/renderer_host/java/java_bound_object.cc \
- content/browser/renderer_host/java/java_bridge_channel_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
- content/browser/renderer_host/java/java_method.cc \
- content/browser/renderer_host/java/java_type.cc \
- content/browser/renderer_host/java/jni_helper.cc \
content/browser/renderer_host/media/audio_input_device_manager.cc \
content/browser/renderer_host/media/audio_input_renderer_host.cc \
content/browser/renderer_host/media/audio_input_sync_writer.cc \
@@ -391,8 +387,6 @@
content/browser/renderer_host/media/media_stream_manager.cc \
content/browser/renderer_host/media/media_stream_track_metrics_host.cc \
content/browser/renderer_host/media/media_stream_ui_proxy.cc \
- content/browser/renderer_host/media/midi_dispatcher_host.cc \
- content/browser/renderer_host/media/midi_host.cc \
content/browser/renderer_host/media/video_capture_buffer_pool.cc \
content/browser/renderer_host/media/video_capture_controller.cc \
content/browser/renderer_host/media/video_capture_controller_event_handler.cc \
@@ -433,6 +427,7 @@
content/browser/service_worker/service_worker_dispatcher_host.cc \
content/browser/service_worker/service_worker_fetch_dispatcher.cc \
content/browser/service_worker/service_worker_handle.cc \
+ content/browser/service_worker/service_worker_histograms.cc \
content/browser/service_worker/service_worker_info.cc \
content/browser/service_worker/service_worker_internals_ui.cc \
content/browser/service_worker/service_worker_job_coordinator.cc \
@@ -514,7 +509,18 @@
content/browser/renderer_host/p2p/socket_host_tcp_server.cc \
content/browser/renderer_host/p2p/socket_host_throttler.cc \
content/browser/renderer_host/p2p/socket_host_udp.cc \
- content/browser/renderer_host/p2p/socket_dispatcher_host.cc
+ content/browser/renderer_host/p2p/socket_dispatcher_host.cc \
+ content/browser/renderer_host/java/gin_java_method_invocation_helper.cc \
+ content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.cc \
+ content/browser/renderer_host/java/java_bound_object.cc \
+ content/browser/renderer_host/java/java_bridge_channel_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
+ content/browser/renderer_host/java/java_method.cc \
+ content/browser/renderer_host/java/java_type.cc \
+ content/browser/renderer_host/java/jni_helper.cc \
+ content/browser/media/cdm/browser_cdm_manager.cc \
+ content/browser/media/media_web_contents_observer.cc
# Flags passed to both C and C++ files.
@@ -569,6 +575,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -591,11 +598,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -636,6 +643,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -657,7 +665,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
@@ -755,6 +762,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -777,11 +785,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -823,6 +831,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -844,7 +853,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
diff --git a/content/content_browser.target.linux-arm64.mk b/content/content_browser.target.linux-arm64.mk
index 187bd05..9f47ec6 100644
--- a/content/content_browser.target.linux-arm64.mk
+++ b/content/content_browser.target.linux-arm64.mk
@@ -120,6 +120,7 @@
content/browser/android/surface_texture_peer_browser_impl.cc \
content/browser/android/tracing_controller_android.cc \
content/browser/android/web_contents_observer_android.cc \
+ content/browser/android/ui_resource_provider_impl.cc \
content/browser/appcache/appcache_dispatcher_host.cc \
content/browser/appcache/appcache_frontend_proxy.cc \
content/browser/appcache/appcache_interceptor.cc \
@@ -264,6 +265,7 @@
content/browser/indexed_db/indexed_db_backing_store.cc \
content/browser/indexed_db/indexed_db_blob_info.cc \
content/browser/indexed_db/indexed_db_callbacks.cc \
+ content/browser/indexed_db/indexed_db_class_factory.cc \
content/browser/indexed_db/indexed_db_connection.cc \
content/browser/indexed_db/indexed_db_context_impl.cc \
content/browser/indexed_db/indexed_db_cursor.cc \
@@ -309,7 +311,6 @@
content/browser/media/android/browser_media_player_manager.cc \
content/browser/media/android/media_drm_credential_manager.cc \
content/browser/media/android/media_resource_getter_impl.cc \
- content/browser/media/android/media_web_contents_observer.cc \
content/browser/media/capture/audio_mirroring_manager.cc \
content/browser/media/capture/content_video_capture_device_core.cc \
content/browser/media/capture/video_capture_oracle.cc \
@@ -321,6 +322,8 @@
content/browser/media/media_internals_handler.cc \
content/browser/media/media_internals_proxy.cc \
content/browser/media/media_internals_ui.cc \
+ content/browser/media/midi_dispatcher_host.cc \
+ content/browser/media/midi_host.cc \
content/browser/media/webrtc_identity_store.cc \
content/browser/media/webrtc_identity_store_backend.cc \
content/browser/message_port_message_filter.cc \
@@ -373,13 +376,6 @@
content/browser/renderer_host/input/web_input_event_builders_android.cc \
content/browser/renderer_host/input/web_input_event_util.cc \
content/browser/renderer_host/input/web_input_event_util_posix.cc \
- content/browser/renderer_host/java/java_bound_object.cc \
- content/browser/renderer_host/java/java_bridge_channel_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
- content/browser/renderer_host/java/java_method.cc \
- content/browser/renderer_host/java/java_type.cc \
- content/browser/renderer_host/java/jni_helper.cc \
content/browser/renderer_host/media/audio_input_device_manager.cc \
content/browser/renderer_host/media/audio_input_renderer_host.cc \
content/browser/renderer_host/media/audio_input_sync_writer.cc \
@@ -391,8 +387,6 @@
content/browser/renderer_host/media/media_stream_manager.cc \
content/browser/renderer_host/media/media_stream_track_metrics_host.cc \
content/browser/renderer_host/media/media_stream_ui_proxy.cc \
- content/browser/renderer_host/media/midi_dispatcher_host.cc \
- content/browser/renderer_host/media/midi_host.cc \
content/browser/renderer_host/media/video_capture_buffer_pool.cc \
content/browser/renderer_host/media/video_capture_controller.cc \
content/browser/renderer_host/media/video_capture_controller_event_handler.cc \
@@ -433,6 +427,7 @@
content/browser/service_worker/service_worker_dispatcher_host.cc \
content/browser/service_worker/service_worker_fetch_dispatcher.cc \
content/browser/service_worker/service_worker_handle.cc \
+ content/browser/service_worker/service_worker_histograms.cc \
content/browser/service_worker/service_worker_info.cc \
content/browser/service_worker/service_worker_internals_ui.cc \
content/browser/service_worker/service_worker_job_coordinator.cc \
@@ -514,7 +509,18 @@
content/browser/renderer_host/p2p/socket_host_tcp_server.cc \
content/browser/renderer_host/p2p/socket_host_throttler.cc \
content/browser/renderer_host/p2p/socket_host_udp.cc \
- content/browser/renderer_host/p2p/socket_dispatcher_host.cc
+ content/browser/renderer_host/p2p/socket_dispatcher_host.cc \
+ content/browser/renderer_host/java/gin_java_method_invocation_helper.cc \
+ content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.cc \
+ content/browser/renderer_host/java/java_bound_object.cc \
+ content/browser/renderer_host/java/java_bridge_channel_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
+ content/browser/renderer_host/java/java_method.cc \
+ content/browser/renderer_host/java/java_type.cc \
+ content/browser/renderer_host/java/jni_helper.cc \
+ content/browser/media/cdm/browser_cdm_manager.cc \
+ content/browser/media/media_web_contents_observer.cc
# Flags passed to both C and C++ files.
@@ -559,6 +565,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -581,11 +588,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -626,6 +633,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -647,7 +655,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
@@ -734,6 +741,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -756,11 +764,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -802,6 +810,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -823,7 +832,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
diff --git a/content/content_browser.target.linux-mips.mk b/content/content_browser.target.linux-mips.mk
index b039e10..5581c4d 100644
--- a/content/content_browser.target.linux-mips.mk
+++ b/content/content_browser.target.linux-mips.mk
@@ -120,6 +120,7 @@
content/browser/android/surface_texture_peer_browser_impl.cc \
content/browser/android/tracing_controller_android.cc \
content/browser/android/web_contents_observer_android.cc \
+ content/browser/android/ui_resource_provider_impl.cc \
content/browser/appcache/appcache_dispatcher_host.cc \
content/browser/appcache/appcache_frontend_proxy.cc \
content/browser/appcache/appcache_interceptor.cc \
@@ -264,6 +265,7 @@
content/browser/indexed_db/indexed_db_backing_store.cc \
content/browser/indexed_db/indexed_db_blob_info.cc \
content/browser/indexed_db/indexed_db_callbacks.cc \
+ content/browser/indexed_db/indexed_db_class_factory.cc \
content/browser/indexed_db/indexed_db_connection.cc \
content/browser/indexed_db/indexed_db_context_impl.cc \
content/browser/indexed_db/indexed_db_cursor.cc \
@@ -309,7 +311,6 @@
content/browser/media/android/browser_media_player_manager.cc \
content/browser/media/android/media_drm_credential_manager.cc \
content/browser/media/android/media_resource_getter_impl.cc \
- content/browser/media/android/media_web_contents_observer.cc \
content/browser/media/capture/audio_mirroring_manager.cc \
content/browser/media/capture/content_video_capture_device_core.cc \
content/browser/media/capture/video_capture_oracle.cc \
@@ -321,6 +322,8 @@
content/browser/media/media_internals_handler.cc \
content/browser/media/media_internals_proxy.cc \
content/browser/media/media_internals_ui.cc \
+ content/browser/media/midi_dispatcher_host.cc \
+ content/browser/media/midi_host.cc \
content/browser/media/webrtc_identity_store.cc \
content/browser/media/webrtc_identity_store_backend.cc \
content/browser/message_port_message_filter.cc \
@@ -373,13 +376,6 @@
content/browser/renderer_host/input/web_input_event_builders_android.cc \
content/browser/renderer_host/input/web_input_event_util.cc \
content/browser/renderer_host/input/web_input_event_util_posix.cc \
- content/browser/renderer_host/java/java_bound_object.cc \
- content/browser/renderer_host/java/java_bridge_channel_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
- content/browser/renderer_host/java/java_method.cc \
- content/browser/renderer_host/java/java_type.cc \
- content/browser/renderer_host/java/jni_helper.cc \
content/browser/renderer_host/media/audio_input_device_manager.cc \
content/browser/renderer_host/media/audio_input_renderer_host.cc \
content/browser/renderer_host/media/audio_input_sync_writer.cc \
@@ -391,8 +387,6 @@
content/browser/renderer_host/media/media_stream_manager.cc \
content/browser/renderer_host/media/media_stream_track_metrics_host.cc \
content/browser/renderer_host/media/media_stream_ui_proxy.cc \
- content/browser/renderer_host/media/midi_dispatcher_host.cc \
- content/browser/renderer_host/media/midi_host.cc \
content/browser/renderer_host/media/video_capture_buffer_pool.cc \
content/browser/renderer_host/media/video_capture_controller.cc \
content/browser/renderer_host/media/video_capture_controller_event_handler.cc \
@@ -433,6 +427,7 @@
content/browser/service_worker/service_worker_dispatcher_host.cc \
content/browser/service_worker/service_worker_fetch_dispatcher.cc \
content/browser/service_worker/service_worker_handle.cc \
+ content/browser/service_worker/service_worker_histograms.cc \
content/browser/service_worker/service_worker_info.cc \
content/browser/service_worker/service_worker_internals_ui.cc \
content/browser/service_worker/service_worker_job_coordinator.cc \
@@ -514,7 +509,18 @@
content/browser/renderer_host/p2p/socket_host_tcp_server.cc \
content/browser/renderer_host/p2p/socket_host_throttler.cc \
content/browser/renderer_host/p2p/socket_host_udp.cc \
- content/browser/renderer_host/p2p/socket_dispatcher_host.cc
+ content/browser/renderer_host/p2p/socket_dispatcher_host.cc \
+ content/browser/renderer_host/java/gin_java_method_invocation_helper.cc \
+ content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.cc \
+ content/browser/renderer_host/java/java_bound_object.cc \
+ content/browser/renderer_host/java/java_bridge_channel_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
+ content/browser/renderer_host/java/java_method.cc \
+ content/browser/renderer_host/java/java_type.cc \
+ content/browser/renderer_host/java/jni_helper.cc \
+ content/browser/media/cdm/browser_cdm_manager.cc \
+ content/browser/media/media_web_contents_observer.cc
# Flags passed to both C and C++ files.
@@ -563,6 +569,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -585,11 +592,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -630,6 +637,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -651,7 +659,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
@@ -743,6 +750,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -765,11 +773,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -811,6 +819,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -832,7 +841,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
diff --git a/content/content_browser.target.linux-x86.mk b/content/content_browser.target.linux-x86.mk
index 522f354..dc677de 100644
--- a/content/content_browser.target.linux-x86.mk
+++ b/content/content_browser.target.linux-x86.mk
@@ -120,6 +120,7 @@
content/browser/android/surface_texture_peer_browser_impl.cc \
content/browser/android/tracing_controller_android.cc \
content/browser/android/web_contents_observer_android.cc \
+ content/browser/android/ui_resource_provider_impl.cc \
content/browser/appcache/appcache_dispatcher_host.cc \
content/browser/appcache/appcache_frontend_proxy.cc \
content/browser/appcache/appcache_interceptor.cc \
@@ -264,6 +265,7 @@
content/browser/indexed_db/indexed_db_backing_store.cc \
content/browser/indexed_db/indexed_db_blob_info.cc \
content/browser/indexed_db/indexed_db_callbacks.cc \
+ content/browser/indexed_db/indexed_db_class_factory.cc \
content/browser/indexed_db/indexed_db_connection.cc \
content/browser/indexed_db/indexed_db_context_impl.cc \
content/browser/indexed_db/indexed_db_cursor.cc \
@@ -309,7 +311,6 @@
content/browser/media/android/browser_media_player_manager.cc \
content/browser/media/android/media_drm_credential_manager.cc \
content/browser/media/android/media_resource_getter_impl.cc \
- content/browser/media/android/media_web_contents_observer.cc \
content/browser/media/capture/audio_mirroring_manager.cc \
content/browser/media/capture/content_video_capture_device_core.cc \
content/browser/media/capture/video_capture_oracle.cc \
@@ -321,6 +322,8 @@
content/browser/media/media_internals_handler.cc \
content/browser/media/media_internals_proxy.cc \
content/browser/media/media_internals_ui.cc \
+ content/browser/media/midi_dispatcher_host.cc \
+ content/browser/media/midi_host.cc \
content/browser/media/webrtc_identity_store.cc \
content/browser/media/webrtc_identity_store_backend.cc \
content/browser/message_port_message_filter.cc \
@@ -373,13 +376,6 @@
content/browser/renderer_host/input/web_input_event_builders_android.cc \
content/browser/renderer_host/input/web_input_event_util.cc \
content/browser/renderer_host/input/web_input_event_util_posix.cc \
- content/browser/renderer_host/java/java_bound_object.cc \
- content/browser/renderer_host/java/java_bridge_channel_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
- content/browser/renderer_host/java/java_method.cc \
- content/browser/renderer_host/java/java_type.cc \
- content/browser/renderer_host/java/jni_helper.cc \
content/browser/renderer_host/media/audio_input_device_manager.cc \
content/browser/renderer_host/media/audio_input_renderer_host.cc \
content/browser/renderer_host/media/audio_input_sync_writer.cc \
@@ -391,8 +387,6 @@
content/browser/renderer_host/media/media_stream_manager.cc \
content/browser/renderer_host/media/media_stream_track_metrics_host.cc \
content/browser/renderer_host/media/media_stream_ui_proxy.cc \
- content/browser/renderer_host/media/midi_dispatcher_host.cc \
- content/browser/renderer_host/media/midi_host.cc \
content/browser/renderer_host/media/video_capture_buffer_pool.cc \
content/browser/renderer_host/media/video_capture_controller.cc \
content/browser/renderer_host/media/video_capture_controller_event_handler.cc \
@@ -433,6 +427,7 @@
content/browser/service_worker/service_worker_dispatcher_host.cc \
content/browser/service_worker/service_worker_fetch_dispatcher.cc \
content/browser/service_worker/service_worker_handle.cc \
+ content/browser/service_worker/service_worker_histograms.cc \
content/browser/service_worker/service_worker_info.cc \
content/browser/service_worker/service_worker_internals_ui.cc \
content/browser/service_worker/service_worker_job_coordinator.cc \
@@ -514,7 +509,18 @@
content/browser/renderer_host/p2p/socket_host_tcp_server.cc \
content/browser/renderer_host/p2p/socket_host_throttler.cc \
content/browser/renderer_host/p2p/socket_host_udp.cc \
- content/browser/renderer_host/p2p/socket_dispatcher_host.cc
+ content/browser/renderer_host/p2p/socket_dispatcher_host.cc \
+ content/browser/renderer_host/java/gin_java_method_invocation_helper.cc \
+ content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.cc \
+ content/browser/renderer_host/java/java_bound_object.cc \
+ content/browser/renderer_host/java/java_bridge_channel_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
+ content/browser/renderer_host/java/java_method.cc \
+ content/browser/renderer_host/java/java_type.cc \
+ content/browser/renderer_host/java/jni_helper.cc \
+ content/browser/media/cdm/browser_cdm_manager.cc \
+ content/browser/media/media_web_contents_observer.cc
# Flags passed to both C and C++ files.
@@ -564,6 +570,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -585,11 +592,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -630,6 +637,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -651,7 +659,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
@@ -743,6 +750,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -764,11 +772,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -810,6 +818,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -831,7 +840,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
diff --git a/content/content_browser.target.linux-x86_64.mk b/content/content_browser.target.linux-x86_64.mk
index 7c93c79..fd557b3 100644
--- a/content/content_browser.target.linux-x86_64.mk
+++ b/content/content_browser.target.linux-x86_64.mk
@@ -120,6 +120,7 @@
content/browser/android/surface_texture_peer_browser_impl.cc \
content/browser/android/tracing_controller_android.cc \
content/browser/android/web_contents_observer_android.cc \
+ content/browser/android/ui_resource_provider_impl.cc \
content/browser/appcache/appcache_dispatcher_host.cc \
content/browser/appcache/appcache_frontend_proxy.cc \
content/browser/appcache/appcache_interceptor.cc \
@@ -264,6 +265,7 @@
content/browser/indexed_db/indexed_db_backing_store.cc \
content/browser/indexed_db/indexed_db_blob_info.cc \
content/browser/indexed_db/indexed_db_callbacks.cc \
+ content/browser/indexed_db/indexed_db_class_factory.cc \
content/browser/indexed_db/indexed_db_connection.cc \
content/browser/indexed_db/indexed_db_context_impl.cc \
content/browser/indexed_db/indexed_db_cursor.cc \
@@ -309,7 +311,6 @@
content/browser/media/android/browser_media_player_manager.cc \
content/browser/media/android/media_drm_credential_manager.cc \
content/browser/media/android/media_resource_getter_impl.cc \
- content/browser/media/android/media_web_contents_observer.cc \
content/browser/media/capture/audio_mirroring_manager.cc \
content/browser/media/capture/content_video_capture_device_core.cc \
content/browser/media/capture/video_capture_oracle.cc \
@@ -321,6 +322,8 @@
content/browser/media/media_internals_handler.cc \
content/browser/media/media_internals_proxy.cc \
content/browser/media/media_internals_ui.cc \
+ content/browser/media/midi_dispatcher_host.cc \
+ content/browser/media/midi_host.cc \
content/browser/media/webrtc_identity_store.cc \
content/browser/media/webrtc_identity_store_backend.cc \
content/browser/message_port_message_filter.cc \
@@ -373,13 +376,6 @@
content/browser/renderer_host/input/web_input_event_builders_android.cc \
content/browser/renderer_host/input/web_input_event_util.cc \
content/browser/renderer_host/input/web_input_event_util_posix.cc \
- content/browser/renderer_host/java/java_bound_object.cc \
- content/browser/renderer_host/java/java_bridge_channel_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
- content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
- content/browser/renderer_host/java/java_method.cc \
- content/browser/renderer_host/java/java_type.cc \
- content/browser/renderer_host/java/jni_helper.cc \
content/browser/renderer_host/media/audio_input_device_manager.cc \
content/browser/renderer_host/media/audio_input_renderer_host.cc \
content/browser/renderer_host/media/audio_input_sync_writer.cc \
@@ -391,8 +387,6 @@
content/browser/renderer_host/media/media_stream_manager.cc \
content/browser/renderer_host/media/media_stream_track_metrics_host.cc \
content/browser/renderer_host/media/media_stream_ui_proxy.cc \
- content/browser/renderer_host/media/midi_dispatcher_host.cc \
- content/browser/renderer_host/media/midi_host.cc \
content/browser/renderer_host/media/video_capture_buffer_pool.cc \
content/browser/renderer_host/media/video_capture_controller.cc \
content/browser/renderer_host/media/video_capture_controller_event_handler.cc \
@@ -433,6 +427,7 @@
content/browser/service_worker/service_worker_dispatcher_host.cc \
content/browser/service_worker/service_worker_fetch_dispatcher.cc \
content/browser/service_worker/service_worker_handle.cc \
+ content/browser/service_worker/service_worker_histograms.cc \
content/browser/service_worker/service_worker_info.cc \
content/browser/service_worker/service_worker_internals_ui.cc \
content/browser/service_worker/service_worker_job_coordinator.cc \
@@ -514,7 +509,18 @@
content/browser/renderer_host/p2p/socket_host_tcp_server.cc \
content/browser/renderer_host/p2p/socket_host_throttler.cc \
content/browser/renderer_host/p2p/socket_host_udp.cc \
- content/browser/renderer_host/p2p/socket_dispatcher_host.cc
+ content/browser/renderer_host/p2p/socket_dispatcher_host.cc \
+ content/browser/renderer_host/java/gin_java_method_invocation_helper.cc \
+ content/browser/renderer_host/java/gin_java_script_to_java_types_coercion.cc \
+ content/browser/renderer_host/java/java_bound_object.cc \
+ content/browser/renderer_host/java/java_bridge_channel_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host.cc \
+ content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc \
+ content/browser/renderer_host/java/java_method.cc \
+ content/browser/renderer_host/java/java_type.cc \
+ content/browser/renderer_host/java/jni_helper.cc \
+ content/browser/media/cdm/browser_cdm_manager.cc \
+ content/browser/media/media_web_contents_observer.cc
# Flags passed to both C and C++ files.
@@ -563,6 +569,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -585,11 +592,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -630,6 +637,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -651,7 +659,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
@@ -742,6 +749,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -764,11 +772,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -810,6 +818,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(gyp_intermediate_dir) \
$(LOCAL_PATH)/third_party/khronos \
@@ -831,7 +840,6 @@
$(LOCAL_PATH)/third_party/re2 \
$(LOCAL_PATH)/third_party/zlib \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/external/icu4c/common \
$(PWD)/external/icu4c/i18n \
$(gyp_shared_intermediate_dir)/ui/ui_resources \
diff --git a/content/content_child.gypi b/content/content_child.gypi
index a187223..3e45b0c 100644
--- a/content/content_child.gypi
+++ b/content/content_child.gypi
@@ -35,6 +35,7 @@
'child/appcache/appcache_frontend_impl.h',
'child/appcache/web_application_cache_host_impl.cc',
'child/appcache/web_application_cache_host_impl.h',
+ 'child/assert_matching_enums.cc',
'child/blink_glue.cc',
'child/blink_glue.h',
'child/blink_platform_impl.cc',
@@ -213,6 +214,8 @@
'child/webfileutilities_impl.h',
'child/webmessageportchannel_impl.cc',
'child/webmessageportchannel_impl.h',
+ 'child/threaded_data_provider.cc',
+ 'child/threaded_data_provider.h',
'child/websocket_bridge.cc',
'child/websocket_bridge.h',
'child/websocket_dispatcher.cc',
diff --git a/content/content_child.target.darwin-arm.mk b/content/content_child.target.darwin-arm.mk
index b06bba5..0c43f59 100644
--- a/content/content_child.target.darwin-arm.mk
+++ b/content/content_child.target.darwin-arm.mk
@@ -37,6 +37,7 @@
content/child/appcache/appcache_dispatcher.cc \
content/child/appcache/appcache_frontend_impl.cc \
content/child/appcache/web_application_cache_host_impl.cc \
+ content/child/assert_matching_enums.cc \
content/child/blink_glue.cc \
content/child/blink_platform_impl.cc \
content/child/child_histogram_message_filter.cc \
@@ -107,6 +108,7 @@
content/child/webfallbackthemeengine_impl.cc \
content/child/webfileutilities_impl.cc \
content/child/webmessageportchannel_impl.cc \
+ content/child/threaded_data_provider.cc \
content/child/websocket_bridge.cc \
content/child/websocket_dispatcher.cc \
content/child/webthemeengine_impl_android.cc \
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -188,11 +191,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -222,13 +225,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -324,6 +327,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -345,11 +349,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -380,13 +384,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_child.target.darwin-arm64.mk b/content/content_child.target.darwin-arm64.mk
index 54acc4a..5549e4f 100644
--- a/content/content_child.target.darwin-arm64.mk
+++ b/content/content_child.target.darwin-arm64.mk
@@ -37,6 +37,7 @@
content/child/appcache/appcache_dispatcher.cc \
content/child/appcache/appcache_frontend_impl.cc \
content/child/appcache/web_application_cache_host_impl.cc \
+ content/child/assert_matching_enums.cc \
content/child/blink_glue.cc \
content/child/blink_platform_impl.cc \
content/child/child_histogram_message_filter.cc \
@@ -107,6 +108,7 @@
content/child/webfallbackthemeengine_impl.cc \
content/child/webfileutilities_impl.cc \
content/child/webmessageportchannel_impl.cc \
+ content/child/threaded_data_provider.cc \
content/child/websocket_bridge.cc \
content/child/websocket_dispatcher.cc \
content/child/webthemeengine_impl_android.cc \
@@ -157,6 +159,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -178,11 +181,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -212,13 +215,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -303,6 +306,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -324,11 +328,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -359,13 +363,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_child.target.darwin-mips.mk b/content/content_child.target.darwin-mips.mk
index 12149f6..8e4186b 100644
--- a/content/content_child.target.darwin-mips.mk
+++ b/content/content_child.target.darwin-mips.mk
@@ -37,6 +37,7 @@
content/child/appcache/appcache_dispatcher.cc \
content/child/appcache/appcache_frontend_impl.cc \
content/child/appcache/web_application_cache_host_impl.cc \
+ content/child/assert_matching_enums.cc \
content/child/blink_glue.cc \
content/child/blink_platform_impl.cc \
content/child/child_histogram_message_filter.cc \
@@ -107,6 +108,7 @@
content/child/webfallbackthemeengine_impl.cc \
content/child/webfileutilities_impl.cc \
content/child/webmessageportchannel_impl.cc \
+ content/child/threaded_data_provider.cc \
content/child/websocket_bridge.cc \
content/child/websocket_dispatcher.cc \
content/child/webthemeengine_impl_android.cc \
@@ -161,6 +163,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -182,11 +185,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -216,13 +219,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -312,6 +315,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -333,11 +337,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -368,13 +372,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_child.target.darwin-x86.mk b/content/content_child.target.darwin-x86.mk
index a805a34..9a2d7ab 100644
--- a/content/content_child.target.darwin-x86.mk
+++ b/content/content_child.target.darwin-x86.mk
@@ -37,6 +37,7 @@
content/child/appcache/appcache_dispatcher.cc \
content/child/appcache/appcache_frontend_impl.cc \
content/child/appcache/web_application_cache_host_impl.cc \
+ content/child/assert_matching_enums.cc \
content/child/blink_glue.cc \
content/child/blink_platform_impl.cc \
content/child/child_histogram_message_filter.cc \
@@ -107,6 +108,7 @@
content/child/webfallbackthemeengine_impl.cc \
content/child/webfileutilities_impl.cc \
content/child/webmessageportchannel_impl.cc \
+ content/child/threaded_data_provider.cc \
content/child/websocket_bridge.cc \
content/child/websocket_dispatcher.cc \
content/child/webthemeengine_impl_android.cc \
@@ -162,6 +164,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -183,11 +186,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -216,13 +219,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -312,6 +315,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -333,11 +337,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -367,13 +371,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_child.target.darwin-x86_64.mk b/content/content_child.target.darwin-x86_64.mk
index 6562835..043c1ba 100644
--- a/content/content_child.target.darwin-x86_64.mk
+++ b/content/content_child.target.darwin-x86_64.mk
@@ -37,6 +37,7 @@
content/child/appcache/appcache_dispatcher.cc \
content/child/appcache/appcache_frontend_impl.cc \
content/child/appcache/web_application_cache_host_impl.cc \
+ content/child/assert_matching_enums.cc \
content/child/blink_glue.cc \
content/child/blink_platform_impl.cc \
content/child/child_histogram_message_filter.cc \
@@ -107,6 +108,7 @@
content/child/webfallbackthemeengine_impl.cc \
content/child/webfileutilities_impl.cc \
content/child/webmessageportchannel_impl.cc \
+ content/child/threaded_data_provider.cc \
content/child/websocket_bridge.cc \
content/child/websocket_dispatcher.cc \
content/child/webthemeengine_impl_android.cc \
@@ -161,6 +163,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -182,11 +185,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -216,13 +219,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -312,6 +315,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -333,11 +337,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -368,13 +372,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_child.target.linux-arm.mk b/content/content_child.target.linux-arm.mk
index b06bba5..0c43f59 100644
--- a/content/content_child.target.linux-arm.mk
+++ b/content/content_child.target.linux-arm.mk
@@ -37,6 +37,7 @@
content/child/appcache/appcache_dispatcher.cc \
content/child/appcache/appcache_frontend_impl.cc \
content/child/appcache/web_application_cache_host_impl.cc \
+ content/child/assert_matching_enums.cc \
content/child/blink_glue.cc \
content/child/blink_platform_impl.cc \
content/child/child_histogram_message_filter.cc \
@@ -107,6 +108,7 @@
content/child/webfallbackthemeengine_impl.cc \
content/child/webfileutilities_impl.cc \
content/child/webmessageportchannel_impl.cc \
+ content/child/threaded_data_provider.cc \
content/child/websocket_bridge.cc \
content/child/websocket_dispatcher.cc \
content/child/webthemeengine_impl_android.cc \
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -188,11 +191,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -222,13 +225,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -324,6 +327,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -345,11 +349,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -380,13 +384,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_child.target.linux-arm64.mk b/content/content_child.target.linux-arm64.mk
index 54acc4a..5549e4f 100644
--- a/content/content_child.target.linux-arm64.mk
+++ b/content/content_child.target.linux-arm64.mk
@@ -37,6 +37,7 @@
content/child/appcache/appcache_dispatcher.cc \
content/child/appcache/appcache_frontend_impl.cc \
content/child/appcache/web_application_cache_host_impl.cc \
+ content/child/assert_matching_enums.cc \
content/child/blink_glue.cc \
content/child/blink_platform_impl.cc \
content/child/child_histogram_message_filter.cc \
@@ -107,6 +108,7 @@
content/child/webfallbackthemeengine_impl.cc \
content/child/webfileutilities_impl.cc \
content/child/webmessageportchannel_impl.cc \
+ content/child/threaded_data_provider.cc \
content/child/websocket_bridge.cc \
content/child/websocket_dispatcher.cc \
content/child/webthemeengine_impl_android.cc \
@@ -157,6 +159,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -178,11 +181,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -212,13 +215,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -303,6 +306,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -324,11 +328,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -359,13 +363,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_child.target.linux-mips.mk b/content/content_child.target.linux-mips.mk
index 12149f6..8e4186b 100644
--- a/content/content_child.target.linux-mips.mk
+++ b/content/content_child.target.linux-mips.mk
@@ -37,6 +37,7 @@
content/child/appcache/appcache_dispatcher.cc \
content/child/appcache/appcache_frontend_impl.cc \
content/child/appcache/web_application_cache_host_impl.cc \
+ content/child/assert_matching_enums.cc \
content/child/blink_glue.cc \
content/child/blink_platform_impl.cc \
content/child/child_histogram_message_filter.cc \
@@ -107,6 +108,7 @@
content/child/webfallbackthemeengine_impl.cc \
content/child/webfileutilities_impl.cc \
content/child/webmessageportchannel_impl.cc \
+ content/child/threaded_data_provider.cc \
content/child/websocket_bridge.cc \
content/child/websocket_dispatcher.cc \
content/child/webthemeengine_impl_android.cc \
@@ -161,6 +163,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -182,11 +185,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -216,13 +219,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -312,6 +315,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -333,11 +337,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -368,13 +372,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_child.target.linux-x86.mk b/content/content_child.target.linux-x86.mk
index a805a34..9a2d7ab 100644
--- a/content/content_child.target.linux-x86.mk
+++ b/content/content_child.target.linux-x86.mk
@@ -37,6 +37,7 @@
content/child/appcache/appcache_dispatcher.cc \
content/child/appcache/appcache_frontend_impl.cc \
content/child/appcache/web_application_cache_host_impl.cc \
+ content/child/assert_matching_enums.cc \
content/child/blink_glue.cc \
content/child/blink_platform_impl.cc \
content/child/child_histogram_message_filter.cc \
@@ -107,6 +108,7 @@
content/child/webfallbackthemeengine_impl.cc \
content/child/webfileutilities_impl.cc \
content/child/webmessageportchannel_impl.cc \
+ content/child/threaded_data_provider.cc \
content/child/websocket_bridge.cc \
content/child/websocket_dispatcher.cc \
content/child/webthemeengine_impl_android.cc \
@@ -162,6 +164,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -183,11 +186,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -216,13 +219,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -312,6 +315,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -333,11 +337,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -367,13 +371,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_child.target.linux-x86_64.mk b/content/content_child.target.linux-x86_64.mk
index 6562835..043c1ba 100644
--- a/content/content_child.target.linux-x86_64.mk
+++ b/content/content_child.target.linux-x86_64.mk
@@ -37,6 +37,7 @@
content/child/appcache/appcache_dispatcher.cc \
content/child/appcache/appcache_frontend_impl.cc \
content/child/appcache/web_application_cache_host_impl.cc \
+ content/child/assert_matching_enums.cc \
content/child/blink_glue.cc \
content/child/blink_platform_impl.cc \
content/child/child_histogram_message_filter.cc \
@@ -107,6 +108,7 @@
content/child/webfallbackthemeengine_impl.cc \
content/child/webfileutilities_impl.cc \
content/child/webmessageportchannel_impl.cc \
+ content/child/threaded_data_provider.cc \
content/child/websocket_bridge.cc \
content/child/websocket_dispatcher.cc \
content/child/webthemeengine_impl_android.cc \
@@ -161,6 +163,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -182,11 +185,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -216,13 +219,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -312,6 +315,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -333,11 +337,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -368,13 +372,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(gyp_shared_intermediate_dir)/content \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_common.gypi b/content/content_common.gypi
index 4735b7c..240c001 100644
--- a/content/content_common.gypi
+++ b/content/content_common.gypi
@@ -32,7 +32,6 @@
],
'variables': {
'public_common_sources': [
- 'public/common/assert_matching_enums.cc',
'public/common/bindings_policy.h',
'public/common/child_process_host.h',
'public/common/child_process_host_delegate.cc',
@@ -237,6 +236,7 @@
'common/gpu/client/gl_helper_scaling.h',
'common/gpu/client/gpu_channel_host.cc',
'common/gpu/client/gpu_channel_host.h',
+ 'common/gpu/client/gpu_memory_buffer_factory_host.h',
'common/gpu/client/gpu_memory_buffer_impl.cc',
'common/gpu/client/gpu_memory_buffer_impl.h',
'common/gpu/client/gpu_memory_buffer_impl_android.cc',
@@ -277,15 +277,17 @@
'common/gpu/image_transport_surface.cc',
'common/gpu/image_transport_surface.h',
'common/gpu/image_transport_surface_android.cc',
+ 'common/gpu/image_transport_surface_fbo_mac.cc',
+ 'common/gpu/image_transport_surface_fbo_mac.h',
'common/gpu/image_transport_surface_linux.cc',
- 'common/gpu/image_transport_surface_mac.cc',
+ 'common/gpu/image_transport_surface_mac.mm',
+ 'common/gpu/image_transport_surface_iosurface_mac.cc',
+ 'common/gpu/image_transport_surface_iosurface_mac.h',
'common/gpu/image_transport_surface_win.cc',
'common/gpu/media/gpu_video_decode_accelerator.cc',
'common/gpu/media/gpu_video_decode_accelerator.h',
'common/gpu/media/gpu_video_encode_accelerator.cc',
'common/gpu/media/gpu_video_encode_accelerator.h',
- 'common/gpu/media/video_decode_accelerator_impl.cc',
- 'common/gpu/media/video_decode_accelerator_impl.h',
'common/gpu/stream_texture_android.cc',
'common/gpu/stream_texture_android.h',
'common/gpu/sync_point_manager.cc',
@@ -346,6 +348,7 @@
'common/mac/font_descriptor.mm',
'common/mac/font_loader.h',
'common/mac/font_loader.mm',
+ 'common/media/aec_dump_messages.h',
'common/media/audio_messages.h',
'common/media/cdm_messages.h',
'common/media/cdm_messages_enums.h',
@@ -566,6 +569,8 @@
'sources': [
'common/gpu/client/gpu_memory_buffer_impl_io_surface.cc',
'common/gpu/client/gpu_memory_buffer_impl_io_surface.h',
+ 'common/gpu/media/vt_video_decode_accelerator.cc',
+ 'common/gpu/media/vt_video_decode_accelerator.h',
],
'sources!': [
'common/plugin_list_posix.cc',
diff --git a/content/content_common.target.darwin-arm.mk b/content/content_common.target.darwin-arm.mk
index 4d9b5a7..73fece6 100644
--- a/content/content_common.target.darwin-arm.mk
+++ b/content/content_common.target.darwin-arm.mk
@@ -49,7 +49,6 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- content/public/common/assert_matching_enums.cc \
content/public/common/child_process_host_delegate.cc \
content/public/common/color_suggestion.cc \
content/public/common/common_param_traits.cc \
@@ -130,7 +129,6 @@
content/common/gpu/image_transport_surface_android.cc \
content/common/gpu/media/gpu_video_decode_accelerator.cc \
content/common/gpu/media/gpu_video_encode_accelerator.cc \
- content/common/gpu/media/video_decode_accelerator_impl.cc \
content/common/gpu/stream_texture_android.cc \
content/common/gpu/sync_point_manager.cc \
content/common/gpu/texture_image_transport_surface.cc \
@@ -238,6 +236,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -261,11 +260,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -304,6 +303,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -330,7 +330,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
@@ -415,6 +414,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -438,11 +438,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -482,6 +482,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -508,7 +509,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
diff --git a/content/content_common.target.darwin-arm64.mk b/content/content_common.target.darwin-arm64.mk
index 43f3cdd..1e9baa7 100644
--- a/content/content_common.target.darwin-arm64.mk
+++ b/content/content_common.target.darwin-arm64.mk
@@ -49,7 +49,6 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- content/public/common/assert_matching_enums.cc \
content/public/common/child_process_host_delegate.cc \
content/public/common/color_suggestion.cc \
content/public/common/common_param_traits.cc \
@@ -130,7 +129,6 @@
content/common/gpu/image_transport_surface_android.cc \
content/common/gpu/media/gpu_video_decode_accelerator.cc \
content/common/gpu/media/gpu_video_encode_accelerator.cc \
- content/common/gpu/media/video_decode_accelerator_impl.cc \
content/common/gpu/stream_texture_android.cc \
content/common/gpu/sync_point_manager.cc \
content/common/gpu/texture_image_transport_surface.cc \
@@ -226,6 +224,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -248,11 +247,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -291,6 +290,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -317,7 +317,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
@@ -391,6 +390,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -413,11 +413,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -457,6 +457,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -483,7 +484,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
diff --git a/content/content_common.target.darwin-mips.mk b/content/content_common.target.darwin-mips.mk
index 60cdb01..8a121f9 100644
--- a/content/content_common.target.darwin-mips.mk
+++ b/content/content_common.target.darwin-mips.mk
@@ -49,7 +49,6 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- content/public/common/assert_matching_enums.cc \
content/public/common/child_process_host_delegate.cc \
content/public/common/color_suggestion.cc \
content/public/common/common_param_traits.cc \
@@ -130,7 +129,6 @@
content/common/gpu/image_transport_surface_android.cc \
content/common/gpu/media/gpu_video_decode_accelerator.cc \
content/common/gpu/media/gpu_video_encode_accelerator.cc \
- content/common/gpu/media/video_decode_accelerator_impl.cc \
content/common/gpu/stream_texture_android.cc \
content/common/gpu/sync_point_manager.cc \
content/common/gpu/texture_image_transport_surface.cc \
@@ -230,6 +228,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -252,11 +251,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -295,6 +294,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -321,7 +321,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
@@ -400,6 +399,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -422,11 +422,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -466,6 +466,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -492,7 +493,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
diff --git a/content/content_common.target.darwin-x86.mk b/content/content_common.target.darwin-x86.mk
index 22a77be..15765a8 100644
--- a/content/content_common.target.darwin-x86.mk
+++ b/content/content_common.target.darwin-x86.mk
@@ -49,7 +49,6 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- content/public/common/assert_matching_enums.cc \
content/public/common/child_process_host_delegate.cc \
content/public/common/color_suggestion.cc \
content/public/common/common_param_traits.cc \
@@ -130,7 +129,6 @@
content/common/gpu/image_transport_surface_android.cc \
content/common/gpu/media/gpu_video_decode_accelerator.cc \
content/common/gpu/media/gpu_video_encode_accelerator.cc \
- content/common/gpu/media/video_decode_accelerator_impl.cc \
content/common/gpu/stream_texture_android.cc \
content/common/gpu/sync_point_manager.cc \
content/common/gpu/texture_image_transport_surface.cc \
@@ -233,6 +231,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -255,11 +254,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -298,6 +297,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -324,7 +324,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
@@ -403,6 +402,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -425,11 +425,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -469,6 +469,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -495,7 +496,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
diff --git a/content/content_common.target.darwin-x86_64.mk b/content/content_common.target.darwin-x86_64.mk
index 3f4b15c..a079a06 100644
--- a/content/content_common.target.darwin-x86_64.mk
+++ b/content/content_common.target.darwin-x86_64.mk
@@ -49,7 +49,6 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- content/public/common/assert_matching_enums.cc \
content/public/common/child_process_host_delegate.cc \
content/public/common/color_suggestion.cc \
content/public/common/common_param_traits.cc \
@@ -130,7 +129,6 @@
content/common/gpu/image_transport_surface_android.cc \
content/common/gpu/media/gpu_video_decode_accelerator.cc \
content/common/gpu/media/gpu_video_encode_accelerator.cc \
- content/common/gpu/media/video_decode_accelerator_impl.cc \
content/common/gpu/stream_texture_android.cc \
content/common/gpu/sync_point_manager.cc \
content/common/gpu/texture_image_transport_surface.cc \
@@ -232,6 +230,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -255,11 +254,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -298,6 +297,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -324,7 +324,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
@@ -402,6 +401,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -425,11 +425,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -469,6 +469,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -495,7 +496,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
diff --git a/content/content_common.target.linux-arm.mk b/content/content_common.target.linux-arm.mk
index 4d9b5a7..73fece6 100644
--- a/content/content_common.target.linux-arm.mk
+++ b/content/content_common.target.linux-arm.mk
@@ -49,7 +49,6 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- content/public/common/assert_matching_enums.cc \
content/public/common/child_process_host_delegate.cc \
content/public/common/color_suggestion.cc \
content/public/common/common_param_traits.cc \
@@ -130,7 +129,6 @@
content/common/gpu/image_transport_surface_android.cc \
content/common/gpu/media/gpu_video_decode_accelerator.cc \
content/common/gpu/media/gpu_video_encode_accelerator.cc \
- content/common/gpu/media/video_decode_accelerator_impl.cc \
content/common/gpu/stream_texture_android.cc \
content/common/gpu/sync_point_manager.cc \
content/common/gpu/texture_image_transport_surface.cc \
@@ -238,6 +236,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -261,11 +260,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -304,6 +303,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -330,7 +330,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
@@ -415,6 +414,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -438,11 +438,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -482,6 +482,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -508,7 +509,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
diff --git a/content/content_common.target.linux-arm64.mk b/content/content_common.target.linux-arm64.mk
index 43f3cdd..1e9baa7 100644
--- a/content/content_common.target.linux-arm64.mk
+++ b/content/content_common.target.linux-arm64.mk
@@ -49,7 +49,6 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- content/public/common/assert_matching_enums.cc \
content/public/common/child_process_host_delegate.cc \
content/public/common/color_suggestion.cc \
content/public/common/common_param_traits.cc \
@@ -130,7 +129,6 @@
content/common/gpu/image_transport_surface_android.cc \
content/common/gpu/media/gpu_video_decode_accelerator.cc \
content/common/gpu/media/gpu_video_encode_accelerator.cc \
- content/common/gpu/media/video_decode_accelerator_impl.cc \
content/common/gpu/stream_texture_android.cc \
content/common/gpu/sync_point_manager.cc \
content/common/gpu/texture_image_transport_surface.cc \
@@ -226,6 +224,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -248,11 +247,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -291,6 +290,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -317,7 +317,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
@@ -391,6 +390,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -413,11 +413,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -457,6 +457,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -483,7 +484,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
diff --git a/content/content_common.target.linux-mips.mk b/content/content_common.target.linux-mips.mk
index 60cdb01..8a121f9 100644
--- a/content/content_common.target.linux-mips.mk
+++ b/content/content_common.target.linux-mips.mk
@@ -49,7 +49,6 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- content/public/common/assert_matching_enums.cc \
content/public/common/child_process_host_delegate.cc \
content/public/common/color_suggestion.cc \
content/public/common/common_param_traits.cc \
@@ -130,7 +129,6 @@
content/common/gpu/image_transport_surface_android.cc \
content/common/gpu/media/gpu_video_decode_accelerator.cc \
content/common/gpu/media/gpu_video_encode_accelerator.cc \
- content/common/gpu/media/video_decode_accelerator_impl.cc \
content/common/gpu/stream_texture_android.cc \
content/common/gpu/sync_point_manager.cc \
content/common/gpu/texture_image_transport_surface.cc \
@@ -230,6 +228,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -252,11 +251,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -295,6 +294,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -321,7 +321,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
@@ -400,6 +399,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -422,11 +422,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -466,6 +466,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -492,7 +493,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
diff --git a/content/content_common.target.linux-x86.mk b/content/content_common.target.linux-x86.mk
index 22a77be..15765a8 100644
--- a/content/content_common.target.linux-x86.mk
+++ b/content/content_common.target.linux-x86.mk
@@ -49,7 +49,6 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- content/public/common/assert_matching_enums.cc \
content/public/common/child_process_host_delegate.cc \
content/public/common/color_suggestion.cc \
content/public/common/common_param_traits.cc \
@@ -130,7 +129,6 @@
content/common/gpu/image_transport_surface_android.cc \
content/common/gpu/media/gpu_video_decode_accelerator.cc \
content/common/gpu/media/gpu_video_encode_accelerator.cc \
- content/common/gpu/media/video_decode_accelerator_impl.cc \
content/common/gpu/stream_texture_android.cc \
content/common/gpu/sync_point_manager.cc \
content/common/gpu/texture_image_transport_surface.cc \
@@ -233,6 +231,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -255,11 +254,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -298,6 +297,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -324,7 +324,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
@@ -403,6 +402,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -425,11 +425,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -469,6 +469,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -495,7 +496,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
diff --git a/content/content_common.target.linux-x86_64.mk b/content/content_common.target.linux-x86_64.mk
index 3f4b15c..a079a06 100644
--- a/content/content_common.target.linux-x86_64.mk
+++ b/content/content_common.target.linux-x86_64.mk
@@ -49,7 +49,6 @@
GYP_COPIED_SOURCE_ORIGIN_DIRS :=
LOCAL_SRC_FILES := \
- content/public/common/assert_matching_enums.cc \
content/public/common/child_process_host_delegate.cc \
content/public/common/color_suggestion.cc \
content/public/common/common_param_traits.cc \
@@ -130,7 +129,6 @@
content/common/gpu/image_transport_surface_android.cc \
content/common/gpu/media/gpu_video_decode_accelerator.cc \
content/common/gpu/media/gpu_video_encode_accelerator.cc \
- content/common/gpu/media/video_decode_accelerator_impl.cc \
content/common/gpu/stream_texture_android.cc \
content/common/gpu/sync_point_manager.cc \
content/common/gpu/texture_image_transport_surface.cc \
@@ -232,6 +230,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -255,11 +254,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -298,6 +297,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -324,7 +324,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
@@ -402,6 +401,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -425,11 +425,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -469,6 +469,7 @@
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
@@ -495,7 +496,6 @@
$(LOCAL_PATH)/third_party \
$(LOCAL_PATH)/third_party/webrtc \
$(PWD)/external/expat/lib \
- $(gyp_shared_intermediate_dir) \
$(gyp_shared_intermediate_dir)/content \
$(LOCAL_PATH)/third_party/WebKit \
$(LOCAL_PATH)/third_party/npapi \
diff --git a/content/content_common_mojo_bindings.target.darwin-arm.mk b/content/content_common_mojo_bindings.target.darwin-arm.mk
index 8c50560..49a3455 100644
--- a/content/content_common_mojo_bindings.target.darwin-arm.mk
+++ b/content/content_common_mojo_bindings.target.darwin-arm.mk
@@ -105,6 +105,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -135,8 +136,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -205,6 +206,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -236,8 +238,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_common_mojo_bindings.target.darwin-arm64.mk b/content/content_common_mojo_bindings.target.darwin-arm64.mk
index 6571879..6bf8c49 100644
--- a/content/content_common_mojo_bindings.target.darwin-arm64.mk
+++ b/content/content_common_mojo_bindings.target.darwin-arm64.mk
@@ -95,6 +95,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -125,8 +126,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -184,6 +185,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -215,8 +217,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_common_mojo_bindings.target.darwin-mips.mk b/content/content_common_mojo_bindings.target.darwin-mips.mk
index a4f1ccc..23a08b0 100644
--- a/content/content_common_mojo_bindings.target.darwin-mips.mk
+++ b/content/content_common_mojo_bindings.target.darwin-mips.mk
@@ -99,6 +99,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -129,8 +130,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -193,6 +194,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -224,8 +226,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_common_mojo_bindings.target.darwin-x86.mk b/content/content_common_mojo_bindings.target.darwin-x86.mk
index e9b289d..15f8005 100644
--- a/content/content_common_mojo_bindings.target.darwin-x86.mk
+++ b/content/content_common_mojo_bindings.target.darwin-x86.mk
@@ -100,6 +100,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -130,8 +131,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -194,6 +195,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -225,8 +227,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_common_mojo_bindings.target.darwin-x86_64.mk b/content/content_common_mojo_bindings.target.darwin-x86_64.mk
index 34be9ed..4f4d6a4 100644
--- a/content/content_common_mojo_bindings.target.darwin-x86_64.mk
+++ b/content/content_common_mojo_bindings.target.darwin-x86_64.mk
@@ -99,6 +99,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -129,8 +130,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -192,6 +193,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -223,8 +225,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_common_mojo_bindings.target.linux-arm.mk b/content/content_common_mojo_bindings.target.linux-arm.mk
index 8c50560..49a3455 100644
--- a/content/content_common_mojo_bindings.target.linux-arm.mk
+++ b/content/content_common_mojo_bindings.target.linux-arm.mk
@@ -105,6 +105,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -135,8 +136,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -205,6 +206,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -236,8 +238,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_common_mojo_bindings.target.linux-arm64.mk b/content/content_common_mojo_bindings.target.linux-arm64.mk
index 6571879..6bf8c49 100644
--- a/content/content_common_mojo_bindings.target.linux-arm64.mk
+++ b/content/content_common_mojo_bindings.target.linux-arm64.mk
@@ -95,6 +95,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -125,8 +126,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -184,6 +185,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -215,8 +217,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_common_mojo_bindings.target.linux-mips.mk b/content/content_common_mojo_bindings.target.linux-mips.mk
index a4f1ccc..23a08b0 100644
--- a/content/content_common_mojo_bindings.target.linux-mips.mk
+++ b/content/content_common_mojo_bindings.target.linux-mips.mk
@@ -99,6 +99,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -129,8 +130,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -193,6 +194,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -224,8 +226,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_common_mojo_bindings.target.linux-x86.mk b/content/content_common_mojo_bindings.target.linux-x86.mk
index e9b289d..15f8005 100644
--- a/content/content_common_mojo_bindings.target.linux-x86.mk
+++ b/content/content_common_mojo_bindings.target.linux-x86.mk
@@ -100,6 +100,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -130,8 +131,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -194,6 +195,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -225,8 +227,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_common_mojo_bindings.target.linux-x86_64.mk b/content/content_common_mojo_bindings.target.linux-x86_64.mk
index 34be9ed..4f4d6a4 100644
--- a/content/content_common_mojo_bindings.target.linux-x86_64.mk
+++ b/content/content_common_mojo_bindings.target.linux-x86_64.mk
@@ -99,6 +99,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -129,8 +130,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -192,6 +193,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -223,8 +225,8 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_gamepad_mapping.target.darwin-arm.mk b/content/content_gamepad_mapping.target.darwin-arm.mk
index 6a1156c..b7aca7e 100644
--- a/content/content_gamepad_mapping.target.darwin-arm.mk
+++ b/content/content_gamepad_mapping.target.darwin-arm.mk
@@ -102,6 +102,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -130,6 +131,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -198,6 +200,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -227,6 +230,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_gamepad_mapping.target.darwin-arm64.mk b/content/content_gamepad_mapping.target.darwin-arm64.mk
index f6dd53a..90343f3 100644
--- a/content/content_gamepad_mapping.target.darwin-arm64.mk
+++ b/content/content_gamepad_mapping.target.darwin-arm64.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_gamepad_mapping.target.darwin-mips.mk b/content/content_gamepad_mapping.target.darwin-mips.mk
index ebf06f8..38e1641 100644
--- a/content/content_gamepad_mapping.target.darwin-mips.mk
+++ b/content/content_gamepad_mapping.target.darwin-mips.mk
@@ -96,6 +96,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -124,6 +125,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -186,6 +188,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -215,6 +218,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_gamepad_mapping.target.darwin-x86.mk b/content/content_gamepad_mapping.target.darwin-x86.mk
index e2aa431..09409cd 100644
--- a/content/content_gamepad_mapping.target.darwin-x86.mk
+++ b/content/content_gamepad_mapping.target.darwin-x86.mk
@@ -97,6 +97,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -125,6 +126,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -187,6 +189,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -216,6 +219,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_gamepad_mapping.target.darwin-x86_64.mk b/content/content_gamepad_mapping.target.darwin-x86_64.mk
index 7dfd828..6adaa08 100644
--- a/content/content_gamepad_mapping.target.darwin-x86_64.mk
+++ b/content/content_gamepad_mapping.target.darwin-x86_64.mk
@@ -96,6 +96,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -124,6 +125,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -185,6 +187,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -214,6 +217,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_gamepad_mapping.target.linux-arm.mk b/content/content_gamepad_mapping.target.linux-arm.mk
index 6a1156c..b7aca7e 100644
--- a/content/content_gamepad_mapping.target.linux-arm.mk
+++ b/content/content_gamepad_mapping.target.linux-arm.mk
@@ -102,6 +102,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -130,6 +131,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -198,6 +200,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -227,6 +230,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_gamepad_mapping.target.linux-arm64.mk b/content/content_gamepad_mapping.target.linux-arm64.mk
index f6dd53a..90343f3 100644
--- a/content/content_gamepad_mapping.target.linux-arm64.mk
+++ b/content/content_gamepad_mapping.target.linux-arm64.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_gamepad_mapping.target.linux-mips.mk b/content/content_gamepad_mapping.target.linux-mips.mk
index ebf06f8..38e1641 100644
--- a/content/content_gamepad_mapping.target.linux-mips.mk
+++ b/content/content_gamepad_mapping.target.linux-mips.mk
@@ -96,6 +96,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -124,6 +125,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -186,6 +188,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -215,6 +218,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_gamepad_mapping.target.linux-x86.mk b/content/content_gamepad_mapping.target.linux-x86.mk
index e2aa431..09409cd 100644
--- a/content/content_gamepad_mapping.target.linux-x86.mk
+++ b/content/content_gamepad_mapping.target.linux-x86.mk
@@ -97,6 +97,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -125,6 +126,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -187,6 +189,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -216,6 +219,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_gamepad_mapping.target.linux-x86_64.mk b/content/content_gamepad_mapping.target.linux-x86_64.mk
index 7dfd828..6adaa08 100644
--- a/content/content_gamepad_mapping.target.linux-x86_64.mk
+++ b/content/content_gamepad_mapping.target.linux-x86_64.mk
@@ -96,6 +96,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -124,6 +125,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -185,6 +187,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -214,6 +217,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_gpu.target.darwin-arm.mk b/content/content_gpu.target.darwin-arm.mk
index d4bfa1f..b16a5f6 100644
--- a/content/content_gpu.target.darwin-arm.mk
+++ b/content/content_gpu.target.darwin-arm.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -108,11 +109,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -137,13 +138,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -225,6 +226,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -246,11 +248,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -276,13 +278,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_gpu.target.darwin-arm64.mk b/content/content_gpu.target.darwin-arm64.mk
index de4dab5..fdcd8b0 100644
--- a/content/content_gpu.target.darwin-arm64.mk
+++ b/content/content_gpu.target.darwin-arm64.mk
@@ -77,6 +77,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -98,11 +99,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -127,13 +128,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -204,6 +205,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -225,11 +227,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -255,13 +257,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_gpu.target.darwin-mips.mk b/content/content_gpu.target.darwin-mips.mk
index 6c0ab1b..9a6506a 100644
--- a/content/content_gpu.target.darwin-mips.mk
+++ b/content/content_gpu.target.darwin-mips.mk
@@ -81,6 +81,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -102,11 +103,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -131,13 +132,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -213,6 +214,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -234,11 +236,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -264,13 +266,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_gpu.target.darwin-x86.mk b/content/content_gpu.target.darwin-x86.mk
index 77d4d8f..5b661b3 100644
--- a/content/content_gpu.target.darwin-x86.mk
+++ b/content/content_gpu.target.darwin-x86.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -103,11 +104,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -132,13 +133,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -214,6 +215,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -235,11 +237,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -265,13 +267,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_gpu.target.darwin-x86_64.mk b/content/content_gpu.target.darwin-x86_64.mk
index cca37a4..3458675 100644
--- a/content/content_gpu.target.darwin-x86_64.mk
+++ b/content/content_gpu.target.darwin-x86_64.mk
@@ -81,6 +81,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -102,11 +103,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -131,13 +132,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -212,6 +213,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -233,11 +235,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -263,13 +265,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_gpu.target.linux-arm.mk b/content/content_gpu.target.linux-arm.mk
index d4bfa1f..b16a5f6 100644
--- a/content/content_gpu.target.linux-arm.mk
+++ b/content/content_gpu.target.linux-arm.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -108,11 +109,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -137,13 +138,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -225,6 +226,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -246,11 +248,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -276,13 +278,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_gpu.target.linux-arm64.mk b/content/content_gpu.target.linux-arm64.mk
index de4dab5..fdcd8b0 100644
--- a/content/content_gpu.target.linux-arm64.mk
+++ b/content/content_gpu.target.linux-arm64.mk
@@ -77,6 +77,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -98,11 +99,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -127,13 +128,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -204,6 +205,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -225,11 +227,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -255,13 +257,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_gpu.target.linux-mips.mk b/content/content_gpu.target.linux-mips.mk
index 6c0ab1b..9a6506a 100644
--- a/content/content_gpu.target.linux-mips.mk
+++ b/content/content_gpu.target.linux-mips.mk
@@ -81,6 +81,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -102,11 +103,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -131,13 +132,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -213,6 +214,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -234,11 +236,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -264,13 +266,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_gpu.target.linux-x86.mk b/content/content_gpu.target.linux-x86.mk
index 77d4d8f..5b661b3 100644
--- a/content/content_gpu.target.linux-x86.mk
+++ b/content/content_gpu.target.linux-x86.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -103,11 +104,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -132,13 +133,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -214,6 +215,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -235,11 +237,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -265,13 +267,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_gpu.target.linux-x86_64.mk b/content/content_gpu.target.linux-x86_64.mk
index cca37a4..3458675 100644
--- a/content/content_gpu.target.linux-x86_64.mk
+++ b/content/content_gpu.target.linux-x86_64.mk
@@ -81,6 +81,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -102,11 +103,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -131,13 +132,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
@@ -212,6 +213,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -233,11 +235,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -263,13 +265,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/skia/src/core \
$(LOCAL_PATH)/third_party/skia/include/core \
$(LOCAL_PATH)/third_party/skia/include/effects \
diff --git a/content/content_jni_headers.target.darwin-arm.mk b/content/content_jni_headers.target.darwin-arm.mk
index 283d8be..251b10b 100644
--- a/content/content_jni_headers.target.darwin-arm.mk
+++ b/content/content_jni_headers.target.darwin-arm.mk
@@ -436,6 +436,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -464,6 +465,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -532,6 +534,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -561,6 +564,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_jni_headers.target.darwin-arm64.mk b/content/content_jni_headers.target.darwin-arm64.mk
index 6e77ae6..c100139 100644
--- a/content/content_jni_headers.target.darwin-arm64.mk
+++ b/content/content_jni_headers.target.darwin-arm64.mk
@@ -426,6 +426,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -454,6 +455,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -511,6 +513,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -540,6 +543,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_jni_headers.target.darwin-mips.mk b/content/content_jni_headers.target.darwin-mips.mk
index 4d467e0..e5a42ed 100644
--- a/content/content_jni_headers.target.darwin-mips.mk
+++ b/content/content_jni_headers.target.darwin-mips.mk
@@ -430,6 +430,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -458,6 +459,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -520,6 +522,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -549,6 +552,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_jni_headers.target.darwin-x86.mk b/content/content_jni_headers.target.darwin-x86.mk
index 4cca891..f5c066d 100644
--- a/content/content_jni_headers.target.darwin-x86.mk
+++ b/content/content_jni_headers.target.darwin-x86.mk
@@ -431,6 +431,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -459,6 +460,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -521,6 +523,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -550,6 +553,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_jni_headers.target.darwin-x86_64.mk b/content/content_jni_headers.target.darwin-x86_64.mk
index d908d0b..0c9dc24 100644
--- a/content/content_jni_headers.target.darwin-x86_64.mk
+++ b/content/content_jni_headers.target.darwin-x86_64.mk
@@ -430,6 +430,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -458,6 +459,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -519,6 +521,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -548,6 +551,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_jni_headers.target.linux-arm.mk b/content/content_jni_headers.target.linux-arm.mk
index 283d8be..251b10b 100644
--- a/content/content_jni_headers.target.linux-arm.mk
+++ b/content/content_jni_headers.target.linux-arm.mk
@@ -436,6 +436,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -464,6 +465,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -532,6 +534,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -561,6 +564,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_jni_headers.target.linux-arm64.mk b/content/content_jni_headers.target.linux-arm64.mk
index 6e77ae6..c100139 100644
--- a/content/content_jni_headers.target.linux-arm64.mk
+++ b/content/content_jni_headers.target.linux-arm64.mk
@@ -426,6 +426,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -454,6 +455,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -511,6 +513,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -540,6 +543,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_jni_headers.target.linux-mips.mk b/content/content_jni_headers.target.linux-mips.mk
index 4d467e0..e5a42ed 100644
--- a/content/content_jni_headers.target.linux-mips.mk
+++ b/content/content_jni_headers.target.linux-mips.mk
@@ -430,6 +430,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -458,6 +459,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -520,6 +522,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -549,6 +552,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_jni_headers.target.linux-x86.mk b/content/content_jni_headers.target.linux-x86.mk
index 4cca891..f5c066d 100644
--- a/content/content_jni_headers.target.linux-x86.mk
+++ b/content/content_jni_headers.target.linux-x86.mk
@@ -431,6 +431,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -459,6 +460,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -521,6 +523,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -550,6 +553,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_jni_headers.target.linux-x86_64.mk b/content/content_jni_headers.target.linux-x86_64.mk
index d908d0b..0c9dc24 100644
--- a/content/content_jni_headers.target.linux-x86_64.mk
+++ b/content/content_jni_headers.target.linux-x86_64.mk
@@ -430,6 +430,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -458,6 +459,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -519,6 +521,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -548,6 +551,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi
index 9f87719..444a665 100644
--- a/content/content_renderer.gypi
+++ b/content/content_renderer.gypi
@@ -5,7 +5,11 @@
{
'dependencies': [
'content_common_mojo_bindings',
+ '../base/base.gyp:base',
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ '../cc/cc.gyp:cc',
'../gin/gin.gyp:gin',
+ '../gpu/gpu.gyp:gpu',
'../jingle/jingle.gyp:jingle_glue',
'../media/media.gyp:media',
'../mojo/mojo.gyp:mojo_environment_chromium',
@@ -21,14 +25,14 @@
'../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
'../ui/accessibility/accessibility.gyp:accessibility',
'../ui/events/events.gyp:dom4_keycode_converter',
+ '../ui/gfx/gfx.gyp:gfx',
+ '../ui/gfx/gfx.gyp:gfx_geometry',
'../ui/native_theme/native_theme.gyp:native_theme',
'../ui/surface/surface.gyp:surface',
'../v8/tools/gyp/v8.gyp:v8',
'../webkit/child/webkit_child.gyp:webkit_child',
'../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu',
'../webkit/common/webkit_common.gyp:webkit_common',
- '../webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_bindings',
- '../webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_support',
'../webkit/storage_common.gyp:webkit_storage_common',
],
'include_dirs': [
@@ -111,6 +115,46 @@
'renderer/clipboard_utils.h',
'renderer/child_frame_compositing_helper.cc',
'renderer/child_frame_compositing_helper.h',
+ 'renderer/compositor_bindings/scrollbar_impl.cc',
+ 'renderer/compositor_bindings/scrollbar_impl.h',
+ 'renderer/compositor_bindings/web_animation_curve_common.cc',
+ 'renderer/compositor_bindings/web_animation_curve_common.h',
+ 'renderer/compositor_bindings/web_animation_impl.cc',
+ 'renderer/compositor_bindings/web_animation_impl.h',
+ 'renderer/compositor_bindings/web_compositor_support_impl.cc',
+ 'renderer/compositor_bindings/web_compositor_support_impl.h',
+ 'renderer/compositor_bindings/web_content_layer_impl.cc',
+ 'renderer/compositor_bindings/web_content_layer_impl.h',
+ 'renderer/compositor_bindings/web_external_bitmap_impl.cc',
+ 'renderer/compositor_bindings/web_external_bitmap_impl.h',
+ 'renderer/compositor_bindings/web_external_texture_layer_impl.cc',
+ 'renderer/compositor_bindings/web_external_texture_layer_impl.h',
+ 'renderer/compositor_bindings/web_filter_animation_curve_impl.cc',
+ 'renderer/compositor_bindings/web_filter_animation_curve_impl.h',
+ 'renderer/compositor_bindings/web_filter_operations_impl.cc',
+ 'renderer/compositor_bindings/web_filter_operations_impl.h',
+ 'renderer/compositor_bindings/web_float_animation_curve_impl.cc',
+ 'renderer/compositor_bindings/web_float_animation_curve_impl.h',
+ 'renderer/compositor_bindings/web_image_layer_impl.cc',
+ 'renderer/compositor_bindings/web_image_layer_impl.h',
+ 'renderer/compositor_bindings/web_layer_impl.cc',
+ 'renderer/compositor_bindings/web_layer_impl.h',
+ 'renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc',
+ 'renderer/compositor_bindings/web_layer_impl_fixed_bounds.h',
+ 'renderer/compositor_bindings/web_nine_patch_layer_impl.cc',
+ 'renderer/compositor_bindings/web_nine_patch_layer_impl.h',
+ 'renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc',
+ 'renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h',
+ 'renderer/compositor_bindings/web_scrollbar_layer_impl.cc',
+ 'renderer/compositor_bindings/web_scrollbar_layer_impl.h',
+ 'renderer/compositor_bindings/web_solid_color_layer_impl.cc',
+ 'renderer/compositor_bindings/web_solid_color_layer_impl.h',
+ 'renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc',
+ 'renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h',
+ 'renderer/compositor_bindings/web_transform_animation_curve_impl.cc',
+ 'renderer/compositor_bindings/web_transform_animation_curve_impl.h',
+ 'renderer/compositor_bindings/web_transform_operations_impl.cc',
+ 'renderer/compositor_bindings/web_transform_operations_impl.h',
'renderer/context_menu_params_builder.cc',
'renderer/context_menu_params_builder.h',
'renderer/cursor_utils.cc',
@@ -205,6 +249,8 @@
'renderer/java/java_bridge_dispatcher.h',
'renderer/media/active_loader.cc',
'renderer/media/active_loader.h',
+ 'renderer/media/aec_dump_message_filter.cc',
+ 'renderer/media/aec_dump_message_filter.h',
'renderer/media/android/audio_decoder_android.cc',
'renderer/media/android/audio_decoder_android.h',
'renderer/media/android/media_info_loader.cc',
@@ -255,10 +301,6 @@
'renderer/media/crypto/ppapi_decryptor.h',
'renderer/media/crypto/proxy_decryptor.cc',
'renderer/media/crypto/proxy_decryptor.h',
- 'renderer/media/crypto/proxy_media_keys.cc',
- 'renderer/media/crypto/proxy_media_keys.h',
- 'renderer/media/crypto/renderer_cdm_manager.cc',
- 'renderer/media/crypto/renderer_cdm_manager.h',
'renderer/media/media_stream_audio_level_calculator.cc',
'renderer/media/media_stream_audio_level_calculator.h',
'renderer/media/media_stream_audio_renderer.cc',
@@ -326,7 +368,7 @@
'renderer/mouse_lock_dispatcher.cc',
'renderer/mouse_lock_dispatcher.h',
'renderer/net_info_helper.cc',
- 'renderer/net_info_helper.h',
+ 'renderer/net_info_helper.h',
'renderer/notification_provider.cc',
'renderer/notification_provider.h',
'renderer/push_messaging_dispatcher.cc',
@@ -396,6 +438,8 @@
'renderer/shared_memory_seqlock_reader.h',
'renderer/shared_worker_repository.cc',
'renderer/shared_worker_repository.h',
+ 'renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc',
+ 'renderer/shared_worker/embedded_shared_worker_permission_client_proxy.h',
'renderer/shared_worker/embedded_shared_worker_stub.cc',
'renderer/shared_worker/embedded_shared_worker_stub.h',
'renderer/skia_benchmarking_extension.cc',
@@ -477,6 +521,8 @@
'renderer/pepper/pepper_broker.h',
'renderer/pepper/pepper_browser_connection.cc',
'renderer/pepper/pepper_browser_connection.h',
+ 'renderer/pepper/pepper_compositor_host.cc',
+ 'renderer/pepper/pepper_compositor_host.h',
'renderer/pepper/pepper_device_enumeration_host_helper.cc',
'renderer/pepper/pepper_device_enumeration_host_helper.h',
'renderer/pepper/pepper_file_chooser_host.cc',
@@ -568,6 +614,8 @@
'renderer/pepper/usb_key_code_conversion_win.cc',
'renderer/pepper/v8_var_converter.cc',
'renderer/pepper/v8_var_converter.h',
+ 'renderer/pepper/video_decoder_shim.cc',
+ 'renderer/pepper/video_decoder_shim.h',
'renderer/render_widget_fullscreen_pepper.cc',
'renderer/render_widget_fullscreen_pepper.h',
],
@@ -646,7 +694,7 @@
'renderer/media/webrtc/webrtc_video_track_adapter.cc',
'renderer/media/webrtc/webrtc_video_track_adapter.h',
'renderer/media/webrtc/media_stream_remote_video_source.cc',
- 'renderer/media/webrtc/media_stream_remote_video_source.h',
+ 'renderer/media/webrtc/media_stream_remote_video_source.h',
'renderer/media/webrtc/media_stream_track_metrics.cc',
'renderer/media/webrtc/media_stream_track_metrics.h',
'renderer/media/webrtc/peer_connection_dependency_factory.cc',
@@ -826,6 +874,14 @@
'renderer/media/crypto/ppapi_decryptor.h',
],
}],
+ ['enable_browser_cdms==1', {
+ 'sources': [
+ 'renderer/media/crypto/proxy_media_keys.cc',
+ 'renderer/media/crypto/proxy_media_keys.h',
+ 'renderer/media/crypto/renderer_cdm_manager.cc',
+ 'renderer/media/crypto/renderer_cdm_manager.h',
+ ],
+ }],
],
'target_conditions': [
['OS=="android"', {
diff --git a/content/content_renderer.target.darwin-arm.mk b/content/content_renderer.target.darwin-arm.mk
index ae50672..08c3852 100644
--- a/content/content_renderer.target.darwin-arm.mk
+++ b/content/content_renderer.target.darwin-arm.mk
@@ -14,6 +14,7 @@
GYP_TARGET_DEPENDENCIES := \
$(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,content_content_common_mojo_bindings_gyp,,,$(GYP_VAR_PREFIX))/content_content_common_mojo_bindings_gyp.a \
+ $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_service_provider_bindings_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_service_provider_bindings_gyp.a \
$(call intermediates-dir-for,GYP,skia_skia_gyp,,,$(GYP_VAR_PREFIX))/skia.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a \
@@ -66,6 +67,26 @@
content/renderer/browser_plugin/browser_plugin_manager.cc \
content/renderer/clipboard_utils.cc \
content/renderer/child_frame_compositing_helper.cc \
+ content/renderer/compositor_bindings/scrollbar_impl.cc \
+ content/renderer/compositor_bindings/web_animation_curve_common.cc \
+ content/renderer/compositor_bindings/web_animation_impl.cc \
+ content/renderer/compositor_bindings/web_compositor_support_impl.cc \
+ content/renderer/compositor_bindings/web_content_layer_impl.cc \
+ content/renderer/compositor_bindings/web_external_bitmap_impl.cc \
+ content/renderer/compositor_bindings/web_external_texture_layer_impl.cc \
+ content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_filter_operations_impl.cc \
+ content/renderer/compositor_bindings/web_float_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_image_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc \
+ content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc \
+ content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc \
+ content/renderer/compositor_bindings/web_solid_color_layer_impl.cc \
+ content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc \
+ content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_transform_operations_impl.cc \
content/renderer/context_menu_params_builder.cc \
content/renderer/cursor_utils.cc \
content/renderer/date_time_suggestion_builder.cc \
@@ -112,6 +133,7 @@
content/renderer/java/java_bridge_channel.cc \
content/renderer/java/java_bridge_dispatcher.cc \
content/renderer/media/active_loader.cc \
+ content/renderer/media/aec_dump_message_filter.cc \
content/renderer/media/android/audio_decoder_android.cc \
content/renderer/media/android/media_info_loader.cc \
content/renderer/media/android/media_source_delegate.cc \
@@ -134,8 +156,6 @@
content/renderer/media/crypto/key_systems_support_uma.cc \
content/renderer/media/crypto/pepper_cdm_wrapper_impl.cc \
content/renderer/media/crypto/proxy_decryptor.cc \
- content/renderer/media/crypto/proxy_media_keys.cc \
- content/renderer/media/crypto/renderer_cdm_manager.cc \
content/renderer/media/media_stream_audio_level_calculator.cc \
content/renderer/media/media_stream_audio_renderer.cc \
content/renderer/media/media_stream_constraints_util.cc \
@@ -199,6 +219,7 @@
content/renderer/service_worker/service_worker_script_context.cc \
content/renderer/shared_memory_seqlock_reader.cc \
content/renderer/shared_worker_repository.cc \
+ content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc \
content/renderer/shared_worker/embedded_shared_worker_stub.cc \
content/renderer/skia_benchmarking_extension.cc \
content/renderer/speech_recognition_dispatcher.cc \
@@ -275,7 +296,9 @@
content/renderer/p2p/ipc_socket_factory.cc \
content/renderer/p2p/port_allocator.cc \
content/renderer/p2p/socket_client_impl.cc \
- content/renderer/p2p/socket_dispatcher.cc
+ content/renderer/p2p/socket_dispatcher.cc \
+ content/renderer/media/crypto/proxy_media_keys.cc \
+ content/renderer/media/crypto/renderer_cdm_manager.cc
# Flags passed to both C and C++ files.
@@ -330,6 +353,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -354,11 +378,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -403,8 +427,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
@@ -519,6 +543,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -543,11 +568,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -593,8 +618,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
diff --git a/content/content_renderer.target.darwin-arm64.mk b/content/content_renderer.target.darwin-arm64.mk
index bd7bca8..e89af60 100644
--- a/content/content_renderer.target.darwin-arm64.mk
+++ b/content/content_renderer.target.darwin-arm64.mk
@@ -14,6 +14,7 @@
GYP_TARGET_DEPENDENCIES := \
$(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,content_content_common_mojo_bindings_gyp,,,$(GYP_VAR_PREFIX))/content_content_common_mojo_bindings_gyp.a \
+ $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_service_provider_bindings_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_service_provider_bindings_gyp.a \
$(call intermediates-dir-for,GYP,skia_skia_gyp,,,$(GYP_VAR_PREFIX))/skia.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a \
@@ -66,6 +67,26 @@
content/renderer/browser_plugin/browser_plugin_manager.cc \
content/renderer/clipboard_utils.cc \
content/renderer/child_frame_compositing_helper.cc \
+ content/renderer/compositor_bindings/scrollbar_impl.cc \
+ content/renderer/compositor_bindings/web_animation_curve_common.cc \
+ content/renderer/compositor_bindings/web_animation_impl.cc \
+ content/renderer/compositor_bindings/web_compositor_support_impl.cc \
+ content/renderer/compositor_bindings/web_content_layer_impl.cc \
+ content/renderer/compositor_bindings/web_external_bitmap_impl.cc \
+ content/renderer/compositor_bindings/web_external_texture_layer_impl.cc \
+ content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_filter_operations_impl.cc \
+ content/renderer/compositor_bindings/web_float_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_image_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc \
+ content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc \
+ content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc \
+ content/renderer/compositor_bindings/web_solid_color_layer_impl.cc \
+ content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc \
+ content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_transform_operations_impl.cc \
content/renderer/context_menu_params_builder.cc \
content/renderer/cursor_utils.cc \
content/renderer/date_time_suggestion_builder.cc \
@@ -112,6 +133,7 @@
content/renderer/java/java_bridge_channel.cc \
content/renderer/java/java_bridge_dispatcher.cc \
content/renderer/media/active_loader.cc \
+ content/renderer/media/aec_dump_message_filter.cc \
content/renderer/media/android/audio_decoder_android.cc \
content/renderer/media/android/media_info_loader.cc \
content/renderer/media/android/media_source_delegate.cc \
@@ -134,8 +156,6 @@
content/renderer/media/crypto/key_systems_support_uma.cc \
content/renderer/media/crypto/pepper_cdm_wrapper_impl.cc \
content/renderer/media/crypto/proxy_decryptor.cc \
- content/renderer/media/crypto/proxy_media_keys.cc \
- content/renderer/media/crypto/renderer_cdm_manager.cc \
content/renderer/media/media_stream_audio_level_calculator.cc \
content/renderer/media/media_stream_audio_renderer.cc \
content/renderer/media/media_stream_constraints_util.cc \
@@ -199,6 +219,7 @@
content/renderer/service_worker/service_worker_script_context.cc \
content/renderer/shared_memory_seqlock_reader.cc \
content/renderer/shared_worker_repository.cc \
+ content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc \
content/renderer/shared_worker/embedded_shared_worker_stub.cc \
content/renderer/skia_benchmarking_extension.cc \
content/renderer/speech_recognition_dispatcher.cc \
@@ -275,7 +296,9 @@
content/renderer/p2p/ipc_socket_factory.cc \
content/renderer/p2p/port_allocator.cc \
content/renderer/p2p/socket_client_impl.cc \
- content/renderer/p2p/socket_dispatcher.cc
+ content/renderer/p2p/socket_dispatcher.cc \
+ content/renderer/media/crypto/proxy_media_keys.cc \
+ content/renderer/media/crypto/renderer_cdm_manager.cc
# Flags passed to both C and C++ files.
@@ -320,6 +343,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -344,11 +368,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -393,8 +417,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
@@ -498,6 +522,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -522,11 +547,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -572,8 +597,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
diff --git a/content/content_renderer.target.darwin-mips.mk b/content/content_renderer.target.darwin-mips.mk
index 2dd230d..a5d66c1 100644
--- a/content/content_renderer.target.darwin-mips.mk
+++ b/content/content_renderer.target.darwin-mips.mk
@@ -14,6 +14,7 @@
GYP_TARGET_DEPENDENCIES := \
$(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,content_content_common_mojo_bindings_gyp,,,$(GYP_VAR_PREFIX))/content_content_common_mojo_bindings_gyp.a \
+ $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_service_provider_bindings_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_service_provider_bindings_gyp.a \
$(call intermediates-dir-for,GYP,skia_skia_gyp,,,$(GYP_VAR_PREFIX))/skia.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a \
@@ -66,6 +67,26 @@
content/renderer/browser_plugin/browser_plugin_manager.cc \
content/renderer/clipboard_utils.cc \
content/renderer/child_frame_compositing_helper.cc \
+ content/renderer/compositor_bindings/scrollbar_impl.cc \
+ content/renderer/compositor_bindings/web_animation_curve_common.cc \
+ content/renderer/compositor_bindings/web_animation_impl.cc \
+ content/renderer/compositor_bindings/web_compositor_support_impl.cc \
+ content/renderer/compositor_bindings/web_content_layer_impl.cc \
+ content/renderer/compositor_bindings/web_external_bitmap_impl.cc \
+ content/renderer/compositor_bindings/web_external_texture_layer_impl.cc \
+ content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_filter_operations_impl.cc \
+ content/renderer/compositor_bindings/web_float_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_image_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc \
+ content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc \
+ content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc \
+ content/renderer/compositor_bindings/web_solid_color_layer_impl.cc \
+ content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc \
+ content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_transform_operations_impl.cc \
content/renderer/context_menu_params_builder.cc \
content/renderer/cursor_utils.cc \
content/renderer/date_time_suggestion_builder.cc \
@@ -112,6 +133,7 @@
content/renderer/java/java_bridge_channel.cc \
content/renderer/java/java_bridge_dispatcher.cc \
content/renderer/media/active_loader.cc \
+ content/renderer/media/aec_dump_message_filter.cc \
content/renderer/media/android/audio_decoder_android.cc \
content/renderer/media/android/media_info_loader.cc \
content/renderer/media/android/media_source_delegate.cc \
@@ -134,8 +156,6 @@
content/renderer/media/crypto/key_systems_support_uma.cc \
content/renderer/media/crypto/pepper_cdm_wrapper_impl.cc \
content/renderer/media/crypto/proxy_decryptor.cc \
- content/renderer/media/crypto/proxy_media_keys.cc \
- content/renderer/media/crypto/renderer_cdm_manager.cc \
content/renderer/media/media_stream_audio_level_calculator.cc \
content/renderer/media/media_stream_audio_renderer.cc \
content/renderer/media/media_stream_constraints_util.cc \
@@ -199,6 +219,7 @@
content/renderer/service_worker/service_worker_script_context.cc \
content/renderer/shared_memory_seqlock_reader.cc \
content/renderer/shared_worker_repository.cc \
+ content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc \
content/renderer/shared_worker/embedded_shared_worker_stub.cc \
content/renderer/skia_benchmarking_extension.cc \
content/renderer/speech_recognition_dispatcher.cc \
@@ -275,7 +296,9 @@
content/renderer/p2p/ipc_socket_factory.cc \
content/renderer/p2p/port_allocator.cc \
content/renderer/p2p/socket_client_impl.cc \
- content/renderer/p2p/socket_dispatcher.cc
+ content/renderer/p2p/socket_dispatcher.cc \
+ content/renderer/media/crypto/proxy_media_keys.cc \
+ content/renderer/media/crypto/renderer_cdm_manager.cc
# Flags passed to both C and C++ files.
@@ -324,6 +347,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -348,11 +372,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -397,8 +421,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
@@ -507,6 +531,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -531,11 +556,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -581,8 +606,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
diff --git a/content/content_renderer.target.darwin-x86.mk b/content/content_renderer.target.darwin-x86.mk
index 4499e79..2e15760 100644
--- a/content/content_renderer.target.darwin-x86.mk
+++ b/content/content_renderer.target.darwin-x86.mk
@@ -14,6 +14,7 @@
GYP_TARGET_DEPENDENCIES := \
$(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,content_content_common_mojo_bindings_gyp,,,$(GYP_VAR_PREFIX))/content_content_common_mojo_bindings_gyp.a \
+ $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_service_provider_bindings_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_service_provider_bindings_gyp.a \
$(call intermediates-dir-for,GYP,skia_skia_gyp,,,$(GYP_VAR_PREFIX))/skia.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a \
@@ -66,6 +67,26 @@
content/renderer/browser_plugin/browser_plugin_manager.cc \
content/renderer/clipboard_utils.cc \
content/renderer/child_frame_compositing_helper.cc \
+ content/renderer/compositor_bindings/scrollbar_impl.cc \
+ content/renderer/compositor_bindings/web_animation_curve_common.cc \
+ content/renderer/compositor_bindings/web_animation_impl.cc \
+ content/renderer/compositor_bindings/web_compositor_support_impl.cc \
+ content/renderer/compositor_bindings/web_content_layer_impl.cc \
+ content/renderer/compositor_bindings/web_external_bitmap_impl.cc \
+ content/renderer/compositor_bindings/web_external_texture_layer_impl.cc \
+ content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_filter_operations_impl.cc \
+ content/renderer/compositor_bindings/web_float_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_image_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc \
+ content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc \
+ content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc \
+ content/renderer/compositor_bindings/web_solid_color_layer_impl.cc \
+ content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc \
+ content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_transform_operations_impl.cc \
content/renderer/context_menu_params_builder.cc \
content/renderer/cursor_utils.cc \
content/renderer/date_time_suggestion_builder.cc \
@@ -112,6 +133,7 @@
content/renderer/java/java_bridge_channel.cc \
content/renderer/java/java_bridge_dispatcher.cc \
content/renderer/media/active_loader.cc \
+ content/renderer/media/aec_dump_message_filter.cc \
content/renderer/media/android/audio_decoder_android.cc \
content/renderer/media/android/media_info_loader.cc \
content/renderer/media/android/media_source_delegate.cc \
@@ -134,8 +156,6 @@
content/renderer/media/crypto/key_systems_support_uma.cc \
content/renderer/media/crypto/pepper_cdm_wrapper_impl.cc \
content/renderer/media/crypto/proxy_decryptor.cc \
- content/renderer/media/crypto/proxy_media_keys.cc \
- content/renderer/media/crypto/renderer_cdm_manager.cc \
content/renderer/media/media_stream_audio_level_calculator.cc \
content/renderer/media/media_stream_audio_renderer.cc \
content/renderer/media/media_stream_constraints_util.cc \
@@ -199,6 +219,7 @@
content/renderer/service_worker/service_worker_script_context.cc \
content/renderer/shared_memory_seqlock_reader.cc \
content/renderer/shared_worker_repository.cc \
+ content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc \
content/renderer/shared_worker/embedded_shared_worker_stub.cc \
content/renderer/skia_benchmarking_extension.cc \
content/renderer/speech_recognition_dispatcher.cc \
@@ -275,7 +296,9 @@
content/renderer/p2p/ipc_socket_factory.cc \
content/renderer/p2p/port_allocator.cc \
content/renderer/p2p/socket_client_impl.cc \
- content/renderer/p2p/socket_dispatcher.cc
+ content/renderer/p2p/socket_dispatcher.cc \
+ content/renderer/media/crypto/proxy_media_keys.cc \
+ content/renderer/media/crypto/renderer_cdm_manager.cc
# Flags passed to both C and C++ files.
@@ -325,6 +348,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -348,11 +372,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -397,8 +421,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
@@ -507,6 +531,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -530,11 +555,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -580,8 +605,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
diff --git a/content/content_renderer.target.darwin-x86_64.mk b/content/content_renderer.target.darwin-x86_64.mk
index 033fa4d..c518ab4 100644
--- a/content/content_renderer.target.darwin-x86_64.mk
+++ b/content/content_renderer.target.darwin-x86_64.mk
@@ -14,6 +14,7 @@
GYP_TARGET_DEPENDENCIES := \
$(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,content_content_common_mojo_bindings_gyp,,,$(GYP_VAR_PREFIX))/content_content_common_mojo_bindings_gyp.a \
+ $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_service_provider_bindings_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_service_provider_bindings_gyp.a \
$(call intermediates-dir-for,GYP,skia_skia_gyp,,,$(GYP_VAR_PREFIX))/skia.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a \
@@ -66,6 +67,26 @@
content/renderer/browser_plugin/browser_plugin_manager.cc \
content/renderer/clipboard_utils.cc \
content/renderer/child_frame_compositing_helper.cc \
+ content/renderer/compositor_bindings/scrollbar_impl.cc \
+ content/renderer/compositor_bindings/web_animation_curve_common.cc \
+ content/renderer/compositor_bindings/web_animation_impl.cc \
+ content/renderer/compositor_bindings/web_compositor_support_impl.cc \
+ content/renderer/compositor_bindings/web_content_layer_impl.cc \
+ content/renderer/compositor_bindings/web_external_bitmap_impl.cc \
+ content/renderer/compositor_bindings/web_external_texture_layer_impl.cc \
+ content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_filter_operations_impl.cc \
+ content/renderer/compositor_bindings/web_float_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_image_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc \
+ content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc \
+ content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc \
+ content/renderer/compositor_bindings/web_solid_color_layer_impl.cc \
+ content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc \
+ content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_transform_operations_impl.cc \
content/renderer/context_menu_params_builder.cc \
content/renderer/cursor_utils.cc \
content/renderer/date_time_suggestion_builder.cc \
@@ -112,6 +133,7 @@
content/renderer/java/java_bridge_channel.cc \
content/renderer/java/java_bridge_dispatcher.cc \
content/renderer/media/active_loader.cc \
+ content/renderer/media/aec_dump_message_filter.cc \
content/renderer/media/android/audio_decoder_android.cc \
content/renderer/media/android/media_info_loader.cc \
content/renderer/media/android/media_source_delegate.cc \
@@ -134,8 +156,6 @@
content/renderer/media/crypto/key_systems_support_uma.cc \
content/renderer/media/crypto/pepper_cdm_wrapper_impl.cc \
content/renderer/media/crypto/proxy_decryptor.cc \
- content/renderer/media/crypto/proxy_media_keys.cc \
- content/renderer/media/crypto/renderer_cdm_manager.cc \
content/renderer/media/media_stream_audio_level_calculator.cc \
content/renderer/media/media_stream_audio_renderer.cc \
content/renderer/media/media_stream_constraints_util.cc \
@@ -199,6 +219,7 @@
content/renderer/service_worker/service_worker_script_context.cc \
content/renderer/shared_memory_seqlock_reader.cc \
content/renderer/shared_worker_repository.cc \
+ content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc \
content/renderer/shared_worker/embedded_shared_worker_stub.cc \
content/renderer/skia_benchmarking_extension.cc \
content/renderer/speech_recognition_dispatcher.cc \
@@ -275,7 +296,9 @@
content/renderer/p2p/ipc_socket_factory.cc \
content/renderer/p2p/port_allocator.cc \
content/renderer/p2p/socket_client_impl.cc \
- content/renderer/p2p/socket_dispatcher.cc
+ content/renderer/p2p/socket_dispatcher.cc \
+ content/renderer/media/crypto/proxy_media_keys.cc \
+ content/renderer/media/crypto/renderer_cdm_manager.cc
# Flags passed to both C and C++ files.
@@ -324,6 +347,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -348,11 +372,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -397,8 +421,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
@@ -506,6 +530,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -530,11 +555,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -580,8 +605,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
diff --git a/content/content_renderer.target.linux-arm.mk b/content/content_renderer.target.linux-arm.mk
index ae50672..08c3852 100644
--- a/content/content_renderer.target.linux-arm.mk
+++ b/content/content_renderer.target.linux-arm.mk
@@ -14,6 +14,7 @@
GYP_TARGET_DEPENDENCIES := \
$(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,content_content_common_mojo_bindings_gyp,,,$(GYP_VAR_PREFIX))/content_content_common_mojo_bindings_gyp.a \
+ $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_service_provider_bindings_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_service_provider_bindings_gyp.a \
$(call intermediates-dir-for,GYP,skia_skia_gyp,,,$(GYP_VAR_PREFIX))/skia.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a \
@@ -66,6 +67,26 @@
content/renderer/browser_plugin/browser_plugin_manager.cc \
content/renderer/clipboard_utils.cc \
content/renderer/child_frame_compositing_helper.cc \
+ content/renderer/compositor_bindings/scrollbar_impl.cc \
+ content/renderer/compositor_bindings/web_animation_curve_common.cc \
+ content/renderer/compositor_bindings/web_animation_impl.cc \
+ content/renderer/compositor_bindings/web_compositor_support_impl.cc \
+ content/renderer/compositor_bindings/web_content_layer_impl.cc \
+ content/renderer/compositor_bindings/web_external_bitmap_impl.cc \
+ content/renderer/compositor_bindings/web_external_texture_layer_impl.cc \
+ content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_filter_operations_impl.cc \
+ content/renderer/compositor_bindings/web_float_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_image_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc \
+ content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc \
+ content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc \
+ content/renderer/compositor_bindings/web_solid_color_layer_impl.cc \
+ content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc \
+ content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_transform_operations_impl.cc \
content/renderer/context_menu_params_builder.cc \
content/renderer/cursor_utils.cc \
content/renderer/date_time_suggestion_builder.cc \
@@ -112,6 +133,7 @@
content/renderer/java/java_bridge_channel.cc \
content/renderer/java/java_bridge_dispatcher.cc \
content/renderer/media/active_loader.cc \
+ content/renderer/media/aec_dump_message_filter.cc \
content/renderer/media/android/audio_decoder_android.cc \
content/renderer/media/android/media_info_loader.cc \
content/renderer/media/android/media_source_delegate.cc \
@@ -134,8 +156,6 @@
content/renderer/media/crypto/key_systems_support_uma.cc \
content/renderer/media/crypto/pepper_cdm_wrapper_impl.cc \
content/renderer/media/crypto/proxy_decryptor.cc \
- content/renderer/media/crypto/proxy_media_keys.cc \
- content/renderer/media/crypto/renderer_cdm_manager.cc \
content/renderer/media/media_stream_audio_level_calculator.cc \
content/renderer/media/media_stream_audio_renderer.cc \
content/renderer/media/media_stream_constraints_util.cc \
@@ -199,6 +219,7 @@
content/renderer/service_worker/service_worker_script_context.cc \
content/renderer/shared_memory_seqlock_reader.cc \
content/renderer/shared_worker_repository.cc \
+ content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc \
content/renderer/shared_worker/embedded_shared_worker_stub.cc \
content/renderer/skia_benchmarking_extension.cc \
content/renderer/speech_recognition_dispatcher.cc \
@@ -275,7 +296,9 @@
content/renderer/p2p/ipc_socket_factory.cc \
content/renderer/p2p/port_allocator.cc \
content/renderer/p2p/socket_client_impl.cc \
- content/renderer/p2p/socket_dispatcher.cc
+ content/renderer/p2p/socket_dispatcher.cc \
+ content/renderer/media/crypto/proxy_media_keys.cc \
+ content/renderer/media/crypto/renderer_cdm_manager.cc
# Flags passed to both C and C++ files.
@@ -330,6 +353,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -354,11 +378,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -403,8 +427,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
@@ -519,6 +543,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -543,11 +568,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -593,8 +618,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
diff --git a/content/content_renderer.target.linux-arm64.mk b/content/content_renderer.target.linux-arm64.mk
index bd7bca8..e89af60 100644
--- a/content/content_renderer.target.linux-arm64.mk
+++ b/content/content_renderer.target.linux-arm64.mk
@@ -14,6 +14,7 @@
GYP_TARGET_DEPENDENCIES := \
$(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,content_content_common_mojo_bindings_gyp,,,$(GYP_VAR_PREFIX))/content_content_common_mojo_bindings_gyp.a \
+ $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_service_provider_bindings_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_service_provider_bindings_gyp.a \
$(call intermediates-dir-for,GYP,skia_skia_gyp,,,$(GYP_VAR_PREFIX))/skia.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a \
@@ -66,6 +67,26 @@
content/renderer/browser_plugin/browser_plugin_manager.cc \
content/renderer/clipboard_utils.cc \
content/renderer/child_frame_compositing_helper.cc \
+ content/renderer/compositor_bindings/scrollbar_impl.cc \
+ content/renderer/compositor_bindings/web_animation_curve_common.cc \
+ content/renderer/compositor_bindings/web_animation_impl.cc \
+ content/renderer/compositor_bindings/web_compositor_support_impl.cc \
+ content/renderer/compositor_bindings/web_content_layer_impl.cc \
+ content/renderer/compositor_bindings/web_external_bitmap_impl.cc \
+ content/renderer/compositor_bindings/web_external_texture_layer_impl.cc \
+ content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_filter_operations_impl.cc \
+ content/renderer/compositor_bindings/web_float_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_image_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc \
+ content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc \
+ content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc \
+ content/renderer/compositor_bindings/web_solid_color_layer_impl.cc \
+ content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc \
+ content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_transform_operations_impl.cc \
content/renderer/context_menu_params_builder.cc \
content/renderer/cursor_utils.cc \
content/renderer/date_time_suggestion_builder.cc \
@@ -112,6 +133,7 @@
content/renderer/java/java_bridge_channel.cc \
content/renderer/java/java_bridge_dispatcher.cc \
content/renderer/media/active_loader.cc \
+ content/renderer/media/aec_dump_message_filter.cc \
content/renderer/media/android/audio_decoder_android.cc \
content/renderer/media/android/media_info_loader.cc \
content/renderer/media/android/media_source_delegate.cc \
@@ -134,8 +156,6 @@
content/renderer/media/crypto/key_systems_support_uma.cc \
content/renderer/media/crypto/pepper_cdm_wrapper_impl.cc \
content/renderer/media/crypto/proxy_decryptor.cc \
- content/renderer/media/crypto/proxy_media_keys.cc \
- content/renderer/media/crypto/renderer_cdm_manager.cc \
content/renderer/media/media_stream_audio_level_calculator.cc \
content/renderer/media/media_stream_audio_renderer.cc \
content/renderer/media/media_stream_constraints_util.cc \
@@ -199,6 +219,7 @@
content/renderer/service_worker/service_worker_script_context.cc \
content/renderer/shared_memory_seqlock_reader.cc \
content/renderer/shared_worker_repository.cc \
+ content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc \
content/renderer/shared_worker/embedded_shared_worker_stub.cc \
content/renderer/skia_benchmarking_extension.cc \
content/renderer/speech_recognition_dispatcher.cc \
@@ -275,7 +296,9 @@
content/renderer/p2p/ipc_socket_factory.cc \
content/renderer/p2p/port_allocator.cc \
content/renderer/p2p/socket_client_impl.cc \
- content/renderer/p2p/socket_dispatcher.cc
+ content/renderer/p2p/socket_dispatcher.cc \
+ content/renderer/media/crypto/proxy_media_keys.cc \
+ content/renderer/media/crypto/renderer_cdm_manager.cc
# Flags passed to both C and C++ files.
@@ -320,6 +343,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -344,11 +368,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -393,8 +417,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
@@ -498,6 +522,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -522,11 +547,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -572,8 +597,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
diff --git a/content/content_renderer.target.linux-mips.mk b/content/content_renderer.target.linux-mips.mk
index 2dd230d..a5d66c1 100644
--- a/content/content_renderer.target.linux-mips.mk
+++ b/content/content_renderer.target.linux-mips.mk
@@ -14,6 +14,7 @@
GYP_TARGET_DEPENDENCIES := \
$(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,content_content_common_mojo_bindings_gyp,,,$(GYP_VAR_PREFIX))/content_content_common_mojo_bindings_gyp.a \
+ $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_service_provider_bindings_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_service_provider_bindings_gyp.a \
$(call intermediates-dir-for,GYP,skia_skia_gyp,,,$(GYP_VAR_PREFIX))/skia.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a \
@@ -66,6 +67,26 @@
content/renderer/browser_plugin/browser_plugin_manager.cc \
content/renderer/clipboard_utils.cc \
content/renderer/child_frame_compositing_helper.cc \
+ content/renderer/compositor_bindings/scrollbar_impl.cc \
+ content/renderer/compositor_bindings/web_animation_curve_common.cc \
+ content/renderer/compositor_bindings/web_animation_impl.cc \
+ content/renderer/compositor_bindings/web_compositor_support_impl.cc \
+ content/renderer/compositor_bindings/web_content_layer_impl.cc \
+ content/renderer/compositor_bindings/web_external_bitmap_impl.cc \
+ content/renderer/compositor_bindings/web_external_texture_layer_impl.cc \
+ content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_filter_operations_impl.cc \
+ content/renderer/compositor_bindings/web_float_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_image_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc \
+ content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc \
+ content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc \
+ content/renderer/compositor_bindings/web_solid_color_layer_impl.cc \
+ content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc \
+ content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_transform_operations_impl.cc \
content/renderer/context_menu_params_builder.cc \
content/renderer/cursor_utils.cc \
content/renderer/date_time_suggestion_builder.cc \
@@ -112,6 +133,7 @@
content/renderer/java/java_bridge_channel.cc \
content/renderer/java/java_bridge_dispatcher.cc \
content/renderer/media/active_loader.cc \
+ content/renderer/media/aec_dump_message_filter.cc \
content/renderer/media/android/audio_decoder_android.cc \
content/renderer/media/android/media_info_loader.cc \
content/renderer/media/android/media_source_delegate.cc \
@@ -134,8 +156,6 @@
content/renderer/media/crypto/key_systems_support_uma.cc \
content/renderer/media/crypto/pepper_cdm_wrapper_impl.cc \
content/renderer/media/crypto/proxy_decryptor.cc \
- content/renderer/media/crypto/proxy_media_keys.cc \
- content/renderer/media/crypto/renderer_cdm_manager.cc \
content/renderer/media/media_stream_audio_level_calculator.cc \
content/renderer/media/media_stream_audio_renderer.cc \
content/renderer/media/media_stream_constraints_util.cc \
@@ -199,6 +219,7 @@
content/renderer/service_worker/service_worker_script_context.cc \
content/renderer/shared_memory_seqlock_reader.cc \
content/renderer/shared_worker_repository.cc \
+ content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc \
content/renderer/shared_worker/embedded_shared_worker_stub.cc \
content/renderer/skia_benchmarking_extension.cc \
content/renderer/speech_recognition_dispatcher.cc \
@@ -275,7 +296,9 @@
content/renderer/p2p/ipc_socket_factory.cc \
content/renderer/p2p/port_allocator.cc \
content/renderer/p2p/socket_client_impl.cc \
- content/renderer/p2p/socket_dispatcher.cc
+ content/renderer/p2p/socket_dispatcher.cc \
+ content/renderer/media/crypto/proxy_media_keys.cc \
+ content/renderer/media/crypto/renderer_cdm_manager.cc
# Flags passed to both C and C++ files.
@@ -324,6 +347,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -348,11 +372,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -397,8 +421,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
@@ -507,6 +531,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -531,11 +556,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -581,8 +606,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
diff --git a/content/content_renderer.target.linux-x86.mk b/content/content_renderer.target.linux-x86.mk
index 4499e79..2e15760 100644
--- a/content/content_renderer.target.linux-x86.mk
+++ b/content/content_renderer.target.linux-x86.mk
@@ -14,6 +14,7 @@
GYP_TARGET_DEPENDENCIES := \
$(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,content_content_common_mojo_bindings_gyp,,,$(GYP_VAR_PREFIX))/content_content_common_mojo_bindings_gyp.a \
+ $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_service_provider_bindings_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_service_provider_bindings_gyp.a \
$(call intermediates-dir-for,GYP,skia_skia_gyp,,,$(GYP_VAR_PREFIX))/skia.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a \
@@ -66,6 +67,26 @@
content/renderer/browser_plugin/browser_plugin_manager.cc \
content/renderer/clipboard_utils.cc \
content/renderer/child_frame_compositing_helper.cc \
+ content/renderer/compositor_bindings/scrollbar_impl.cc \
+ content/renderer/compositor_bindings/web_animation_curve_common.cc \
+ content/renderer/compositor_bindings/web_animation_impl.cc \
+ content/renderer/compositor_bindings/web_compositor_support_impl.cc \
+ content/renderer/compositor_bindings/web_content_layer_impl.cc \
+ content/renderer/compositor_bindings/web_external_bitmap_impl.cc \
+ content/renderer/compositor_bindings/web_external_texture_layer_impl.cc \
+ content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_filter_operations_impl.cc \
+ content/renderer/compositor_bindings/web_float_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_image_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc \
+ content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc \
+ content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc \
+ content/renderer/compositor_bindings/web_solid_color_layer_impl.cc \
+ content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc \
+ content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_transform_operations_impl.cc \
content/renderer/context_menu_params_builder.cc \
content/renderer/cursor_utils.cc \
content/renderer/date_time_suggestion_builder.cc \
@@ -112,6 +133,7 @@
content/renderer/java/java_bridge_channel.cc \
content/renderer/java/java_bridge_dispatcher.cc \
content/renderer/media/active_loader.cc \
+ content/renderer/media/aec_dump_message_filter.cc \
content/renderer/media/android/audio_decoder_android.cc \
content/renderer/media/android/media_info_loader.cc \
content/renderer/media/android/media_source_delegate.cc \
@@ -134,8 +156,6 @@
content/renderer/media/crypto/key_systems_support_uma.cc \
content/renderer/media/crypto/pepper_cdm_wrapper_impl.cc \
content/renderer/media/crypto/proxy_decryptor.cc \
- content/renderer/media/crypto/proxy_media_keys.cc \
- content/renderer/media/crypto/renderer_cdm_manager.cc \
content/renderer/media/media_stream_audio_level_calculator.cc \
content/renderer/media/media_stream_audio_renderer.cc \
content/renderer/media/media_stream_constraints_util.cc \
@@ -199,6 +219,7 @@
content/renderer/service_worker/service_worker_script_context.cc \
content/renderer/shared_memory_seqlock_reader.cc \
content/renderer/shared_worker_repository.cc \
+ content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc \
content/renderer/shared_worker/embedded_shared_worker_stub.cc \
content/renderer/skia_benchmarking_extension.cc \
content/renderer/speech_recognition_dispatcher.cc \
@@ -275,7 +296,9 @@
content/renderer/p2p/ipc_socket_factory.cc \
content/renderer/p2p/port_allocator.cc \
content/renderer/p2p/socket_client_impl.cc \
- content/renderer/p2p/socket_dispatcher.cc
+ content/renderer/p2p/socket_dispatcher.cc \
+ content/renderer/media/crypto/proxy_media_keys.cc \
+ content/renderer/media/crypto/renderer_cdm_manager.cc
# Flags passed to both C and C++ files.
@@ -325,6 +348,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -348,11 +372,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -397,8 +421,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
@@ -507,6 +531,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -530,11 +555,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -580,8 +605,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
diff --git a/content/content_renderer.target.linux-x86_64.mk b/content/content_renderer.target.linux-x86_64.mk
index 033fa4d..c518ab4 100644
--- a/content/content_renderer.target.linux-x86_64.mk
+++ b/content/content_renderer.target.linux-x86_64.mk
@@ -14,6 +14,7 @@
GYP_TARGET_DEPENDENCIES := \
$(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,content_content_common_mojo_bindings_gyp,,,$(GYP_VAR_PREFIX))/content_content_common_mojo_bindings_gyp.a \
+ $(call intermediates-dir-for,GYP,gpu_gpu_gyp,,,$(GYP_VAR_PREFIX))/gpu.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_service_provider_bindings_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_service_provider_bindings_gyp.a \
$(call intermediates-dir-for,GYP,skia_skia_gyp,,,$(GYP_VAR_PREFIX))/skia.stamp \
$(call intermediates-dir-for,STATIC_LIBRARIES,skia_skia_library_gyp,,,$(GYP_VAR_PREFIX))/skia_skia_library_gyp.a \
@@ -66,6 +67,26 @@
content/renderer/browser_plugin/browser_plugin_manager.cc \
content/renderer/clipboard_utils.cc \
content/renderer/child_frame_compositing_helper.cc \
+ content/renderer/compositor_bindings/scrollbar_impl.cc \
+ content/renderer/compositor_bindings/web_animation_curve_common.cc \
+ content/renderer/compositor_bindings/web_animation_impl.cc \
+ content/renderer/compositor_bindings/web_compositor_support_impl.cc \
+ content/renderer/compositor_bindings/web_content_layer_impl.cc \
+ content/renderer/compositor_bindings/web_external_bitmap_impl.cc \
+ content/renderer/compositor_bindings/web_external_texture_layer_impl.cc \
+ content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_filter_operations_impl.cc \
+ content/renderer/compositor_bindings/web_float_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_image_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl.cc \
+ content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc \
+ content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc \
+ content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc \
+ content/renderer/compositor_bindings/web_solid_color_layer_impl.cc \
+ content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc \
+ content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc \
+ content/renderer/compositor_bindings/web_transform_operations_impl.cc \
content/renderer/context_menu_params_builder.cc \
content/renderer/cursor_utils.cc \
content/renderer/date_time_suggestion_builder.cc \
@@ -112,6 +133,7 @@
content/renderer/java/java_bridge_channel.cc \
content/renderer/java/java_bridge_dispatcher.cc \
content/renderer/media/active_loader.cc \
+ content/renderer/media/aec_dump_message_filter.cc \
content/renderer/media/android/audio_decoder_android.cc \
content/renderer/media/android/media_info_loader.cc \
content/renderer/media/android/media_source_delegate.cc \
@@ -134,8 +156,6 @@
content/renderer/media/crypto/key_systems_support_uma.cc \
content/renderer/media/crypto/pepper_cdm_wrapper_impl.cc \
content/renderer/media/crypto/proxy_decryptor.cc \
- content/renderer/media/crypto/proxy_media_keys.cc \
- content/renderer/media/crypto/renderer_cdm_manager.cc \
content/renderer/media/media_stream_audio_level_calculator.cc \
content/renderer/media/media_stream_audio_renderer.cc \
content/renderer/media/media_stream_constraints_util.cc \
@@ -199,6 +219,7 @@
content/renderer/service_worker/service_worker_script_context.cc \
content/renderer/shared_memory_seqlock_reader.cc \
content/renderer/shared_worker_repository.cc \
+ content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc \
content/renderer/shared_worker/embedded_shared_worker_stub.cc \
content/renderer/skia_benchmarking_extension.cc \
content/renderer/speech_recognition_dispatcher.cc \
@@ -275,7 +296,9 @@
content/renderer/p2p/ipc_socket_factory.cc \
content/renderer/p2p/port_allocator.cc \
content/renderer/p2p/socket_client_impl.cc \
- content/renderer/p2p/socket_dispatcher.cc
+ content/renderer/p2p/socket_dispatcher.cc \
+ content/renderer/media/crypto/proxy_media_keys.cc \
+ content/renderer/media/crypto/renderer_cdm_manager.cc
# Flags passed to both C and C++ files.
@@ -324,6 +347,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -348,11 +372,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -397,8 +421,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
@@ -506,6 +530,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -530,11 +555,11 @@
'-DGR_GL_IGNORE_ES3_MSAA=0' \
'-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT' \
'-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \
- '-DSK_SUPPORT_LEGACY_SETCONFIG_INFO' \
+ '-DSK_SUPPORT_LEGACY_BITMAP_CONFIG' \
+ '-DSK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE' \
'-DSK_SUPPORT_LEGACY_N32_NAME' \
+ '-DSK_SUPPORT_LEGACY_SETCONFIG' \
'-DSK_IGNORE_ETC1_SUPPORT' \
- '-DSK_SUPPORT_LEGACY_INSTALLPIXELSPARAMS' \
- '-DSK_SUPPORT_LEGACY_DRAWPICTURE_API' \
'-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \
'-DSK_BUILD_FOR_ANDROID' \
'-DSK_USE_POSIX_THREADS' \
@@ -580,8 +605,8 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
- $(LOCAL_PATH) \
$(gyp_shared_intermediate_dir) \
+ $(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
diff --git a/content/content_shell.gypi b/content/content_shell.gypi
index bbf7304..743453b 100644
--- a/content/content_shell.gypi
+++ b/content/content_shell.gypi
@@ -61,7 +61,6 @@
'../url/url.gyp:url_lib',
'../v8/tools/gyp/v8.gyp:v8',
'../webkit/common/webkit_common.gyp:webkit_common',
- '../webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_bindings',
'../webkit/storage_browser.gyp:webkit_storage_browser',
'../webkit/webkit_resources.gyp:webkit_resources',
],
@@ -191,8 +190,6 @@
'shell/renderer/test_runner/TestInterfaces.h',
'shell/renderer/test_runner/TestPlugin.cpp',
'shell/renderer/test_runner/TestPlugin.h',
- 'shell/renderer/test_runner/WebPermissions.cpp',
- 'shell/renderer/test_runner/WebPermissions.h',
'shell/renderer/test_runner/WebTask.cpp',
'shell/renderer/test_runner/WebTask.h',
'shell/renderer/test_runner/WebTestDelegate.h',
@@ -214,6 +211,8 @@
'shell/renderer/test_runner/mock_grammar_check.h',
'shell/renderer/test_runner/mock_web_audio_device.cc',
'shell/renderer/test_runner/mock_web_audio_device.h',
+ 'shell/renderer/test_runner/mock_web_push_client.cc',
+ 'shell/renderer/test_runner/mock_web_push_client.h',
'shell/renderer/test_runner/mock_web_user_media_client.cc',
'shell/renderer/test_runner/mock_web_user_media_client.h',
'shell/renderer/test_runner/mock_webrtc_data_channel_handler.cc',
@@ -231,6 +230,8 @@
'shell/renderer/test_runner/web_ax_object_proxy.cc',
'shell/renderer/test_runner/web_ax_object_proxy.h',
'shell/renderer/test_runner/web_frame_test_proxy.h',
+ 'shell/renderer/test_runner/web_permissions.cc',
+ 'shell/renderer/test_runner/web_permissions.h',
'shell/renderer/test_runner/web_test_proxy.cc',
'shell/renderer/test_runner/web_test_proxy.h',
'shell/renderer/test_runner/web_test_runner.h',
@@ -1027,6 +1028,11 @@
'<(PRODUCT_DIR)/icudtl.dat',
],
}],
+ ['component != "shared_library" and target_arch != "arm64" and target_arch != "x64"', {
+ # Only enable the chromium linker on regular builds, since the
+ # component build crashes on Android 4.4. See b/11379966
+ 'use_chromium_linker': '1',
+ }],
],
},
'conditions': [
diff --git a/content/content_strings_grd.target.darwin-arm.mk b/content/content_strings_grd.target.darwin-arm.mk
index e5d5ead..22c5ae0 100644
--- a/content/content_strings_grd.target.darwin-arm.mk
+++ b/content/content_strings_grd.target.darwin-arm.mk
@@ -15,105 +15,117 @@
GYP_TARGET_DEPENDENCIES :=
### Rules for action "generate_localized_strings_xml":
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: Generating resources from ../content/public/android/java/strings/android_content_strings.grd ($@)"
- $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+
+### Rules for action "create_resources_zip":
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: $(LOCAL_PATH)/build/android/gyp/zip.py $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml $(GYP_TARGET_DEPENDENCIES)
+ @echo "Gyp action: content_content_gyp_content_strings_grd_target_create_resources_zip ($@)"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/res.java; python ../build/android/gyp/zip.py --input-dir "$(gyp_intermediate_dir)/content_strings_grd/res_grit" --output "$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip"
+
GYP_GENERATED_OUTPUTS := \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml \
+ $(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/content/content_strings_grd.target.darwin-arm64.mk b/content/content_strings_grd.target.darwin-arm64.mk
index e5d5ead..22c5ae0 100644
--- a/content/content_strings_grd.target.darwin-arm64.mk
+++ b/content/content_strings_grd.target.darwin-arm64.mk
@@ -15,105 +15,117 @@
GYP_TARGET_DEPENDENCIES :=
### Rules for action "generate_localized_strings_xml":
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: Generating resources from ../content/public/android/java/strings/android_content_strings.grd ($@)"
- $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+
+### Rules for action "create_resources_zip":
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: $(LOCAL_PATH)/build/android/gyp/zip.py $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml $(GYP_TARGET_DEPENDENCIES)
+ @echo "Gyp action: content_content_gyp_content_strings_grd_target_create_resources_zip ($@)"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/res.java; python ../build/android/gyp/zip.py --input-dir "$(gyp_intermediate_dir)/content_strings_grd/res_grit" --output "$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip"
+
GYP_GENERATED_OUTPUTS := \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml \
+ $(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/content/content_strings_grd.target.darwin-mips.mk b/content/content_strings_grd.target.darwin-mips.mk
index e5d5ead..22c5ae0 100644
--- a/content/content_strings_grd.target.darwin-mips.mk
+++ b/content/content_strings_grd.target.darwin-mips.mk
@@ -15,105 +15,117 @@
GYP_TARGET_DEPENDENCIES :=
### Rules for action "generate_localized_strings_xml":
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: Generating resources from ../content/public/android/java/strings/android_content_strings.grd ($@)"
- $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+
+### Rules for action "create_resources_zip":
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: $(LOCAL_PATH)/build/android/gyp/zip.py $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml $(GYP_TARGET_DEPENDENCIES)
+ @echo "Gyp action: content_content_gyp_content_strings_grd_target_create_resources_zip ($@)"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/res.java; python ../build/android/gyp/zip.py --input-dir "$(gyp_intermediate_dir)/content_strings_grd/res_grit" --output "$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip"
+
GYP_GENERATED_OUTPUTS := \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml \
+ $(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/content/content_strings_grd.target.darwin-x86.mk b/content/content_strings_grd.target.darwin-x86.mk
index e5d5ead..22c5ae0 100644
--- a/content/content_strings_grd.target.darwin-x86.mk
+++ b/content/content_strings_grd.target.darwin-x86.mk
@@ -15,105 +15,117 @@
GYP_TARGET_DEPENDENCIES :=
### Rules for action "generate_localized_strings_xml":
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: Generating resources from ../content/public/android/java/strings/android_content_strings.grd ($@)"
- $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+
+### Rules for action "create_resources_zip":
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: $(LOCAL_PATH)/build/android/gyp/zip.py $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml $(GYP_TARGET_DEPENDENCIES)
+ @echo "Gyp action: content_content_gyp_content_strings_grd_target_create_resources_zip ($@)"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/res.java; python ../build/android/gyp/zip.py --input-dir "$(gyp_intermediate_dir)/content_strings_grd/res_grit" --output "$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip"
+
GYP_GENERATED_OUTPUTS := \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml \
+ $(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/content/content_strings_grd.target.darwin-x86_64.mk b/content/content_strings_grd.target.darwin-x86_64.mk
index e5d5ead..22c5ae0 100644
--- a/content/content_strings_grd.target.darwin-x86_64.mk
+++ b/content/content_strings_grd.target.darwin-x86_64.mk
@@ -15,105 +15,117 @@
GYP_TARGET_DEPENDENCIES :=
### Rules for action "generate_localized_strings_xml":
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: Generating resources from ../content/public/android/java/strings/android_content_strings.grd ($@)"
- $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+
+### Rules for action "create_resources_zip":
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: $(LOCAL_PATH)/build/android/gyp/zip.py $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml $(GYP_TARGET_DEPENDENCIES)
+ @echo "Gyp action: content_content_gyp_content_strings_grd_target_create_resources_zip ($@)"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/res.java; python ../build/android/gyp/zip.py --input-dir "$(gyp_intermediate_dir)/content_strings_grd/res_grit" --output "$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip"
+
GYP_GENERATED_OUTPUTS := \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml \
+ $(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/content/content_strings_grd.target.linux-arm.mk b/content/content_strings_grd.target.linux-arm.mk
index e5d5ead..22c5ae0 100644
--- a/content/content_strings_grd.target.linux-arm.mk
+++ b/content/content_strings_grd.target.linux-arm.mk
@@ -15,105 +15,117 @@
GYP_TARGET_DEPENDENCIES :=
### Rules for action "generate_localized_strings_xml":
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: Generating resources from ../content/public/android/java/strings/android_content_strings.grd ($@)"
- $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+
+### Rules for action "create_resources_zip":
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: $(LOCAL_PATH)/build/android/gyp/zip.py $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml $(GYP_TARGET_DEPENDENCIES)
+ @echo "Gyp action: content_content_gyp_content_strings_grd_target_create_resources_zip ($@)"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/res.java; python ../build/android/gyp/zip.py --input-dir "$(gyp_intermediate_dir)/content_strings_grd/res_grit" --output "$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip"
+
GYP_GENERATED_OUTPUTS := \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml \
+ $(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/content/content_strings_grd.target.linux-arm64.mk b/content/content_strings_grd.target.linux-arm64.mk
index e5d5ead..22c5ae0 100644
--- a/content/content_strings_grd.target.linux-arm64.mk
+++ b/content/content_strings_grd.target.linux-arm64.mk
@@ -15,105 +15,117 @@
GYP_TARGET_DEPENDENCIES :=
### Rules for action "generate_localized_strings_xml":
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: Generating resources from ../content/public/android/java/strings/android_content_strings.grd ($@)"
- $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+
+### Rules for action "create_resources_zip":
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: $(LOCAL_PATH)/build/android/gyp/zip.py $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml $(GYP_TARGET_DEPENDENCIES)
+ @echo "Gyp action: content_content_gyp_content_strings_grd_target_create_resources_zip ($@)"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/res.java; python ../build/android/gyp/zip.py --input-dir "$(gyp_intermediate_dir)/content_strings_grd/res_grit" --output "$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip"
+
GYP_GENERATED_OUTPUTS := \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml \
+ $(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/content/content_strings_grd.target.linux-mips.mk b/content/content_strings_grd.target.linux-mips.mk
index e5d5ead..22c5ae0 100644
--- a/content/content_strings_grd.target.linux-mips.mk
+++ b/content/content_strings_grd.target.linux-mips.mk
@@ -15,105 +15,117 @@
GYP_TARGET_DEPENDENCIES :=
### Rules for action "generate_localized_strings_xml":
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: Generating resources from ../content/public/android/java/strings/android_content_strings.grd ($@)"
- $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+
+### Rules for action "create_resources_zip":
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: $(LOCAL_PATH)/build/android/gyp/zip.py $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml $(GYP_TARGET_DEPENDENCIES)
+ @echo "Gyp action: content_content_gyp_content_strings_grd_target_create_resources_zip ($@)"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/res.java; python ../build/android/gyp/zip.py --input-dir "$(gyp_intermediate_dir)/content_strings_grd/res_grit" --output "$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip"
+
GYP_GENERATED_OUTPUTS := \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml \
+ $(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/content/content_strings_grd.target.linux-x86.mk b/content/content_strings_grd.target.linux-x86.mk
index e5d5ead..22c5ae0 100644
--- a/content/content_strings_grd.target.linux-x86.mk
+++ b/content/content_strings_grd.target.linux-x86.mk
@@ -15,105 +15,117 @@
GYP_TARGET_DEPENDENCIES :=
### Rules for action "generate_localized_strings_xml":
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: Generating resources from ../content/public/android/java/strings/android_content_strings.grd ($@)"
- $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+
+### Rules for action "create_resources_zip":
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: $(LOCAL_PATH)/build/android/gyp/zip.py $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml $(GYP_TARGET_DEPENDENCIES)
+ @echo "Gyp action: content_content_gyp_content_strings_grd_target_create_resources_zip ($@)"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/res.java; python ../build/android/gyp/zip.py --input-dir "$(gyp_intermediate_dir)/content_strings_grd/res_grit" --output "$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip"
+
GYP_GENERATED_OUTPUTS := \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml \
+ $(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/content/content_strings_grd.target.linux-x86_64.mk b/content/content_strings_grd.target.linux-x86_64.mk
index e5d5ead..22c5ae0 100644
--- a/content/content_strings_grd.target.linux-x86_64.mk
+++ b/content/content_strings_grd.target.linux-x86_64.mk
@@ -15,105 +15,117 @@
GYP_TARGET_DEPENDENCIES :=
### Rules for action "generate_localized_strings_xml":
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_local_path := $(LOCAL_PATH)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml: $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_am.xtb $(LOCAL_PATH)/content/public/android/java/strings/android_content_strings.grd $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ar.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_bg.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ca.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_cs.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_da.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_de.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_el.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_en-GB.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es-419.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_es.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fa.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fil.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_fr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_hu.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_id.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_it.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_iw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ja.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ko.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lt.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_lv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_nl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_no.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-BR.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_pt-PT.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ro.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_ru.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sl.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sv.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_sw.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_th.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_tr.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_uk.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_vi.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-CN.xtb $(LOCAL_PATH)/content/public/android/java/strings/translations/android_content_strings_zh-TW.xtb $(LOCAL_PATH)/tools/grit/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit.py $(LOCAL_PATH)/tools/grit/grit/__init__.py $(LOCAL_PATH)/tools/grit/grit/clique.py $(LOCAL_PATH)/tools/grit/grit/constants.py $(LOCAL_PATH)/tools/grit/grit/exception.py $(LOCAL_PATH)/tools/grit/grit/extern/BogoFP.py $(LOCAL_PATH)/tools/grit/grit/extern/FP.py $(LOCAL_PATH)/tools/grit/grit/extern/__init__.py $(LOCAL_PATH)/tools/grit/grit/extern/tclib.py $(LOCAL_PATH)/tools/grit/grit/format/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/android_xml.py $(LOCAL_PATH)/tools/grit/grit/format/c_format.py $(LOCAL_PATH)/tools/grit/grit/format/chrome_messages_json.py $(LOCAL_PATH)/tools/grit/grit/format/data_pack.py $(LOCAL_PATH)/tools/grit/grit/format/html_inline.py $(LOCAL_PATH)/tools/grit/grit/format/js_map_format.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/PRESUBMIT.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/policy_template_generator.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/template_formatter.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writer_configuration.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/__init__.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adm_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/adml_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/admx_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/doc_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/ios_plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/json_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/mock_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_helper.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_strings_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/plist_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/reg_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/template_writer.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/writer_unittest_common.py $(LOCAL_PATH)/tools/grit/grit/format/policy_templates/writers/xml_formatted_writer.py $(LOCAL_PATH)/tools/grit/grit/format/rc.py $(LOCAL_PATH)/tools/grit/grit/format/rc_header.py $(LOCAL_PATH)/tools/grit/grit/format/repack.py $(LOCAL_PATH)/tools/grit/grit/format/resource_map.py $(LOCAL_PATH)/tools/grit/grit/gather/__init__.py $(LOCAL_PATH)/tools/grit/grit/gather/admin_template.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_html.py $(LOCAL_PATH)/tools/grit/grit/gather/chrome_scaled_image.py $(LOCAL_PATH)/tools/grit/grit/gather/igoogle_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/interface.py $(LOCAL_PATH)/tools/grit/grit/gather/json_loader.py $(LOCAL_PATH)/tools/grit/grit/gather/muppet_strings.py $(LOCAL_PATH)/tools/grit/grit/gather/policy_json.py $(LOCAL_PATH)/tools/grit/grit/gather/rc.py $(LOCAL_PATH)/tools/grit/grit/gather/regexp.py $(LOCAL_PATH)/tools/grit/grit/gather/skeleton_gatherer.py $(LOCAL_PATH)/tools/grit/grit/gather/tr_html.py $(LOCAL_PATH)/tools/grit/grit/gather/txt.py $(LOCAL_PATH)/tools/grit/grit/grd_reader.py $(LOCAL_PATH)/tools/grit/grit/grit_runner.py $(LOCAL_PATH)/tools/grit/grit/lazy_re.py $(LOCAL_PATH)/tools/grit/grit/node/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/base.py $(LOCAL_PATH)/tools/grit/grit/node/custom/__init__.py $(LOCAL_PATH)/tools/grit/grit/node/custom/filename.py $(LOCAL_PATH)/tools/grit/grit/node/empty.py $(LOCAL_PATH)/tools/grit/grit/node/include.py $(LOCAL_PATH)/tools/grit/grit/node/io.py $(LOCAL_PATH)/tools/grit/grit/node/mapping.py $(LOCAL_PATH)/tools/grit/grit/node/message.py $(LOCAL_PATH)/tools/grit/grit/node/misc.py $(LOCAL_PATH)/tools/grit/grit/node/structure.py $(LOCAL_PATH)/tools/grit/grit/node/variant.py $(LOCAL_PATH)/tools/grit/grit/pseudo.py $(LOCAL_PATH)/tools/grit/grit/pseudo_rtl.py $(LOCAL_PATH)/tools/grit/grit/scons.py $(LOCAL_PATH)/tools/grit/grit/shortcuts.py $(LOCAL_PATH)/tools/grit/grit/shortcuts_unittests.py $(LOCAL_PATH)/tools/grit/grit/tclib.py $(LOCAL_PATH)/tools/grit/grit/test_suite_all.py $(LOCAL_PATH)/tools/grit/grit/tool/__init__.py $(LOCAL_PATH)/tools/grit/grit/tool/android2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/build.py $(LOCAL_PATH)/tools/grit/grit/tool/buildinfo.py $(LOCAL_PATH)/tools/grit/grit/tool/count.py $(LOCAL_PATH)/tools/grit/grit/tool/diff_structures.py $(LOCAL_PATH)/tools/grit/grit/tool/interface.py $(LOCAL_PATH)/tools/grit/grit/tool/menu_from_parts.py $(LOCAL_PATH)/tools/grit/grit/tool/newgrd.py $(LOCAL_PATH)/tools/grit/grit/tool/postprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/preprocess_interface.py $(LOCAL_PATH)/tools/grit/grit/tool/rc2grd.py $(LOCAL_PATH)/tools/grit/grit/tool/resize.py $(LOCAL_PATH)/tools/grit/grit/tool/test.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_postprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/toolbar_preprocess.py $(LOCAL_PATH)/tools/grit/grit/tool/transl2tc.py $(LOCAL_PATH)/tools/grit/grit/tool/unit.py $(LOCAL_PATH)/tools/grit/grit/tool/xmb.py $(LOCAL_PATH)/tools/grit/grit/util.py $(LOCAL_PATH)/tools/grit/grit/xtb_reader.py $(LOCAL_PATH)/tools/grit/grit_info.py $(GYP_TARGET_DEPENDENCIES)
@echo "Gyp action: Generating resources from ../content/public/android/java/strings/android_content_strings.grd ($@)"
- $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi; python ../tools/grit/grit.py -i ../content/public/android/java/strings/android_content_strings.grd build -f "" -o "$(gyp_intermediate_dir)/content_strings_grd/res_grit" -D _chromium -E "CHROMIUM_BUILD=chromium" -t android -E "ANDROID_JAVA_TAGGED_ONLY=true" -D enable_printing -D use_concatenated_impulse_responses -D enable_webrtc -E "ANDROID_JAVA_TAGGED_ONLY=false"
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
-$(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+$(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml: $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml ;
+
+### Rules for action "create_resources_zip":
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_var_prefix := $(GYP_VAR_PREFIX)
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip: $(LOCAL_PATH)/build/android/gyp/zip.py $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml $(GYP_TARGET_DEPENDENCIES)
+ @echo "Gyp action: content_content_gyp_content_strings_grd_target_create_resources_zip ($@)"
+ $(hide)cd $(gyp_local_path)/content; mkdir -p $(gyp_shared_intermediate_dir)/res.java; python ../build/android/gyp/zip.py --input-dir "$(gyp_intermediate_dir)/content_strings_grd/res_grit" --output "$(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip"
+
GYP_GENERATED_OUTPUTS := \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
- $(gyp_shared_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-am/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ar/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-bg/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ca/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-cs/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-da/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-de/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-el/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-en-rGB/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-es-rUS/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fa/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-fr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-hu/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-in/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-it/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-iw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ja/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ko/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lt/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-lv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-nb/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rBR/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-pt-rPT/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ro/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-ru/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sl/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sv/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-sw/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-th/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-tr/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-uk/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-vi/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rCN/android_content_strings.xml \
+ $(gyp_intermediate_dir)/content_strings_grd/res_grit/values-zh-rTW/android_content_strings.xml \
+ $(gyp_shared_intermediate_dir)/res.java/content_strings_grd.zip
# Make sure our deps and generated files are built first.
LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/content/content_tests.gypi b/content/content_tests.gypi
index 8ffe45e..f662451 100644
--- a/content/content_tests.gypi
+++ b/content/content_tests.gypi
@@ -53,8 +53,6 @@
'../ui/events/events.gyp:events_base',
'../ui/events/events.gyp:events_test_support',
'../ui/events/events.gyp:gesture_detection',
- '../ui/gfx/gfx.gyp:gfx',
- '../ui/gfx/gfx.gyp:gfx_geometry',
'../ui/gfx/gfx.gyp:gfx_test_support',
'../ui/resources/ui_resources.gyp:ui_resources',
'../url/url.gyp:url_lib',
@@ -268,6 +266,7 @@
'content.gyp:content_renderer',
'content.gyp:content_utility',
'content.gyp:content_worker',
+ '../cc/cc.gyp:cc',
'../cc/cc_tests.gyp:cc_test_support',
'../media/media.gyp:media',
'../ppapi/ppapi_internal.gyp:ppapi_host',
@@ -279,7 +278,6 @@
'../v8/tools/gyp/v8.gyp:v8',
'../webkit/child/webkit_child.gyp:webkit_child',
'../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu',
- '../webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_support',
'../webkit/storage_browser.gyp:webkit_storage_browser',
'../webkit/storage_common.gyp:webkit_storage_common',
],
@@ -513,6 +511,7 @@
'browser/media/capture/web_contents_audio_input_stream_unittest.cc',
'browser/media/capture/web_contents_video_capture_device_unittest.cc',
'browser/media/media_internals_unittest.cc',
+ 'browser/media/midi_host_unittest.cc',
'browser/media/webrtc_identity_store_unittest.cc',
'browser/net/sqlite_persistent_cookie_store_unittest.cc',
'browser/notification_service_impl_unittest.cc',
@@ -549,7 +548,6 @@
'browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc',
'browser/renderer_host/media/media_stream_manager_unittest.cc',
'browser/renderer_host/media/media_stream_ui_proxy_unittest.cc',
- 'browser/renderer_host/media/midi_host_unittest.cc',
'browser/renderer_host/media/video_capture_buffer_pool_unittest.cc',
'browser/renderer_host/media/video_capture_controller_unittest.cc',
'browser/renderer_host/media/video_capture_host_unittest.cc',
@@ -571,7 +569,6 @@
'browser/renderer_host/web_input_event_aura_unittest.cc',
'browser/renderer_host/websocket_dispatcher_host_unittest.cc',
'browser/resolve_proxy_msg_helper_unittest.cc',
- 'browser/screen_orientation/screen_orientation_dispatcher_host_unittest.cc',
'browser/service_worker/embedded_worker_instance_unittest.cc',
'browser/service_worker/embedded_worker_test_helper.cc',
'browser/service_worker/embedded_worker_test_helper.h',
@@ -656,6 +653,9 @@
'renderer/android/phone_number_detector_unittest.cc',
'renderer/battery_status/battery_status_dispatcher_unittest.cc',
'renderer/bmp_image_decoder_unittest.cc',
+ 'renderer/compositor_bindings/web_animation_unittest.cc',
+ 'renderer/compositor_bindings/web_float_animation_curve_unittest.cc',
+ 'renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc',
'renderer/device_sensors/device_motion_event_pump_unittest.cc',
'renderer/device_sensors/device_orientation_event_pump_unittest.cc',
'renderer/disambiguation_popup_helper_unittest.cc',
@@ -717,6 +717,8 @@
'content.gyp:content_renderer',
'content_resources.gyp:content_resources',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ '../cc/cc.gyp:cc',
+ '../cc/cc_tests.gyp:cc_test_support',
'../gpu/gpu.gyp:gpu',
'../gpu/gpu.gyp:gpu_unittest_utils',
'../ipc/ipc.gyp:test_support_ipc',
@@ -875,6 +877,7 @@
}],
['OS == "android"', {
'sources': [
+ 'browser/renderer_host/java/gin_java_method_invocation_helper_unittest.cc',
'browser/renderer_host/java/jni_helper_unittest.cc',
'renderer/java/gin_java_bridge_value_converter_unittest.cc',
],
@@ -1079,6 +1082,7 @@
'browser/accessibility/android_hit_testing_browsertest.cc',
'browser/accessibility/cross_platform_accessibility_browsertest.cc',
'browser/accessibility/dump_accessibility_tree_browsertest.cc',
+ 'browser/battery_status/battery_status_browsertest.cc',
'browser/compositor/image_transport_factory_browsertest.cc',
'browser/bookmarklet_browsertest.cc',
'browser/child_process_security_policy_browsertest.cc',
@@ -1198,10 +1202,6 @@
},
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
- }, { # OS!="win"
- 'sources!': [
- 'browser/accessibility/accessibility_win_browsertest.cc',
- ],
}],
['OS=="win" and win_use_allocator_shim==1', {
'dependencies': [
@@ -1236,11 +1236,6 @@
'renderer/external_popup_menu_browsertest.cc',
],
}],
- ['use_aura==1', {
- 'sources!': [
- 'browser/accessibility/accessibility_win_browsertest.cc',
- ],
- }],
['use_aura==1 and OS!="win"', {
'sources!': [
'browser/plugin_browsertest.cc',
diff --git a/content/content_utility.target.darwin-arm.mk b/content/content_utility.target.darwin-arm.mk
index 8a547f0..33a5e1d 100644
--- a/content/content_utility.target.darwin-arm.mk
+++ b/content/content_utility.target.darwin-arm.mk
@@ -84,6 +84,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -116,13 +117,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -191,6 +192,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -224,13 +226,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_utility.target.darwin-arm64.mk b/content/content_utility.target.darwin-arm64.mk
index a9e1173..dea05a3 100644
--- a/content/content_utility.target.darwin-arm64.mk
+++ b/content/content_utility.target.darwin-arm64.mk
@@ -74,6 +74,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -106,13 +107,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -170,6 +171,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -203,13 +205,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_utility.target.darwin-mips.mk b/content/content_utility.target.darwin-mips.mk
index e856de5..1d71a2e 100644
--- a/content/content_utility.target.darwin-mips.mk
+++ b/content/content_utility.target.darwin-mips.mk
@@ -78,6 +78,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,13 +111,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -179,6 +180,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -212,13 +214,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_utility.target.darwin-x86.mk b/content/content_utility.target.darwin-x86.mk
index 883c86d..0638856 100644
--- a/content/content_utility.target.darwin-x86.mk
+++ b/content/content_utility.target.darwin-x86.mk
@@ -79,6 +79,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -111,13 +112,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -180,6 +181,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -213,13 +215,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_utility.target.darwin-x86_64.mk b/content/content_utility.target.darwin-x86_64.mk
index 0990b47..e96f88a 100644
--- a/content/content_utility.target.darwin-x86_64.mk
+++ b/content/content_utility.target.darwin-x86_64.mk
@@ -78,6 +78,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,13 +111,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -178,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -211,13 +213,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_utility.target.linux-arm.mk b/content/content_utility.target.linux-arm.mk
index 8a547f0..33a5e1d 100644
--- a/content/content_utility.target.linux-arm.mk
+++ b/content/content_utility.target.linux-arm.mk
@@ -84,6 +84,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -116,13 +117,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -191,6 +192,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -224,13 +226,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_utility.target.linux-arm64.mk b/content/content_utility.target.linux-arm64.mk
index a9e1173..dea05a3 100644
--- a/content/content_utility.target.linux-arm64.mk
+++ b/content/content_utility.target.linux-arm64.mk
@@ -74,6 +74,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -106,13 +107,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -170,6 +171,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -203,13 +205,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_utility.target.linux-mips.mk b/content/content_utility.target.linux-mips.mk
index e856de5..1d71a2e 100644
--- a/content/content_utility.target.linux-mips.mk
+++ b/content/content_utility.target.linux-mips.mk
@@ -78,6 +78,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,13 +111,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -179,6 +180,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -212,13 +214,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_utility.target.linux-x86.mk b/content/content_utility.target.linux-x86.mk
index 883c86d..0638856 100644
--- a/content/content_utility.target.linux-x86.mk
+++ b/content/content_utility.target.linux-x86.mk
@@ -79,6 +79,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -111,13 +112,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -180,6 +181,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -213,13 +215,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/content_utility.target.linux-x86_64.mk b/content/content_utility.target.linux-x86_64.mk
index 0990b47..e96f88a 100644
--- a/content/content_utility.target.linux-x86_64.mk
+++ b/content/content_utility.target.linux-x86_64.mk
@@ -78,6 +78,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,13 +111,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -178,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -211,13 +213,13 @@
$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH) \
$(LOCAL_PATH)/skia/config \
$(LOCAL_PATH)/third_party/WebKit/Source \
$(LOCAL_PATH)/third_party/khronos \
$(LOCAL_PATH)/gpu \
$(LOCAL_PATH)/third_party/WebKit \
- $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/gesture_event_type_java.target.darwin-arm.mk b/content/gesture_event_type_java.target.darwin-arm.mk
index 791db93..59dbed2 100644
--- a/content/gesture_event_type_java.target.darwin-arm.mk
+++ b/content/gesture_event_type_java.target.darwin-arm.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/gesture_event_type_java.target.darwin-arm64.mk b/content/gesture_event_type_java.target.darwin-arm64.mk
index 9736052..ce5fa13 100644
--- a/content/gesture_event_type_java.target.darwin-arm64.mk
+++ b/content/gesture_event_type_java.target.darwin-arm64.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,6 +111,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/gesture_event_type_java.target.darwin-mips.mk b/content/gesture_event_type_java.target.darwin-mips.mk
index be75f1a..c3d793f 100644
--- a/content/gesture_event_type_java.target.darwin-mips.mk
+++ b/content/gesture_event_type_java.target.darwin-mips.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -176,6 +178,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -205,6 +208,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/gesture_event_type_java.target.darwin-x86.mk b/content/gesture_event_type_java.target.darwin-x86.mk
index 3c05eee..a75800c 100644
--- a/content/gesture_event_type_java.target.darwin-x86.mk
+++ b/content/gesture_event_type_java.target.darwin-x86.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -115,6 +116,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/gesture_event_type_java.target.darwin-x86_64.mk b/content/gesture_event_type_java.target.darwin-x86_64.mk
index ff2d199..ef1226b 100644
--- a/content/gesture_event_type_java.target.darwin-x86_64.mk
+++ b/content/gesture_event_type_java.target.darwin-x86_64.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -175,6 +177,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/gesture_event_type_java.target.linux-arm.mk b/content/gesture_event_type_java.target.linux-arm.mk
index 791db93..59dbed2 100644
--- a/content/gesture_event_type_java.target.linux-arm.mk
+++ b/content/gesture_event_type_java.target.linux-arm.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/gesture_event_type_java.target.linux-arm64.mk b/content/gesture_event_type_java.target.linux-arm64.mk
index 9736052..ce5fa13 100644
--- a/content/gesture_event_type_java.target.linux-arm64.mk
+++ b/content/gesture_event_type_java.target.linux-arm64.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,6 +111,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/gesture_event_type_java.target.linux-mips.mk b/content/gesture_event_type_java.target.linux-mips.mk
index be75f1a..c3d793f 100644
--- a/content/gesture_event_type_java.target.linux-mips.mk
+++ b/content/gesture_event_type_java.target.linux-mips.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -176,6 +178,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -205,6 +208,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/gesture_event_type_java.target.linux-x86.mk b/content/gesture_event_type_java.target.linux-x86.mk
index 3c05eee..a75800c 100644
--- a/content/gesture_event_type_java.target.linux-x86.mk
+++ b/content/gesture_event_type_java.target.linux-x86.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -115,6 +116,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/gesture_event_type_java.target.linux-x86_64.mk b/content/gesture_event_type_java.target.linux-x86_64.mk
index ff2d199..ef1226b 100644
--- a/content/gesture_event_type_java.target.linux-x86_64.mk
+++ b/content/gesture_event_type_java.target.linux-x86_64.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -175,6 +177,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn
new file mode 100644
index 0000000..6a47b73
--- /dev/null
+++ b/content/gpu/BUILD.gn
@@ -0,0 +1,73 @@
+# Copyright 2014 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.
+
+import("//content/content.gni")
+
+# We don't support x64 prior to Win7 and D3DCompiler_43.dll is not needed on
+# Vista+.
+need_d3dcompiler = (is_win && cpu_arch == "x86" && directxsdk_exists)
+
+source_set("gpu") {
+ visibility = "//content/*"
+ sources = [
+ "gpu_main.cc",
+ "gpu_process.cc",
+ "gpu_process.h",
+ "gpu_child_thread.cc",
+ "gpu_child_thread.h",
+ "gpu_watchdog_thread.cc",
+ "gpu_watchdog_thread.h",
+ "in_process_gpu_thread.cc",
+ "in_process_gpu_thread.h",
+ ]
+
+ configs += [ "//content:content_implementation" ]
+
+ deps = [
+ "//base",
+ "//content:export",
+ "//mojo/public/interfaces/service_provider",
+ "//skia",
+ "//ui/gl",
+ ]
+
+ if (is_win) {
+ configs += [
+ "//third_party/khronos:khronos_headers",
+ "//third_party/wtl:wtl_includes",
+ ]
+ libs = [ "setupapi.lib" ]
+ deps += [
+ "//third_party/angle:libEGL",
+ "//third_party/angle:libGLESv2",
+ ]
+ }
+
+ if (need_d3dcompiler) {
+ deps += [ ":extract_d3dcompiler" ]
+ }
+
+ if (is_chromeos && cpu_arch != "arm") {
+ configs += [ "//third_party/libva/libva_config" ]
+ }
+}
+
+if (need_d3dcompiler) {
+ action("extract_d3dcompiler") {
+ visibility = ":*"
+ script = "//build/extract_from_cab.py"
+
+ cabfile = "//third_party/directxsdk/files/Redist/Jun2010_D3DCompiler_43_x86.cab"
+ dllfile = "D3DCompiler_43.dll"
+
+ source_prereqs = [ cabfile ]
+ outputs = [ "$root_out_dir/$dllfile" ]
+
+ args = [
+ rebase_path(cabfile, root_build_dir),
+ dllfile,
+ rebase_path(root_out_dir, root_build_dir),
+ ]
+ }
+}
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 894c648..1f68ee5 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -66,8 +66,18 @@
namespace {
+void GetGpuInfoFromCommandLine(gpu::GPUInfo& gpu_info,
+ const CommandLine& command_line);
bool WarmUpSandbox(const CommandLine& command_line);
+
+#if !defined(OS_MACOSX)
+bool CollectGraphicsInfo(gpu::GPUInfo& gpu_info);
+#endif
+
#if defined(OS_LINUX)
+#if !defined(OS_CHROMEOS)
+bool CanAccessNvidiaDeviceFile();
+#endif
bool StartSandboxLinux(const gpu::GPUInfo&, GpuWatchdogThread*, bool);
#elif defined(OS_WIN)
bool StartSandboxWindows(const sandbox::SandboxInterfaceInfo*);
@@ -201,22 +211,7 @@
gpu::GPUInfo gpu_info;
// Get vendor_id, device_id, driver_version from browser process through
// commandline switches.
- DCHECK(command_line.HasSwitch(switches::kGpuVendorID) &&
- command_line.HasSwitch(switches::kGpuDeviceID) &&
- command_line.HasSwitch(switches::kGpuDriverVersion));
- bool success = base::HexStringToUInt(
- command_line.GetSwitchValueASCII(switches::kGpuVendorID),
- &gpu_info.gpu.vendor_id);
- DCHECK(success);
- success = base::HexStringToUInt(
- command_line.GetSwitchValueASCII(switches::kGpuDeviceID),
- &gpu_info.gpu.device_id);
- DCHECK(success);
- gpu_info.driver_vendor =
- command_line.GetSwitchValueASCII(switches::kGpuDriverVendor);
- gpu_info.driver_version =
- command_line.GetSwitchValueASCII(switches::kGpuDriverVersion);
- GetContentClient()->SetGpuInfo(gpu_info);
+ GetGpuInfoFromCommandLine(gpu_info, command_line);
base::TimeDelta collect_context_time;
base::TimeDelta initialize_one_off_time;
@@ -273,20 +268,8 @@
base::TimeTicks before_collect_context_graphics_info =
base::TimeTicks::Now();
#if !defined(OS_MACOSX)
- gpu::CollectInfoResult result =
- gpu::CollectContextGraphicsInfo(&gpu_info);
- switch (result) {
- case gpu::kCollectInfoFatalFailure:
- LOG(ERROR) << "gpu::CollectGraphicsInfo failed (fatal).";
- dead_on_arrival = true;
- break;
- case gpu::kCollectInfoNonFatalFailure:
- VLOG(1) << "gpu::CollectGraphicsInfo failed (non-fatal).";
- break;
- case gpu::kCollectInfoSuccess:
- break;
- }
- GetContentClient()->SetGpuInfo(gpu_info);
+ if (!CollectGraphicsInfo(gpu_info))
+ dead_on_arrival = true;
#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
// Recompute gpu driver bug workarounds - this is specifically useful
@@ -301,19 +284,15 @@
initialized_gl_context = true;
#if !defined(OS_CHROMEOS)
if (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA
- gpu_info.driver_vendor == "NVIDIA") {
- base::ThreadRestrictions::AssertIOAllowed();
- if (access("/dev/nvidiactl", R_OK) != 0) {
- VLOG(1) << "NVIDIA device file /dev/nvidiactl access denied";
- dead_on_arrival = true;
- }
- }
+ gpu_info.driver_vendor == "NVIDIA" &&
+ !CanAccessNvidiaDeviceFile())
+ dead_on_arrival = true;
#endif // !defined(OS_CHROMEOS)
#endif // defined(OS_LINUX)
#endif // !defined(OS_MACOSX)
collect_context_time =
base::TimeTicks::Now() - before_collect_context_graphics_info;
- } else {
+ } else { // gl_initialized
VLOG(1) << "gfx::GLSurface::InitializeOneOff failed";
dead_on_arrival = true;
}
@@ -384,7 +363,69 @@
namespace {
+void GetGpuInfoFromCommandLine(gpu::GPUInfo& gpu_info,
+ const CommandLine& command_line) {
+ DCHECK(command_line.HasSwitch(switches::kGpuVendorID) &&
+ command_line.HasSwitch(switches::kGpuDeviceID) &&
+ command_line.HasSwitch(switches::kGpuDriverVersion));
+ bool success = base::HexStringToUInt(
+ command_line.GetSwitchValueASCII(switches::kGpuVendorID),
+ &gpu_info.gpu.vendor_id);
+ DCHECK(success);
+ success = base::HexStringToUInt(
+ command_line.GetSwitchValueASCII(switches::kGpuDeviceID),
+ &gpu_info.gpu.device_id);
+ DCHECK(success);
+ gpu_info.driver_vendor =
+ command_line.GetSwitchValueASCII(switches::kGpuDriverVendor);
+ gpu_info.driver_version =
+ command_line.GetSwitchValueASCII(switches::kGpuDriverVersion);
+ GetContentClient()->SetGpuInfo(gpu_info);
+}
+
+bool WarmUpSandbox(const CommandLine& command_line) {
+ {
+ TRACE_EVENT0("gpu", "Warm up rand");
+ // Warm up the random subsystem, which needs to be done pre-sandbox on all
+ // platforms.
+ (void) base::RandUint64();
+ }
+ return true;
+}
+
+#if !defined(OS_MACOSX)
+bool CollectGraphicsInfo(gpu::GPUInfo& gpu_info) {
+ bool res = true;
+ gpu::CollectInfoResult result = gpu::CollectContextGraphicsInfo(&gpu_info);
+ switch (result) {
+ case gpu::kCollectInfoFatalFailure:
+ LOG(ERROR) << "gpu::CollectGraphicsInfo failed (fatal).";
+ res = false;
+ break;
+ case gpu::kCollectInfoNonFatalFailure:
+ VLOG(1) << "gpu::CollectGraphicsInfo failed (non-fatal).";
+ break;
+ case gpu::kCollectInfoSuccess:
+ break;
+ }
+ GetContentClient()->SetGpuInfo(gpu_info);
+ return res;
+}
+#endif
+
#if defined(OS_LINUX)
+#if !defined(OS_CHROMEOS)
+bool CanAccessNvidiaDeviceFile() {
+ bool res = true;
+ base::ThreadRestrictions::AssertIOAllowed();
+ if (access("/dev/nvidiactl", R_OK) != 0) {
+ VLOG(1) << "NVIDIA device file /dev/nvidiactl access denied";
+ res = false;
+ }
+ return res;
+}
+#endif
+
void CreateDummyGlContext() {
scoped_refptr<gfx::GLSurface> surface(
gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size()));
@@ -409,19 +450,7 @@
VLOG(1) << "gfx::GLContext::MakeCurrent failed";
}
}
-#endif
-bool WarmUpSandbox(const CommandLine& command_line) {
- {
- TRACE_EVENT0("gpu", "Warm up rand");
- // Warm up the random subsystem, which needs to be done pre-sandbox on all
- // platforms.
- (void) base::RandUint64();
- }
- return true;
-}
-
-#if defined(OS_LINUX)
void WarmUpSandboxNvidia(const gpu::GPUInfo& gpu_info,
bool should_initialize_gl_context) {
// We special case Optimus since the vendor_id we see may not be Nvidia.
diff --git a/content/gpu/in_process_gpu_thread.cc b/content/gpu/in_process_gpu_thread.cc
index 59a257d..8a7818d 100644
--- a/content/gpu/in_process_gpu_thread.cc
+++ b/content/gpu/in_process_gpu_thread.cc
@@ -27,6 +27,7 @@
}
void InProcessGpuThread::CleanUp() {
+ SetThreadWasQuitProperly(true);
delete gpu_process_;
}
diff --git a/content/java_set_jni_headers.target.darwin-arm.mk b/content/java_set_jni_headers.target.darwin-arm.mk
index 0671b78..802e6ac 100644
--- a/content/java_set_jni_headers.target.darwin-arm.mk
+++ b/content/java_set_jni_headers.target.darwin-arm.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/java_set_jni_headers.target.darwin-arm64.mk b/content/java_set_jni_headers.target.darwin-arm64.mk
index b27effb..33ada2a 100644
--- a/content/java_set_jni_headers.target.darwin-arm64.mk
+++ b/content/java_set_jni_headers.target.darwin-arm64.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,6 +111,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/java_set_jni_headers.target.darwin-mips.mk b/content/java_set_jni_headers.target.darwin-mips.mk
index 490902a..e83323d 100644
--- a/content/java_set_jni_headers.target.darwin-mips.mk
+++ b/content/java_set_jni_headers.target.darwin-mips.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -176,6 +178,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -205,6 +208,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/java_set_jni_headers.target.darwin-x86.mk b/content/java_set_jni_headers.target.darwin-x86.mk
index 86e0800..1c3cdf4 100644
--- a/content/java_set_jni_headers.target.darwin-x86.mk
+++ b/content/java_set_jni_headers.target.darwin-x86.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -115,6 +116,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/java_set_jni_headers.target.darwin-x86_64.mk b/content/java_set_jni_headers.target.darwin-x86_64.mk
index bb3e787..bfcf94b 100644
--- a/content/java_set_jni_headers.target.darwin-x86_64.mk
+++ b/content/java_set_jni_headers.target.darwin-x86_64.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -175,6 +177,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/java_set_jni_headers.target.linux-arm.mk b/content/java_set_jni_headers.target.linux-arm.mk
index 0671b78..802e6ac 100644
--- a/content/java_set_jni_headers.target.linux-arm.mk
+++ b/content/java_set_jni_headers.target.linux-arm.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/java_set_jni_headers.target.linux-arm64.mk b/content/java_set_jni_headers.target.linux-arm64.mk
index b27effb..33ada2a 100644
--- a/content/java_set_jni_headers.target.linux-arm64.mk
+++ b/content/java_set_jni_headers.target.linux-arm64.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,6 +111,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/java_set_jni_headers.target.linux-mips.mk b/content/java_set_jni_headers.target.linux-mips.mk
index 490902a..e83323d 100644
--- a/content/java_set_jni_headers.target.linux-mips.mk
+++ b/content/java_set_jni_headers.target.linux-mips.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -176,6 +178,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -205,6 +208,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/java_set_jni_headers.target.linux-x86.mk b/content/java_set_jni_headers.target.linux-x86.mk
index 86e0800..1c3cdf4 100644
--- a/content/java_set_jni_headers.target.linux-x86.mk
+++ b/content/java_set_jni_headers.target.linux-x86.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -115,6 +116,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/java_set_jni_headers.target.linux-x86_64.mk b/content/java_set_jni_headers.target.linux-x86_64.mk
index bb3e787..bfcf94b 100644
--- a/content/java_set_jni_headers.target.linux-x86_64.mk
+++ b/content/java_set_jni_headers.target.linux-x86_64.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -175,6 +177,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/motionevent_jni_headers.target.darwin-arm.mk b/content/motionevent_jni_headers.target.darwin-arm.mk
index fa3334f..9f9f7a5 100644
--- a/content/motionevent_jni_headers.target.darwin-arm.mk
+++ b/content/motionevent_jni_headers.target.darwin-arm.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/motionevent_jni_headers.target.darwin-arm64.mk b/content/motionevent_jni_headers.target.darwin-arm64.mk
index 056254e..df2e412 100644
--- a/content/motionevent_jni_headers.target.darwin-arm64.mk
+++ b/content/motionevent_jni_headers.target.darwin-arm64.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,6 +111,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/motionevent_jni_headers.target.darwin-mips.mk b/content/motionevent_jni_headers.target.darwin-mips.mk
index 2c77ff9..fe9890e 100644
--- a/content/motionevent_jni_headers.target.darwin-mips.mk
+++ b/content/motionevent_jni_headers.target.darwin-mips.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -176,6 +178,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -205,6 +208,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/motionevent_jni_headers.target.darwin-x86.mk b/content/motionevent_jni_headers.target.darwin-x86.mk
index 2953853..9e941dd 100644
--- a/content/motionevent_jni_headers.target.darwin-x86.mk
+++ b/content/motionevent_jni_headers.target.darwin-x86.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -115,6 +116,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/motionevent_jni_headers.target.darwin-x86_64.mk b/content/motionevent_jni_headers.target.darwin-x86_64.mk
index 6b58e04..5810772 100644
--- a/content/motionevent_jni_headers.target.darwin-x86_64.mk
+++ b/content/motionevent_jni_headers.target.darwin-x86_64.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -175,6 +177,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/motionevent_jni_headers.target.linux-arm.mk b/content/motionevent_jni_headers.target.linux-arm.mk
index fa3334f..9f9f7a5 100644
--- a/content/motionevent_jni_headers.target.linux-arm.mk
+++ b/content/motionevent_jni_headers.target.linux-arm.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/motionevent_jni_headers.target.linux-arm64.mk b/content/motionevent_jni_headers.target.linux-arm64.mk
index 056254e..df2e412 100644
--- a/content/motionevent_jni_headers.target.linux-arm64.mk
+++ b/content/motionevent_jni_headers.target.linux-arm64.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,6 +111,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/motionevent_jni_headers.target.linux-mips.mk b/content/motionevent_jni_headers.target.linux-mips.mk
index 2c77ff9..fe9890e 100644
--- a/content/motionevent_jni_headers.target.linux-mips.mk
+++ b/content/motionevent_jni_headers.target.linux-mips.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -176,6 +178,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -205,6 +208,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/motionevent_jni_headers.target.linux-x86.mk b/content/motionevent_jni_headers.target.linux-x86.mk
index 2953853..9e941dd 100644
--- a/content/motionevent_jni_headers.target.linux-x86.mk
+++ b/content/motionevent_jni_headers.target.linux-x86.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -115,6 +116,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/motionevent_jni_headers.target.linux-x86_64.mk b/content/motionevent_jni_headers.target.linux-x86_64.mk
index 6b58e04..5810772 100644
--- a/content/motionevent_jni_headers.target.linux-x86_64.mk
+++ b/content/motionevent_jni_headers.target.linux-x86_64.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -175,6 +177,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/page_transition_types_java.target.darwin-arm.mk b/content/page_transition_types_java.target.darwin-arm.mk
index 0ef11e3..3174551 100644
--- a/content/page_transition_types_java.target.darwin-arm.mk
+++ b/content/page_transition_types_java.target.darwin-arm.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/page_transition_types_java.target.darwin-arm64.mk b/content/page_transition_types_java.target.darwin-arm64.mk
index 2548ff8..0f7969a 100644
--- a/content/page_transition_types_java.target.darwin-arm64.mk
+++ b/content/page_transition_types_java.target.darwin-arm64.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,6 +111,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/page_transition_types_java.target.darwin-mips.mk b/content/page_transition_types_java.target.darwin-mips.mk
index aa867ae..3e07286 100644
--- a/content/page_transition_types_java.target.darwin-mips.mk
+++ b/content/page_transition_types_java.target.darwin-mips.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -176,6 +178,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -205,6 +208,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/page_transition_types_java.target.darwin-x86.mk b/content/page_transition_types_java.target.darwin-x86.mk
index 0562464..3e72ec8 100644
--- a/content/page_transition_types_java.target.darwin-x86.mk
+++ b/content/page_transition_types_java.target.darwin-x86.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -115,6 +116,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/page_transition_types_java.target.darwin-x86_64.mk b/content/page_transition_types_java.target.darwin-x86_64.mk
index a439357..dbb0c71 100644
--- a/content/page_transition_types_java.target.darwin-x86_64.mk
+++ b/content/page_transition_types_java.target.darwin-x86_64.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -175,6 +177,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/page_transition_types_java.target.linux-arm.mk b/content/page_transition_types_java.target.linux-arm.mk
index 0ef11e3..3174551 100644
--- a/content/page_transition_types_java.target.linux-arm.mk
+++ b/content/page_transition_types_java.target.linux-arm.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/page_transition_types_java.target.linux-arm64.mk b/content/page_transition_types_java.target.linux-arm64.mk
index 2548ff8..0f7969a 100644
--- a/content/page_transition_types_java.target.linux-arm64.mk
+++ b/content/page_transition_types_java.target.linux-arm64.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,6 +111,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/page_transition_types_java.target.linux-mips.mk b/content/page_transition_types_java.target.linux-mips.mk
index aa867ae..3e07286 100644
--- a/content/page_transition_types_java.target.linux-mips.mk
+++ b/content/page_transition_types_java.target.linux-mips.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -176,6 +178,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -205,6 +208,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/page_transition_types_java.target.linux-x86.mk b/content/page_transition_types_java.target.linux-x86.mk
index 0562464..3e72ec8 100644
--- a/content/page_transition_types_java.target.linux-x86.mk
+++ b/content/page_transition_types_java.target.linux-x86.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -115,6 +116,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/page_transition_types_java.target.linux-x86_64.mk b/content/page_transition_types_java.target.linux-x86_64.mk
index a439357..dbb0c71 100644
--- a/content/page_transition_types_java.target.linux-x86_64.mk
+++ b/content/page_transition_types_java.target.linux-x86_64.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -175,6 +177,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/plugin/BUILD.gn b/content/plugin/BUILD.gn
new file mode 100644
index 0000000..6235dbf
--- /dev/null
+++ b/content/plugin/BUILD.gn
@@ -0,0 +1,44 @@
+# Copyright 2014 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.
+
+import("//build/config/features.gni")
+
+# This is the NPAPI plugin process. It isn't used on Linux.
+if (enable_plugins && !is_linux) {
+ source_set("plugin") {
+ visibility = "//content/*"
+ sources = [
+ "plugin_channel.cc",
+ "plugin_channel.h",
+ "plugin_interpose_util_mac.mm",
+ "plugin_interpose_util_mac.h",
+ "plugin_main.cc",
+ "plugin_main_mac.mm",
+ "plugin_thread.cc",
+ "plugin_thread.h",
+ "webplugin_accelerated_surface_proxy_mac.cc",
+ "webplugin_accelerated_surface_proxy_mac.h",
+ "webplugin_delegate_stub.cc",
+ "webplugin_delegate_stub.h",
+ "webplugin_proxy.cc",
+ "webplugin_proxy.h",
+ ]
+
+ configs += [ "//content:content_implementation" ]
+
+ deps = [
+ "//content:export",
+ "//mojo/public/interfaces/service_provider",
+ "//skia",
+ "//third_party/npapi",
+ #"//third_party/WebKit/public:blink", TODO(GYP)
+ # TODO(GYP) remove this when blink is enabled:
+ "//third_party/WebKit/public:blink_headers",
+ ]
+ }
+} else {
+ # This way it can be unconditionally depended on.
+ group("plugin") {
+ }
+}
diff --git a/content/plugin/plugin_channel.cc b/content/plugin/plugin_channel.cc
index 9a566d5..0f96044 100644
--- a/content/plugin/plugin_channel.cc
+++ b/content/plugin/plugin_channel.cc
@@ -43,7 +43,7 @@
// happen in a single process browser and avoid deadlock.
class PluginChannel::MessageFilter : public IPC::MessageFilter {
public:
- MessageFilter() : channel_(NULL) { }
+ MessageFilter() : sender_(NULL) { }
base::WaitableEvent* GetModalDialogEvent(int render_view_id) {
base::AutoLock auto_lock(modal_dialog_event_map_lock_);
@@ -75,12 +75,12 @@
bool Send(IPC::Message* message) {
// Need this function for the IPC_MESSAGE_HANDLER_DELAY_REPLY macro.
- return channel_->Send(message);
+ return sender_->Send(message);
}
// IPC::MessageFilter:
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE {
- channel_ = channel;
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE {
+ sender_ = sender;
}
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE {
@@ -138,7 +138,7 @@
ModalDialogEventMap modal_dialog_event_map_;
base::Lock modal_dialog_event_map_lock_;
- IPC::Channel* channel_;
+ IPC::Sender* sender_;
};
PluginChannel* PluginChannel::GetPluginChannel(
diff --git a/content/plugin/plugin_channel.h b/content/plugin/plugin_channel.h
index 7535944..ffe5c79 100644
--- a/content/plugin/plugin_channel.h
+++ b/content/plugin/plugin_channel.h
@@ -7,7 +7,6 @@
#include <vector>
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_handle.h"
#include "base/process/process.h"
#include "build/build_config.h"
#include "content/child/npapi/np_channel_base.h"
diff --git a/content/plugin/plugin_main_mac.mm b/content/plugin/plugin_main_mac.mm
index 91deed8..557deb7 100644
--- a/content/plugin/plugin_main_mac.mm
+++ b/content/plugin/plugin_main_mac.mm
@@ -3,11 +3,14 @@
// found in the LICENSE file.
#import <AppKit/AppKit.h>
+#include <servers/bootstrap.h>
#include "base/environment.h"
+#include "base/mac/mach_logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_util.h"
#include "content/common/plugin_carbon_interpose_constants_mac.h"
+#include "content/common/sandbox_init_mac.h"
#include "content/plugin/plugin_interpose_util_mac.h"
#include "content/public/common/content_client.h"
@@ -46,6 +49,27 @@
#endif
void InitializeChromeApplication() {
+ // The bootstrap sandbox has taken over the bootstrap port. However, NPAPI
+ // plugins request servers with the BOOTSTRAP_PER_PID_SERVICE flag. This
+ // will fail, since the browser will be forwarding the message on behalf of
+ // the plugin, and the browser has already created these per-pid services
+ // for itself.
+ //
+ // Instead, request the real bootstrap port from the sandbox server, which
+ // can then be used by the plugin.
+ mach_port_t new_bootstrap_port = MACH_PORT_NULL;
+ kern_return_t kr = bootstrap_look_up(bootstrap_port,
+ kBootstrapPortNameForNPAPIPlugins, &new_bootstrap_port);
+ BOOTSTRAP_LOG_IF(ERROR, kr != KERN_SUCCESS, kr)
+ << "Failed to look up original bootstrap port.";
+ if (kr == KERN_SUCCESS) {
+ bootstrap_port = new_bootstrap_port;
+ kr = task_set_bootstrap_port(mach_task_self(), new_bootstrap_port);
+ MACH_LOG_IF(ERROR, kr != KERN_SUCCESS, kr)
+ << "Failed to reset TASK_BOOTSTRAP_PORT.";
+ }
+
+
[NSApplication sharedApplication];
mac_plugin_interposing::SetUpCocoaInterposing();
}
diff --git a/content/plugin/webplugin_proxy.cc b/content/plugin/webplugin_proxy.cc
index c6a627d..81003fc 100644
--- a/content/plugin/webplugin_proxy.cc
+++ b/content/plugin/webplugin_proxy.cc
@@ -8,7 +8,6 @@
#include "base/bind.h"
#include "base/lazy_instance.h"
-#include "base/memory/scoped_handle.h"
#include "base/memory/shared_memory.h"
#include "build/build_config.h"
#include "content/child/npapi/npobject_proxy.h"
diff --git a/content/plugin/webplugin_proxy.h b/content/plugin/webplugin_proxy.h
index 314bd5a..5cece13 100644
--- a/content/plugin/webplugin_proxy.h
+++ b/content/plugin/webplugin_proxy.h
@@ -12,7 +12,6 @@
#if defined(OS_MACOSX)
#include "base/mac/scoped_cftyperef.h"
#endif
-#include "base/memory/scoped_handle.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/shared_memory.h"
#include "base/memory/weak_ptr.h"
diff --git a/content/popup_item_type_java.target.darwin-arm.mk b/content/popup_item_type_java.target.darwin-arm.mk
index 2d83355..75e4120 100644
--- a/content/popup_item_type_java.target.darwin-arm.mk
+++ b/content/popup_item_type_java.target.darwin-arm.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/popup_item_type_java.target.darwin-arm64.mk b/content/popup_item_type_java.target.darwin-arm64.mk
index 7d82f34..d9a57e6 100644
--- a/content/popup_item_type_java.target.darwin-arm64.mk
+++ b/content/popup_item_type_java.target.darwin-arm64.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,6 +111,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/popup_item_type_java.target.darwin-mips.mk b/content/popup_item_type_java.target.darwin-mips.mk
index b3366d4..e2d0ef1 100644
--- a/content/popup_item_type_java.target.darwin-mips.mk
+++ b/content/popup_item_type_java.target.darwin-mips.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -176,6 +178,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -205,6 +208,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/popup_item_type_java.target.darwin-x86.mk b/content/popup_item_type_java.target.darwin-x86.mk
index f16b05a..270f749 100644
--- a/content/popup_item_type_java.target.darwin-x86.mk
+++ b/content/popup_item_type_java.target.darwin-x86.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -115,6 +116,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/popup_item_type_java.target.darwin-x86_64.mk b/content/popup_item_type_java.target.darwin-x86_64.mk
index 336f566..cc57c21 100644
--- a/content/popup_item_type_java.target.darwin-x86_64.mk
+++ b/content/popup_item_type_java.target.darwin-x86_64.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -175,6 +177,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/popup_item_type_java.target.linux-arm.mk b/content/popup_item_type_java.target.linux-arm.mk
index 2d83355..75e4120 100644
--- a/content/popup_item_type_java.target.linux-arm.mk
+++ b/content/popup_item_type_java.target.linux-arm.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/popup_item_type_java.target.linux-arm64.mk b/content/popup_item_type_java.target.linux-arm64.mk
index 7d82f34..d9a57e6 100644
--- a/content/popup_item_type_java.target.linux-arm64.mk
+++ b/content/popup_item_type_java.target.linux-arm64.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,6 +111,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/popup_item_type_java.target.linux-mips.mk b/content/popup_item_type_java.target.linux-mips.mk
index b3366d4..e2d0ef1 100644
--- a/content/popup_item_type_java.target.linux-mips.mk
+++ b/content/popup_item_type_java.target.linux-mips.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -176,6 +178,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -205,6 +208,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/popup_item_type_java.target.linux-x86.mk b/content/popup_item_type_java.target.linux-x86.mk
index f16b05a..270f749 100644
--- a/content/popup_item_type_java.target.linux-x86.mk
+++ b/content/popup_item_type_java.target.linux-x86.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -115,6 +116,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/popup_item_type_java.target.linux-x86_64.mk b/content/popup_item_type_java.target.linux-x86_64.mk
index 336f566..cc57c21 100644
--- a/content/popup_item_type_java.target.linux-x86_64.mk
+++ b/content/popup_item_type_java.target.linux-x86_64.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -175,6 +177,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/ppapi_plugin/BUILD.gn b/content/ppapi_plugin/BUILD.gn
new file mode 100644
index 0000000..fae7d1a
--- /dev/null
+++ b/content/ppapi_plugin/BUILD.gn
@@ -0,0 +1,35 @@
+# Copyright 2014 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.
+
+source_set("ppapi_plugin") {
+ sources = [
+ "broker_process_dispatcher.cc",
+ "broker_process_dispatcher.h",
+ "plugin_process_dispatcher.cc",
+ "plugin_process_dispatcher.h",
+ "ppapi_broker_main.cc",
+ "ppapi_plugin_main.cc",
+ "ppapi_thread.cc",
+ "ppapi_thread.h",
+ "ppapi_webkitplatformsupport_impl.cc",
+ "ppapi_webkitplatformsupport_impl.h",
+ ]
+
+ configs += [ "//content:content_implementation" ]
+
+ deps = [
+ "//base",
+ "//content:export",
+ "//mojo/public/interfaces/service_provider",
+ "//ppapi:ppapi_ipc",
+ "//skia",
+ "//third_party/icu",
+ #"//third_party/WebKit/public:blink", TODO(GYP)
+ # TODO(GYP) remove this when blink is enabled:
+ "//third_party/WebKit/public:blink_headers",
+ "//ui/base",
+ "//ui/gfx",
+ "//ui/gfx/geometry",
+ ]
+}
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index cb0abde..2d5e3db 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "base/cpu.h"
#include "base/debug/crash_logging.h"
+#include "base/file_util.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/metrics/sparse_histogram.h"
@@ -275,6 +276,10 @@
if (!library.is_valid()) {
LOG(ERROR) << "Failed to load Pepper module from " << path.value()
<< " (error: " << error.ToString() << ")";
+ if (!base::PathExists(path)) {
+ ReportLoadResult(path, FILE_MISSING);
+ return;
+ }
ReportLoadResult(path, LOAD_FAILED);
// Report detailed reason for load failure.
ReportLoadErrorCode(path, error);
diff --git a/content/ppapi_plugin/ppapi_thread.h b/content/ppapi_plugin/ppapi_thread.h
index 9b40189..87ac2cc 100644
--- a/content/ppapi_plugin/ppapi_thread.h
+++ b/content/ppapi_plugin/ppapi_thread.h
@@ -56,6 +56,7 @@
LOAD_FAILED,
ENTRY_POINT_MISSING,
INIT_FAILED,
+ FILE_MISSING,
// NOTE: Add new values only immediately above this line.
LOAD_RESULT_MAX // Boundary value for UMA_HISTOGRAM_ENUMERATION.
};
diff --git a/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc b/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc
index bdaf47d..cfbed44 100644
--- a/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc
+++ b/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc
@@ -24,7 +24,7 @@
#include "third_party/WebKit/public/platform/android/WebSandboxSupport.h"
#elif defined(OS_POSIX)
#include "content/common/child_process_sandbox_support_impl_linux.h"
-#include "third_party/WebKit/public/platform/linux/WebFontFamily.h"
+#include "third_party/WebKit/public/platform/linux/WebFallbackFont.h"
#include "third_party/WebKit/public/platform/linux/WebSandboxSupport.h"
#include "third_party/icu/source/common/unicode/utf16.h"
#endif
@@ -52,10 +52,10 @@
// Empty class.
#elif defined(OS_POSIX)
SandboxSupport();
- virtual void getFontFamilyForCharacter(
+ virtual void getFallbackFontForCharacter(
WebUChar32 character,
const char* preferred_locale,
- blink::WebFontFamily* family);
+ blink::WebFallbackFont* fallbackFont);
virtual void getRenderStyleForStrike(
const char* family, int sizeAndStyle, blink::WebFontRenderStyle* out);
@@ -63,7 +63,7 @@
// WebKit likes to ask us for the correct font family to use for a set of
// unicode code points. It needs this information frequently so we cache it
// here.
- std::map<int32_t, blink::WebFontFamily> unicode_font_families_;
+ std::map<int32_t, blink::WebFallbackFont> unicode_font_families_;
// For debugging crbug.com/312965
base::PlatformThreadId creation_thread_;
#endif
@@ -106,24 +106,26 @@
}
void
-PpapiWebKitPlatformSupportImpl::SandboxSupport::getFontFamilyForCharacter(
+PpapiWebKitPlatformSupportImpl::SandboxSupport::getFallbackFontForCharacter(
WebUChar32 character,
const char* preferred_locale,
- blink::WebFontFamily* family) {
+ blink::WebFallbackFont* fallbackFont) {
ppapi::ProxyLock::AssertAcquired();
// For debugging crbug.com/312965
CHECK_EQ(creation_thread_, base::PlatformThread::CurrentId());
- const std::map<int32_t, blink::WebFontFamily>::const_iterator iter =
+ const std::map<int32_t, blink::WebFallbackFont>::const_iterator iter =
unicode_font_families_.find(character);
if (iter != unicode_font_families_.end()) {
- family->name = iter->second.name;
- family->isBold = iter->second.isBold;
- family->isItalic = iter->second.isItalic;
+ fallbackFont->name = iter->second.name;
+ fallbackFont->filename = iter->second.filename;
+ fallbackFont->ttcIndex = iter->second.ttcIndex;
+ fallbackFont->isBold = iter->second.isBold;
+ fallbackFont->isItalic = iter->second.isItalic;
return;
}
- GetFontFamilyForCharacter(character, preferred_locale, family);
- unicode_font_families_.insert(std::make_pair(character, *family));
+ GetFallbackFontForCharacter(character, preferred_locale, fallbackFont);
+ unicode_font_families_.insert(std::make_pair(character, *fallbackFont));
}
void PpapiWebKitPlatformSupportImpl::SandboxSupport::getRenderStyleForStrike(
diff --git a/content/public/android/OWNERS b/content/public/android/OWNERS
index 0e99ab7..6d043f4 100644
--- a/content/public/android/OWNERS
+++ b/content/public/android/OWNERS
@@ -5,4 +5,3 @@
per-file *.aidl=set noparent
per-file *.aidl=palmer@chromium.org
-per-file *.aidl=cdn@chromium.org
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index 64b1d58..50044ae 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -303,9 +303,9 @@
// because the OSK was just brought up.
private final Rect mFocusPreOSKViewportRect = new Rect();
- // On single tap this will store the x, y coordinates of the touch.
- private int mSingleTapX;
- private int mSingleTapY;
+ // On tap this will store the x, y coordinates of the touch.
+ private int mLastTapX;
+ private int mLastTapY;
// Whether a touch scroll sequence is active, used to hide text selection
// handles. Note that a scroll sequence will *always* bound a pinch
@@ -1108,7 +1108,8 @@
pointerCount > 1 ? event.getX(1) : 0,
pointerCount > 1 ? event.getY(1) : 0,
event.getPointerId(0), pointerCount > 1 ? event.getPointerId(1) : -1,
- event.getTouchMajor(), pointerCount > 1 ? event.getTouchMajor(1) : 0);
+ event.getTouchMajor(), pointerCount > 1 ? event.getTouchMajor(1) : 0,
+ event.getRawX(), event.getRawY());
if (offset != null) offset.recycle();
return consumed;
@@ -1829,33 +1830,30 @@
if (!mPopupZoomer.isShowing()) mPopupZoomer.setLastTouch(xPix, yPix);
+ mLastTapX = (int) xPix;
+ mLastTapY = (int) yPix;
+
if (type == GestureEventType.LONG_PRESS
|| type == GestureEventType.LONG_TAP) {
getInsertionHandleController().allowAutomaticShowing();
getSelectionHandleController().allowAutomaticShowing();
} else {
- setClickXAndY((int) xPix, (int) yPix);
if (mSelectionEditable) getInsertionHandleController().allowAutomaticShowing();
}
}
- private void setClickXAndY(int x, int y) {
- mSingleTapX = x;
- mSingleTapY = y;
+ /**
+ * @return The x coordinate for the last point that a tap or press gesture was initiated from.
+ */
+ public int getLastTapX() {
+ return mLastTapX;
}
/**
- * @return The x coordinate for the last point that a singleTap gesture was initiated from.
+ * @return The y coordinate for the last point that a tap or press gesture was initiated from.
*/
- public int getSingleTapX() {
- return mSingleTapX;
- }
-
- /**
- * @return The y coordinate for the last point that a singleTap gesture was initiated from.
- */
- public int getSingleTapY() {
- return mSingleTapY;
+ public int getLastTapY() {
+ return mLastTapY;
}
public void setZoomControlsDelegate(ZoomControlsDelegate zoomControlsDelegate) {
@@ -1919,8 +1917,9 @@
@Override
public void showHandles(int startDir, int endDir) {
+ final boolean wasShowing = isShowing();
super.showHandles(startDir, endDir);
- showSelectActionBar();
+ if (!wasShowing || mActionMode == null) showSelectActionBar();
}
};
@@ -2314,8 +2313,6 @@
TraceEvent.begin();
mSelectionEditable = (textInputType != ImeAdapter.getTextInputTypeNone());
- if (mActionMode != null) mActionMode.invalidate();
-
mImeAdapter.updateKeyboardVisibility(
nativeImeAdapterAndroid, textInputType, showImeIfNeeded);
@@ -2323,6 +2320,8 @@
mInputConnection.updateState(text, selectionStart, selectionEnd, compositionStart,
compositionEnd, isNonImeChange);
}
+
+ if (mActionMode != null) mActionMode.invalidate();
TraceEvent.end();
}
@@ -3126,7 +3125,8 @@
long timeMs, int action, int pointerCount, int historySize, int actionIndex,
float x0, float y0, float x1, float y1,
int pointerId0, int pointerId1,
- float touchMajor0, float touchMajor1);
+ float touchMajor0, float touchMajor1,
+ float rawX, float rawY);
private native int nativeSendMouseMoveEvent(
long nativeContentViewCoreImpl, long timeMs, float x, float y);
diff --git a/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java b/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java
index 92583c6..b497d90 100644
--- a/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java
+++ b/content/public/android/java/src/org/chromium/content/browser/WebContentsObserverAndroid.java
@@ -126,6 +126,14 @@
}
/**
+ * Notifies that the document has finished loading for the given frame.
+ * @param frameId A positive, non-zero integer identifying the navigating frame.
+ */
+ @CalledByNative
+ public void documentLoadedInFrame(long frameId) {
+ }
+
+ /**
* Notifies that a navigation entry has been committed.
*/
@CalledByNative
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java b/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java
index 034839c..272b97e 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java
@@ -4,6 +4,8 @@
package org.chromium.content.browser.input;
+import android.annotation.SuppressLint;
+import android.annotation.TargetApi;
import android.content.Context;
import android.hardware.input.InputManager;
import android.hardware.input.InputManager.InputDeviceListener;
@@ -35,6 +37,7 @@
private boolean mIsGamepadAccessed;
private InputDeviceListener mInputDeviceListener;
+ @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
private GamepadList() {
mInputDeviceListener = new InputDeviceListener() {
// Override InputDeviceListener methods
@@ -55,6 +58,7 @@
};
}
+ @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
private void initializeDevices() {
// Get list of all the attached input devices.
int[] deviceIds = mInputManager.getInputDeviceIds();
@@ -79,6 +83,7 @@
getInstance().attachedToWindow(context);
}
+ @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
private void attachedToWindow(Context context) {
if (mAttachedToWindowCounter++ == 0) {
mInputManager = (InputManager) context.getSystemService(Context.INPUT_SERVICE);
@@ -93,12 +98,14 @@
/**
* Notifies the GamepadList that a {@link ContentView} is detached from it's window.
*/
+ @SuppressLint("MissingSuperCall")
public static void onDetachedFromWindow() {
assert ThreadUtils.runningOnUiThread();
if (!isGamepadSupported()) return;
getInstance().detachedFromWindow();
}
+ @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
private void detachedFromWindow() {
if (--mAttachedToWindowCounter == 0) {
synchronized (mLock) {
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/HandleView.java b/content/public/android/java/src/org/chromium/content/browser/input/HandleView.java
index e41efcf..a633aea 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/HandleView.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/HandleView.java
@@ -60,14 +60,6 @@
private final View mParent;
private InsertionHandleController.PastePopupMenu mPastePopupWindow;
- private final int mTextSelectHandleLeftRes;
- private final int mTextSelectHandleRightRes;
- private final int mTextSelectHandleRes;
-
- private Drawable mSelectHandleLeft;
- private Drawable mSelectHandleRight;
- private Drawable mSelectHandleCenter;
-
private final Rect mTempRect = new Rect();
static final int LEFT = 0;
@@ -91,18 +83,13 @@
HandleView(CursorController controller, int pos, View parent,
PositionObserver parentPositionObserver) {
super(parent.getContext());
- Context context = parent.getContext();
mParent = parent;
+ Context context = mParent.getContext();
mController = controller;
mContainer = new PopupWindow(context, null, android.R.attr.textSelectHandleWindowStyle);
mContainer.setSplitTouchEnabled(true);
mContainer.setClippingEnabled(false);
-
- TypedArray a = context.obtainStyledAttributes(TEXT_VIEW_HANDLE_ATTRS);
- mTextSelectHandleLeftRes = a.getResourceId(a.getIndex(LEFT), 0);
- mTextSelectHandleRes = a.getResourceId(a.getIndex(CENTER), 0);
- mTextSelectHandleRightRes = a.getResourceId(a.getIndex(RIGHT), 0);
- a.recycle();
+ mContainer.setAnimationStyle(0);
setOrientation(pos);
@@ -122,45 +109,33 @@
}
void setOrientation(int pos) {
- int handleWidth;
+ Context context = mParent.getContext();
+ TypedArray a = context.getTheme().obtainStyledAttributes(TEXT_VIEW_HANDLE_ATTRS);
+ mDrawable = a.getDrawable(pos);
+ a.recycle();
+
+ mIsInsertionHandle = (pos == CENTER);
+
+ int handleWidth = mDrawable.getIntrinsicWidth();
switch (pos) {
case LEFT: {
- if (mSelectHandleLeft == null) {
- mSelectHandleLeft = getContext().getResources().getDrawable(
- mTextSelectHandleLeftRes);
- }
- mDrawable = mSelectHandleLeft;
- handleWidth = mDrawable.getIntrinsicWidth();
mHotspotX = (handleWidth * 3) / 4f;
break;
}
case RIGHT: {
- if (mSelectHandleRight == null) {
- mSelectHandleRight = getContext().getResources().getDrawable(
- mTextSelectHandleRightRes);
- }
- mDrawable = mSelectHandleRight;
- handleWidth = mDrawable.getIntrinsicWidth();
mHotspotX = handleWidth / 4f;
break;
}
case CENTER:
default: {
- if (mSelectHandleCenter == null) {
- mSelectHandleCenter = getContext().getResources().getDrawable(
- mTextSelectHandleRes);
- }
- mDrawable = mSelectHandleCenter;
- handleWidth = mDrawable.getIntrinsicWidth();
mHotspotX = handleWidth / 2f;
- mIsInsertionHandle = true;
break;
}
}
-
mHotspotY = 0;
+
invalidate();
}
@@ -190,6 +165,9 @@
}
private void onPositionChanged() {
+ // Deferring View invalidation while the handles are hidden prevents
+ // scheduling conflicts with the compositor.
+ if (getVisibility() != VISIBLE) return;
mContainer.update(getContainerPositionX(), getContainerPositionY(),
getRight() - getLeft(), getBottom() - getTop());
}
@@ -417,6 +395,8 @@
mAlpha = 0.f;
mFadeStartTime = AnimationUtils.currentAnimationTimeMillis();
setVisibility(VISIBLE);
+ // Position updates may have been deferred while the handle was hidden.
+ onPositionChanged();
}
void showPastePopupWindow() {
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
index bfc8ea5..cffc903 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
@@ -250,6 +250,9 @@
if (nativeImeAdapter != 0) {
nativeAttachImeAdapter(mNativeImeAdapterAndroid);
}
+ if (mTextInputType == sTextInputTypeNone) {
+ dismissInput(false);
+ }
}
/**
@@ -258,13 +261,7 @@
* @param nativeImeAdapter The pointer to the native ImeAdapter object.
*/
public void attach(long nativeImeAdapter) {
- if (mNativeImeAdapterAndroid != 0) {
- nativeResetImeAdapter(mNativeImeAdapterAndroid);
- }
- mNativeImeAdapterAndroid = nativeImeAdapter;
- if (nativeImeAdapter != 0) {
- nativeAttachImeAdapter(mNativeImeAdapterAndroid);
- }
+ attach(nativeImeAdapter, sTextInputTypeNone);
}
private void showKeyboard() {
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeChildFrameTest.java b/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeChildFrameTest.java
index 8e0b424..f0bfe74 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeChildFrameTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/JavaBridgeChildFrameTest.java
@@ -41,13 +41,83 @@
@SmallTest
@Feature({"AndroidWebView", "Android-JavaBridge"})
public void testInjectedObjectPresentInChildFrame() throws Throwable {
- // In the case that the test fails (i.e. the child frame doesn't get the injected object,
- // the call to testController.setStringValue in the child frame's onload handler will
- // not be made.
loadDataSync(getContentViewCore(),
- "<html><head></head><body>" +
- "<iframe id=\"childFrame\" onload=\"testController.setStringValue('PASS');\" />" +
- "</body></html>", "text/html", false);
+ "<html><body><iframe></iframe></body></html>", "text/html", false);
+ // We are not executing this code as a part of page loading routine to avoid races
+ // with internal Blink events that notify Java Bridge about window object updates.
+ assertEquals("\"object\"", executeJavaScriptAndGetResult(
+ getContentViewCore(), "typeof window.frames[0].testController"));
+ executeJavaScriptAndGetResult(
+ getContentViewCore(), "window.frames[0].testController.setStringValue('PASS')");
assertEquals("PASS", mTestController.waitForStringValue());
}
+
+ // Verify that loading an iframe doesn't ruin JS wrapper of the main page.
+ // This is a regression test for the problem described in b/15572824.
+ @SmallTest
+ @Feature({"AndroidWebView", "Android-JavaBridge"})
+ public void testMainPageWrapperIsNotBrokenByChildFrame() throws Throwable {
+ loadDataSync(getContentViewCore(),
+ "<html><body><iframe></iframe></body></html>", "text/html", false);
+ // In case there is anything wrong with the JS wrapper, an attempt
+ // to look up its properties will result in an exception being thrown.
+ String script =
+ "(function(){ try {" +
+ " return typeof testController.setStringValue;" +
+ "} catch (e) {" +
+ " return e.toString();" +
+ "} })()";
+ assertEquals("\"function\"",
+ executeJavaScriptAndGetResult(getContentViewCore(), script));
+ // Make sure calling a method also works.
+ executeJavaScriptAndGetResult(getContentViewCore(),
+ "testController.setStringValue('PASS');");
+ assertEquals("PASS", mTestController.waitForStringValue());
+ }
+
+ // Verify that parent page and child frame each has own JS wrapper object.
+ // Failing to do so exposes parent's context to the child.
+ @SmallTest
+ @Feature({"AndroidWebView", "Android-JavaBridge"})
+ public void testWrapperIsNotSharedWithChildFrame() throws Throwable {
+ // Test by setting a custom property on the parent page's injected
+ // object and then checking that child frame doesn't see the property.
+ loadDataSync(getContentViewCore(),
+ "<html><head>" +
+ "<script>" +
+ " window.wProperty = 42;" +
+ " testController.tcProperty = 42;" +
+ " function queryProperties(w) {" +
+ " return w.wProperty + ' / ' + w.testController.tcProperty;" +
+ " }" +
+ "</script>" +
+ "</head><body><iframe></iframe></body></html>", "text/html", false);
+ assertEquals("\"42 / 42\"",
+ executeJavaScriptAndGetResult(getContentViewCore(), "queryProperties(window)"));
+ assertEquals("\"undefined / undefined\"",
+ executeJavaScriptAndGetResult(getContentViewCore(),
+ "queryProperties(window.frames[0])"));
+ }
+
+ private String executeJavaScriptAndGetResult(final ContentViewCore contentViewCore,
+ final String script) throws Throwable {
+ final String[] result = new String[1];
+ class ResultCallback extends JavaBridgeTestBase.Controller
+ implements ContentViewCore.JavaScriptCallback {
+ @Override
+ public void handleJavaScriptResult(String jsonResult) {
+ result[0] = jsonResult;
+ notifyResultIsReady();
+ }
+ }
+ final ResultCallback resultCallback = new ResultCallback();
+ runTestOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ contentViewCore.evaluateJavaScript(script, resultCallback);
+ }
+ });
+ resultCallback.waitForResult();
+ return result[0];
+ }
}
diff --git a/content/public/app/BUILD.gn b/content/public/app/BUILD.gn
new file mode 100644
index 0000000..37d2847
--- /dev/null
+++ b/content/public/app/BUILD.gn
@@ -0,0 +1,25 @@
+# Copyright 2014 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.
+
+source_set("app") {
+ sources = [
+ "android_library_loader_hooks.h",
+ "content_main.h",
+ "content_main_delegate.cc",
+ "content_main_delegate.h",
+ "content_main_runner.h",
+ "startup_helper_win.h",
+ ]
+
+ configs += [ "//content:content_implementation" ]
+
+ deps = [
+ "//base",
+ "//base:i18n",
+ "//content:export",
+ "//content/public/plugin",
+ "//content/public/renderer",
+ "//content/public/utility",
+ ]
+}
diff --git a/content/public/browser/BUILD.gn b/content/public/browser/BUILD.gn
index 98bd536..9289ec9 100644
--- a/content/public/browser/BUILD.gn
+++ b/content/public/browser/BUILD.gn
@@ -3,10 +3,29 @@
# found in the LICENSE file.
import("//content/browser/browser.gni")
+import("//build/config/ui.gni")
source_set("browser") {
- sources = rebase_path(content_browser_gypi_values.public_browser_sources,
- ".", "//content")
+ if (is_ios) {
+ # iOS doesn't get the normal file list and only takes these whitelisted
+ # files.
+ sources = [
+ "browser_main_parts.cc",
+ "content_browser_client.cc",
+ "favicon_status.cc",
+ "navigation_details.cc",
+ "notification_registrar.cc",
+ "page_navigator.cc",
+ "web_ui_controller.cc",
+ ]
+ } else {
+ sources = rebase_path(content_browser_gypi_values.public_browser_sources,
+ ".", "//content")
+ }
+
+ if (use_aura) {
+ sources -= [ "context_factory.h" ]
+ }
configs += [ "//content:content_implementation" ]
diff --git a/content/public/browser/android/compositor.h b/content/public/browser/android/compositor.h
index 2d8126b..a8f734c 100644
--- a/content/public/browser/android/compositor.h
+++ b/content/public/browser/android/compositor.h
@@ -7,8 +7,8 @@
#include "base/callback.h"
#include "cc/resources/ui_resource_bitmap.h"
-#include "cc/resources/ui_resource_client.h"
#include "content/common/content_export.h"
+#include "content/public/browser/android/ui_resource_provider.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
@@ -25,6 +25,7 @@
namespace content {
class CompositorClient;
+class UIResourceProvider;
// An interface to the browser-side compositor.
class CONTENT_EXPORT Compositor {
@@ -68,20 +69,8 @@
// Composite *without* having modified the layer tree.
virtual void SetNeedsComposite() = 0;
- // Generates a UIResource and returns a UIResourceId. |is_transient|
- // indicates whether or not to release the resource once the bitmap
- // has been uploaded. May return 0.
- virtual cc::UIResourceId GenerateUIResource(const SkBitmap& bitmap,
- bool is_transient) = 0;
-
- // Generates an ETC1 compressed UIResource. See above for |is_transient|.
- // May return 0.
- virtual cc::UIResourceId GenerateCompressedUIResource(const gfx::Size& size,
- void* pixels,
- bool is_transient) = 0;
-
- // Deletes a UIResource.
- virtual void DeleteUIResource(cc::UIResourceId resource_id) = 0;
+ // Returns the UI resource provider associated with the compositor.
+ virtual UIResourceProvider& GetUIResourceProvider() = 0;
protected:
Compositor() {}
diff --git a/content/public/browser/android/compositor_client.h b/content/public/browser/android/compositor_client.h
index 09a12e5..84a263e 100644
--- a/content/public/browser/android/compositor_client.h
+++ b/content/public/browser/android/compositor_client.h
@@ -20,12 +20,6 @@
// Tells the client that GL resources were lost and need to be reinitialized.
virtual void DidLoseResources() {}
- // Tells the client that UI resources were lost and need to be reinitialized.
- virtual void DidLoseUIResources() {}
-
- // Mark the UI Resources as being invalid for use.
- virtual void UIResourcesAreInvalid() {}
-
protected:
CompositorClient() {}
virtual ~CompositorClient() {}
diff --git a/content/public/browser/android/synchronous_compositor.h b/content/public/browser/android/synchronous_compositor.h
index 5cd659f..6aaa213 100644
--- a/content/public/browser/android/synchronous_compositor.h
+++ b/content/public/browser/android/synchronous_compositor.h
@@ -19,7 +19,6 @@
}
namespace gfx {
-class GLSurface;
class Transform;
};
@@ -67,9 +66,8 @@
// Synchronously initialize compositor for hardware draw. Can only be called
// while compositor is in software only mode, either after compositor is
// first created or after ReleaseHwDraw is called. It is invalid to
- // DemandDrawHw before this returns true. |surface| is the GLSurface that
- // should be used to create the underlying hardware context.
- virtual bool InitializeHwDraw(scoped_refptr<gfx::GLSurface> surface) = 0;
+ // DemandDrawHw before this returns true.
+ virtual bool InitializeHwDraw() = 0;
// Reverse of InitializeHwDraw above. Can only be called while hardware draw
// is already initialized. Brings compositor back to software only mode and
@@ -82,14 +80,12 @@
virtual gpu::GLInProcessContext* GetShareContext() = 0;
// "On demand" hardware draw. The content is first clipped to |damage_area|,
- // then transformed through |transform|, and finally clipped to |view_size|
- // and by the existing stencil buffer if any.
+ // then transformed through |transform|, and finally clipped to |view_size|.
virtual scoped_ptr<cc::CompositorFrame> DemandDrawHw(
gfx::Size surface_size,
const gfx::Transform& transform,
gfx::Rect viewport,
- gfx::Rect clip,
- bool stencil_enabled) = 0;
+ gfx::Rect clip) = 0;
// For delegated rendering, return resources from parent compositor to this.
// Note that all resources must be returned before ReleaseHwDraw.
diff --git a/content/public/browser/android/ui_resource_client_android.h b/content/public/browser/android/ui_resource_client_android.h
new file mode 100644
index 0000000..83228bd
--- /dev/null
+++ b/content/public/browser/android/ui_resource_client_android.h
@@ -0,0 +1,30 @@
+// Copyright 2014 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 CONTENT_PUBLIC_BROWSER_ANDROID_UI_RESOURCE_CLIENT_ANDROID_H_
+#define CONTENT_PUBLIC_BROWSER_ANDROID_UI_RESOURCE_CLIENT_ANDROID_H_
+
+#include "cc/resources/ui_resource_client.h"
+#include "content/common/content_export.h"
+
+namespace content {
+
+class UIResourceProvider;
+
+// Android's UIResourceClient has one extra callback (UIResourceIsInvalid).
+// This signal is intended for the case when the LayerTreeHost is cleared and
+// the user needs to recreate their resources.
+// TODO(powei): This interface can be removed once crbug.com/374906 has been
+// addressed.
+class CONTENT_EXPORT UIResourceClientAndroid : public cc::UIResourceClient {
+ public:
+ // This method indicates that the UI resource the user holds is no longer
+ // valid. The user should not call DeleteUIResource on any resource generated
+ // before this signal.
+ virtual void UIResourceIsInvalid() = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_ANDROID_UI_RESOURCE_CLIENT_ANDROID_H_
diff --git a/content/public/browser/android/ui_resource_provider.h b/content/public/browser/android/ui_resource_provider.h
new file mode 100644
index 0000000..38511e1
--- /dev/null
+++ b/content/public/browser/android/ui_resource_provider.h
@@ -0,0 +1,27 @@
+// Copyright 2014 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 CONTENT_PUBLIC_BROWSER_ANDROID_UI_RESOURCE_PROVIDER_H_
+#define CONTENT_PUBLIC_BROWSER_ANDROID_UI_RESOURCE_PROVIDER_H_
+
+#include "cc/resources/ui_resource_client.h"
+#include "content/common/content_export.h"
+
+namespace content {
+
+class UIResourceClientAndroid;
+
+class CONTENT_EXPORT UIResourceProvider {
+ public:
+ virtual ~UIResourceProvider() {}
+
+ virtual cc::UIResourceId CreateUIResource(
+ UIResourceClientAndroid* client) = 0;
+
+ virtual void DeleteUIResource(cc::UIResourceId resource_id) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_ANDROID_UI_RESOURCE_PROVIDER_H_
diff --git a/content/public/browser/browser_context.h b/content/public/browser/browser_context.h
index 27a5569..1c09777 100644
--- a/content/public/browser/browser_context.h
+++ b/content/public/browser/browser_context.h
@@ -35,8 +35,8 @@
class BrowserPluginGuestManager;
class DownloadManager;
class DownloadManagerDelegate;
-class GeolocationPermissionContext;
class IndexedDBContext;
+class PushMessagingService;
class ResourceContext;
class SiteInstance;
class StoragePartition;
@@ -131,41 +131,6 @@
const base::FilePath& partition_path,
bool in_memory) = 0;
- typedef base::Callback<void(bool)> MidiSysExPermissionCallback;
-
- // Requests a permission to use system exclusive messages in MIDI events.
- // |callback| will be invoked when the request is resolved.
- virtual void RequestMidiSysExPermission(
- int render_process_id,
- int render_view_id,
- int bridge_id,
- const GURL& requesting_frame,
- bool user_gesture,
- const MidiSysExPermissionCallback& callback) = 0;
-
- // Cancels a pending MIDI permission request.
- virtual void CancelMidiSysExPermissionRequest(
- int render_process_id,
- int render_view_id,
- int bridge_id,
- const GURL& requesting_frame) = 0;
-
- typedef base::Callback<void(bool)> ProtectedMediaIdentifierPermissionCallback;
-
- // Request permission to access protected media identifier. The callback will
- // tell whether it's permitted.
- virtual void RequestProtectedMediaIdentifierPermission(
- int render_process_id,
- int render_view_id,
- const GURL& origin,
- const ProtectedMediaIdentifierPermissionCallback& callback) = 0;
-
- // Cancels pending protected media identifier permission requests.
- virtual void CancelProtectedMediaIdentifierPermissionRequests(
- int render_process_id,
- int render_view_id,
- const GURL& origin) = 0;
-
// Returns the resource context.
virtual ResourceContext* GetResourceContext() = 0;
@@ -174,15 +139,16 @@
// ensuring that it outlives DownloadManager. It's valid to return NULL.
virtual DownloadManagerDelegate* GetDownloadManagerDelegate() = 0;
- // Returns the geolocation permission context for this context. It's valid to
- // return NULL, in which case geolocation requests will always be allowed.
- virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0;
-
// Returns the guest manager for this context.
virtual BrowserPluginGuestManager* GetGuestManager() = 0;
// Returns a special storage policy implementation, or NULL.
virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() = 0;
+
+ // Returns a push messaging service. The embedder owns the service, and is
+ // responsible for ensuring that it outlives RenderProcessHost. It's valid to
+ // return NULL.
+ virtual PushMessagingService* GetPushMessagingService() = 0;
};
} // namespace content
diff --git a/content/public/browser/browser_message_filter.cc b/content/public/browser/browser_message_filter.cc
index 377cfb7..6b34322 100644
--- a/content/public/browser/browser_message_filter.cc
+++ b/content/public/browser/browser_message_filter.cc
@@ -30,9 +30,9 @@
virtual ~Internal() {}
// IPC::MessageFilter implementation:
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE {
- filter_->channel_ = channel;
- filter_->OnFilterAdded(channel);
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE {
+ filter_->sender_ = sender;
+ filter_->OnFilterAdded(sender);
}
virtual void OnFilterRemoved() OVERRIDE {
@@ -40,7 +40,7 @@
}
virtual void OnChannelClosing() OVERRIDE {
- filter_->channel_ = NULL;
+ filter_->sender_ = NULL;
filter_->OnChannelClosing();
}
@@ -101,7 +101,7 @@
BrowserMessageFilter::BrowserMessageFilter(uint32 message_class_to_filter)
: internal_(NULL),
- channel_(NULL),
+ sender_(NULL),
#if defined(OS_WIN)
peer_handle_(base::kNullProcessHandle),
#endif
@@ -112,7 +112,7 @@
const uint32* message_classes_to_filter,
size_t num_message_classes_to_filter)
: internal_(NULL),
- channel_(NULL),
+ sender_(NULL),
#if defined(OS_WIN)
peer_handle_(base::kNullProcessHandle),
#endif
@@ -161,8 +161,8 @@
return true;
}
- if (channel_)
- return channel_->Send(message);
+ if (sender_)
+ return sender_->Send(message);
delete message;
return false;
diff --git a/content/public/browser/browser_message_filter.h b/content/public/browser/browser_message_filter.h
index f1334b9..81f06a9 100644
--- a/content/public/browser/browser_message_filter.h
+++ b/content/public/browser/browser_message_filter.h
@@ -39,7 +39,7 @@
// These match the corresponding IPC::MessageFilter methods and are always
// called on the IO thread.
- virtual void OnFilterAdded(IPC::Channel* channel) {}
+ virtual void OnFilterAdded(IPC::Sender* sender) {}
virtual void OnFilterRemoved() {}
virtual void OnChannelClosing() {}
virtual void OnChannelConnected(int32 peer_pid) {}
@@ -123,7 +123,7 @@
// child class does in its OnDestruct method.
Internal* internal_;
- IPC::Channel* channel_;
+ IPC::Sender* sender_;
base::ProcessId peer_pid_;
std::vector<uint32> message_classes_to_filter_;
diff --git a/content/public/browser/browser_plugin_guest_delegate.h b/content/public/browser/browser_plugin_guest_delegate.h
index c6df728..24dc3a8 100644
--- a/content/public/browser/browser_plugin_guest_delegate.h
+++ b/content/public/browser/browser_plugin_guest_delegate.h
@@ -9,6 +9,10 @@
#include "base/process/kill.h"
#include "content/common/content_export.h"
+namespace base {
+class DictionaryValue;
+} // namespace base
+
namespace gfx {
class Size;
} // namespace gfx
@@ -24,7 +28,7 @@
virtual ~BrowserPluginGuestDelegate() {}
// Notification that the embedder has completed attachment.
- virtual void DidAttach() {}
+ virtual void DidAttach(const base::DictionaryValue& extra_params) {}
// Notifies that the content size of the guest has changed in autosize mode.
virtual void SizeChanged(const gfx::Size& old_size,
@@ -37,9 +41,6 @@
bool last_unlocked_by_target,
const base::Callback<void(bool)>& callback) {}
- // Request navigating the guest to the provided |src| URL.
- virtual void NavigateGuest(const std::string& src) {}
-
// Requests that the delegate destroy itself along with its associated
// WebContents.
virtual void Destroy() {}
diff --git a/content/public/browser/browser_plugin_guest_manager.cc b/content/public/browser/browser_plugin_guest_manager.cc
index 3c97145..abb0bb0 100644
--- a/content/public/browser/browser_plugin_guest_manager.cc
+++ b/content/public/browser/browser_plugin_guest_manager.cc
@@ -11,8 +11,6 @@
content::WebContents* BrowserPluginGuestManager::CreateGuest(
SiteInstance* embedder_site_instance,
int instance_id,
- const std::string& storage_partition_id,
- bool persist_storage,
scoped_ptr<base::DictionaryValue> extra_params) {
return NULL;
}
diff --git a/content/public/browser/browser_plugin_guest_manager.h b/content/public/browser/browser_plugin_guest_manager.h
index 6a54d4b..3e7dd26 100644
--- a/content/public/browser/browser_plugin_guest_manager.h
+++ b/content/public/browser/browser_plugin_guest_manager.h
@@ -31,8 +31,6 @@
virtual content::WebContents* CreateGuest(
content::SiteInstance* embedder_site_instance,
int instance_id,
- const std::string& storage_partition_id,
- bool persist_storage,
scoped_ptr<base::DictionaryValue> extra_params);
// Return a new instance ID.
diff --git a/content/public/browser/child_process_data.h b/content/public/browser/child_process_data.h
index 3683be9..395c487 100644
--- a/content/public/browser/child_process_data.h
+++ b/content/public/browser/child_process_data.h
@@ -25,7 +25,9 @@
// one run of the browser.
int id;
- // The handle to the process.
+ // The handle to the process. May have value kNullProcessHandle if no process
+ // exists - either because it hasn't been started yet or it's running in the
+ // current process.
base::ProcessHandle handle;
explicit ChildProcessData(int process_type)
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index 60ca573..3305e5f 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -105,7 +105,7 @@
return std::string();
}
-gfx::ImageSkia* ContentBrowserClient::GetDefaultFavicon() {
+const gfx::ImageSkia* ContentBrowserClient::GetDefaultFavicon() {
static gfx::ImageSkia* empty = new gfx::ImageSkia();
return empty;
}
@@ -211,6 +211,34 @@
return blink::WebNotificationPresenter::PermissionAllowed;
}
+void ContentBrowserClient::RequestGeolocationPermission(
+ WebContents* web_contents,
+ int bridge_id,
+ const GURL& requesting_frame,
+ bool user_gesture,
+ base::Callback<void(bool)> result_callback,
+ base::Closure* cancel_callback) {
+ result_callback.Run(true);
+}
+
+void ContentBrowserClient::RequestMidiSysExPermission(
+ WebContents* web_contents,
+ int bridge_id,
+ const GURL& requesting_frame,
+ bool user_gesture,
+ base::Callback<void(bool)> result_callback,
+ base::Closure* cancel_callback) {
+ result_callback.Run(true);
+}
+
+void ContentBrowserClient::RequestProtectedMediaIdentifierPermission(
+ WebContents* web_contents,
+ const GURL& origin,
+ base::Callback<void(bool)> result_callback,
+ base::Closure* cancel_callback) {
+ result_callback.Run(true);
+}
+
bool ContentBrowserClient::CanCreateWindow(
const GURL& opener_url,
const GURL& opener_top_level_frame_url,
@@ -290,12 +318,6 @@
return NULL;
}
-#if defined(OS_WIN)
-const wchar_t* ContentBrowserClient::GetResourceDllName() {
- return NULL;
-}
-#endif
-
bool ContentBrowserClient::IsPluginAllowedToCallRequestOSFileHandle(
BrowserContext* browser_context,
const GURL& url) {
@@ -311,6 +333,12 @@
return NULL;
}
+#if defined(OS_WIN)
+const wchar_t* ContentBrowserClient::GetResourceDllName() {
+ return NULL;
+}
+#endif
+
#if defined(VIDEO_HOLE)
ExternalVideoSurfaceContainer*
ContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer(
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index b4fdc39..d29b30e 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -300,7 +300,7 @@
virtual std::string GetAcceptLangs(BrowserContext* context);
// Returns the default favicon. The callee doesn't own the given bitmap.
- virtual gfx::ImageSkia* GetDefaultFavicon();
+ virtual const gfx::ImageSkia* GetDefaultFavicon();
// Allow the embedder to control if an AppCache can be used for the given url.
// This is called on the IO thread.
@@ -468,6 +468,39 @@
DesktopNotificationDelegate* delegate,
base::Closure* cancel_callback) {}
+ // The renderer is requesting permission to use Geolocation. When the answer
+ // to a permission request has been determined, |result_callback| should be
+ // called with the result. If |cancel_callback| is non-null, it's set to a
+ // callback which can be used to cancel the permission request.
+ virtual void RequestGeolocationPermission(
+ WebContents* web_contents,
+ int bridge_id,
+ const GURL& requesting_frame,
+ bool user_gesture,
+ base::Callback<void(bool)> result_callback,
+ base::Closure* cancel_callback);
+
+ // Requests a permission to use system exclusive messages in MIDI events.
+ // |result_callback| will be invoked when the request is resolved. If
+ // |cancel_callback| is non-null, it's set to a callback which can be used to
+ // cancel the permission request.
+ virtual void RequestMidiSysExPermission(
+ WebContents* web_contents,
+ int bridge_id,
+ const GURL& requesting_frame,
+ bool user_gesture,
+ base::Callback<void(bool)> result_callback,
+ base::Closure* cancel_callback);
+
+ // Request permission to access protected media identifier. |result_callback
+ // will tell whether it's permitted. If |cancel_callback| is non-null, it's
+ // set to a callback which can be used to cancel the permission request.
+ virtual void RequestProtectedMediaIdentifierPermission(
+ WebContents* web_contents,
+ const GURL& origin,
+ base::Callback<void(bool)> result_callback,
+ base::Closure* cancel_callback);
+
// Returns true if the given page is allowed to open a window of the given
// type. If true is returned, |no_javascript_access| will indicate whether
// the window that is created should be scriptable/in the same process.
@@ -601,6 +634,21 @@
// It's valid to return NULL.
virtual DevToolsManagerDelegate* GetDevToolsManagerDelegate();
+ // Returns true if plugin referred to by the url can use
+ // pp::FileIO::RequestOSFileHandle.
+ virtual bool IsPluginAllowedToCallRequestOSFileHandle(
+ BrowserContext* browser_context,
+ const GURL& url);
+
+ // Returns true if dev channel APIs are available for plugins.
+ virtual bool IsPluginAllowedToUseDevChannelAPIs();
+
+ // Returns a special cookie store to use for a given render process, or NULL
+ // if the default cookie store should be used
+ // This is called on the IO thread.
+ virtual net::CookieStore* OverrideCookieStoreForRenderProcess(
+ int render_process_id);
+
#if defined(OS_POSIX) && !defined(OS_MACOSX)
// Populates |mappings| with all files that need to be mapped before launching
// a child process.
@@ -621,21 +669,6 @@
bool* success) {}
#endif
- // Returns true if plugin referred to by the url can use
- // pp::FileIO::RequestOSFileHandle.
- virtual bool IsPluginAllowedToCallRequestOSFileHandle(
- BrowserContext* browser_context,
- const GURL& url);
-
- // Returns true if dev channel APIs are available for plugins.
- virtual bool IsPluginAllowedToUseDevChannelAPIs();
-
- // Returns a special cookie store to use for a given render process, or NULL
- // if the default cookie store should be used
- // This is called on the IO thread.
- virtual net::CookieStore* OverrideCookieStoreForRenderProcess(
- int render_process_id);
-
#if defined(VIDEO_HOLE)
// Allows an embedder to provide its own ExternalVideoSurfaceContainer
// implementation. Return NULL to disable external surface video.
diff --git a/content/public/browser/download_manager.h b/content/public/browser/download_manager.h
index 6bb1f35..0c9bbac 100644
--- a/content/public/browser/download_manager.h
+++ b/content/public/browser/download_manager.h
@@ -142,6 +142,8 @@
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const std::string& mime_type,
+ const std::string& original_mime_type,
const base::Time& start_time,
const base::Time& end_time,
const std::string& etag,
diff --git a/content/public/browser/geolocation_permission_context.h b/content/public/browser/geolocation_permission_context.h
deleted file mode 100644
index a97c83f..0000000
--- a/content/public/browser/geolocation_permission_context.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2012 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 CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_
-#define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_
-
-#include "base/callback.h"
-#include "base/memory/ref_counted.h"
-#include "content/common/content_export.h"
-
-class GURL;
-
-namespace content {
-class WebContents;
-
-// GeolocationPermissionContext must be implemented by the embedder, to provide
-// the policy and logic for the Geolocation permissions flow.
-// This includes both prompting the user and persisting results, as required.
-class CONTENT_EXPORT GeolocationPermissionContext
- : public base::RefCountedThreadSafe<GeolocationPermissionContext> {
- public:
- // The renderer is requesting permission to use Geolocation.
- // When the answer to a permission request has been determined, |callback|
- // should be called with the result.
- virtual void RequestGeolocationPermission(
- WebContents* web_contents,
- int bridge_id,
- const GURL& requesting_frame,
- bool user_gesture,
- base::Callback<void(bool)> callback) = 0;
-
- // The renderer is cancelling a pending permission request.
- virtual void CancelGeolocationPermissionRequest(
- WebContents* web_contents,
- int bridge_id,
- const GURL& requesting_frame) = 0;
-
- protected:
- virtual ~GeolocationPermissionContext() {}
-
- private:
- friend class base::RefCountedThreadSafe<GeolocationPermissionContext>;
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_
diff --git a/content/public/browser/host_zoom_map.h b/content/public/browser/host_zoom_map.h
index e98e74e..e65b443 100644
--- a/content/public/browser/host_zoom_map.h
+++ b/content/public/browser/host_zoom_map.h
@@ -78,7 +78,14 @@
const std::string& scheme,
const std::string& host) const = 0;
- // Returns all non-temporary zoom levels. Can only be called on any thread.
+ // Returns true if the specified |scheme| and/or |host| has a zoom level
+ // currently set.
+ //
+ // This may be called on any thread.
+ virtual bool HasZoomLevel(const std::string& scheme,
+ const std::string& host) const = 0;
+
+ // Returns all non-temporary zoom levels. Can be called on any thread.
virtual ZoomLevelVector GetAllZoomLevels() const = 0;
// Here |host| is the host portion of URL, or (in the absence of a host)
@@ -102,6 +109,25 @@
const std::string& host,
double level) = 0;
+ // Returns whether the view manages its zoom level independently of other
+ // views displaying content from the same host.
+ virtual bool UsesTemporaryZoomLevel(int render_process_id,
+ int render_view_id) const = 0;
+
+ // Sets the temporary zoom level that's only valid for the lifetime of this
+ // WebContents.
+ //
+ // This should only be called on the UI thread.
+ virtual void SetTemporaryZoomLevel(int render_process_id,
+ int render_view_id,
+ double level) = 0;
+
+ // Clears the temporary zoom level stored for this WebContents.
+ //
+ // This should only be called on the UI thread.
+ virtual void ClearTemporaryZoomLevel(int render_process_id,
+ int render_view_id) = 0;
+
// Get/Set the default zoom level for pages that don't override it.
virtual double GetDefaultZoomLevel() const = 0;
virtual void SetDefaultZoomLevel(double level) = 0;;
diff --git a/content/public/browser/push_messaging_service.h b/content/public/browser/push_messaging_service.h
new file mode 100644
index 0000000..37150db
--- /dev/null
+++ b/content/public/browser/push_messaging_service.h
@@ -0,0 +1,33 @@
+// Copyright 2014 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 CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_
+#define CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_
+
+#include <string>
+
+#include "base/callback.h"
+#include "content/common/content_export.h"
+#include "url/gurl.h"
+
+namespace content {
+
+// A push service-agnostic interface that the Push API uses for talking to
+// push messaging services like GCM.
+class CONTENT_EXPORT PushMessagingService {
+ public:
+ typedef base::Callback<void(const GURL& /* endpoint */,
+ const std::string& /* registration_id */,
+ bool /* success */)>
+ RegisterCallback;
+
+ virtual ~PushMessagingService() {}
+ virtual void Register(const std::string& app_id,
+ const std::string& sender_id,
+ const RegisterCallback& callback) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_PUSH_MESSAGING_SERVICE_H_
diff --git a/content/public/browser/render_widget_host_view_mac_delegate.h b/content/public/browser/render_widget_host_view_mac_delegate.h
index 976940d..c00d8bd 100644
--- a/content/public/browser/render_widget_host_view_mac_delegate.h
+++ b/content/public/browser/render_widget_host_view_mac_delegate.h
@@ -31,12 +31,6 @@
// normal processing should take place.
- (BOOL)handleEvent:(NSEvent*)event;
-// Notification of scroll offset pinning.
-- (void)scrollOffsetPinnedToLeft:(BOOL)left toRight:(BOOL)right;
-
-// Notification of whether the view has a horizontal scrollbar.
-- (void)setHasHorizontalScrollbar:(BOOL)has_horizontal_scrollbar;
-
// Provides validation of user interface items. If the return value is NO, then
// the delegate is unaware of that item and |valid| is undefined. Otherwise,
// |valid| contains the validity of the specified item.
diff --git a/content/public/browser/resource_dispatcher_host_delegate.cc b/content/public/browser/resource_dispatcher_host_delegate.cc
index ccd358f..b7b96c3 100644
--- a/content/public/browser/resource_dispatcher_host_delegate.cc
+++ b/content/public/browser/resource_dispatcher_host_delegate.cc
@@ -61,21 +61,16 @@
}
bool ResourceDispatcherHostDelegate::ShouldInterceptResourceAsStream(
- content::ResourceContext* resource_context,
- const GURL& url,
+ net::URLRequest* request,
const std::string& mime_type,
GURL* origin,
- std::string* target_id) {
+ std::string* payload) {
return false;
}
void ResourceDispatcherHostDelegate::OnStreamCreated(
- content::ResourceContext* resource_context,
- int render_process_id,
- int render_view_id,
- const std::string& target_id,
- scoped_ptr<StreamHandle> stream,
- int64 expected_content_size) {
+ net::URLRequest* request,
+ scoped_ptr<content::StreamHandle> stream) {
}
void ResourceDispatcherHostDelegate::OnResponseStarted(
diff --git a/content/public/browser/resource_dispatcher_host_delegate.h b/content/public/browser/resource_dispatcher_host_delegate.h
index 598cffb..45796ba 100644
--- a/content/public/browser/resource_dispatcher_host_delegate.h
+++ b/content/public/browser/resource_dispatcher_host_delegate.h
@@ -96,32 +96,28 @@
virtual bool ShouldForceDownloadResource(
const GURL& url, const std::string& mime_type);
- // Returns true and sets |origin| and |target_id| if a Stream should be
- // created for the resource.
+ // Returns true and sets |origin| if a Stream should be created for the
+ // resource.
// If true is returned, a new Stream will be created and OnStreamCreated()
// will be called with
- // - the |target_id| returned by this function
// - a StreamHandle instance for the Stream. The handle contains the URL for
// reading the Stream etc.
// The Stream's origin will be set to |origin|.
+ //
+ // If the stream will be rendered in a BrowserPlugin, |payload| will contain
+ // the data that should be given to the old ResourceHandler to forward to the
+ // renderer process.
virtual bool ShouldInterceptResourceAsStream(
- content::ResourceContext* resource_context,
- const GURL& url,
+ net::URLRequest* request,
const std::string& mime_type,
GURL* origin,
- std::string* target_id);
+ std::string* payload);
- // Informs the delegate that a Stream was created. |target_id| will be filled
- // with the parameter returned by ShouldInterceptResourceAsStream(). The
- // Stream can be read from the blob URL of the Stream, but can only be read
- // once.
+ // Informs the delegate that a Stream was created. The Stream can be read from
+ // the blob URL of the Stream, but can only be read once.
virtual void OnStreamCreated(
- content::ResourceContext* resource_context,
- int render_process_id,
- int render_view_id,
- const std::string& target_id,
- scoped_ptr<StreamHandle> stream,
- int64 expected_content_size);
+ net::URLRequest* request,
+ scoped_ptr<content::StreamHandle> stream);
// Informs the delegate that a response has started.
virtual void OnResponseStarted(
diff --git a/content/public/common/OWNERS b/content/public/common/OWNERS
index 5b9b76b..cbcb62d 100644
--- a/content/public/common/OWNERS
+++ b/content/public/common/OWNERS
@@ -3,7 +3,6 @@
per-file common_param_traits.cc=tsepez@chromium.org
per-file *param_traits*.h=set noparent
-per-file *param_traits*.h=cdn@chromium.org
per-file *param_traits*.h=cevans@chromium.org
per-file *param_traits*.h=dcheng@chromium.org
per-file *param_traits*.h=inferno@chromium.org
@@ -12,4 +11,4 @@
per-file *param_traits*.h=kenrb@chromium.org
per-file *param_traits*.h=nasko@chromium.org
per-file *param_traits*.h=palmer@chromium.org
-per-file *param_traits*.h=tsepez@chromium.org
\ No newline at end of file
+per-file *param_traits*.h=tsepez@chromium.org
diff --git a/content/public/common/assert_matching_enums.cc b/content/public/common/assert_matching_enums.cc
deleted file mode 100644
index 9a0e898..0000000
--- a/content/public/common/assert_matching_enums.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2014 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.
-
-// Use this file to assert that *_list.h enums that are meant to do the bridge
-// from Blink are valid.
-
-#include "base/macros.h"
-#include "content/public/common/screen_orientation_values.h"
-#include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
-
-namespace content {
-
-#define COMPILE_ASSERT_MATCHING_ENUM(expected, actual) \
- COMPILE_ASSERT(int(expected) == int(actual), mismatching_enums)
-
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockDefault,
- DEFAULT);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortraitPrimary,
- PORTRAIT_PRIMARY);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortraitSecondary,
- PORTRAIT_SECONDARY);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscapePrimary,
- LANDSCAPE_PRIMARY);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscapeSecondary,
- LANDSCAPE_SECONDARY);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockAny,
- ANY);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscape,
- LANDSCAPE);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortrait,
- PORTRAIT);
-
-} // namespace content
diff --git a/content/public/common/common_param_traits_macros.h b/content/public/common/common_param_traits_macros.h
index 34c76a8..61d8b85 100644
--- a/content/public/common/common_param_traits_macros.h
+++ b/content/public/common/common_param_traits_macros.h
@@ -143,7 +143,6 @@
IPC_STRUCT_TRAITS_MEMBER(layer_squashing_enabled)
IPC_STRUCT_TRAITS_MEMBER(asynchronous_spell_checking_enabled)
IPC_STRUCT_TRAITS_MEMBER(unified_textchecker_enabled)
- IPC_STRUCT_TRAITS_MEMBER(force_compositing_mode)
IPC_STRUCT_TRAITS_MEMBER(accelerated_2d_canvas_enabled)
IPC_STRUCT_TRAITS_MEMBER(minimum_accelerated_2d_canvas_size)
IPC_STRUCT_TRAITS_MEMBER(antialiased_2d_canvas_disabled)
@@ -158,7 +157,6 @@
IPC_STRUCT_TRAITS_MEMBER(enable_scroll_animator)
IPC_STRUCT_TRAITS_MEMBER(password_echo_enabled)
IPC_STRUCT_TRAITS_MEMBER(should_clear_document_background)
- IPC_STRUCT_TRAITS_MEMBER(lazy_layout_enabled)
IPC_STRUCT_TRAITS_MEMBER(region_based_columns_enabled)
IPC_STRUCT_TRAITS_MEMBER(touch_enabled)
IPC_STRUCT_TRAITS_MEMBER(device_supports_touch)
diff --git a/content/public/common/content_descriptors.h b/content/public/common/content_descriptors.h
index ce7ab0e..5a6b234 100644
--- a/content/public/common/content_descriptors.h
+++ b/content/public/common/content_descriptors.h
@@ -15,6 +15,7 @@
#if defined(OS_ANDROID)
kAndroidPropertyDescriptor,
+ kAndroidICUDataDescriptor,
#endif
// The first key that embedders can use to register descriptors (see
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index 035d5d8..5973fc0 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -154,9 +154,6 @@
const char kDisableGestureTapHighlight[] = "disable-gesture-tap-highlight";
-// Disable GL multisampling.
-const char kDisableGLMultisampling[] = "disable-gl-multisampling";
-
// Disables GPU hardware acceleration. If software renderer is not in place,
// then the GPU process won't launch.
const char kDisableGpu[] = "disable-gpu";
@@ -279,11 +276,6 @@
// Disable multithreaded GPU compositing of web content.
const char kDisableThreadedCompositing[] = "disable-threaded-compositing";
-// Disable accelerated overflow scrolling in corner cases (that would not be
-// handled by enable-accelerated-overflow-scroll).
-const char kDisableUniversalAcceleratedOverflowScroll[] =
- "disable-universal-accelerated-overflow-scroll";
-
// Don't enforce the same-origin policy. (Used by people testing their sites.)
const char kDisableWebSecurity[] = "disable-web-security";
@@ -509,10 +501,6 @@
// Enable multithreaded GPU compositing of web content.
const char kEnableThreadedCompositing[] = "enable-threaded-compositing";
-// Enable accelerated overflow scrolling in all cases.
-const char kEnableUniversalAcceleratedOverflowScroll[] =
- "enable-universal-accelerated-overflow-scroll";
-
// Enable screen capturing support for MediaStream API.
const char kEnableUserMediaScreenCapturing[] =
"enable-usermedia-screen-capturing";
@@ -552,9 +540,6 @@
// Load NPAPI plugins from the specified directory.
const char kExtraPluginDir[] = "extra-plugin-dir";
-// Enable force_compositing_mode in layout tests.
-const char kForceCompositingMode[] = "force-compositing-mode";
-
// Some field trials may be randomized in the browser, and the randomly selected
// outcome needs to be propagated to the renderer. For instance, this is used
// to modify histograms recorded in the renderer, or to get the renderer to
@@ -966,12 +951,12 @@
// Device scale factor passed to certain processes like renderers, etc.
const char kDeviceScaleFactor[] = "device-scale-factor";
+// Disables the DirectWrite font rendering system on windows.
+const char kDisableDirectWrite[] = "disable-direct-write";
+
// Disable the Legacy Window which corresponds to the size of the WebContents.
const char kDisableLegacyIntermediateWindow[] = "disable-legacy-window";
-// Enables the DirectWrite font rendering system on windows.
-const char kEnableDirectWrite[] = "enable-direct-write";
-
// Use high resolution timers for TimeTicks.
const char kEnableHighResolutionTime[] = "enable-high-resolution-time";
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index 437c3d2..f763e20 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -54,7 +54,6 @@
CONTENT_EXPORT extern const char kDisableFlash3d[];
CONTENT_EXPORT extern const char kDisableFlashStage3d[];
CONTENT_EXPORT extern const char kDisableGestureTapHighlight[];
-CONTENT_EXPORT extern const char kDisableGLMultisampling[];
CONTENT_EXPORT extern const char kDisableGpu[];
CONTENT_EXPORT extern const char kDisableGpuCompositing[];
extern const char kDisableGpuProcessCrashLimit[];
@@ -90,7 +89,6 @@
CONTENT_EXPORT extern const char kDisableSoftwareRasterizer[];
CONTENT_EXPORT extern const char kDisableSSLFalseStart[];
CONTENT_EXPORT extern const char kDisableThreadedCompositing[];
-CONTENT_EXPORT extern const char kDisableUniversalAcceleratedOverflowScroll[];
CONTENT_EXPORT extern const char kDisableWebSecurity[];
extern const char kDisableXSLT[];
extern const char kDisableXSSAuditor[];
@@ -146,7 +144,6 @@
CONTENT_EXPORT extern const char kEnableTargetedStyleRecalc[];
CONTENT_EXPORT extern const char kEnableTcpFastOpen[];
CONTENT_EXPORT extern const char kEnableThreadedCompositing[];
-CONTENT_EXPORT extern const char kEnableUniversalAcceleratedOverflowScroll[];
CONTENT_EXPORT extern const char kEnableUserMediaScreenCapturing[];
CONTENT_EXPORT extern const char kEnableViewport[];
CONTENT_EXPORT extern const char kEnableViewportMeta[];
@@ -158,7 +155,6 @@
CONTENT_EXPORT extern const char kEnableWebMIDI[];
CONTENT_EXPORT extern const char kEnableZeroCopy[];
CONTENT_EXPORT extern const char kExtraPluginDir[];
-CONTENT_EXPORT extern const char kForceCompositingMode[];
CONTENT_EXPORT extern const char kForceFieldTrials[];
CONTENT_EXPORT extern const char kForceGpuRasterization[];
CONTENT_EXPORT extern const char kForceRendererAccessibility[];
@@ -285,8 +281,8 @@
// This switch contains the device scale factor passed to certain processes
// like renderers, etc.
CONTENT_EXPORT extern const char kDeviceScaleFactor[];
+CONTENT_EXPORT extern const char kDisableDirectWrite[];
CONTENT_EXPORT extern const char kDisableLegacyIntermediateWindow[];
-CONTENT_EXPORT extern const char kEnableDirectWrite[];
CONTENT_EXPORT extern const char kEnableHighResolutionTime[];
// This switch will be removed when we enable the win32K lockdown process
// mitigation.
diff --git a/content/public/common/resource_response_info.cc b/content/public/common/resource_response_info.cc
index 4828841..70dbc50 100644
--- a/content/public/common/resource_response_info.cc
+++ b/content/public/common/resource_response_info.cc
@@ -12,7 +12,7 @@
ResourceResponseInfo::ResourceResponseInfo()
: content_length(-1),
encoded_data_length(-1),
- appcache_id(appcache::kNoCacheId),
+ appcache_id(appcache::kAppCacheNoCacheId),
was_fetched_via_spdy(false),
was_npn_negotiated(false),
was_alternate_protocol_available(false),
diff --git a/content/public/common/resource_response_info.h b/content/public/common/resource_response_info.h
index 4c233b0..31fa4b9 100644
--- a/content/public/common/resource_response_info.h
+++ b/content/public/common/resource_response_info.h
@@ -53,7 +53,7 @@
// no data, contains -1.
int64 encoded_data_length;
- // The appcache this response was loaded from, or kNoCacheId.
+ // The appcache this response was loaded from, or kAppCacheNoCacheId.
int64 appcache_id;
// The manifest url of the appcache this response was loaded from.
diff --git a/content/public/common/sandbox_type_mac.h b/content/public/common/sandbox_type_mac.h
index b034ba5..4121ae4 100644
--- a/content/public/common/sandbox_type_mac.h
+++ b/content/public/common/sandbox_type_mac.h
@@ -11,6 +11,9 @@
// additional sandbox types with IDs starting with SANDBOX_TYPE_AFTER_LAST_TYPE.
enum SandboxType {
+ // Not a valid sandbox type.
+ SANDBOX_TYPE_INVALID = -1,
+
SANDBOX_TYPE_FIRST_TYPE = 0, // Placeholder to ease iteration.
SANDBOX_TYPE_RENDERER = SANDBOX_TYPE_FIRST_TYPE,
@@ -31,6 +34,10 @@
// The PPAPI plugin process.
SANDBOX_TYPE_PPAPI,
+ // The NPAPI plugin process. This does not use a Seatbelt/.sb sandbox policy,
+ // but it uses a bootstrap sandbox.
+ SANDBOX_TYPE_NPAPI,
+
SANDBOX_TYPE_AFTER_LAST_TYPE, // Placeholder to ease iteration.
};
diff --git a/content/public/common/sandboxed_process_launcher_delegate.cc b/content/public/common/sandboxed_process_launcher_delegate.cc
index 6dc1933..b961c3e 100644
--- a/content/public/common/sandboxed_process_launcher_delegate.cc
+++ b/content/public/common/sandboxed_process_launcher_delegate.cc
@@ -7,21 +7,28 @@
namespace content {
#if defined(OS_WIN)
- bool SandboxedProcessLauncherDelegate::ShouldLaunchElevated() {
- return false;
- }
+bool SandboxedProcessLauncherDelegate::ShouldLaunchElevated() {
+ return false;
+}
- bool SandboxedProcessLauncherDelegate::ShouldSandbox() {
- return true;
- }
+bool SandboxedProcessLauncherDelegate::ShouldSandbox() {
+ return true;
+}
#elif(OS_POSIX)
- bool SandboxedProcessLauncherDelegate::ShouldUseZygote() {
- return false;
- }
+bool SandboxedProcessLauncherDelegate::ShouldUseZygote() {
+ return false;
+}
- base::EnvironmentMap SandboxedProcessLauncherDelegate::GetEnvironment() {
- return base::EnvironmentMap();
- }
+base::EnvironmentMap SandboxedProcessLauncherDelegate::GetEnvironment() {
+ return base::EnvironmentMap();
+}
+
+#if defined(OS_MACOSX)
+SandboxType SandboxedProcessLauncherDelegate::GetSandboxType() {
+ return SANDBOX_TYPE_INVALID;
+}
+#endif
+
#endif
} // namespace content
diff --git a/content/public/common/sandboxed_process_launcher_delegate.h b/content/public/common/sandboxed_process_launcher_delegate.h
index 9dd45ad..3f634a1 100644
--- a/content/public/common/sandboxed_process_launcher_delegate.h
+++ b/content/public/common/sandboxed_process_launcher_delegate.h
@@ -10,6 +10,10 @@
#include "content/common/content_export.h"
+#if defined(OS_MACOSX)
+#include "content/public/common/sandbox_type_mac.h"
+#endif
+
namespace base {
class FilePath;
}
@@ -62,6 +66,12 @@
// Return the file descriptor for the IPC channel.
virtual int GetIpcFd() = 0;
+#if defined(OS_MACOSX)
+ // Gets the Mac SandboxType to enforce on the process. Return
+ // SANDBOX_TYPE_INVALID for no sandbox policy.
+ virtual SandboxType GetSandboxType();
+#endif
+
#endif
};
diff --git a/content/public/common/url_constants.cc b/content/public/common/url_constants.cc
index f22be90..a19b8b1 100644
--- a/content/public/common/url_constants.cc
+++ b/content/public/common/url_constants.cc
@@ -6,8 +6,6 @@
namespace content {
-const char kAboutScheme[] = "about";
-
// Before adding new chrome schemes please check with security@chromium.org.
// There are security implications associated with introducing new schemes.
const char kChromeDevToolsScheme[] = "chrome-devtools";
@@ -17,7 +15,6 @@
const char kSwappedOutScheme[] = "swappedout";
const char kViewSourceScheme[] = "view-source";
-const char kAboutBlankURL[] = "about:blank";
const char kAboutSrcDocURL[] = "about:srcdoc";
const char kChromeUIAppCacheInternalsHost[] = "appcache-internals";
diff --git a/content/public/common/url_constants.h b/content/public/common/url_constants.h
index bb6fe97..d1d0ddc 100644
--- a/content/public/common/url_constants.h
+++ b/content/public/common/url_constants.h
@@ -15,7 +15,6 @@
// Canonical schemes you can use as input to GURL.SchemeIs().
// TODO(jam): some of these don't below in the content layer, but are accessed
// from there.
-CONTENT_EXPORT extern const char kAboutScheme[];
CONTENT_EXPORT extern const char kChromeDevToolsScheme[];
CONTENT_EXPORT extern const char kChromeUIScheme[]; // Used for WebUIs.
CONTENT_EXPORT extern const char kGuestScheme[];
@@ -24,7 +23,6 @@
CONTENT_EXPORT extern const char kViewSourceScheme[];
// Hosts for about URLs.
-CONTENT_EXPORT extern const char kAboutBlankURL[];
CONTENT_EXPORT extern const char kAboutSrcDocURL[];
CONTENT_EXPORT extern const char kChromeUIAccessibilityHost[];
diff --git a/content/public/plugin/BUILD.gn b/content/public/plugin/BUILD.gn
new file mode 100644
index 0000000..059aea6
--- /dev/null
+++ b/content/public/plugin/BUILD.gn
@@ -0,0 +1,9 @@
+# Copyright 2014 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.
+
+source_set("plugin") {
+ sources = [
+ "content_plugin_client.h",
+ ]
+}
diff --git a/content/public/renderer/BUILD.gn b/content/public/renderer/BUILD.gn
index 9984c6f..7e0bd4f 100644
--- a/content/public/renderer/BUILD.gn
+++ b/content/public/renderer/BUILD.gn
@@ -12,7 +12,6 @@
configs += [
"//content:content_implementation",
"//content:libjingle_stub_config",
- "//content:v8_stub_config",
"//content:widevine_stub_config",
]
diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc
index 7934968..800bb55 100644
--- a/content/public/renderer/content_renderer_client.cc
+++ b/content/public/renderer/content_renderer_client.cc
@@ -154,11 +154,6 @@
return false;
}
-bool ContentRendererClient::AllowBrowserPlugin(
- blink::WebPluginContainer* container) {
- return false;
-}
-
bool ContentRendererClient::AllowPepperMediaStreamAPI(const GURL& url) {
return false;
}
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index 5f17054..ca60039 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -235,9 +235,6 @@
// startup steps).
virtual bool IsExternalPepperPlugin(const std::string& module_name);
- // Returns whether BrowserPlugin should be allowed within the |container|.
- virtual bool AllowBrowserPlugin(blink::WebPluginContainer* container);
-
// Returns true if the page at |url| can use Pepper MediaStream APIs.
virtual bool AllowPepperMediaStreamAPI(const GURL& url);
diff --git a/content/public/renderer/render_view.h b/content/public/renderer/render_view.h
index 6a5943a..c4fce50 100644
--- a/content/public/renderer/render_view.h
+++ b/content/public/renderer/render_view.h
@@ -98,9 +98,6 @@
// false, but set to true by some tests.
virtual bool GetContentStateImmediately() const = 0;
- // Filtered time per frame based on UpdateRect messages.
- virtual float GetFilteredTimePerFrame() const = 0;
-
// Returns the current visibility of the WebView.
virtual blink::WebPageVisibilityState GetVisibilityState() const = 0;
diff --git a/content/public/renderer/render_view_observer.cc b/content/public/renderer/render_view_observer.cc
index 612fb15..8289da9 100644
--- a/content/public/renderer/render_view_observer.cc
+++ b/content/public/renderer/render_view_observer.cc
@@ -13,7 +13,7 @@
RenderViewObserver::RenderViewObserver(RenderView* render_view)
: render_view_(render_view),
routing_id_(MSG_ROUTING_NONE) {
- // |render_view| can be NULL on unit testing.
+ // |render_view| can be NULL on unit testing or if Observe() is used.
if (render_view) {
RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view);
routing_id_ = impl->routing_id();
@@ -53,4 +53,19 @@
render_view_ = NULL;
}
+void RenderViewObserver::Observe(RenderView* render_view) {
+ RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view_);
+ if (impl) {
+ impl->RemoveObserver(this);
+ routing_id_ = 0;
+ }
+
+ render_view_ = render_view;
+ impl = static_cast<RenderViewImpl*>(render_view_);
+ if (impl) {
+ routing_id_ = impl->routing_id();
+ impl->AddObserver(this);
+ }
+}
+
} // namespace content
diff --git a/content/public/renderer/render_view_observer.h b/content/public/renderer/render_view_observer.h
index 84a7e4c..2849bdd 100644
--- a/content/public/renderer/render_view_observer.h
+++ b/content/public/renderer/render_view_observer.h
@@ -11,7 +11,6 @@
#include "ipc/ipc_listener.h"
#include "ipc/ipc_sender.h"
#include "third_party/WebKit/public/platform/WebVector.h"
-#include "third_party/WebKit/public/web/WebIconURL.h"
class GURL;
@@ -29,6 +28,7 @@
class WebLocalFrame;
class WebMouseEvent;
class WebNode;
+class WebString;
class WebTouchEvent;
class WebURL;
struct WebURLError;
@@ -109,6 +109,12 @@
explicit RenderViewObserver(RenderView* render_view);
virtual ~RenderViewObserver();
+ // Sets |render_view_| to track.
+ // Removes itself of previous (if any) |render_view_| observer list and adds
+ // to the new |render_view|. Since it assumes that observer outlives
+ // render_view, OnDestruct should be overridden.
+ void Observe(RenderView* render_view);
+
private:
friend class RenderViewImpl;
diff --git a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/DOMUtils.java b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/DOMUtils.java
index 299e3de..7851318 100644
--- a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/DOMUtils.java
+++ b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/DOMUtils.java
@@ -127,7 +127,7 @@
return getNodeField("value", viewCore, nodeId);
}
- private static String getNodeField(String fieldName, final ContentViewCore viewCore,
+ public static String getNodeField(String fieldName, final ContentViewCore viewCore,
String nodeId)
throws InterruptedException, TimeoutException {
StringBuilder sb = new StringBuilder();
diff --git a/content/public/test/browser_test_base.cc b/content/public/test/browser_test_base.cc
index 3a55750..c8f23e5 100644
--- a/content/public/test/browser_test_base.cc
+++ b/content/public/test/browser_test_base.cc
@@ -239,14 +239,7 @@
MainFunctionParams params(*command_line);
params.ui_task = ui_task;
// TODO(phajdan.jr): Check return code, http://crbug.com/374738 .
- BrowserMainRunner::Create()->Initialize(params);
- // We are done running the test by now. During teardown we
- // need to be able to perform IO.
- base::ThreadRestrictions::SetIOAllowed(true);
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- base::Bind(base::IgnoreResult(&base::ThreadRestrictions::SetIOAllowed),
- true));
+ BrowserMain(params);
#else
GetContentMainParams()->ui_task = ui_task;
EXPECT_EQ(expected_exit_code_, ContentMain(*GetContentMainParams()));
diff --git a/content/public/test/content_browser_test.cc b/content/public/test/content_browser_test.cc
index 29c8815..73fc7ca 100644
--- a/content/public/test/content_browser_test.cc
+++ b/content/public/test/content_browser_test.cc
@@ -157,7 +157,7 @@
Shell* ContentBrowserTest::CreateBrowser() {
return Shell::CreateNewWindow(
ShellContentBrowserClient::Get()->browser_context(),
- GURL(kAboutBlankURL),
+ GURL(url::kAboutBlankURL),
NULL,
MSG_ROUTING_NONE,
gfx::Size());
@@ -166,7 +166,7 @@
Shell* ContentBrowserTest::CreateOffTheRecordBrowser() {
return Shell::CreateNewWindow(
ShellContentBrowserClient::Get()->off_the_record_browser_context(),
- GURL(kAboutBlankURL),
+ GURL(url::kAboutBlankURL),
NULL,
MSG_ROUTING_NONE,
gfx::Size());
diff --git a/content/public/test/layouttest_support.h b/content/public/test/layouttest_support.h
index 76a4dee..f374bdd 100644
--- a/content/public/test/layouttest_support.h
+++ b/content/public/test/layouttest_support.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/callback_forward.h"
+#include "cc/layers/texture_layer.h"
#include "third_party/WebKit/public/platform/WebScreenOrientationType.h"
namespace blink {
@@ -17,6 +18,7 @@
class WebDeviceOrientationData;
class WebGamepad;
class WebGamepads;
+class WebLayer;
struct WebSize;
}
@@ -110,6 +112,9 @@
std::string DumpBackForwardList(std::vector<PageState>& page_state,
size_t current_index);
+// Instantiates WebLayerImpl for TestPlugin.
+blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer);
+
} // namespace content
#endif // CONTENT_PUBLIC_TEST_LAYOUTTEST_SUPPORT_H_
diff --git a/content/public/test/mock_download_manager.cc b/content/public/test/mock_download_manager.cc
index ef5a9f5..a5d7cf9 100644
--- a/content/public/test/mock_download_manager.cc
+++ b/content/public/test/mock_download_manager.cc
@@ -15,6 +15,8 @@
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const std::string& mime_type,
+ const std::string& original_mime_type,
const base::Time& start_time,
const base::Time& end_time,
const std::string& etag,
@@ -30,6 +32,8 @@
target_path(target_path),
url_chain(url_chain),
referrer_url(referrer_url),
+ mime_type(mime_type),
+ original_mime_type(original_mime_type),
start_time(start_time),
end_time(end_time),
received_bytes(received_bytes),
@@ -66,6 +70,8 @@
target_path == rhs.target_path &&
url_chain == rhs.url_chain &&
referrer_url == rhs.referrer_url &&
+ mime_type == rhs.mime_type &&
+ original_mime_type == rhs.original_mime_type &&
start_time == rhs.start_time &&
end_time == rhs.end_time &&
etag == rhs.etag &&
@@ -95,6 +101,8 @@
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const std::string& mime_type,
+ const std::string& original_mime_type,
const base::Time& start_time,
const base::Time& end_time,
const std::string& etag,
@@ -106,9 +114,10 @@
DownloadInterruptReason interrupt_reason,
bool opened) {
CreateDownloadItemAdapter adapter(
- id, current_path, target_path, url_chain, referrer_url, start_time,
- end_time, etag, last_modified, received_bytes, total_bytes, state,
- danger_type, interrupt_reason, opened);
+ id, current_path, target_path, url_chain, referrer_url, mime_type,
+ original_mime_type, start_time, end_time, etag, last_modified,
+ received_bytes, total_bytes, state, danger_type, interrupt_reason,
+ opened);
return MockCreateDownloadItem(adapter);
}
diff --git a/content/public/test/mock_download_manager.h b/content/public/test/mock_download_manager.h
index abf0305..1ab4ca5 100644
--- a/content/public/test/mock_download_manager.h
+++ b/content/public/test/mock_download_manager.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_PUBLIC_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_
#define CONTENT_PUBLIC_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_
+#include <string>
#include <vector>
#include "content/public/browser/download_manager.h"
@@ -31,6 +32,8 @@
base::FilePath target_path;
std::vector<GURL> url_chain;
GURL referrer_url;
+ std::string mime_type;
+ std::string original_mime_type;
base::Time start_time;
base::Time end_time;
std::string etag;
@@ -48,6 +51,8 @@
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const std::string& mime_type,
+ const std::string& original_mime_type,
const base::Time& start_time,
const base::Time& end_time,
const std::string& etag,
@@ -101,6 +106,8 @@
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const std::string& mime_type,
+ const std::string& original_mime_type,
const base::Time& start_time,
const base::Time& end_time,
const std::string& etag,
diff --git a/content/public/test/test_browser_context.cc b/content/public/test/test_browser_context.cc
index 7d184c8..fb48cbe 100644
--- a/content/public/test/test_browser_context.cc
+++ b/content/public/test/test_browser_context.cc
@@ -98,39 +98,6 @@
return NULL;
}
-void TestBrowserContext::RequestMidiSysExPermission(
- int render_process_id,
- int render_view_id,
- int bridge_id,
- const GURL& requesting_frame,
- bool user_gesture,
- const MidiSysExPermissionCallback& callback) {
- // Always reject requests for testing.
- callback.Run(false);
-}
-
-void TestBrowserContext::CancelMidiSysExPermissionRequest(
- int render_process_id,
- int render_view_id,
- int bridge_id,
- const GURL& requesting_frame) {
-}
-
-void TestBrowserContext::RequestProtectedMediaIdentifierPermission(
- int render_process_id,
- int render_view_id,
- const GURL& origin,
- const ProtectedMediaIdentifierPermissionCallback& callback) {
- // Always reject requests for testing.
- callback.Run(false);
-}
-
-void TestBrowserContext::CancelProtectedMediaIdentifierPermissionRequests(
- int render_process_id,
- int render_view_id,
- const GURL& origin) {
-}
-
ResourceContext* TestBrowserContext::GetResourceContext() {
if (!resource_context_)
resource_context_.reset(new MockResourceContext(
@@ -138,11 +105,6 @@
return resource_context_.get();
}
-GeolocationPermissionContext*
- TestBrowserContext::GetGeolocationPermissionContext() {
- return NULL;
-}
-
BrowserPluginGuestManager* TestBrowserContext::GetGuestManager() {
return NULL;
}
@@ -151,4 +113,8 @@
return special_storage_policy_.get();
}
+PushMessagingService* TestBrowserContext::GetPushMessagingService() {
+ return NULL;
+}
+
} // namespace content
diff --git a/content/public/test/test_browser_context.h b/content/public/test/test_browser_context.h
index 0179d42..4581e0f 100644
--- a/content/public/test/test_browser_context.h
+++ b/content/public/test/test_browser_context.h
@@ -40,32 +40,10 @@
GetMediaRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory) OVERRIDE;
- virtual void RequestMidiSysExPermission(
- int render_process_id,
- int render_view_id,
- int bridge_id,
- const GURL& requesting_frame,
- bool user_gesture,
- const MidiSysExPermissionCallback& callback) OVERRIDE;
- virtual void CancelMidiSysExPermissionRequest(
- int render_process_id,
- int render_view_id,
- int bridge_id,
- const GURL& requesting_frame) OVERRIDE;
- virtual void RequestProtectedMediaIdentifierPermission(
- int render_process_id,
- int render_view_id,
- const GURL& origin,
- const ProtectedMediaIdentifierPermissionCallback& callback) OVERRIDE;
- virtual void CancelProtectedMediaIdentifierPermissionRequests(
- int render_process_id,
- int render_view_id,
- const GURL& origin) OVERRIDE;
virtual ResourceContext* GetResourceContext() OVERRIDE;
- virtual GeolocationPermissionContext*
- GetGeolocationPermissionContext() OVERRIDE;
virtual BrowserPluginGuestManager* GetGuestManager() OVERRIDE;
virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
+ virtual PushMessagingService* GetPushMessagingService() OVERRIDE;
private:
FRIEND_TEST_ALL_PREFIXES(DOMStorageTest, SessionOnly);
diff --git a/content/public/test/test_launcher.cc b/content/public/test/test_launcher.cc
index 2488085..1914fd1 100644
--- a/content/public/test/test_launcher.cc
+++ b/content/public/test/test_launcher.cc
@@ -345,6 +345,7 @@
new_cmd_line,
browser_wrapper ? browser_wrapper : std::string(),
TestTimeouts::action_max_timeout(),
+ true,
base::Bind(&WrapperTestLauncherDelegate::GTestCallback,
base::Unretained(this),
test_launcher,
@@ -493,8 +494,7 @@
WrapperTestLauncherDelegate delegate(launcher_delegate);
base::TestLauncher launcher(&delegate, default_jobs);
- bool success = launcher.Run(argc, argv);
- return (success ? 0 : 1);
+ return (launcher.Run() ? 0 : 1);
}
TestLauncherDelegate* GetCurrentTestLauncherDelegate() {
diff --git a/content/public/utility/BUILD.gn b/content/public/utility/BUILD.gn
new file mode 100644
index 0000000..f61994b
--- /dev/null
+++ b/content/public/utility/BUILD.gn
@@ -0,0 +1,21 @@
+# Copyright 2014 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.
+
+source_set("utility") {
+ sources = [
+ "content_utility_client.cc",
+ "content_utility_client.h",
+ "utility_thread.cc",
+ "utility_thread.h",
+ ]
+
+ configs += [ "//content:content_implementation" ]
+
+ deps = [
+ "//base",
+ "//content:export",
+ "//ipc",
+ ]
+}
+
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
index ed0cf04..d675a1e 100644
--- a/content/renderer/BUILD.gn
+++ b/content/renderer/BUILD.gn
@@ -16,7 +16,6 @@
configs += [
"//content:content_implementation",
"//content:libjingle_stub_config",
- "//content:v8_stub_config",
"//content:widevine_stub_config",
]
@@ -52,8 +51,6 @@
#'../third_party/WebKit/public/blink.gyp:blink',
#'../third_party/libjingle/libjingle.gyp:libjingle',
#'../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
- #'../webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_bindings',
- #'../webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_support',
]
if (!enable_notifications) {
diff --git a/content/renderer/accessibility/renderer_accessibility.cc b/content/renderer/accessibility/renderer_accessibility.cc
index 1f2d696..9a575a1 100644
--- a/content/renderer/accessibility/renderer_accessibility.cc
+++ b/content/renderer/accessibility/renderer_accessibility.cc
@@ -4,14 +4,11 @@
#include "content/renderer/accessibility/renderer_accessibility.h"
-#include "base/command_line.h"
#include "content/renderer/render_view_impl.h"
-#include "third_party/WebKit/public/web/WebAXObject.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebView.h"
-using blink::WebAXObject;
using blink::WebDocument;
using blink::WebFrame;
using blink::WebView;
diff --git a/content/renderer/accessibility/renderer_accessibility_complete.cc b/content/renderer/accessibility/renderer_accessibility_complete.cc
index a8bea1f..2e72dde 100644
--- a/content/renderer/accessibility/renderer_accessibility_complete.cc
+++ b/content/renderer/accessibility/renderer_accessibility_complete.cc
@@ -23,7 +23,6 @@
using blink::WebNode;
using blink::WebPoint;
using blink::WebRect;
-using blink::WebSize;
using blink::WebView;
namespace content {
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index 9f6f406..26f632d 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -5,10 +5,8 @@
#include "content/renderer/browser_plugin/browser_plugin.h"
#include "base/command_line.h"
-#include "base/json/json_string_value_serializer.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string_number_conversions.h"
-#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "content/common/browser_plugin/browser_plugin_constants.h"
#include "content/common/browser_plugin/browser_plugin_messages.h"
@@ -23,25 +21,17 @@
#include "content/renderer/drop_data_builder.h"
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/sad_plugin.h"
-#include "content/renderer/v8_value_converter_impl.h"
#include "third_party/WebKit/public/platform/WebRect.h"
#include "third_party/WebKit/public/web/WebBindings.h"
-#include "third_party/WebKit/public/web/WebDOMCustomEvent.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
-#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebPluginContainer.h"
#include "third_party/WebKit/public/web/WebPluginParams.h"
-#include "third_party/WebKit/public/web/WebScriptSource.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "ui/events/keycodes/keyboard_codes.h"
-#if defined (OS_WIN)
-#include "base/sys_info.h"
-#endif
-
using blink::WebCanvas;
using blink::WebPluginContainer;
using blink::WebPluginParams;
@@ -52,16 +42,6 @@
namespace content {
-namespace {
-
-const char* kCustomPersistPartition = "persist:custom_plugin";
-
-static std::string GetInternalEventName(const char* event_name) {
- return base::StringPrintf("-internal-%s", event_name);
-}
-
-} // namespace
-
BrowserPlugin::BrowserPlugin(RenderViewImpl* render_view,
blink::WebFrame* frame,
bool auto_navigate)
@@ -75,13 +55,10 @@
sad_guest_(NULL),
guest_crashed_(false),
is_auto_size_state_dirty_(false),
- persist_storage_(false),
- valid_partition_id_(true),
content_window_routing_id_(MSG_ROUTING_NONE),
plugin_focused_(false),
visible_(true),
auto_navigate_(auto_navigate),
- before_first_navigation_(true),
mouse_locked_(false),
browser_plugin_manager_(render_view->GetBrowserPluginManager()),
embedder_frame_url_(frame->document().url()),
@@ -168,10 +145,6 @@
return HasDOMAttribute(browser_plugin::kAttributeAllowTransparency);
}
-std::string BrowserPlugin::GetSrcAttribute() const {
- return GetDOMAttributeValue(browser_plugin::kAttributeSrc);
-}
-
bool BrowserPlugin::GetAutoSizeAttribute() const {
return HasDOMAttribute(browser_plugin::kAttributeAutoSize);
}
@@ -232,10 +205,6 @@
return std::min(min_width, GetAdjustedMaxWidth());
}
-std::string BrowserPlugin::GetPartitionAttribute() const {
- return GetDOMAttributeValue(browser_plugin::kAttributePartition);
-}
-
void BrowserPlugin::ParseAllowTransparencyAttribute() {
if (!HasGuestInstanceID())
return;
@@ -251,45 +220,8 @@
opaque));
}
-bool BrowserPlugin::ParseSrcAttribute(std::string* error_message) {
- if (!valid_partition_id_) {
- *error_message = browser_plugin::kErrorInvalidPartition;
- return false;
- }
- std::string src = GetSrcAttribute();
- if (src.empty())
- return true;
-
- // If we haven't created the guest yet, do so now. We will navigate it right
- // after creation. If |src| is empty, we can delay the creation until we
- // actually need it.
- if (!HasGuestInstanceID()) {
- // On initial navigation, we request an instance ID from the browser
- // process. We essentially ignore all subsequent calls to SetSrcAttribute
- // until we receive an instance ID. |before_first_navigation_|
- // prevents BrowserPlugin from allocating more than one instance ID.
- // Upon receiving an instance ID from the browser process, we continue
- // the process of navigation by populating the
- // BrowserPluginHostMsg_Attach_Params with the current state of
- // BrowserPlugin and sending a BrowserPluginHostMsg_CreateGuest to the
- // browser process in order to create a new guest.
- if (before_first_navigation_) {
- browser_plugin_manager()->AllocateInstanceID(
- weak_ptr_factory_.GetWeakPtr());
- before_first_navigation_ = false;
- }
- return true;
- }
-
- browser_plugin_manager()->Send(
- new BrowserPluginHostMsg_NavigateGuest(render_view_routing_id_,
- guest_instance_id_,
- src));
- return true;
-}
-
void BrowserPlugin::ParseAutoSizeAttribute() {
- last_view_size_ = plugin_rect_.size();
+ last_view_size_ = plugin_size();
is_auto_size_state_dirty_ = true;
UpdateGuestAutoSizeState(GetAutoSizeAttribute());
}
@@ -333,21 +265,6 @@
resize_guest_params));
}
-void BrowserPlugin::OnInstanceIDAllocated(int guest_instance_id) {
- CHECK(guest_instance_id != browser_plugin::kInstanceIDNone);
-
- if (auto_navigate_) {
- scoped_ptr<base::DictionaryValue> params(new base::DictionaryValue());
- Attach(guest_instance_id, params.Pass());
- return;
- }
-
- std::map<std::string, base::Value*> props;
- props[browser_plugin::kWindowID] =
- new base::FundamentalValue(guest_instance_id);
- TriggerEvent(browser_plugin::kEventInternalInstanceIDAllocated, &props);
-}
-
void BrowserPlugin::Attach(int guest_instance_id,
scoped_ptr<base::DictionaryValue> extra_params) {
CHECK(guest_instance_id != browser_plugin::kInstanceIDNone);
@@ -358,7 +275,6 @@
// This API may be called directly without setting the src attribute.
// In that case, we need to make sure we don't allocate another instance ID.
- before_first_navigation_ = false;
guest_instance_id_ = guest_instance_id;
browser_plugin_manager()->AddBrowserPlugin(guest_instance_id, this);
@@ -366,10 +282,8 @@
attach_params.focused = ShouldGuestBeFocused();
attach_params.visible = visible_;
attach_params.opaque = !GetAllowTransparencyAttribute();
- attach_params.storage_partition_id = storage_partition_id_;
- attach_params.persist_storage = persist_storage_;
- attach_params.src = GetSrcAttribute();
attach_params.embedder_frame_url = embedder_frame_url_;
+ attach_params.origin = plugin_rect().origin();
GetSizeParams(&attach_params.auto_size_params,
&attach_params.resize_guest_params,
false);
@@ -390,15 +304,7 @@
render_view_->GetWebView()->advanceFocus(reverse);
}
-void BrowserPlugin::OnAttachACK(
- int guest_instance_id,
- const BrowserPluginMsg_Attach_ACK_Params& params) {
- if (!params.storage_partition_id.empty()) {
- std::string partition_name =
- (params.persist_storage ? browser_plugin::kPersistPrefix : "") +
- params.storage_partition_id;
- UpdateDOMAttribute(browser_plugin::kAttributePartition, partition_name);
- }
+void BrowserPlugin::OnAttachACK(int guest_instance_id) {
attached_ = true;
}
@@ -565,56 +471,10 @@
return guest_frame->windowObject();
}
-bool BrowserPlugin::HasNavigated() const {
- return !before_first_navigation_;
-}
-
bool BrowserPlugin::HasGuestInstanceID() const {
return guest_instance_id_ != browser_plugin::kInstanceIDNone;
}
-bool BrowserPlugin::ParsePartitionAttribute(std::string* error_message) {
- if (HasNavigated()) {
- *error_message = browser_plugin::kErrorAlreadyNavigated;
- return false;
- }
-
- std::string input;
- if (auto_navigate_)
- input = kCustomPersistPartition;
- else
- input = GetPartitionAttribute();
-
- // Since the "persist:" prefix is in ASCII, StartsWith will work fine on
- // UTF-8 encoded |partition_id|. If the prefix is a match, we can safely
- // remove the prefix without splicing in the middle of a multi-byte codepoint.
- // We can use the rest of the string as UTF-8 encoded one.
- if (StartsWithASCII(input, browser_plugin::kPersistPrefix, true)) {
- size_t index = input.find(":");
- CHECK(index != std::string::npos);
- // It is safe to do index + 1, since we tested for the full prefix above.
- input = input.substr(index + 1);
- if (input.empty()) {
- valid_partition_id_ = false;
- *error_message = browser_plugin::kErrorInvalidPartition;
- return false;
- }
- persist_storage_ = true;
- } else {
- persist_storage_ = false;
- }
-
- valid_partition_id_ = true;
- storage_partition_id_ = input;
- return true;
-}
-
-bool BrowserPlugin::CanRemovePartitionAttribute(std::string* error_message) {
- if (HasGuestInstanceID())
- *error_message = browser_plugin::kErrorCannotRemovePartition;
- return !HasGuestInstanceID();
-}
-
void BrowserPlugin::ShowSadGraphic() {
// If the BrowserPlugin is scheduled to be deleted, then container_ will be
// NULL so we shouldn't attempt to access it.
@@ -622,16 +482,6 @@
container_->invalidate();
}
-void BrowserPlugin::ParseAttributes() {
- // TODO(mthiesse): Handle errors here?
- std::string error;
- ParsePartitionAttribute(&error);
-
- // Parse the 'src' attribute last, as it will set the has_navigated_ flag to
- // true, which prevents changing the 'partition' attribute.
- ParseSrcAttribute(&error);
-}
-
float BrowserPlugin::GetDeviceScaleFactor() const {
if (!render_view_.get())
return 1.0f;
@@ -643,58 +493,13 @@
return;
BrowserPluginHostMsg_ResizeGuest_Params params;
- PopulateResizeGuestParameters(¶ms, plugin_rect(), false);
+ PopulateResizeGuestParameters(¶ms, plugin_size(), true);
browser_plugin_manager()->Send(new BrowserPluginHostMsg_ResizeGuest(
render_view_routing_id_,
guest_instance_id_,
params));
}
-void BrowserPlugin::TriggerEvent(const std::string& event_name,
- std::map<std::string, base::Value*>* props) {
- if (!container())
- return;
-
- blink::WebLocalFrame* frame = container()->element().document().frame();
- if (!frame)
- return;
-
- v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
- v8::Local<v8::Context> context = frame->mainWorldScriptContext();
- v8::Context::Scope context_scope(context);
-
- std::string json_string;
- if (props) {
- base::DictionaryValue dict;
- for (std::map<std::string, base::Value*>::iterator iter = props->begin(),
- end = props->end(); iter != end; ++iter) {
- dict.Set(iter->first, iter->second);
- }
-
- JSONStringValueSerializer serializer(&json_string);
- if (!serializer.Serialize(dict))
- return;
- }
-
- blink::WebDOMEvent dom_event = frame->document().createEvent("CustomEvent");
- blink::WebDOMCustomEvent event = dom_event.to<blink::WebDOMCustomEvent>();
-
- // The events triggered directly from the plugin <object> are internal events
- // whose implementation details can (and likely will) change over time. The
- // wrapper/shim (e.g. <webview> tag) should receive these events, and expose a
- // more appropriate (and stable) event to the consumers as part of the API.
- event.initCustomEvent(
- blink::WebString::fromUTF8(GetInternalEventName(event_name.c_str())),
- false,
- false,
- blink::WebSerializedScriptValue::serialize(
- v8::String::NewFromUtf8(context->GetIsolate(),
- json_string.c_str(),
- v8::String::kNormalString,
- json_string.size())));
- container()->element().dispatchEvent(event);
-}
-
void BrowserPlugin::UpdateGuestFocusState() {
if (!HasGuestInstanceID())
return;
@@ -720,10 +525,6 @@
if (!container)
return false;
- if (!GetContentClient()->renderer()->AllowBrowserPlugin(container) &&
- !auto_navigate_)
- return false;
-
// Tell |container| to allow this plugin to use script objects.
npp_.reset(new NPP_t);
container->allowScriptObjects();
@@ -731,7 +532,6 @@
bindings_.reset(new BrowserPluginBindings(this));
container_ = container;
container_->setWantsWheelEvents(true);
- ParseAttributes();
return true;
}
@@ -881,7 +681,7 @@
}
BrowserPluginHostMsg_ResizeGuest_Params params;
- PopulateResizeGuestParameters(¶ms, plugin_rect(), false);
+ PopulateResizeGuestParameters(¶ms, plugin_size(), false);
paint_ack_received_ = false;
browser_plugin_manager()->Send(new BrowserPluginHostMsg_ResizeGuest(
render_view_routing_id_,
@@ -891,14 +691,14 @@
void BrowserPlugin::PopulateResizeGuestParameters(
BrowserPluginHostMsg_ResizeGuest_Params* params,
- const gfx::Rect& view_rect,
+ const gfx::Size& view_size,
bool needs_repaint) {
params->size_changed = true;
- params->view_rect = view_rect;
+ params->view_size = view_size;
params->repaint = needs_repaint;
params->scale_factor = GetDeviceScaleFactor();
if (last_device_scale_factor_ != params->scale_factor){
- params->repaint = true;
+ DCHECK(params->repaint);
last_device_scale_factor_ = params->scale_factor;
}
}
@@ -917,8 +717,7 @@
if (view_size.IsEmpty())
return;
paint_ack_received_ = false;
- gfx::Rect view_rect = gfx::Rect(plugin_rect_.origin(), view_size);
- PopulateResizeGuestParameters(resize_guest_params, view_rect, needs_repaint);
+ PopulateResizeGuestParameters(resize_guest_params, view_size, needs_repaint);
}
void BrowserPlugin::updateFocus(bool focused) {
@@ -1048,8 +847,8 @@
void BrowserPlugin::didFinishLoading() {
if (auto_navigate_) {
+ // TODO(lazyboy): Make |auto_navigate_| stuff work.
UpdateDOMAttribute(content::browser_plugin::kAttributeSrc, html_string_);
- ParseAttributes();
}
}
diff --git a/content/renderer/browser_plugin/browser_plugin.h b/content/renderer/browser_plugin/browser_plugin.h
index 2008303..925ee23 100644
--- a/content/renderer/browser_plugin/browser_plugin.h
+++ b/content/renderer/browser_plugin/browser_plugin.h
@@ -10,7 +10,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/sequenced_task_runner_helpers.h"
-#include "base/values.h"
#include "content/renderer/browser_plugin/browser_plugin_bindings.h"
#include "content/renderer/mouse_lock_dispatcher.h"
#include "content/renderer/render_view_impl.h"
@@ -20,7 +19,6 @@
struct BrowserPluginHostMsg_AutoSize_Params;
struct BrowserPluginHostMsg_ResizeGuest_Params;
-struct BrowserPluginMsg_Attach_ACK_Params;
struct BrowserPluginMsg_UpdateRect_Params;
struct FrameMsg_BuffersSwapped_Params;
@@ -60,10 +58,6 @@
// Parse the allowtransparency attribute and adjust transparency of
// BrowserPlugin accordingly.
void ParseAllowTransparencyAttribute();
- // Get the src attribute value of the BrowserPlugin instance.
- std::string GetSrcAttribute() const;
- // Parse the src attribute value of the BrowserPlugin instance.
- bool ParseSrcAttribute(std::string* error_message);
// Get the autosize attribute value.
bool GetAutoSizeAttribute() const;
// Parses the autosize attribute value.
@@ -78,14 +72,6 @@
int GetMinWidthAttribute() const;
// Parse the minwidth, maxwidth, minheight, and maxheight attribute values.
void ParseSizeContraintsChanged();
- // The partition identifier string is stored as UTF-8.
- std::string GetPartitionAttribute() const;
- // This method can be successfully called only before the first navigation for
- // this instance of BrowserPlugin. If an error occurs, the |error_message| is
- // set appropriately to indicate the failure reason.
- bool ParsePartitionAttribute(std::string* error_message);
- // True if the partition attribute can be removed.
- bool CanRemovePartitionAttribute(std::string* error_message);
bool InAutoSizeBounds(const gfx::Size& size) const;
@@ -94,8 +80,6 @@
// Returns whether the guest process has crashed.
bool guest_crashed() const { return guest_crashed_; }
- // Returns whether this BrowserPlugin has requested an instance ID.
- bool HasNavigated() const;
// Returns whether this BrowserPlugin has allocated an instance ID.
bool HasGuestInstanceID() const;
@@ -111,8 +95,6 @@
// A request to enable hardware compositing.
void EnableCompositing(bool enable);
- // Called when a guest instance ID has been allocated by the browser process.
- void OnInstanceIDAllocated(int guest_instance_id);
// Provided that a guest instance ID has been allocated, this method attaches
// this BrowserPlugin instance to that guest. |extra_params| are parameters
// passed in by the content embedder to the browser process.
@@ -208,7 +190,8 @@
int width() const { return plugin_rect_.width(); }
int height() const { return plugin_rect_.height(); }
- gfx::Rect plugin_rect() { return plugin_rect_; }
+ gfx::Size plugin_size() const { return plugin_rect_.size(); }
+ gfx::Rect plugin_rect() const { return plugin_rect_; }
// Gets the Max Height value used for auto size.
int GetAdjustedMaxHeight() const;
// Gets the Max Width value used for auto size.
@@ -223,10 +206,6 @@
void ShowSadGraphic();
- // Parses the attributes of the browser plugin from the element's attributes
- // and sets them appropriately.
- void ParseAttributes();
-
// Triggers the event-listeners for |event_name|. Note that the function
// frees all the values in |props|.
void TriggerEvent(const std::string& event_name,
@@ -235,7 +214,7 @@
// Populates BrowserPluginHostMsg_ResizeGuest_Params with resize state.
void PopulateResizeGuestParameters(
BrowserPluginHostMsg_ResizeGuest_Params* params,
- const gfx::Rect& view_size,
+ const gfx::Size& view_size,
bool needs_repaint);
// Populates BrowserPluginHostMsg_AutoSize_Params object with autosize state.
@@ -256,8 +235,7 @@
// IPC message handlers.
// Please keep in alphabetical order.
void OnAdvanceFocus(int instance_id, bool reverse);
- void OnAttachACK(int instance_id,
- const BrowserPluginMsg_Attach_ACK_Params& ack_params);
+ void OnAttachACK(int instance_id);
void OnBuffersSwapped(int instance_id,
const FrameMsg_BuffersSwapped_Params& params);
void OnCompositorFrameSwapped(const IPC::Message& message);
@@ -293,13 +271,9 @@
// Bitmap for crashed plugin. Lazily initialized, non-owning pointer.
SkBitmap* sad_guest_;
bool guest_crashed_;
- scoped_ptr<BrowserPluginHostMsg_ResizeGuest_Params> pending_resize_params_;
bool is_auto_size_state_dirty_;
// Maximum size constraint for autosize.
gfx::Size max_auto_size_;
- std::string storage_partition_id_;
- bool persist_storage_;
- bool valid_partition_id_;
int content_window_routing_id_;
bool plugin_focused_;
// Tracks the visibility of the browser plugin regardless of the whole
@@ -312,7 +286,6 @@
WebCursor cursor_;
gfx::Size last_view_size_;
- bool before_first_navigation_;
bool mouse_locked_;
// BrowserPlugin outlives RenderViewImpl in Chrome Apps and so we need to
diff --git a/content/renderer/browser_plugin/browser_plugin_bindings.cc b/content/renderer/browser_plugin/browser_plugin_bindings.cc
index 624e19f..6758242 100644
--- a/content/renderer/browser_plugin/browser_plugin_bindings.cc
+++ b/content/renderer/browser_plugin/browser_plugin_bindings.cc
@@ -51,18 +51,6 @@
return std::string(np_string.UTF8Characters, np_string.UTF8Length);
}
-bool StringToNPVariant(const std::string &in, NPVariant *variant) {
- size_t length = in.size();
- NPUTF8 *chars = static_cast<NPUTF8 *>(malloc(length));
- if (!chars) {
- VOID_TO_NPVARIANT(*variant);
- return false;
- }
- memcpy(chars, in.c_str(), length);
- STRINGN_TO_NPVARIANT(chars, length, *variant);
- return true;
-}
-
// Depending on where the attribute comes from it could be a string, int32,
// or a double. Javascript tends to produce an int32 or a string, but setting
// the value from the developer tools console may also produce a double.
@@ -515,97 +503,6 @@
DISALLOW_COPY_AND_ASSIGN(BrowserPluginPropertyBindingMinWidth);
};
-class BrowserPluginPropertyBindingPartition
- : public BrowserPluginPropertyBinding {
- public:
- BrowserPluginPropertyBindingPartition()
- : BrowserPluginPropertyBinding(browser_plugin::kAttributePartition) {
- }
- virtual bool GetProperty(BrowserPluginBindings* bindings,
- NPVariant* result) OVERRIDE {
- std::string partition_id = bindings->instance()->GetPartitionAttribute();
- return StringToNPVariant(partition_id, result);
- }
- virtual bool SetProperty(BrowserPluginBindings* bindings,
- NPObject* np_obj,
- const NPVariant* variant) OVERRIDE {
- std::string new_value = StringFromNPVariant(*variant);
- std::string old_value = bindings->instance()->GetPartitionAttribute();
- if (old_value != new_value) {
- UpdateDOMAttribute(bindings, new_value);
- std::string error_message;
- if (!bindings->instance()->ParsePartitionAttribute(&error_message)) {
- // Reset to old value on error.
- UpdateDOMAttribute(bindings, old_value);
- // Exceptions must be set as the last operation before returning to
- // script.
- WebBindings::setException(
- np_obj, static_cast<const NPUTF8 *>(error_message.c_str()));
- return false;
- }
- }
- return true;
- }
- virtual void RemoveProperty(BrowserPluginBindings* bindings,
- NPObject* np_obj) OVERRIDE {
- std::string error_message;
- if (bindings->instance()->CanRemovePartitionAttribute(&error_message)) {
- bindings->instance()->RemoveDOMAttribute(name());
- } else {
- WebBindings::setException(
- np_obj, static_cast<const NPUTF8 *>(error_message.c_str()));
- }
- }
- private:
- DISALLOW_COPY_AND_ASSIGN(BrowserPluginPropertyBindingPartition);
-};
-
-class BrowserPluginPropertyBindingSrc : public BrowserPluginPropertyBinding {
- public:
- BrowserPluginPropertyBindingSrc()
- : BrowserPluginPropertyBinding(browser_plugin::kAttributeSrc) {
- }
- virtual bool GetProperty(BrowserPluginBindings* bindings,
- NPVariant* result) OVERRIDE {
- std::string src = bindings->instance()->GetSrcAttribute();
- return StringToNPVariant(src, result);
- }
- virtual bool SetProperty(BrowserPluginBindings* bindings,
- NPObject* np_obj,
- const NPVariant* variant) OVERRIDE {
- std::string new_value = StringFromNPVariant(*variant);
- // We should not be issuing navigation IPCs if we attempt to set the
- // src property to the empty string. Instead, we want to simply restore
- // the src attribute back to its old value.
- if (new_value.empty()) {
- return true;
- }
- std::string old_value = bindings->instance()->GetSrcAttribute();
- // If the new value was empty then we're effectively resetting the
- // attribute to the old value here. This will be picked up by <webview>'s
- // mutation observer and will restore the src attribute after it has been
- // removed.
- UpdateDOMAttribute(bindings, new_value);
- std::string error_message;
- if (!bindings->instance()->ParseSrcAttribute(&error_message)) {
- // Reset to old value on error.
- UpdateDOMAttribute(bindings, old_value);
- // Exceptions must be set as the last operation before returning to
- // script.
- WebBindings::setException(
- np_obj, static_cast<const NPUTF8 *>(error_message.c_str()));
- return false;
- }
- return true;
- }
- virtual void RemoveProperty(BrowserPluginBindings* bindings,
- NPObject* np_obj) OVERRIDE {
- bindings->instance()->RemoveDOMAttribute(name());
- }
- private:
- DISALLOW_COPY_AND_ASSIGN(BrowserPluginPropertyBindingSrc);
-};
-
// BrowserPluginBindings ------------------------------------------------------
@@ -635,8 +532,6 @@
property_bindings_.push_back(new BrowserPluginPropertyBindingMaxWidth);
property_bindings_.push_back(new BrowserPluginPropertyBindingMinHeight);
property_bindings_.push_back(new BrowserPluginPropertyBindingMinWidth);
- property_bindings_.push_back(new BrowserPluginPropertyBindingPartition);
- property_bindings_.push_back(new BrowserPluginPropertyBindingSrc);
}
BrowserPluginBindings::~BrowserPluginBindings() {
diff --git a/content/renderer/browser_plugin/browser_plugin_browsertest.cc b/content/renderer/browser_plugin/browser_plugin_browsertest.cc
index b7eb616..7f9846a 100644
--- a/content/renderer/browser_plugin/browser_plugin_browsertest.cc
+++ b/content/renderer/browser_plugin/browser_plugin_browsertest.cc
@@ -39,18 +39,6 @@
const char kHTMLForSourcelessPluginObject[] =
"<object id='browserplugin' width='640px' height='480px' type='%s'>";
-const char kHTMLForPartitionedPluginObject[] =
- "<object id='browserplugin' width='640px' height='480px'"
- " src='foo' type='%s' partition='someid'>";
-
-const char kHTMLForInvalidPartitionedPluginObject[] =
- "<object id='browserplugin' width='640px' height='480px'"
- " type='%s' partition='persist:'>";
-
-const char kHTMLForPartitionedPersistedPluginObject[] =
- "<object id='browserplugin' width='640px' height='480px'"
- " src='foo' type='%s' partition='persist:someid'>";
-
std::string GetHTMLForBrowserPluginObject() {
return base::StringPrintf(kHTMLForBrowserPluginObject,
kBrowserPluginMimeType);
@@ -58,19 +46,6 @@
} // namespace
-class TestContentRendererClient : public ContentRendererClient {
- public:
- TestContentRendererClient() : ContentRendererClient() {
- }
- virtual ~TestContentRendererClient() {
- }
- virtual bool AllowBrowserPlugin(
- blink::WebPluginContainer* container) OVERRIDE {
- // Allow BrowserPlugin for tests.
- return true;
- }
-};
-
// Test factory for creating test instances of BrowserPluginManager.
class TestBrowserPluginManagerFactory : public BrowserPluginManagerFactory {
public:
@@ -116,10 +91,6 @@
RenderViewTest::TearDown();
}
-ContentRendererClient* BrowserPluginTest::CreateContentRendererClient() {
- return new TestContentRendererClient;
-}
-
std::string BrowserPluginTest::ExecuteScriptAndReturnString(
const std::string& script) {
v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
@@ -167,6 +138,12 @@
MockBrowserPlugin* BrowserPluginTest::GetCurrentPluginWithAttachParams(
BrowserPluginHostMsg_Attach_Params* params) {
+ MockBrowserPlugin* browser_plugin = static_cast<MockBrowserPluginManager*>(
+ browser_plugin_manager())->last_plugin();
+ if (!browser_plugin)
+ return NULL;
+ browser_plugin_manager()->AllocateInstanceID(browser_plugin);
+
int instance_id = 0;
const IPC::Message* msg =
browser_plugin_manager()->sink().GetUniqueMessageMatching(
@@ -179,15 +156,11 @@
return NULL;
if (!IPC::ParamTraits<BrowserPluginHostMsg_Attach_Params>::Read(
- msg, &iter, params))
+ msg, &iter, params)) {
return NULL;
+ }
- MockBrowserPlugin* browser_plugin = static_cast<MockBrowserPlugin*>(
- browser_plugin_manager()->GetBrowserPlugin(instance_id));
-
- BrowserPluginMsg_Attach_ACK_Params attach_ack_params;
- browser_plugin->OnAttachACK(instance_id, attach_ack_params);
-
+ browser_plugin->OnAttachACK(instance_id);
return browser_plugin;
}
@@ -199,8 +172,8 @@
BrowserPluginHostMsg_Attach_Params params;
MockBrowserPlugin* browser_plugin = GetCurrentPluginWithAttachParams(¶ms);
- EXPECT_EQ(640, params.resize_guest_params.view_rect.width());
- EXPECT_EQ(480, params.resize_guest_params.view_rect.height());
+ EXPECT_EQ(640, params.resize_guest_params.view_size.width());
+ EXPECT_EQ(480, params.resize_guest_params.view_size.height());
ASSERT_TRUE(browser_plugin);
}
@@ -228,56 +201,6 @@
int minWidth = ExecuteScriptAndReturnInt(
"document.getElementById('browserplugin').minwidth");
EXPECT_EQ(320, minWidth);
- std::string name = ExecuteScriptAndReturnString(
- "document.getElementById('browserplugin').name");
- EXPECT_STREQ("Jim", name.c_str());
- std::string partition = ExecuteScriptAndReturnString(
- "document.getElementById('browserplugin').partition");
- EXPECT_STREQ("someid", partition.c_str());
- std::string src = ExecuteScriptAndReturnString(
- "document.getElementById('browserplugin').src");
- EXPECT_STREQ("foo", src.c_str());
-}
-
-// Verify that the src attribute on the browser plugin works as expected.
-TEST_F(BrowserPluginTest, SrcAttribute) {
- LoadHTML(GetHTMLForBrowserPluginObject().c_str());
- // Verify that we're reporting the correct URL to navigate to based on the
- // src attribute.
- {
- BrowserPluginHostMsg_Attach_Params params;
- MockBrowserPlugin* browser_plugin =
- GetCurrentPluginWithAttachParams(¶ms);
- ASSERT_TRUE(browser_plugin);
- EXPECT_EQ("foo", params.src);
- }
-
- browser_plugin_manager()->sink().ClearMessages();
- // Navigate to bar and observe the associated
- // BrowserPluginHostMsg_NavigateGuest message.
- // Verify that the src attribute is updated as well.
- ExecuteJavaScript("document.getElementById('browserplugin').src = 'bar'");
- {
- // Verify that we do not get a Attach on subsequent navigations.
- const IPC::Message* create_msg =
- browser_plugin_manager()->sink().GetUniqueMessageMatching(
- BrowserPluginHostMsg_Attach::ID);
- ASSERT_FALSE(create_msg);
-
- const IPC::Message* msg =
- browser_plugin_manager()->sink().GetUniqueMessageMatching(
- BrowserPluginHostMsg_NavigateGuest::ID);
- ASSERT_TRUE(msg);
-
- BrowserPluginHostMsg_NavigateGuest::Param params;
- BrowserPluginHostMsg_NavigateGuest::Read(msg, ¶ms);
- std::string src = params.b;
- EXPECT_EQ("bar", src);
- std::string src_value =
- ExecuteScriptAndReturnString(
- "document.getElementById('browserplugin').src");
- EXPECT_EQ("bar", src_value);
- }
}
TEST_F(BrowserPluginTest, ResizeFlowControl) {
@@ -332,8 +255,8 @@
BrowserPluginHostMsg_ResizeGuest::Read(msg, ¶m);
instance_id = param.a;
BrowserPluginHostMsg_ResizeGuest_Params params = param.b;
- EXPECT_EQ(641, params.view_rect.width());
- EXPECT_EQ(480, params.view_rect.height());
+ EXPECT_EQ(641, params.view_size.width());
+ EXPECT_EQ(480, params.view_size.height());
{
// We send a stale UpdateRect to the BrowserPlugin.
@@ -358,6 +281,9 @@
TEST_F(BrowserPluginTest, RemovePlugin) {
LoadHTML(GetHTMLForBrowserPluginObject().c_str());
+ MockBrowserPlugin* browser_plugin = GetCurrentPlugin();
+ ASSERT_TRUE(browser_plugin);
+
EXPECT_FALSE(browser_plugin_manager()->sink().GetUniqueMessageMatching(
BrowserPluginHostMsg_PluginDestroyed::ID));
ExecuteJavaScript("x = document.getElementById('browserplugin'); "
@@ -384,142 +310,6 @@
// Verify that the 'partition' attribute on the browser plugin is parsed
// correctly.
-TEST_F(BrowserPluginTest, PartitionAttribute) {
- std::string html = base::StringPrintf(kHTMLForPartitionedPluginObject,
- kBrowserPluginMimeType);
- LoadHTML(html.c_str());
- std::string partition_value = ExecuteScriptAndReturnString(
- "document.getElementById('browserplugin').partition");
- EXPECT_STREQ("someid", partition_value.c_str());
-
- html = base::StringPrintf(kHTMLForPartitionedPersistedPluginObject,
- kBrowserPluginMimeType);
- LoadHTML(html.c_str());
- partition_value = ExecuteScriptAndReturnString(
- "document.getElementById('browserplugin').partition");
- EXPECT_STREQ("persist:someid", partition_value.c_str());
-
- // Verify that once HTML has defined a source and partition, we cannot change
- // the partition anymore.
- ExecuteJavaScript(
- "try {"
- " document.getElementById('browserplugin').partition = 'foo';"
- " document.title = 'success';"
- "} catch (e) { document.title = e.message; }");
- std::string title = ExecuteScriptAndReturnString("document.title");
- EXPECT_STREQ(
- "The object has already navigated, so its partition cannot be changed.",
- title.c_str());
-
- // Load a browser tag without 'src' defined.
- html = base::StringPrintf(kHTMLForSourcelessPluginObject,
- kBrowserPluginMimeType);
- LoadHTML(html.c_str());
-
- // Ensure we don't parse just "persist:" string and return exception.
- ExecuteJavaScript(
- "try {"
- " document.getElementById('browserplugin').partition = 'persist:';"
- " document.title = 'success';"
- "} catch (e) { document.title = e.message; }");
- title = ExecuteScriptAndReturnString("document.title");
- EXPECT_STREQ("Invalid partition attribute.", title.c_str());
-}
-
-// This test verifies that BrowserPlugin enters an error state when the
-// partition attribute is invalid.
-TEST_F(BrowserPluginTest, InvalidPartition) {
- std::string html = base::StringPrintf(kHTMLForInvalidPartitionedPluginObject,
- kBrowserPluginMimeType);
- LoadHTML(html.c_str());
- // Attempt to navigate with an invalid partition.
- {
- ExecuteJavaScript(
- "try {"
- " document.getElementById('browserplugin').src = 'bar';"
- " document.title = 'success';"
- "} catch (e) { document.title = e.message; }");
- std::string title = ExecuteScriptAndReturnString("document.title");
- EXPECT_STREQ("Invalid partition attribute.", title.c_str());
- // Verify that the 'src' attribute has not been updated.
- EXPECT_EQ("", ExecuteScriptAndReturnString(
- "document.getElementById('browserplugin').src"));
- }
-
- // Verify that the BrowserPlugin accepts changes to its src attribue after
- // setting the partition to a valid value.
- ExecuteJavaScript(
- "document.getElementById('browserplugin').partition = 'persist:foo'");
- ExecuteJavaScript("document.getElementById('browserplugin').src = 'bar'");
- EXPECT_EQ("bar", ExecuteScriptAndReturnString(
- "document.getElementById('browserplugin').src"));
- ProcessPendingMessages();
- // Verify that the BrowserPlugin does not 'deadlock': it can recover from
- // the partition ID error state.
- {
- ExecuteJavaScript(
- "try {"
- " document.getElementById('browserplugin').partition = 'persist:1337';"
- " document.title = 'success';"
- "} catch (e) { document.title = e.message; }");
- std::string title = ExecuteScriptAndReturnString("document.title");
- EXPECT_STREQ(
- "The object has already navigated, so its partition cannot be changed.",
- title.c_str());
- ExecuteJavaScript("document.getElementById('browserplugin').src = '42'");
- EXPECT_EQ("42", ExecuteScriptAndReturnString(
- "document.getElementById('browserplugin').src"));
- }
-}
-
-// Test to verify that after the first navigation, the partition attribute
-// cannot be modified.
-TEST_F(BrowserPluginTest, ImmutableAttributesAfterNavigation) {
- std::string html = base::StringPrintf(kHTMLForSourcelessPluginObject,
- kBrowserPluginMimeType);
- LoadHTML(html.c_str());
-
- ExecuteJavaScript(
- "document.getElementById('browserplugin').partition = 'storage'");
- std::string partition_value = ExecuteScriptAndReturnString(
- "document.getElementById('browserplugin').partition");
- EXPECT_STREQ("storage", partition_value.c_str());
-
- std::string src_value = ExecuteScriptAndReturnString(
- "document.getElementById('browserplugin').src");
- EXPECT_STREQ("", src_value.c_str());
-
- ExecuteJavaScript("document.getElementById('browserplugin').src = 'bar'");
- ProcessPendingMessages();
- {
- BrowserPluginHostMsg_Attach_Params params;
- MockBrowserPlugin* browser_plugin =
- GetCurrentPluginWithAttachParams(¶ms);
- ASSERT_TRUE(browser_plugin);
-
- EXPECT_STREQ("storage", params.storage_partition_id.c_str());
- EXPECT_FALSE(params.persist_storage);
- EXPECT_STREQ("bar", params.src.c_str());
- }
-
- // Setting the partition should throw an exception and the value should not
- // change.
- ExecuteJavaScript(
- "try {"
- " document.getElementById('browserplugin').partition = 'someid';"
- " document.title = 'success';"
- "} catch (e) { document.title = e.message; }");
-
- std::string title = ExecuteScriptAndReturnString("document.title");
- EXPECT_STREQ(
- "The object has already navigated, so its partition cannot be changed.",
- title.c_str());
-
- partition_value = ExecuteScriptAndReturnString(
- "document.getElementById('browserplugin').partition");
- EXPECT_STREQ("storage", partition_value.c_str());
-}
-
TEST_F(BrowserPluginTest, AutoSizeAttributes) {
std::string html = base::StringPrintf(kHTMLForSourcelessPluginObject,
kBrowserPluginMimeType);
@@ -543,8 +333,7 @@
ProcessPendingMessages();
BrowserPluginHostMsg_Attach_Params params;
- MockBrowserPlugin* browser_plugin =
- GetCurrentPluginWithAttachParams(¶ms);
+ MockBrowserPlugin* browser_plugin = GetCurrentPluginWithAttachParams(¶ms);
ASSERT_TRUE(browser_plugin);
EXPECT_TRUE(params.auto_size_params.enable);
diff --git a/content/renderer/browser_plugin/browser_plugin_browsertest.h b/content/renderer/browser_plugin/browser_plugin_browsertest.h
index 415afc3..434da34 100644
--- a/content/renderer/browser_plugin/browser_plugin_browsertest.h
+++ b/content/renderer/browser_plugin/browser_plugin_browsertest.h
@@ -29,7 +29,6 @@
virtual void SetUp() OVERRIDE;
virtual void TearDown() OVERRIDE;
- virtual ContentRendererClient* CreateContentRendererClient() OVERRIDE;
MockBrowserPluginManager* browser_plugin_manager() const {
return static_cast<MockBrowserPluginManager*>(
diff --git a/content/renderer/browser_plugin/browser_plugin_manager.h b/content/renderer/browser_plugin/browser_plugin_manager.h
index 1f71ea6..636f6ad 100644
--- a/content/renderer/browser_plugin/browser_plugin_manager.h
+++ b/content/renderer/browser_plugin/browser_plugin_manager.h
@@ -49,12 +49,6 @@
blink::WebFrame* frame,
bool auto_navigate) = 0;
- // Asynchronously requests a new browser-process-allocated instance ID.
- // After the browser process allocates an ID, it calls back into the
- // |browser_plugin| if it's still alive.
- virtual void AllocateInstanceID(
- const base::WeakPtr<BrowserPlugin>& browser_plugin) = 0;
-
void AddBrowserPlugin(int guest_instance_id, BrowserPlugin* browser_plugin);
void RemoveBrowserPlugin(int guest_instance_id);
BrowserPlugin* GetBrowserPlugin(int guest_instance_id) const;
diff --git a/content/renderer/browser_plugin/browser_plugin_manager_impl.cc b/content/renderer/browser_plugin/browser_plugin_manager_impl.cc
index 5ce7ebb..54f557a 100644
--- a/content/renderer/browser_plugin/browser_plugin_manager_impl.cc
+++ b/content/renderer/browser_plugin/browser_plugin_manager_impl.cc
@@ -13,10 +13,8 @@
namespace content {
-BrowserPluginManagerImpl::BrowserPluginManagerImpl(
- RenderViewImpl* render_view)
- : BrowserPluginManager(render_view),
- request_id_counter_(0) {
+BrowserPluginManagerImpl::BrowserPluginManagerImpl(RenderViewImpl* render_view)
+ : BrowserPluginManager(render_view) {
}
BrowserPluginManagerImpl::~BrowserPluginManagerImpl() {
@@ -29,15 +27,6 @@
return new BrowserPlugin(render_view, frame, auto_navigate);
}
-void BrowserPluginManagerImpl::AllocateInstanceID(
- const base::WeakPtr<BrowserPlugin>& browser_plugin) {
- int request_id = ++request_id_counter_;
- pending_allocate_guest_instance_id_requests_.insert(
- std::make_pair(request_id, browser_plugin));
- Send(new BrowserPluginHostMsg_AllocateInstanceID(
- browser_plugin->render_view_routing_id(), request_id));
-}
-
bool BrowserPluginManagerImpl::Send(IPC::Message* msg) {
return RenderThread::Get()->Send(msg);
}
@@ -56,13 +45,7 @@
return true;
}
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(BrowserPluginManagerImpl, message)
- IPC_MESSAGE_HANDLER(BrowserPluginMsg_AllocateInstanceID_ACK,
- OnAllocateInstanceIDACK)
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
- return handled;
+ return false;
}
void BrowserPluginManagerImpl::DidCommitCompositorFrame() {
@@ -73,19 +56,4 @@
}
}
-void BrowserPluginManagerImpl::OnAllocateInstanceIDACK(
- int request_id,
- int guest_instance_id) {
- InstanceIDMap::iterator it =
- pending_allocate_guest_instance_id_requests_.find(request_id);
- if (it == pending_allocate_guest_instance_id_requests_.end())
- return;
-
- const base::WeakPtr<BrowserPlugin> plugin(it->second);
- if (!plugin)
- return;
- pending_allocate_guest_instance_id_requests_.erase(request_id);
- plugin->OnInstanceIDAllocated(guest_instance_id);
-}
-
} // namespace content
diff --git a/content/renderer/browser_plugin/browser_plugin_manager_impl.h b/content/renderer/browser_plugin/browser_plugin_manager_impl.h
index 384313b..219ff30 100644
--- a/content/renderer/browser_plugin/browser_plugin_manager_impl.h
+++ b/content/renderer/browser_plugin/browser_plugin_manager_impl.h
@@ -25,8 +25,6 @@
RenderViewImpl* render_view,
blink::WebFrame* frame,
bool auto_navigate) OVERRIDE;
- virtual void AllocateInstanceID(
- const base::WeakPtr<BrowserPlugin>& browser_plugin) OVERRIDE;
// IPC::Sender implementation.
virtual bool Send(IPC::Message* msg) OVERRIDE;
@@ -38,13 +36,6 @@
private:
virtual ~BrowserPluginManagerImpl();
- void OnAllocateInstanceIDACK(int request_id,
- int guest_instance_id);
-
- int request_id_counter_;
- typedef std::map<int, const base::WeakPtr<BrowserPlugin> > InstanceIDMap;
- InstanceIDMap pending_allocate_guest_instance_id_requests_;
-
DISALLOW_COPY_AND_ASSIGN(BrowserPluginManagerImpl);
};
diff --git a/content/renderer/browser_plugin/mock_browser_plugin_manager.cc b/content/renderer/browser_plugin/mock_browser_plugin_manager.cc
index 282edc0..36d78b8 100644
--- a/content/renderer/browser_plugin/mock_browser_plugin_manager.cc
+++ b/content/renderer/browser_plugin/mock_browser_plugin_manager.cc
@@ -14,7 +14,8 @@
MockBrowserPluginManager::MockBrowserPluginManager(
RenderViewImpl* render_view)
: BrowserPluginManager(render_view),
- guest_instance_id_counter_(0) {
+ guest_instance_id_counter_(0),
+ last_plugin_(NULL) {
}
MockBrowserPluginManager::~MockBrowserPluginManager() {
@@ -24,18 +25,13 @@
RenderViewImpl* render_view,
blink::WebFrame* frame,
bool auto_navigate) {
- return new MockBrowserPlugin(render_view, frame, auto_navigate);
+ last_plugin_ = new MockBrowserPlugin(render_view, frame, auto_navigate);
+ return last_plugin_;
}
void MockBrowserPluginManager::AllocateInstanceID(
- const base::WeakPtr<BrowserPlugin>& browser_plugin) {
- int guest_instance_id = ++guest_instance_id_counter_;
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&MockBrowserPluginManager::AllocateInstanceIDACK,
- this,
- browser_plugin.get(),
- guest_instance_id));
+ BrowserPlugin* browser_plugin) {
+ AllocateInstanceIDACK(browser_plugin, ++guest_instance_id_counter_);
}
void MockBrowserPluginManager::AllocateInstanceIDACK(
diff --git a/content/renderer/browser_plugin/mock_browser_plugin_manager.h b/content/renderer/browser_plugin/mock_browser_plugin_manager.h
index 1ec85e3..b3614c7 100644
--- a/content/renderer/browser_plugin/mock_browser_plugin_manager.h
+++ b/content/renderer/browser_plugin/mock_browser_plugin_manager.h
@@ -13,6 +13,8 @@
namespace content {
+class MockBrowserPlugin;
+
class MockBrowserPluginManager : public BrowserPluginManager {
public:
MockBrowserPluginManager(RenderViewImpl* render_view);
@@ -22,15 +24,20 @@
RenderViewImpl* render_view,
blink::WebFrame* frame,
bool auto_navigate) OVERRIDE;
- virtual void AllocateInstanceID(
- const base::WeakPtr<BrowserPlugin>& browser_plugin) OVERRIDE;
// Provides access to the messages that have been received by this thread.
IPC::TestSink& sink() { return sink_; }
+ // Allocates instance ID for the browser plugin.
+ void AllocateInstanceID(BrowserPlugin* browser_plugin);
+
// RenderViewObserver override.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual bool Send(IPC::Message* msg) OVERRIDE;
+
+ // Returns the latest browser plugin that was created by this manager.
+ MockBrowserPlugin* last_plugin() { return last_plugin_; }
+
protected:
virtual ~MockBrowserPluginManager();
void AllocateInstanceIDACK(BrowserPlugin* browser_plugin,
@@ -42,6 +49,7 @@
scoped_ptr<IPC::MessageReplyDeserializer> reply_deserializer_;
int guest_instance_id_counter_;
+ MockBrowserPlugin* last_plugin_;
DISALLOW_COPY_AND_ASSIGN(MockBrowserPluginManager);
};
diff --git a/content/renderer/child_frame_compositing_helper.cc b/content/renderer/child_frame_compositing_helper.cc
index 0a651db..fee5ab7 100644
--- a/content/renderer/child_frame_compositing_helper.cc
+++ b/content/renderer/child_frame_compositing_helper.cc
@@ -18,6 +18,7 @@
#include "content/common/gpu/client/context_provider_command_buffer.h"
#include "content/renderer/browser_plugin/browser_plugin.h"
#include "content/renderer/browser_plugin/browser_plugin_manager.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
#include "content/renderer/render_frame_impl.h"
#include "content/renderer/render_thread_impl.h"
#include "skia/ext/image_operations.h"
@@ -27,7 +28,6 @@
#include "third_party/khronos/GLES2/gl2.h"
#include "ui/gfx/size_conversions.h"
#include "ui/gfx/skia_util.h"
-#include "webkit/renderer/compositor_bindings/web_layer_impl.h"
namespace content {
@@ -186,7 +186,7 @@
background_layer_->SetMasksToBounds(true);
background_layer_->SetBackgroundColor(
SkColorSetARGBInline(255, 255, 255, 255));
- web_layer_.reset(new webkit::WebLayerImpl(background_layer_));
+ web_layer_.reset(new WebLayerImpl(background_layer_));
}
if (GetContainer()) {
diff --git a/content/renderer/compositor_bindings/OWNERS b/content/renderer/compositor_bindings/OWNERS
new file mode 100644
index 0000000..d42bb39
--- /dev/null
+++ b/content/renderer/compositor_bindings/OWNERS
@@ -0,0 +1,2 @@
+enne@chromium.org
+nduca@chromium.org
diff --git a/content/renderer/compositor_bindings/PRESUBMIT.py b/content/renderer/compositor_bindings/PRESUBMIT.py
new file mode 100644
index 0000000..8e4e571
--- /dev/null
+++ b/content/renderer/compositor_bindings/PRESUBMIT.py
@@ -0,0 +1,33 @@
+# Copyright 2014 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.
+
+"""
+See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
+details on the presubmit API built into gcl.
+"""
+
+SOURCE_FILES = (r'^.*\.(cc|h)$')
+
+def CheckChangeLintsClean(input_api, output_api):
+ input_api.cpplint._cpplint_state.ResetErrorCounts() # reset global state
+ source_filter = lambda x: input_api.FilterSourceFile(
+ x, white_list=SOURCE_FILES, black_list=None)
+ files = [f.AbsoluteLocalPath() for f in
+ input_api.AffectedSourceFiles(source_filter)]
+ level = 1 # strict, but just warn
+
+ for file_name in files:
+ input_api.cpplint.ProcessFile(file_name, level)
+
+ if not input_api.cpplint._cpplint_state.error_count:
+ return []
+
+ return [output_api.PresubmitPromptWarning(
+ 'Changelist failed cpplint.py check.')]
+
+
+def CheckChangeOnUpload(input_api, output_api):
+ results = []
+ results += CheckChangeLintsClean(input_api, output_api)
+ return results
diff --git a/content/renderer/compositor_bindings/scrollbar_impl.cc b/content/renderer/compositor_bindings/scrollbar_impl.cc
new file mode 100644
index 0000000..6ee82d4
--- /dev/null
+++ b/content/renderer/compositor_bindings/scrollbar_impl.cc
@@ -0,0 +1,109 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/scrollbar_impl.h"
+
+#include "base/logging.h"
+#include "third_party/WebKit/public/platform/WebScrollbar.h"
+#include "third_party/WebKit/public/platform/WebScrollbarThemeGeometry.h"
+
+using blink::WebScrollbar;
+
+namespace content {
+
+ScrollbarImpl::ScrollbarImpl(
+ scoped_ptr<WebScrollbar> scrollbar,
+ blink::WebScrollbarThemePainter painter,
+ scoped_ptr<blink::WebScrollbarThemeGeometry> geometry)
+ : scrollbar_(scrollbar.Pass()),
+ painter_(painter),
+ geometry_(geometry.Pass()) {
+}
+
+ScrollbarImpl::~ScrollbarImpl() {
+}
+
+cc::ScrollbarOrientation ScrollbarImpl::Orientation() const {
+ if (scrollbar_->orientation() == WebScrollbar::Horizontal)
+ return cc::HORIZONTAL;
+ return cc::VERTICAL;
+}
+
+bool ScrollbarImpl::IsLeftSideVerticalScrollbar() const {
+ return scrollbar_->isLeftSideVerticalScrollbar();
+}
+
+bool ScrollbarImpl::HasThumb() const {
+ return geometry_->hasThumb(scrollbar_.get());
+}
+
+bool ScrollbarImpl::IsOverlay() const {
+ return scrollbar_->isOverlay();
+}
+
+gfx::Point ScrollbarImpl::Location() const {
+ return scrollbar_->location();
+}
+
+int ScrollbarImpl::ThumbThickness() const {
+ gfx::Rect thumb_rect = geometry_->thumbRect(scrollbar_.get());
+ if (scrollbar_->orientation() == WebScrollbar::Horizontal)
+ return thumb_rect.height();
+ return thumb_rect.width();
+}
+
+int ScrollbarImpl::ThumbLength() const {
+ gfx::Rect thumb_rect = geometry_->thumbRect(scrollbar_.get());
+ if (scrollbar_->orientation() == WebScrollbar::Horizontal)
+ return thumb_rect.width();
+ return thumb_rect.height();
+}
+
+gfx::Rect ScrollbarImpl::TrackRect() const {
+ return geometry_->trackRect(scrollbar_.get());
+}
+
+void ScrollbarImpl::PaintPart(SkCanvas* canvas,
+ cc::ScrollbarPart part,
+ const gfx::Rect& content_rect) {
+ if (part == cc::THUMB) {
+ painter_.paintThumb(canvas, content_rect);
+ return;
+ }
+
+ // The following is a simplification of ScrollbarThemeComposite::paint.
+ painter_.paintScrollbarBackground(canvas, content_rect);
+
+ if (geometry_->hasButtons(scrollbar_.get())) {
+ gfx::Rect back_button_start_paint_rect =
+ geometry_->backButtonStartRect(scrollbar_.get());
+ painter_.paintBackButtonStart(canvas, back_button_start_paint_rect);
+
+ gfx::Rect back_button_end_paint_rect =
+ geometry_->backButtonEndRect(scrollbar_.get());
+ painter_.paintBackButtonEnd(canvas, back_button_end_paint_rect);
+
+ gfx::Rect forward_button_start_paint_rect =
+ geometry_->forwardButtonStartRect(scrollbar_.get());
+ painter_.paintForwardButtonStart(canvas, forward_button_start_paint_rect);
+
+ gfx::Rect forward_button_end_paint_rect =
+ geometry_->forwardButtonEndRect(scrollbar_.get());
+ painter_.paintForwardButtonEnd(canvas, forward_button_end_paint_rect);
+ }
+
+ gfx::Rect track_paint_rect = geometry_->trackRect(scrollbar_.get());
+ painter_.paintTrackBackground(canvas, track_paint_rect);
+
+ bool thumb_present = geometry_->hasThumb(scrollbar_.get());
+ if (thumb_present) {
+ painter_.paintForwardTrackPart(canvas, track_paint_rect);
+ painter_.paintBackTrackPart(canvas, track_paint_rect);
+ }
+
+ painter_.paintTickmarks(canvas, track_paint_rect);
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/scrollbar_impl.h b/content/renderer/compositor_bindings/scrollbar_impl.h
new file mode 100644
index 0000000..9159d0a
--- /dev/null
+++ b/content/renderer/compositor_bindings/scrollbar_impl.h
@@ -0,0 +1,51 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_SCROLLBAR_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_SCROLLBAR_IMPL_H_
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "cc/input/scrollbar.h"
+#include "third_party/WebKit/public/platform/WebScrollbarThemePainter.h"
+
+namespace blink {
+class WebScrollbar;
+class WebScrollbarThemeGeometry;
+}
+
+namespace content {
+
+class ScrollbarImpl : public cc::Scrollbar {
+ public:
+ ScrollbarImpl(scoped_ptr<blink::WebScrollbar> scrollbar,
+ blink::WebScrollbarThemePainter painter,
+ scoped_ptr<blink::WebScrollbarThemeGeometry> geometry);
+ virtual ~ScrollbarImpl();
+
+ // cc::Scrollbar implementation.
+ virtual cc::ScrollbarOrientation Orientation() const OVERRIDE;
+ virtual bool IsLeftSideVerticalScrollbar() const OVERRIDE;
+ virtual bool HasThumb() const OVERRIDE;
+ virtual bool IsOverlay() const OVERRIDE;
+ virtual gfx::Point Location() const OVERRIDE;
+ virtual int ThumbThickness() const OVERRIDE;
+ virtual int ThumbLength() const OVERRIDE;
+ virtual gfx::Rect TrackRect() const OVERRIDE;
+ virtual void PaintPart(SkCanvas* canvas,
+ cc::ScrollbarPart part,
+ const gfx::Rect& content_rect) OVERRIDE;
+
+ private:
+ scoped_ptr<blink::WebScrollbar> scrollbar_;
+ blink::WebScrollbarThemePainter painter_;
+ scoped_ptr<blink::WebScrollbarThemeGeometry> geometry_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScrollbarImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_SCROLLBAR_IMPL_H_
+
diff --git a/content/renderer/compositor_bindings/web_animation_curve_common.cc b/content/renderer/compositor_bindings/web_animation_curve_common.cc
new file mode 100644
index 0000000..c5bb36d
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_animation_curve_common.cc
@@ -0,0 +1,29 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_animation_curve_common.h"
+
+#include "cc/animation/timing_function.h"
+
+namespace content {
+
+scoped_ptr<cc::TimingFunction> CreateTimingFunction(
+ blink::WebAnimationCurve::TimingFunctionType type) {
+ switch (type) {
+ case blink::WebAnimationCurve::TimingFunctionTypeEase:
+ return cc::EaseTimingFunction::Create();
+ case blink::WebAnimationCurve::TimingFunctionTypeEaseIn:
+ return cc::EaseInTimingFunction::Create();
+ case blink::WebAnimationCurve::TimingFunctionTypeEaseOut:
+ return cc::EaseOutTimingFunction::Create();
+ case blink::WebAnimationCurve::TimingFunctionTypeEaseInOut:
+ return cc::EaseInOutTimingFunction::Create();
+ case blink::WebAnimationCurve::TimingFunctionTypeLinear:
+ return scoped_ptr<cc::TimingFunction>();
+ }
+ return scoped_ptr<cc::TimingFunction>();
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_animation_curve_common.h b/content/renderer/compositor_bindings/web_animation_curve_common.h
new file mode 100644
index 0000000..e0fd7c8
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_animation_curve_common.h
@@ -0,0 +1,21 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_CURVE_COMMON_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_CURVE_COMMON_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "third_party/WebKit/public/platform/WebAnimationCurve.h"
+
+namespace cc {
+class TimingFunction;
+}
+
+namespace content {
+scoped_ptr<cc::TimingFunction> CreateTimingFunction(
+ blink::WebAnimationCurve::TimingFunctionType);
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_CURVE_COMMON_H_
+
diff --git a/content/renderer/compositor_bindings/web_animation_impl.cc b/content/renderer/compositor_bindings/web_animation_impl.cc
new file mode 100644
index 0000000..832aa6e
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_animation_impl.cc
@@ -0,0 +1,160 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_animation_impl.h"
+
+#include "cc/animation/animation.h"
+#include "cc/animation/animation_curve.h"
+#include "cc/animation/animation_id_provider.h"
+#include "content/renderer/compositor_bindings/web_filter_animation_curve_impl.h"
+#include "content/renderer/compositor_bindings/web_float_animation_curve_impl.h"
+#include "content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h"
+#include "content/renderer/compositor_bindings/web_transform_animation_curve_impl.h"
+#include "third_party/WebKit/public/platform/WebAnimation.h"
+#include "third_party/WebKit/public/platform/WebAnimationCurve.h"
+
+using cc::Animation;
+using cc::AnimationIdProvider;
+
+using blink::WebAnimation;
+using blink::WebAnimationCurve;
+
+namespace content {
+
+WebAnimationImpl::WebAnimationImpl(const WebAnimationCurve& web_curve,
+ TargetProperty target_property,
+ int animation_id,
+ int group_id) {
+ if (!animation_id)
+ animation_id = AnimationIdProvider::NextAnimationId();
+ if (!group_id)
+ group_id = AnimationIdProvider::NextGroupId();
+
+ WebAnimationCurve::AnimationCurveType curve_type = web_curve.type();
+ scoped_ptr<cc::AnimationCurve> curve;
+ switch (curve_type) {
+ case WebAnimationCurve::AnimationCurveTypeFloat: {
+ const WebFloatAnimationCurveImpl* float_curve_impl =
+ static_cast<const WebFloatAnimationCurveImpl*>(&web_curve);
+ curve = float_curve_impl->CloneToAnimationCurve();
+ break;
+ }
+ case WebAnimationCurve::AnimationCurveTypeTransform: {
+ const WebTransformAnimationCurveImpl* transform_curve_impl =
+ static_cast<const WebTransformAnimationCurveImpl*>(&web_curve);
+ curve = transform_curve_impl->CloneToAnimationCurve();
+ break;
+ }
+ case WebAnimationCurve::AnimationCurveTypeFilter: {
+ const WebFilterAnimationCurveImpl* filter_curve_impl =
+ static_cast<const WebFilterAnimationCurveImpl*>(&web_curve);
+ curve = filter_curve_impl->CloneToAnimationCurve();
+ break;
+ }
+#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
+ case WebAnimationCurve::AnimationCurveTypeScrollOffset: {
+ const WebScrollOffsetAnimationCurveImpl* scroll_curve_impl =
+ static_cast<const WebScrollOffsetAnimationCurveImpl*>(&web_curve);
+ curve = scroll_curve_impl->CloneToAnimationCurve();
+ break;
+ }
+#endif
+ }
+ animation_ = Animation::Create(
+ curve.Pass(),
+ animation_id,
+ group_id,
+ static_cast<cc::Animation::TargetProperty>(target_property));
+}
+
+WebAnimationImpl::~WebAnimationImpl() {
+}
+
+int WebAnimationImpl::id() {
+ return animation_->id();
+}
+
+blink::WebAnimation::TargetProperty WebAnimationImpl::targetProperty() const {
+ return static_cast<WebAnimationImpl::TargetProperty>(
+ animation_->target_property());
+}
+
+int WebAnimationImpl::iterations() const {
+ return animation_->iterations();
+}
+
+void WebAnimationImpl::setIterations(int n) {
+ animation_->set_iterations(n);
+}
+
+double WebAnimationImpl::startTime() const {
+ return (animation_->start_time() - base::TimeTicks()).InSecondsF();
+}
+
+void WebAnimationImpl::setStartTime(double monotonic_time) {
+ animation_->set_start_time(base::TimeTicks::FromInternalValue(
+ monotonic_time * base::Time::kMicrosecondsPerSecond));
+}
+
+double WebAnimationImpl::timeOffset() const {
+ return animation_->time_offset().InSecondsF();
+}
+
+void WebAnimationImpl::setTimeOffset(double monotonic_time) {
+ animation_->set_time_offset(base::TimeDelta::FromSecondsD(monotonic_time));
+}
+
+#if WEB_ANIMATION_SUPPORTS_FULL_DIRECTION
+blink::WebAnimation::Direction WebAnimationImpl::direction() const {
+ switch (animation_->direction()) {
+ case cc::Animation::Normal:
+ return DirectionNormal;
+ case cc::Animation::Reverse:
+ return DirectionReverse;
+ case cc::Animation::Alternate:
+ return DirectionAlternate;
+ case cc::Animation::AlternateReverse:
+ return DirectionAlternateReverse;
+ default:
+ NOTREACHED();
+ }
+ return DirectionNormal;
+}
+
+void WebAnimationImpl::setDirection(Direction direction) {
+ switch (direction) {
+ case DirectionNormal:
+ animation_->set_direction(cc::Animation::Normal);
+ break;
+ case DirectionReverse:
+ animation_->set_direction(cc::Animation::Reverse);
+ break;
+ case DirectionAlternate:
+ animation_->set_direction(cc::Animation::Alternate);
+ break;
+ case DirectionAlternateReverse:
+ animation_->set_direction(cc::Animation::AlternateReverse);
+ break;
+ }
+}
+#else
+bool WebAnimationImpl::alternatesDirection() const {
+ return animation_->direction() == cc::Animation::Alternate;
+}
+
+void WebAnimationImpl::setAlternatesDirection(bool alternates) {
+ if (alternates)
+ animation_->set_direction(cc::Animation::Alternate);
+ else
+ animation_->set_direction(cc::Animation::Normal);
+}
+#endif
+
+scoped_ptr<cc::Animation> WebAnimationImpl::PassAnimation() {
+ animation_->set_needs_synchronized_start_time(true);
+ return animation_.Pass();
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_animation_impl.h b/content/renderer/compositor_bindings/web_animation_impl.h
new file mode 100644
index 0000000..a706358
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_animation_impl.h
@@ -0,0 +1,59 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_IMPL_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebAnimation.h"
+
+namespace cc {
+class Animation;
+}
+
+namespace blink {
+class WebAnimationCurve;
+}
+
+namespace content {
+
+class WebAnimationImpl : public blink::WebAnimation {
+ public:
+ CONTENT_EXPORT WebAnimationImpl(
+ const blink::WebAnimationCurve& curve,
+ TargetProperty target,
+ int animation_id,
+ int group_id);
+ virtual ~WebAnimationImpl();
+
+ // blink::WebAnimation implementation
+ virtual int id();
+ virtual TargetProperty targetProperty() const;
+ virtual int iterations() const;
+ virtual void setIterations(int iterations);
+ virtual double startTime() const;
+ virtual void setStartTime(double monotonic_time);
+ virtual double timeOffset() const;
+ virtual void setTimeOffset(double monotonic_time);
+#if WEB_ANIMATION_SUPPORTS_FULL_DIRECTION
+ virtual Direction direction() const;
+ virtual void setDirection(Direction);
+#else
+ virtual bool alternatesDirection() const;
+ virtual void setAlternatesDirection(bool alternates);
+#endif
+
+ scoped_ptr<cc::Animation> PassAnimation();
+
+ private:
+ scoped_ptr<cc::Animation> animation_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebAnimationImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_IMPL_H_
+
diff --git a/content/renderer/compositor_bindings/web_animation_unittest.cc b/content/renderer/compositor_bindings/web_animation_unittest.cc
new file mode 100644
index 0000000..b529c01
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_animation_unittest.cc
@@ -0,0 +1,60 @@
+// Copyright 2014 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 "base/memory/scoped_ptr.h"
+#include "content/renderer/compositor_bindings/web_animation_impl.h"
+#include "content/renderer/compositor_bindings/web_float_animation_curve_impl.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+using blink::WebAnimation;
+using blink::WebAnimationCurve;
+using blink::WebFloatAnimationCurve;
+
+namespace content {
+namespace {
+
+TEST(WebAnimationTest, DefaultSettings) {
+ scoped_ptr<WebAnimationCurve> curve(new WebFloatAnimationCurveImpl());
+ scoped_ptr<WebAnimation> animation(
+ new WebAnimationImpl(*curve, WebAnimation::TargetPropertyOpacity, 1, 0));
+
+ // Ensure that the defaults are correct.
+ EXPECT_EQ(1, animation->iterations());
+ EXPECT_EQ(0, animation->startTime());
+ EXPECT_EQ(0, animation->timeOffset());
+#if WEB_ANIMATION_SUPPORTS_FULL_DIRECTION
+ EXPECT_EQ(WebAnimation::DirectionNormal, animation->direction());
+#else
+ EXPECT_FALSE(animation->alternatesDirection());
+#endif
+}
+
+TEST(WebAnimationTest, ModifiedSettings) {
+ scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurveImpl());
+ scoped_ptr<WebAnimation> animation(
+ new WebAnimationImpl(*curve, WebAnimation::TargetPropertyOpacity, 1, 0));
+ animation->setIterations(2);
+ animation->setStartTime(2);
+ animation->setTimeOffset(2);
+#if WEB_ANIMATION_SUPPORTS_FULL_DIRECTION
+ animation->setDirection(WebAnimation::DirectionReverse);
+#else
+ animation->setAlternatesDirection(true);
+#endif
+
+ EXPECT_EQ(2, animation->iterations());
+ EXPECT_EQ(2, animation->startTime());
+ EXPECT_EQ(2, animation->timeOffset());
+#if WEB_ANIMATION_SUPPORTS_FULL_DIRECTION
+ EXPECT_EQ(WebAnimation::DirectionReverse, animation->direction());
+#else
+ EXPECT_TRUE(animation->alternatesDirection());
+ animation->setAlternatesDirection(false);
+ EXPECT_FALSE(animation->alternatesDirection());
+#endif
+}
+
+} // namespace
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_blend_mode.h b/content/renderer/compositor_bindings/web_blend_mode.h
new file mode 100644
index 0000000..6ab6ade
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_blend_mode.h
@@ -0,0 +1,107 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_
+
+#include "third_party/WebKit/public/platform/WebBlendMode.h"
+
+namespace content {
+
+inline SkXfermode::Mode BlendModeToSkia(blink::WebBlendMode blend_mode) {
+ switch (blend_mode) {
+ case blink::WebBlendModeNormal:
+ return SkXfermode::kSrcOver_Mode;
+ case blink::WebBlendModeMultiply:
+ return SkXfermode::kMultiply_Mode;
+ case blink::WebBlendModeScreen:
+ return SkXfermode::kScreen_Mode;
+ case blink::WebBlendModeOverlay:
+ return SkXfermode::kOverlay_Mode;
+ case blink::WebBlendModeDarken:
+ return SkXfermode::kDarken_Mode;
+ case blink::WebBlendModeLighten:
+ return SkXfermode::kLighten_Mode;
+ case blink::WebBlendModeColorDodge:
+ return SkXfermode::kColorDodge_Mode;
+ case blink::WebBlendModeColorBurn:
+ return SkXfermode::kColorBurn_Mode;
+ case blink::WebBlendModeHardLight:
+ return SkXfermode::kHardLight_Mode;
+ case blink::WebBlendModeSoftLight:
+ return SkXfermode::kSoftLight_Mode;
+ case blink::WebBlendModeDifference:
+ return SkXfermode::kDifference_Mode;
+ case blink::WebBlendModeExclusion:
+ return SkXfermode::kExclusion_Mode;
+ case blink::WebBlendModeHue:
+ return SkXfermode::kHue_Mode;
+ case blink::WebBlendModeSaturation:
+ return SkXfermode::kSaturation_Mode;
+ case blink::WebBlendModeColor:
+ return SkXfermode::kColor_Mode;
+ case blink::WebBlendModeLuminosity:
+ return SkXfermode::kLuminosity_Mode;
+ }
+ return SkXfermode::kSrcOver_Mode;
+}
+
+inline blink::WebBlendMode BlendModeFromSkia(SkXfermode::Mode blend_mode) {
+ switch (blend_mode) {
+ case SkXfermode::kSrcOver_Mode:
+ return blink::WebBlendModeNormal;
+ case SkXfermode::kMultiply_Mode:
+ return blink::WebBlendModeMultiply;
+ case SkXfermode::kScreen_Mode:
+ return blink::WebBlendModeScreen;
+ case SkXfermode::kOverlay_Mode:
+ return blink::WebBlendModeOverlay;
+ case SkXfermode::kDarken_Mode:
+ return blink::WebBlendModeDarken;
+ case SkXfermode::kLighten_Mode:
+ return blink::WebBlendModeLighten;
+ case SkXfermode::kColorDodge_Mode:
+ return blink::WebBlendModeColorDodge;
+ case SkXfermode::kColorBurn_Mode:
+ return blink::WebBlendModeColorBurn;
+ case SkXfermode::kHardLight_Mode:
+ return blink::WebBlendModeHardLight;
+ case SkXfermode::kSoftLight_Mode:
+ return blink::WebBlendModeSoftLight;
+ case SkXfermode::kDifference_Mode:
+ return blink::WebBlendModeDifference;
+ case SkXfermode::kExclusion_Mode:
+ return blink::WebBlendModeExclusion;
+ case SkXfermode::kHue_Mode:
+ return blink::WebBlendModeHue;
+ case SkXfermode::kSaturation_Mode:
+ return blink::WebBlendModeSaturation;
+ case SkXfermode::kColor_Mode:
+ return blink::WebBlendModeColor;
+ case SkXfermode::kLuminosity_Mode:
+ return blink::WebBlendModeLuminosity;
+
+ // these value are SkXfermodes, but no blend modes.
+ case SkXfermode::kClear_Mode:
+ case SkXfermode::kSrc_Mode:
+ case SkXfermode::kDst_Mode:
+ case SkXfermode::kDstOver_Mode:
+ case SkXfermode::kSrcIn_Mode:
+ case SkXfermode::kDstIn_Mode:
+ case SkXfermode::kSrcOut_Mode:
+ case SkXfermode::kDstOut_Mode:
+ case SkXfermode::kSrcATop_Mode:
+ case SkXfermode::kDstATop_Mode:
+ case SkXfermode::kXor_Mode:
+ case SkXfermode::kPlus_Mode:
+ case SkXfermode::kModulate_Mode:
+ NOTREACHED();
+ }
+ return blink::WebBlendModeNormal;
+}
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_
+
diff --git a/content/renderer/compositor_bindings/web_compositor_support_impl.cc b/content/renderer/compositor_bindings/web_compositor_support_impl.cc
new file mode 100644
index 0000000..0e4e6fa
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_compositor_support_impl.cc
@@ -0,0 +1,141 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_compositor_support_impl.h"
+
+#include "base/memory/scoped_ptr.h"
+#include "base/message_loop/message_loop_proxy.h"
+#include "cc/animation/transform_operations.h"
+#include "cc/output/output_surface.h"
+#include "cc/output/software_output_device.h"
+#include "content/renderer/compositor_bindings/web_animation_impl.h"
+#include "content/renderer/compositor_bindings/web_content_layer_impl.h"
+#include "content/renderer/compositor_bindings/web_external_texture_layer_impl.h"
+#include "content/renderer/compositor_bindings/web_filter_animation_curve_impl.h"
+#include "content/renderer/compositor_bindings/web_filter_operations_impl.h"
+#include "content/renderer/compositor_bindings/web_float_animation_curve_impl.h"
+#include "content/renderer/compositor_bindings/web_image_layer_impl.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
+#include "content/renderer/compositor_bindings/web_nine_patch_layer_impl.h"
+#include "content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h"
+#include "content/renderer/compositor_bindings/web_scrollbar_layer_impl.h"
+#include "content/renderer/compositor_bindings/web_solid_color_layer_impl.h"
+#include "content/renderer/compositor_bindings/web_transform_animation_curve_impl.h"
+#include "content/renderer/compositor_bindings/web_transform_operations_impl.h"
+
+using blink::WebAnimation;
+using blink::WebAnimationCurve;
+using blink::WebContentLayer;
+using blink::WebContentLayerClient;
+using blink::WebExternalTextureLayer;
+using blink::WebExternalTextureLayerClient;
+using blink::WebFilterAnimationCurve;
+using blink::WebFilterOperations;
+using blink::WebFloatAnimationCurve;
+using blink::WebImageLayer;
+using blink::WebNinePatchLayer;
+using blink::WebLayer;
+using blink::WebScrollbar;
+using blink::WebScrollbarLayer;
+using blink::WebScrollbarThemeGeometry;
+using blink::WebScrollbarThemePainter;
+#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
+using blink::WebScrollOffsetAnimationCurve;
+#endif
+using blink::WebSolidColorLayer;
+using blink::WebTransformAnimationCurve;
+using blink::WebTransformOperations;
+
+namespace content {
+
+WebCompositorSupportImpl::WebCompositorSupportImpl() {
+}
+
+WebCompositorSupportImpl::~WebCompositorSupportImpl() {
+}
+
+WebLayer* WebCompositorSupportImpl::createLayer() {
+ return new WebLayerImpl();
+}
+
+WebContentLayer* WebCompositorSupportImpl::createContentLayer(
+ WebContentLayerClient* client) {
+ return new WebContentLayerImpl(client);
+}
+
+WebExternalTextureLayer* WebCompositorSupportImpl::createExternalTextureLayer(
+ WebExternalTextureLayerClient* client) {
+ return new WebExternalTextureLayerImpl(client);
+}
+
+blink::WebImageLayer* WebCompositorSupportImpl::createImageLayer() {
+ return new WebImageLayerImpl();
+}
+
+blink::WebNinePatchLayer* WebCompositorSupportImpl::createNinePatchLayer() {
+ return new WebNinePatchLayerImpl();
+}
+
+WebSolidColorLayer* WebCompositorSupportImpl::createSolidColorLayer() {
+ return new WebSolidColorLayerImpl();
+}
+
+WebScrollbarLayer* WebCompositorSupportImpl::createScrollbarLayer(
+ WebScrollbar* scrollbar,
+ WebScrollbarThemePainter painter,
+ WebScrollbarThemeGeometry* geometry) {
+ return new WebScrollbarLayerImpl(scrollbar, painter, geometry);
+}
+
+WebScrollbarLayer* WebCompositorSupportImpl::createSolidColorScrollbarLayer(
+ WebScrollbar::Orientation orientation,
+ int thumb_thickness,
+ int track_start,
+ bool is_left_side_vertical_scrollbar) {
+ return new WebScrollbarLayerImpl(orientation,
+ thumb_thickness,
+ track_start,
+ is_left_side_vertical_scrollbar);
+}
+
+WebAnimation* WebCompositorSupportImpl::createAnimation(
+ const blink::WebAnimationCurve& curve,
+ blink::WebAnimation::TargetProperty target,
+ int animation_id) {
+ return new WebAnimationImpl(curve, target, animation_id, 0);
+}
+
+WebFilterAnimationCurve*
+WebCompositorSupportImpl::createFilterAnimationCurve() {
+ return new WebFilterAnimationCurveImpl();
+}
+
+WebFloatAnimationCurve* WebCompositorSupportImpl::createFloatAnimationCurve() {
+ return new WebFloatAnimationCurveImpl();
+}
+
+#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
+WebScrollOffsetAnimationCurve*
+WebCompositorSupportImpl::createScrollOffsetAnimationCurve(
+ blink::WebFloatPoint target_value,
+ blink::WebAnimationCurve::TimingFunctionType timing_function) {
+ return new WebScrollOffsetAnimationCurveImpl(target_value, timing_function);
+}
+#endif
+
+WebTransformAnimationCurve*
+WebCompositorSupportImpl::createTransformAnimationCurve() {
+ return new WebTransformAnimationCurveImpl();
+}
+
+WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() {
+ return new WebTransformOperationsImpl();
+}
+
+WebFilterOperations* WebCompositorSupportImpl::createFilterOperations() {
+ return new WebFilterOperationsImpl();
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_compositor_support_impl.h b/content/renderer/compositor_bindings/web_compositor_support_impl.h
new file mode 100644
index 0000000..c7d5385
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_compositor_support_impl.h
@@ -0,0 +1,68 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_IMPL_H_
+
+#include "base/memory/ref_counted.h"
+#include "base/message_loop/message_loop_proxy.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebAnimationCurve.h"
+#include "third_party/WebKit/public/platform/WebCompositorSupport.h"
+#include "third_party/WebKit/public/platform/WebLayer.h"
+#include "third_party/WebKit/public/platform/WebTransformOperations.h"
+
+namespace blink {
+class WebGraphicsContext3D;
+}
+
+namespace content {
+
+class CONTENT_EXPORT WebCompositorSupportImpl
+ : public NON_EXPORTED_BASE(blink::WebCompositorSupport) {
+ public:
+ WebCompositorSupportImpl();
+ virtual ~WebCompositorSupportImpl();
+
+ virtual blink::WebLayer* createLayer();
+ virtual blink::WebContentLayer* createContentLayer(
+ blink::WebContentLayerClient* client);
+ virtual blink::WebExternalTextureLayer* createExternalTextureLayer(
+ blink::WebExternalTextureLayerClient* client);
+ virtual blink::WebImageLayer* createImageLayer();
+ virtual blink::WebNinePatchLayer* createNinePatchLayer();
+ virtual blink::WebSolidColorLayer* createSolidColorLayer();
+ virtual blink::WebScrollbarLayer* createScrollbarLayer(
+ blink::WebScrollbar* scrollbar,
+ blink::WebScrollbarThemePainter painter,
+ blink::WebScrollbarThemeGeometry*);
+ virtual blink::WebScrollbarLayer* createSolidColorScrollbarLayer(
+ blink::WebScrollbar::Orientation orientation,
+ int thumb_thickness,
+ int track_start,
+ bool is_left_side_vertical_scrollbar);
+ virtual blink::WebAnimation* createAnimation(
+ const blink::WebAnimationCurve& curve,
+ blink::WebAnimation::TargetProperty target,
+ int animation_id);
+ virtual blink::WebFilterAnimationCurve* createFilterAnimationCurve();
+ virtual blink::WebFloatAnimationCurve* createFloatAnimationCurve();
+#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
+ virtual blink::WebScrollOffsetAnimationCurve*
+ createScrollOffsetAnimationCurve(
+ blink::WebFloatPoint target_value,
+ blink::WebAnimationCurve::TimingFunctionType timing_function);
+#endif
+ virtual blink::WebTransformAnimationCurve* createTransformAnimationCurve();
+ virtual blink::WebTransformOperations* createTransformOperations();
+ virtual blink::WebFilterOperations* createFilterOperations();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WebCompositorSupportImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_IMPL_H_
+
diff --git a/content/renderer/compositor_bindings/web_content_layer_impl.cc b/content/renderer/compositor_bindings/web_content_layer_impl.cc
new file mode 100644
index 0000000..1a1eb43
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_content_layer_impl.cc
@@ -0,0 +1,90 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_content_layer_impl.h"
+
+#include "cc/layers/content_layer.h"
+#include "cc/layers/picture_layer.h"
+#include "third_party/WebKit/public/platform/WebContentLayerClient.h"
+#include "third_party/WebKit/public/platform/WebFloatPoint.h"
+#include "third_party/WebKit/public/platform/WebFloatRect.h"
+#include "third_party/WebKit/public/platform/WebRect.h"
+#include "third_party/WebKit/public/platform/WebSize.h"
+#include "third_party/skia/include/utils/SkMatrix44.h"
+
+using cc::ContentLayer;
+using cc::PictureLayer;
+
+namespace content {
+
+WebContentLayerImpl::WebContentLayerImpl(blink::WebContentLayerClient* client)
+ : client_(client), ignore_lcd_text_change_(false) {
+ if (WebLayerImpl::UsingPictureLayer())
+ layer_ = make_scoped_ptr(new WebLayerImpl(PictureLayer::Create(this)));
+ else
+ layer_ = make_scoped_ptr(new WebLayerImpl(ContentLayer::Create(this)));
+ layer_->layer()->SetIsDrawable(true);
+ can_use_lcd_text_ = layer_->layer()->can_use_lcd_text();
+}
+
+WebContentLayerImpl::~WebContentLayerImpl() {
+ if (WebLayerImpl::UsingPictureLayer())
+ static_cast<PictureLayer*>(layer_->layer())->ClearClient();
+ else
+ static_cast<ContentLayer*>(layer_->layer())->ClearClient();
+}
+
+blink::WebLayer* WebContentLayerImpl::layer() {
+ return layer_.get();
+}
+
+void WebContentLayerImpl::setDoubleSided(bool double_sided) {
+ layer_->layer()->SetDoubleSided(double_sided);
+}
+
+void WebContentLayerImpl::setDrawCheckerboardForMissingTiles(bool enable) {
+ layer_->layer()->SetDrawCheckerboardForMissingTiles(enable);
+}
+
+void WebContentLayerImpl::PaintContents(
+ SkCanvas* canvas,
+ const gfx::Rect& clip,
+ gfx::RectF* opaque,
+ ContentLayerClient::GraphicsContextStatus graphics_context_status) {
+ if (!client_)
+ return;
+
+ blink::WebFloatRect web_opaque;
+ client_->paintContents(
+ canvas,
+ clip,
+ can_use_lcd_text_,
+ web_opaque,
+ graphics_context_status == ContentLayerClient::GRAPHICS_CONTEXT_ENABLED
+ ? blink::WebContentLayerClient::GraphicsContextEnabled
+ : blink::WebContentLayerClient::GraphicsContextDisabled);
+ *opaque = web_opaque;
+}
+
+void WebContentLayerImpl::DidChangeLayerCanUseLCDText() {
+ // It is important to make this comparison because the LCD text status
+ // here can get out of sync with that in the layer.
+ if (can_use_lcd_text_ == layer_->layer()->can_use_lcd_text())
+ return;
+
+ // LCD text cannot be enabled once disabled.
+ if (layer_->layer()->can_use_lcd_text() && ignore_lcd_text_change_)
+ return;
+
+ can_use_lcd_text_ = layer_->layer()->can_use_lcd_text();
+ ignore_lcd_text_change_ = true;
+ layer_->invalidate();
+}
+
+bool WebContentLayerImpl::FillsBoundsCompletely() const {
+ return false;
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_content_layer_impl.h b/content/renderer/compositor_bindings/web_content_layer_impl.h
new file mode 100644
index 0000000..435acfd
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_content_layer_impl.h
@@ -0,0 +1,62 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "cc/layers/content_layer_client.h"
+#include "content/common/content_export.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
+#include "third_party/WebKit/public/platform/WebContentLayer.h"
+
+namespace cc {
+class IntRect;
+class FloatRect;
+}
+
+namespace blink {
+class WebContentLayerClient;
+}
+
+namespace content {
+
+class WebContentLayerImpl : public blink::WebContentLayer,
+ public cc::ContentLayerClient {
+ public:
+ CONTENT_EXPORT explicit WebContentLayerImpl(
+ blink::WebContentLayerClient*);
+
+ // WebContentLayer implementation.
+ virtual blink::WebLayer* layer();
+ virtual void setDoubleSided(bool double_sided);
+ virtual void setDrawCheckerboardForMissingTiles(bool checkerboard);
+
+ protected:
+ virtual ~WebContentLayerImpl();
+
+ // ContentLayerClient implementation.
+ virtual void PaintContents(SkCanvas* canvas,
+ const gfx::Rect& clip,
+ gfx::RectF* opaque,
+ ContentLayerClient::GraphicsContextStatus
+ graphics_context_status) OVERRIDE;
+ virtual void DidChangeLayerCanUseLCDText() OVERRIDE;
+ virtual bool FillsBoundsCompletely() const OVERRIDE;
+
+ scoped_ptr<WebLayerImpl> layer_;
+ blink::WebContentLayerClient* client_;
+ bool draws_content_;
+
+ private:
+ bool can_use_lcd_text_;
+ bool ignore_lcd_text_change_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebContentLayerImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_
+
diff --git a/content/renderer/compositor_bindings/web_external_bitmap_impl.cc b/content/renderer/compositor_bindings/web_external_bitmap_impl.cc
new file mode 100644
index 0000000..bf3d853
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_external_bitmap_impl.cc
@@ -0,0 +1,47 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_external_bitmap_impl.h"
+
+#include "base/memory/shared_memory.h"
+
+namespace content {
+
+namespace {
+
+SharedMemoryAllocationFunction g_memory_allocator;
+
+} // namespace
+
+void SetSharedMemoryAllocationFunction(
+ SharedMemoryAllocationFunction allocator) {
+ g_memory_allocator = allocator;
+}
+
+WebExternalBitmapImpl::WebExternalBitmapImpl() {
+}
+
+WebExternalBitmapImpl::~WebExternalBitmapImpl() {
+}
+
+void WebExternalBitmapImpl::setSize(blink::WebSize size) {
+ if (size != size_) {
+ size_t byte_size = size.width * size.height * 4;
+ shared_memory_ = g_memory_allocator(byte_size);
+ if (shared_memory_)
+ shared_memory_->Map(byte_size);
+ size_ = size;
+ }
+}
+
+blink::WebSize WebExternalBitmapImpl::size() {
+ return size_;
+}
+
+uint8* WebExternalBitmapImpl::pixels() {
+ return static_cast<uint8*>(shared_memory_->memory());
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_external_bitmap_impl.h b/content/renderer/compositor_bindings/web_external_bitmap_impl.h
new file mode 100644
index 0000000..4d7769e
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_external_bitmap_impl.h
@@ -0,0 +1,47 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_BITMAP_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_BITMAP_IMPL_H_
+
+#include "base/bind.h"
+#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebExternalBitmap.h"
+
+namespace base {
+class SharedMemory;
+}
+
+namespace content {
+
+typedef scoped_ptr<base::SharedMemory>(*SharedMemoryAllocationFunction)(size_t);
+
+// Sets the function that this will use to allocate shared memory.
+CONTENT_EXPORT void SetSharedMemoryAllocationFunction(
+ SharedMemoryAllocationFunction);
+
+class WebExternalBitmapImpl : public blink::WebExternalBitmap {
+ public:
+ CONTENT_EXPORT explicit WebExternalBitmapImpl();
+ virtual ~WebExternalBitmapImpl();
+
+ // blink::WebExternalBitmap implementation.
+ virtual blink::WebSize size() OVERRIDE;
+ virtual void setSize(blink::WebSize size) OVERRIDE;
+ virtual uint8* pixels() OVERRIDE;
+
+ base::SharedMemory* shared_memory() { return shared_memory_.get(); }
+
+ private:
+ scoped_ptr<base::SharedMemory> shared_memory_;
+ blink::WebSize size_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebExternalBitmapImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_BITMAP_IMPL_H_
+
diff --git a/content/renderer/compositor_bindings/web_external_texture_layer_impl.cc b/content/renderer/compositor_bindings/web_external_texture_layer_impl.cc
new file mode 100644
index 0000000..9709d59
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_external_texture_layer_impl.cc
@@ -0,0 +1,130 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_external_texture_layer_impl.h"
+
+#include "cc/layers/texture_layer.h"
+#include "cc/resources/resource_update_queue.h"
+#include "cc/resources/single_release_callback.h"
+#include "cc/resources/texture_mailbox.h"
+#include "content/renderer/compositor_bindings/web_external_bitmap_impl.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
+#include "third_party/WebKit/public/platform/WebExternalTextureLayerClient.h"
+#include "third_party/WebKit/public/platform/WebExternalTextureMailbox.h"
+#include "third_party/WebKit/public/platform/WebFloatRect.h"
+#include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
+#include "third_party/WebKit/public/platform/WebSize.h"
+#include "third_party/khronos/GLES2/gl2.h"
+
+using cc::TextureLayer;
+using cc::ResourceUpdateQueue;
+
+namespace content {
+
+WebExternalTextureLayerImpl::WebExternalTextureLayerImpl(
+ blink::WebExternalTextureLayerClient* client)
+ : client_(client) {
+ cc::TextureLayerClient* cc_client = client_ ? this : NULL;
+ scoped_refptr<TextureLayer> layer = TextureLayer::CreateForMailbox(cc_client);
+ layer->SetIsDrawable(true);
+ layer_.reset(new WebLayerImpl(layer));
+}
+
+WebExternalTextureLayerImpl::~WebExternalTextureLayerImpl() {
+ static_cast<TextureLayer*>(layer_->layer())->ClearClient();
+}
+
+blink::WebLayer* WebExternalTextureLayerImpl::layer() {
+ return layer_.get();
+}
+
+void WebExternalTextureLayerImpl::clearTexture() {
+ TextureLayer* layer = static_cast<TextureLayer*>(layer_->layer());
+ layer->ClearTexture();
+}
+
+void WebExternalTextureLayerImpl::setOpaque(bool opaque) {
+ static_cast<TextureLayer*>(layer_->layer())->SetContentsOpaque(opaque);
+}
+
+void WebExternalTextureLayerImpl::setPremultipliedAlpha(
+ bool premultiplied_alpha) {
+ static_cast<TextureLayer*>(layer_->layer())->SetPremultipliedAlpha(
+ premultiplied_alpha);
+}
+
+void WebExternalTextureLayerImpl::setBlendBackgroundColor(bool blend) {
+ static_cast<TextureLayer*>(layer_->layer())->SetBlendBackgroundColor(blend);
+}
+
+void WebExternalTextureLayerImpl::setRateLimitContext(bool rate_limit) {
+ static_cast<TextureLayer*>(layer_->layer())->SetRateLimitContext(rate_limit);
+}
+
+bool WebExternalTextureLayerImpl::PrepareTextureMailbox(
+ cc::TextureMailbox* mailbox,
+ scoped_ptr<cc::SingleReleaseCallback>* release_callback,
+ bool use_shared_memory) {
+ blink::WebExternalTextureMailbox client_mailbox;
+ WebExternalBitmapImpl* bitmap = NULL;
+
+ if (use_shared_memory)
+ bitmap = AllocateBitmap();
+ if (!client_->prepareMailbox(&client_mailbox, bitmap)) {
+ if (bitmap)
+ free_bitmaps_.push_back(bitmap);
+ return false;
+ }
+ gpu::Mailbox name;
+ name.SetName(client_mailbox.name);
+ if (bitmap) {
+ *mailbox = cc::TextureMailbox(bitmap->shared_memory(), bitmap->size());
+ } else {
+ *mailbox =
+ cc::TextureMailbox(name, GL_TEXTURE_2D, client_mailbox.syncPoint);
+ }
+ mailbox->set_allow_overlay(client_mailbox.allowOverlay);
+
+ if (mailbox->IsValid()) {
+ *release_callback = cc::SingleReleaseCallback::Create(
+ base::Bind(&WebExternalTextureLayerImpl::DidReleaseMailbox,
+ this->AsWeakPtr(),
+ client_mailbox,
+ bitmap));
+ }
+
+ return true;
+}
+
+WebExternalBitmapImpl* WebExternalTextureLayerImpl::AllocateBitmap() {
+ if (!free_bitmaps_.empty()) {
+ WebExternalBitmapImpl* result = free_bitmaps_.back();
+ free_bitmaps_.weak_erase(free_bitmaps_.end() - 1);
+ return result;
+ }
+ return new WebExternalBitmapImpl;
+}
+
+// static
+void WebExternalTextureLayerImpl::DidReleaseMailbox(
+ base::WeakPtr<WebExternalTextureLayerImpl> layer,
+ const blink::WebExternalTextureMailbox& mailbox,
+ WebExternalBitmapImpl* bitmap,
+ unsigned sync_point,
+ bool lost_resource) {
+ if (lost_resource || !layer) {
+ delete bitmap;
+ return;
+ }
+
+ blink::WebExternalTextureMailbox available_mailbox;
+ memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name));
+ available_mailbox.syncPoint = sync_point;
+ if (bitmap)
+ layer->free_bitmaps_.push_back(bitmap);
+ layer->client_->mailboxReleased(available_mailbox);
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_external_texture_layer_impl.h b/content/renderer/compositor_bindings/web_external_texture_layer_impl.h
new file mode 100644
index 0000000..bc46b93
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_external_texture_layer_impl.h
@@ -0,0 +1,73 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_
+
+#include "base/bind.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
+#include "cc/layers/texture_layer_client.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebExternalTextureLayer.h"
+
+namespace cc {
+class SingleReleaseCallback;
+class TextureMailbox;
+}
+
+namespace blink {
+struct WebFloatRect;
+struct WebExternalTextureMailbox;
+}
+
+namespace content {
+
+class WebLayerImpl;
+class WebExternalBitmapImpl;
+
+class WebExternalTextureLayerImpl
+ : public blink::WebExternalTextureLayer,
+ public cc::TextureLayerClient,
+ public base::SupportsWeakPtr<WebExternalTextureLayerImpl> {
+ public:
+ CONTENT_EXPORT explicit WebExternalTextureLayerImpl(
+ blink::WebExternalTextureLayerClient*);
+ virtual ~WebExternalTextureLayerImpl();
+
+ // blink::WebExternalTextureLayer implementation.
+ virtual blink::WebLayer* layer();
+ virtual void clearTexture();
+ virtual void setOpaque(bool opaque);
+ virtual void setPremultipliedAlpha(bool premultiplied);
+ virtual void setBlendBackgroundColor(bool blend);
+ virtual void setRateLimitContext(bool rate_limit);
+
+ // TextureLayerClient implementation.
+ virtual bool PrepareTextureMailbox(
+ cc::TextureMailbox* mailbox,
+ scoped_ptr<cc::SingleReleaseCallback>* release_callback,
+ bool use_shared_memory) OVERRIDE;
+
+ private:
+ static void DidReleaseMailbox(
+ base::WeakPtr<WebExternalTextureLayerImpl> layer,
+ const blink::WebExternalTextureMailbox& mailbox,
+ WebExternalBitmapImpl* bitmap,
+ unsigned sync_point,
+ bool lost_resource);
+
+ WebExternalBitmapImpl* AllocateBitmap();
+
+ blink::WebExternalTextureLayerClient* client_;
+ scoped_ptr<WebLayerImpl> layer_;
+ ScopedVector<WebExternalBitmapImpl> free_bitmaps_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebExternalTextureLayerImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_
+
diff --git a/content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc b/content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc
new file mode 100644
index 0000000..944726e
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc
@@ -0,0 +1,59 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_filter_animation_curve_impl.h"
+
+#include "cc/animation/keyframed_animation_curve.h"
+#include "cc/animation/timing_function.h"
+#include "cc/output/filter_operations.h"
+#include "content/renderer/compositor_bindings/web_animation_curve_common.h"
+#include "content/renderer/compositor_bindings/web_filter_operations_impl.h"
+
+using blink::WebFilterKeyframe;
+
+namespace content {
+
+WebFilterAnimationCurveImpl::WebFilterAnimationCurveImpl()
+ : curve_(cc::KeyframedFilterAnimationCurve::Create()) {
+}
+
+WebFilterAnimationCurveImpl::~WebFilterAnimationCurveImpl() {
+}
+
+blink::WebAnimationCurve::AnimationCurveType WebFilterAnimationCurveImpl::type()
+ const {
+ return WebAnimationCurve::AnimationCurveTypeFilter;
+}
+
+void WebFilterAnimationCurveImpl::add(const WebFilterKeyframe& keyframe,
+ TimingFunctionType type) {
+ const cc::FilterOperations& filter_operations =
+ static_cast<const WebFilterOperationsImpl&>(keyframe.value())
+ .AsFilterOperations();
+ curve_->AddKeyframe(cc::FilterKeyframe::Create(
+ keyframe.time(), filter_operations, CreateTimingFunction(type)));
+}
+
+void WebFilterAnimationCurveImpl::add(const WebFilterKeyframe& keyframe,
+ double x1,
+ double y1,
+ double x2,
+ double y2) {
+ const cc::FilterOperations& filter_operations =
+ static_cast<const WebFilterOperationsImpl&>(keyframe.value())
+ .AsFilterOperations();
+ curve_->AddKeyframe(cc::FilterKeyframe::Create(
+ keyframe.time(),
+ filter_operations,
+ cc::CubicBezierTimingFunction::Create(x1, y1, x2, y2)
+ .PassAs<cc::TimingFunction>()));
+}
+
+scoped_ptr<cc::AnimationCurve>
+WebFilterAnimationCurveImpl::CloneToAnimationCurve() const {
+ return curve_->Clone();
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_filter_animation_curve_impl.h b/content/renderer/compositor_bindings/web_filter_animation_curve_impl.h
new file mode 100644
index 0000000..82e8295
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_filter_animation_curve_impl.h
@@ -0,0 +1,51 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_ANIMATION_CURVE_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_ANIMATION_CURVE_IMPL_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebFilterAnimationCurve.h"
+
+namespace cc {
+class AnimationCurve;
+class KeyframedFilterAnimationCurve;
+}
+
+namespace blink {
+class WebFilterKeyframe;
+}
+
+namespace content {
+
+class WebFilterAnimationCurveImpl : public blink::WebFilterAnimationCurve {
+ public:
+ CONTENT_EXPORT WebFilterAnimationCurveImpl();
+ virtual ~WebFilterAnimationCurveImpl();
+
+ // blink::WebAnimationCurve implementation.
+ virtual AnimationCurveType type() const;
+
+ // blink::WebFilterAnimationCurve implementation.
+ virtual void add(const blink::WebFilterKeyframe& keyframe,
+ TimingFunctionType type);
+ virtual void add(const blink::WebFilterKeyframe& keyframe,
+ double x1,
+ double y1,
+ double x2,
+ double y2);
+
+ scoped_ptr<cc::AnimationCurve> CloneToAnimationCurve() const;
+
+ private:
+ scoped_ptr<cc::KeyframedFilterAnimationCurve> curve_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebFilterAnimationCurveImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_ANIMATION_CURVE_IMPL_H_
+
diff --git a/content/renderer/compositor_bindings/web_filter_operations_impl.cc b/content/renderer/compositor_bindings/web_filter_operations_impl.cc
new file mode 100644
index 0000000..2a11ea8
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_filter_operations_impl.cc
@@ -0,0 +1,96 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_filter_operations_impl.h"
+
+#include "base/basictypes.h"
+#include "skia/ext/refptr.h"
+#include "third_party/WebKit/public/platform/WebColor.h"
+#include "third_party/WebKit/public/platform/WebPoint.h"
+#include "third_party/skia/include/core/SkScalar.h"
+
+namespace content {
+
+WebFilterOperationsImpl::WebFilterOperationsImpl() {
+}
+
+WebFilterOperationsImpl::~WebFilterOperationsImpl() {
+}
+
+const cc::FilterOperations& WebFilterOperationsImpl::AsFilterOperations()
+ const {
+ return filter_operations_;
+}
+
+void WebFilterOperationsImpl::appendGrayscaleFilter(float amount) {
+ filter_operations_.Append(cc::FilterOperation::CreateGrayscaleFilter(amount));
+}
+
+void WebFilterOperationsImpl::appendSepiaFilter(float amount) {
+ filter_operations_.Append(cc::FilterOperation::CreateSepiaFilter(amount));
+}
+
+void WebFilterOperationsImpl::appendSaturateFilter(float amount) {
+ filter_operations_.Append(cc::FilterOperation::CreateSaturateFilter(amount));
+}
+
+void WebFilterOperationsImpl::appendHueRotateFilter(float amount) {
+ filter_operations_.Append(cc::FilterOperation::CreateHueRotateFilter(amount));
+}
+
+void WebFilterOperationsImpl::appendInvertFilter(float amount) {
+ filter_operations_.Append(cc::FilterOperation::CreateInvertFilter(amount));
+}
+
+void WebFilterOperationsImpl::appendBrightnessFilter(float amount) {
+ filter_operations_.Append(
+ cc::FilterOperation::CreateBrightnessFilter(amount));
+}
+
+void WebFilterOperationsImpl::appendContrastFilter(float amount) {
+ filter_operations_.Append(cc::FilterOperation::CreateContrastFilter(amount));
+}
+
+void WebFilterOperationsImpl::appendOpacityFilter(float amount) {
+ filter_operations_.Append(cc::FilterOperation::CreateOpacityFilter(amount));
+}
+
+void WebFilterOperationsImpl::appendBlurFilter(float amount) {
+ filter_operations_.Append(cc::FilterOperation::CreateBlurFilter(amount));
+}
+
+void WebFilterOperationsImpl::appendDropShadowFilter(blink::WebPoint offset,
+ float std_deviation,
+ blink::WebColor color) {
+ filter_operations_.Append(cc::FilterOperation::CreateDropShadowFilter(
+ offset, std_deviation, color));
+}
+
+void WebFilterOperationsImpl::appendColorMatrixFilter(SkScalar matrix[20]) {
+ filter_operations_.Append(
+ cc::FilterOperation::CreateColorMatrixFilter(matrix));
+}
+
+void WebFilterOperationsImpl::appendZoomFilter(float amount, int inset) {
+ filter_operations_.Append(
+ cc::FilterOperation::CreateZoomFilter(amount, inset));
+}
+
+void WebFilterOperationsImpl::appendSaturatingBrightnessFilter(float amount) {
+ filter_operations_.Append(
+ cc::FilterOperation::CreateSaturatingBrightnessFilter(amount));
+}
+
+void WebFilterOperationsImpl::appendReferenceFilter(
+ SkImageFilter* image_filter) {
+ filter_operations_.Append(
+ cc::FilterOperation::CreateReferenceFilter(skia::SharePtr(image_filter)));
+}
+
+void WebFilterOperationsImpl::clear() {
+ filter_operations_.Clear();
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_filter_operations_impl.h b/content/renderer/compositor_bindings/web_filter_operations_impl.h
new file mode 100644
index 0000000..d3020e6
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_filter_operations_impl.h
@@ -0,0 +1,50 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_OPERATIONS_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_OPERATIONS_IMPL_H_
+
+#include "cc/output/filter_operations.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebFilterOperations.h"
+
+namespace content {
+
+class WebFilterOperationsImpl : public blink::WebFilterOperations {
+ public:
+ CONTENT_EXPORT WebFilterOperationsImpl();
+ virtual ~WebFilterOperationsImpl();
+
+ const cc::FilterOperations& AsFilterOperations() const;
+
+ // Implementation of blink::WebFilterOperations methods
+ virtual void appendGrayscaleFilter(float amount);
+ virtual void appendSepiaFilter(float amount);
+ virtual void appendSaturateFilter(float amount);
+ virtual void appendHueRotateFilter(float amount);
+ virtual void appendInvertFilter(float amount);
+ virtual void appendBrightnessFilter(float amount);
+ virtual void appendContrastFilter(float amount);
+ virtual void appendOpacityFilter(float amount);
+ virtual void appendBlurFilter(float amount);
+ virtual void appendDropShadowFilter(blink::WebPoint offset,
+ float std_deviation,
+ blink::WebColor color);
+ virtual void appendColorMatrixFilter(SkScalar matrix[20]);
+ virtual void appendZoomFilter(float amount, int inset);
+ virtual void appendSaturatingBrightnessFilter(float amount);
+ virtual void appendReferenceFilter(SkImageFilter* image_filter);
+
+ virtual void clear();
+
+ private:
+ cc::FilterOperations filter_operations_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebFilterOperationsImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_OPERATIONS_IMPL_H_
+
diff --git a/content/renderer/compositor_bindings/web_float_animation_curve_impl.cc b/content/renderer/compositor_bindings/web_float_animation_curve_impl.cc
new file mode 100644
index 0000000..caa1f9b
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_float_animation_curve_impl.cc
@@ -0,0 +1,60 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_float_animation_curve_impl.h"
+
+#include "cc/animation/animation_curve.h"
+#include "cc/animation/keyframed_animation_curve.h"
+#include "cc/animation/timing_function.h"
+#include "content/renderer/compositor_bindings/web_animation_curve_common.h"
+
+using blink::WebFloatKeyframe;
+
+namespace content {
+
+WebFloatAnimationCurveImpl::WebFloatAnimationCurveImpl()
+ : curve_(cc::KeyframedFloatAnimationCurve::Create()) {
+}
+
+WebFloatAnimationCurveImpl::~WebFloatAnimationCurveImpl() {
+}
+
+blink::WebAnimationCurve::AnimationCurveType
+ WebFloatAnimationCurveImpl::type() const {
+ return blink::WebAnimationCurve::AnimationCurveTypeFloat;
+}
+
+void WebFloatAnimationCurveImpl::add(const WebFloatKeyframe& keyframe) {
+ add(keyframe, TimingFunctionTypeEase);
+}
+
+void WebFloatAnimationCurveImpl::add(const WebFloatKeyframe& keyframe,
+ TimingFunctionType type) {
+ curve_->AddKeyframe(cc::FloatKeyframe::Create(
+ keyframe.time, keyframe.value, CreateTimingFunction(type)));
+}
+
+void WebFloatAnimationCurveImpl::add(const WebFloatKeyframe& keyframe,
+ double x1,
+ double y1,
+ double x2,
+ double y2) {
+ curve_->AddKeyframe(cc::FloatKeyframe::Create(
+ keyframe.time,
+ keyframe.value,
+ cc::CubicBezierTimingFunction::Create(x1, y1, x2, y2)
+ .PassAs<cc::TimingFunction>()));
+}
+
+float WebFloatAnimationCurveImpl::getValue(double time) const {
+ return curve_->GetValue(time);
+}
+
+scoped_ptr<cc::AnimationCurve>
+WebFloatAnimationCurveImpl::CloneToAnimationCurve() const {
+ return curve_->Clone();
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_float_animation_curve_impl.h b/content/renderer/compositor_bindings/web_float_animation_curve_impl.h
new file mode 100644
index 0000000..4c67b41
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_float_animation_curve_impl.h
@@ -0,0 +1,54 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebFloatAnimationCurve.h"
+
+namespace cc {
+class AnimationCurve;
+class KeyframedFloatAnimationCurve;
+}
+
+namespace blink {
+struct WebFloatKeyframe;
+}
+
+namespace content {
+
+class WebFloatAnimationCurveImpl : public blink::WebFloatAnimationCurve {
+ public:
+ CONTENT_EXPORT WebFloatAnimationCurveImpl();
+ virtual ~WebFloatAnimationCurveImpl();
+
+ // WebAnimationCurve implementation.
+ virtual AnimationCurveType type() const;
+
+ // WebFloatAnimationCurve implementation.
+ virtual void add(const blink::WebFloatKeyframe& keyframe);
+ virtual void add(const blink::WebFloatKeyframe& keyframe,
+ TimingFunctionType type);
+ virtual void add(const blink::WebFloatKeyframe& keyframe,
+ double x1,
+ double y1,
+ double x2,
+ double y2);
+
+ virtual float getValue(double time) const;
+
+ scoped_ptr<cc::AnimationCurve> CloneToAnimationCurve() const;
+
+ private:
+ scoped_ptr<cc::KeyframedFloatAnimationCurve> curve_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebFloatAnimationCurveImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_
+
diff --git a/content/renderer/compositor_bindings/web_float_animation_curve_unittest.cc b/content/renderer/compositor_bindings/web_float_animation_curve_unittest.cc
new file mode 100644
index 0000000..bc7c410
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_float_animation_curve_unittest.cc
@@ -0,0 +1,234 @@
+// Copyright 2014 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 "base/memory/scoped_ptr.h"
+#include "cc/animation/timing_function.h"
+#include "content/renderer/compositor_bindings/web_float_animation_curve_impl.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+using blink::WebAnimationCurve;
+using blink::WebFloatAnimationCurve;
+using blink::WebFloatKeyframe;
+
+namespace content {
+namespace {
+
+// Tests that a float animation with one keyframe works as expected.
+TEST(WebFloatAnimationCurveTest, OneFloatKeyframe) {
+ scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurveImpl);
+ curve->add(WebFloatKeyframe(0, 2),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+ EXPECT_FLOAT_EQ(2, curve->getValue(-1));
+ EXPECT_FLOAT_EQ(2, curve->getValue(0));
+ EXPECT_FLOAT_EQ(2, curve->getValue(0.5));
+ EXPECT_FLOAT_EQ(2, curve->getValue(1));
+ EXPECT_FLOAT_EQ(2, curve->getValue(2));
+}
+
+// Tests that a float animation with two keyframes works as expected.
+TEST(WebFloatAnimationCurveTest, TwoFloatKeyframe) {
+ scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurveImpl);
+ curve->add(WebFloatKeyframe(0, 2),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+ curve->add(WebFloatKeyframe(1, 4),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+ EXPECT_FLOAT_EQ(2, curve->getValue(-1));
+ EXPECT_FLOAT_EQ(2, curve->getValue(0));
+ EXPECT_FLOAT_EQ(3, curve->getValue(0.5));
+ EXPECT_FLOAT_EQ(4, curve->getValue(1));
+ EXPECT_FLOAT_EQ(4, curve->getValue(2));
+}
+
+// Tests that a float animation with three keyframes works as expected.
+TEST(WebFloatAnimationCurveTest, ThreeFloatKeyframe) {
+ scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurveImpl);
+ curve->add(WebFloatKeyframe(0, 2),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+ curve->add(WebFloatKeyframe(1, 4),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+ curve->add(WebFloatKeyframe(2, 8),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+ EXPECT_FLOAT_EQ(2, curve->getValue(-1));
+ EXPECT_FLOAT_EQ(2, curve->getValue(0));
+ EXPECT_FLOAT_EQ(3, curve->getValue(0.5));
+ EXPECT_FLOAT_EQ(4, curve->getValue(1));
+ EXPECT_FLOAT_EQ(6, curve->getValue(1.5));
+ EXPECT_FLOAT_EQ(8, curve->getValue(2));
+ EXPECT_FLOAT_EQ(8, curve->getValue(3));
+}
+
+// Tests that a float animation with multiple keys at a given time works sanely.
+TEST(WebFloatAnimationCurveTest, RepeatedFloatKeyTimes) {
+ scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurveImpl);
+ curve->add(WebFloatKeyframe(0, 4),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+ curve->add(WebFloatKeyframe(1, 4),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+ curve->add(WebFloatKeyframe(1, 6),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+ curve->add(WebFloatKeyframe(2, 6),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+
+ EXPECT_FLOAT_EQ(4, curve->getValue(-1));
+ EXPECT_FLOAT_EQ(4, curve->getValue(0));
+ EXPECT_FLOAT_EQ(4, curve->getValue(0.5));
+
+ // There is a discontinuity at 1. Any value between 4 and 6 is valid.
+ float value = curve->getValue(1);
+ EXPECT_TRUE(value >= 4 && value <= 6);
+
+ EXPECT_FLOAT_EQ(6, curve->getValue(1.5));
+ EXPECT_FLOAT_EQ(6, curve->getValue(2));
+ EXPECT_FLOAT_EQ(6, curve->getValue(3));
+}
+
+// Tests that the keyframes may be added out of order.
+TEST(WebFloatAnimationCurveTest, UnsortedKeyframes) {
+ scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurveImpl);
+ curve->add(WebFloatKeyframe(2, 8),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+ curve->add(WebFloatKeyframe(0, 2),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+ curve->add(WebFloatKeyframe(1, 4),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+
+ EXPECT_FLOAT_EQ(2, curve->getValue(-1));
+ EXPECT_FLOAT_EQ(2, curve->getValue(0));
+ EXPECT_FLOAT_EQ(3, curve->getValue(0.5));
+ EXPECT_FLOAT_EQ(4, curve->getValue(1));
+ EXPECT_FLOAT_EQ(6, curve->getValue(1.5));
+ EXPECT_FLOAT_EQ(8, curve->getValue(2));
+ EXPECT_FLOAT_EQ(8, curve->getValue(3));
+}
+
+// Tests that a cubic bezier timing function works as expected.
+TEST(WebFloatAnimationCurveTest, CubicBezierTimingFunction) {
+ scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurveImpl);
+ curve->add(WebFloatKeyframe(0, 0), 0.25, 0, 0.75, 1);
+ curve->add(WebFloatKeyframe(1, 1),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+
+ EXPECT_FLOAT_EQ(0, curve->getValue(0));
+ EXPECT_LT(0, curve->getValue(0.25));
+ EXPECT_GT(0.25, curve->getValue(0.25));
+ EXPECT_NEAR(curve->getValue(0.5), 0.5, 0.00015);
+ EXPECT_LT(0.75, curve->getValue(0.75));
+ EXPECT_GT(1, curve->getValue(0.75));
+ EXPECT_FLOAT_EQ(1, curve->getValue(1));
+}
+
+// Tests that an ease timing function works as expected.
+TEST(WebFloatAnimationCurveTest, EaseTimingFunction) {
+ scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurveImpl);
+ curve->add(WebFloatKeyframe(0, 0), WebAnimationCurve::TimingFunctionTypeEase);
+ curve->add(WebFloatKeyframe(1, 1),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+
+ scoped_ptr<cc::TimingFunction> timing_function(
+ cc::EaseTimingFunction::Create());
+ for (int i = 0; i <= 4; ++i) {
+ const double time = i * 0.25;
+ EXPECT_FLOAT_EQ(timing_function->GetValue(time), curve->getValue(time));
+ }
+}
+
+// Tests using a linear timing function.
+TEST(WebFloatAnimationCurveTest, LinearTimingFunction) {
+ scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurveImpl);
+ curve->add(WebFloatKeyframe(0, 0),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+ curve->add(WebFloatKeyframe(1, 1),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+
+ for (int i = 0; i <= 4; ++i) {
+ const double time = i * 0.25;
+ EXPECT_FLOAT_EQ(time, curve->getValue(time));
+ }
+}
+
+// Tests that an ease in timing function works as expected.
+TEST(WebFloatAnimationCurveTest, EaseInTimingFunction) {
+ scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurveImpl);
+ curve->add(WebFloatKeyframe(0, 0),
+ WebAnimationCurve::TimingFunctionTypeEaseIn);
+ curve->add(WebFloatKeyframe(1, 1),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+
+ scoped_ptr<cc::TimingFunction> timing_function(
+ cc::EaseInTimingFunction::Create());
+ for (int i = 0; i <= 4; ++i) {
+ const double time = i * 0.25;
+ EXPECT_FLOAT_EQ(timing_function->GetValue(time), curve->getValue(time));
+ }
+}
+
+// Tests that an ease in timing function works as expected.
+TEST(WebFloatAnimationCurveTest, EaseOutTimingFunction) {
+ scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurveImpl);
+ curve->add(WebFloatKeyframe(0, 0),
+ WebAnimationCurve::TimingFunctionTypeEaseOut);
+ curve->add(WebFloatKeyframe(1, 1),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+
+ scoped_ptr<cc::TimingFunction> timing_function(
+ cc::EaseOutTimingFunction::Create());
+ for (int i = 0; i <= 4; ++i) {
+ const double time = i * 0.25;
+ EXPECT_FLOAT_EQ(timing_function->GetValue(time), curve->getValue(time));
+ }
+}
+
+// Tests that an ease in timing function works as expected.
+TEST(WebFloatAnimationCurveTest, EaseInOutTimingFunction) {
+ scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurveImpl);
+ curve->add(WebFloatKeyframe(0, 0),
+ WebAnimationCurve::TimingFunctionTypeEaseInOut);
+ curve->add(WebFloatKeyframe(1, 1),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+
+ scoped_ptr<cc::TimingFunction> timing_function(
+ cc::EaseInOutTimingFunction::Create());
+ for (int i = 0; i <= 4; ++i) {
+ const double time = i * 0.25;
+ EXPECT_FLOAT_EQ(timing_function->GetValue(time), curve->getValue(time));
+ }
+}
+
+// Tests that an ease in timing function works as expected.
+TEST(WebFloatAnimationCurveTest, CustomBezierTimingFunction) {
+ scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurveImpl);
+ double x1 = 0.3;
+ double y1 = 0.2;
+ double x2 = 0.8;
+ double y2 = 0.7;
+ curve->add(WebFloatKeyframe(0, 0), x1, y1, x2, y2);
+ curve->add(WebFloatKeyframe(1, 1),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+
+ scoped_ptr<cc::TimingFunction> timing_function(
+ cc::CubicBezierTimingFunction::Create(x1, y1, x2, y2));
+ for (int i = 0; i <= 4; ++i) {
+ const double time = i * 0.25;
+ EXPECT_FLOAT_EQ(timing_function->GetValue(time), curve->getValue(time));
+ }
+}
+
+// Tests that the default timing function is indeed ease.
+TEST(WebFloatAnimationCurveTest, DefaultTimingFunction) {
+ scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurveImpl);
+ curve->add(WebFloatKeyframe(0, 0));
+ curve->add(WebFloatKeyframe(1, 1),
+ WebAnimationCurve::TimingFunctionTypeLinear);
+
+ scoped_ptr<cc::TimingFunction> timing_function(
+ cc::EaseTimingFunction::Create());
+ for (int i = 0; i <= 4; ++i) {
+ const double time = i * 0.25;
+ EXPECT_FLOAT_EQ(timing_function->GetValue(time), curve->getValue(time));
+ }
+}
+
+} // namespace
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_image_layer_impl.cc b/content/renderer/compositor_bindings/web_image_layer_impl.cc
new file mode 100644
index 0000000..ecbfbd0
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_image_layer_impl.cc
@@ -0,0 +1,39 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_image_layer_impl.h"
+
+#include "cc/layers/image_layer.h"
+#include "cc/layers/picture_image_layer.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
+#include "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h"
+
+namespace content {
+
+WebImageLayerImpl::WebImageLayerImpl() {
+ if (WebLayerImpl::UsingPictureLayer())
+ layer_.reset(new WebLayerImplFixedBounds(cc::PictureImageLayer::Create()));
+ else
+ layer_.reset(new WebLayerImpl(cc::ImageLayer::Create()));
+}
+
+WebImageLayerImpl::~WebImageLayerImpl() {
+}
+
+blink::WebLayer* WebImageLayerImpl::layer() {
+ return layer_.get();
+}
+
+void WebImageLayerImpl::setBitmap(SkBitmap bitmap) {
+ if (WebLayerImpl::UsingPictureLayer()) {
+ static_cast<cc::PictureImageLayer*>(layer_->layer())->SetBitmap(bitmap);
+ static_cast<WebLayerImplFixedBounds*>(layer_.get())->SetFixedBounds(
+ gfx::Size(bitmap.width(), bitmap.height()));
+ } else {
+ static_cast<cc::ImageLayer*>(layer_->layer())->SetBitmap(bitmap);
+ }
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_image_layer_impl.h b/content/renderer/compositor_bindings/web_image_layer_impl.h
new file mode 100644
index 0000000..359cfa5
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_image_layer_impl.h
@@ -0,0 +1,35 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_IMAGE_LAYER_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_IMAGE_LAYER_IMPL_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebImageLayer.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+
+namespace content {
+
+class WebLayerImpl;
+
+class WebImageLayerImpl : public blink::WebImageLayer {
+ public:
+ CONTENT_EXPORT WebImageLayerImpl();
+ virtual ~WebImageLayerImpl();
+
+ // blink::WebImageLayer implementation.
+ virtual blink::WebLayer* layer();
+ virtual void setBitmap(SkBitmap);
+
+ private:
+ scoped_ptr<WebLayerImpl> layer_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebImageLayerImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_IMAGE_LAYER_IMPL_H_
+
diff --git a/content/renderer/compositor_bindings/web_layer_impl.cc b/content/renderer/compositor_bindings/web_layer_impl.cc
new file mode 100644
index 0000000..a575412
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_layer_impl.cc
@@ -0,0 +1,489 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_layer_impl.h"
+
+#include "base/bind.h"
+#include "base/debug/trace_event_impl.h"
+#include "base/lazy_instance.h"
+#include "base/strings/string_util.h"
+#include "base/threading/thread_checker.h"
+#include "cc/animation/animation.h"
+#include "cc/base/region.h"
+#include "cc/base/switches.h"
+#include "cc/layers/layer.h"
+#include "cc/layers/layer_position_constraint.h"
+#include "cc/trees/layer_tree_host.h"
+#include "content/renderer/compositor_bindings/web_animation_impl.h"
+#include "content/renderer/compositor_bindings/web_blend_mode.h"
+#include "content/renderer/compositor_bindings/web_filter_operations_impl.h"
+#include "content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h"
+#include "third_party/WebKit/public/platform/WebFloatPoint.h"
+#include "third_party/WebKit/public/platform/WebFloatRect.h"
+#include "third_party/WebKit/public/platform/WebGraphicsLayerDebugInfo.h"
+#include "third_party/WebKit/public/platform/WebLayerClient.h"
+#include "third_party/WebKit/public/platform/WebLayerPositionConstraint.h"
+#include "third_party/WebKit/public/platform/WebLayerScrollClient.h"
+#include "third_party/WebKit/public/platform/WebSize.h"
+#include "third_party/skia/include/utils/SkMatrix44.h"
+
+using cc::Animation;
+using cc::Layer;
+using blink::WebLayer;
+using blink::WebFloatPoint;
+using blink::WebVector;
+using blink::WebRect;
+using blink::WebSize;
+using blink::WebColor;
+using blink::WebFilterOperations;
+
+namespace content {
+namespace {
+
+bool g_impl_side_painting_enabled = false;
+
+} // namespace
+
+WebLayerImpl::WebLayerImpl() : layer_(Layer::Create()) {
+ web_layer_client_ = NULL;
+ layer_->SetLayerClient(this);
+}
+
+WebLayerImpl::WebLayerImpl(scoped_refptr<Layer> layer) : layer_(layer) {
+ web_layer_client_ = NULL;
+ layer_->SetLayerClient(this);
+}
+
+WebLayerImpl::~WebLayerImpl() {
+ layer_->ClearRenderSurface();
+ layer_->set_layer_animation_delegate(NULL);
+ web_layer_client_ = NULL;
+}
+
+// static
+bool WebLayerImpl::UsingPictureLayer() {
+ return g_impl_side_painting_enabled;
+}
+
+// static
+void WebLayerImpl::SetImplSidePaintingEnabled(bool enabled) {
+ g_impl_side_painting_enabled = enabled;
+}
+
+int WebLayerImpl::id() const {
+ return layer_->id();
+}
+
+void WebLayerImpl::invalidateRect(const blink::WebFloatRect& rect) {
+ layer_->SetNeedsDisplayRect(rect);
+}
+
+void WebLayerImpl::invalidate() {
+ layer_->SetNeedsDisplay();
+}
+
+void WebLayerImpl::addChild(WebLayer* child) {
+ layer_->AddChild(static_cast<WebLayerImpl*>(child)->layer());
+}
+
+void WebLayerImpl::insertChild(WebLayer* child, size_t index) {
+ layer_->InsertChild(static_cast<WebLayerImpl*>(child)->layer(), index);
+}
+
+void WebLayerImpl::replaceChild(WebLayer* reference, WebLayer* new_layer) {
+ layer_->ReplaceChild(static_cast<WebLayerImpl*>(reference)->layer(),
+ static_cast<WebLayerImpl*>(new_layer)->layer());
+}
+
+void WebLayerImpl::removeFromParent() {
+ layer_->RemoveFromParent();
+}
+
+void WebLayerImpl::removeAllChildren() {
+ layer_->RemoveAllChildren();
+}
+
+void WebLayerImpl::setBounds(const WebSize& size) { layer_->SetBounds(size); }
+
+WebSize WebLayerImpl::bounds() const {
+ return layer_->bounds();
+}
+
+void WebLayerImpl::setMasksToBounds(bool masks_to_bounds) {
+ layer_->SetMasksToBounds(masks_to_bounds);
+}
+
+bool WebLayerImpl::masksToBounds() const {
+ return layer_->masks_to_bounds();
+}
+
+void WebLayerImpl::setMaskLayer(WebLayer* maskLayer) {
+ layer_->SetMaskLayer(
+ maskLayer ? static_cast<WebLayerImpl*>(maskLayer)->layer() : 0);
+}
+
+void WebLayerImpl::setReplicaLayer(WebLayer* replica_layer) {
+ layer_->SetReplicaLayer(
+ replica_layer ? static_cast<WebLayerImpl*>(replica_layer)->layer() : 0);
+}
+
+void WebLayerImpl::setOpacity(float opacity) {
+ layer_->SetOpacity(opacity);
+}
+
+float WebLayerImpl::opacity() const {
+ return layer_->opacity();
+}
+
+void WebLayerImpl::setBlendMode(blink::WebBlendMode blend_mode) {
+ layer_->SetBlendMode(BlendModeToSkia(blend_mode));
+}
+
+blink::WebBlendMode WebLayerImpl::blendMode() const {
+ return BlendModeFromSkia(layer_->blend_mode());
+}
+
+void WebLayerImpl::setIsRootForIsolatedGroup(bool isolate) {
+ layer_->SetIsRootForIsolatedGroup(isolate);
+}
+
+bool WebLayerImpl::isRootForIsolatedGroup() {
+ return layer_->is_root_for_isolated_group();
+}
+
+void WebLayerImpl::setOpaque(bool opaque) {
+ layer_->SetContentsOpaque(opaque);
+}
+
+bool WebLayerImpl::opaque() const {
+ return layer_->contents_opaque();
+}
+
+void WebLayerImpl::setPosition(const WebFloatPoint& position) {
+ layer_->SetPosition(position);
+}
+
+WebFloatPoint WebLayerImpl::position() const {
+ return layer_->position();
+}
+
+void WebLayerImpl::setTransform(const SkMatrix44& matrix) {
+ gfx::Transform transform;
+ transform.matrix() = matrix;
+ layer_->SetTransform(transform);
+}
+
+void WebLayerImpl::setTransformOrigin(const blink::WebFloatPoint3D& point) {
+ gfx::Point3F gfx_point = point;
+ layer_->SetTransformOrigin(gfx_point);
+}
+
+blink::WebFloatPoint3D WebLayerImpl::transformOrigin() const {
+ return layer_->transform_origin();
+}
+
+void WebLayerImpl::setAnchorPoint(const blink::WebFloatPoint&) {}
+
+blink::WebFloatPoint WebLayerImpl::anchorPoint() const {
+ return blink::WebFloatPoint();
+}
+
+void WebLayerImpl::setAnchorPointZ(float) {}
+
+float WebLayerImpl::anchorPointZ() const {
+ return 0.f;
+};
+
+SkMatrix44 WebLayerImpl::transform() const {
+ return layer_->transform().matrix();
+}
+
+void WebLayerImpl::setDrawsContent(bool draws_content) {
+ layer_->SetIsDrawable(draws_content);
+}
+
+bool WebLayerImpl::drawsContent() const {
+ return layer_->DrawsContent();
+}
+
+void WebLayerImpl::setShouldFlattenTransform(bool flatten) {
+ layer_->SetShouldFlattenTransform(flatten);
+}
+
+void WebLayerImpl::setRenderingContext(int context) {
+ layer_->SetIs3dSorted(context != 0);
+}
+
+void WebLayerImpl::setUseParentBackfaceVisibility(
+ bool use_parent_backface_visibility) {
+ layer_->set_use_parent_backface_visibility(use_parent_backface_visibility);
+}
+
+void WebLayerImpl::setBackgroundColor(WebColor color) {
+ layer_->SetBackgroundColor(color);
+}
+
+WebColor WebLayerImpl::backgroundColor() const {
+ return layer_->background_color();
+}
+
+void WebLayerImpl::setFilters(const WebFilterOperations& filters) {
+ const WebFilterOperationsImpl& filters_impl =
+ static_cast<const WebFilterOperationsImpl&>(filters);
+ layer_->SetFilters(filters_impl.AsFilterOperations());
+}
+
+void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) {
+ const WebFilterOperationsImpl& filters_impl =
+ static_cast<const WebFilterOperationsImpl&>(filters);
+ layer_->SetBackgroundFilters(filters_impl.AsFilterOperations());
+}
+
+void WebLayerImpl::setAnimationDelegate(blink::WebAnimationDelegate* delegate) {
+ animation_delegate_adapter_.reset(
+ new WebToCCAnimationDelegateAdapter(delegate));
+ layer_->set_layer_animation_delegate(animation_delegate_adapter_.get());
+}
+
+bool WebLayerImpl::addAnimation(blink::WebAnimation* animation) {
+ bool result = layer_->AddAnimation(
+ static_cast<WebAnimationImpl*>(animation)->PassAnimation());
+ delete animation;
+ return result;
+}
+
+void WebLayerImpl::removeAnimation(int animation_id) {
+ layer_->RemoveAnimation(animation_id);
+}
+
+void WebLayerImpl::removeAnimation(
+ int animation_id,
+ blink::WebAnimation::TargetProperty target_property) {
+ layer_->layer_animation_controller()->RemoveAnimation(
+ animation_id, static_cast<Animation::TargetProperty>(target_property));
+}
+
+void WebLayerImpl::pauseAnimation(int animation_id, double time_offset) {
+ layer_->PauseAnimation(animation_id, time_offset);
+}
+
+bool WebLayerImpl::hasActiveAnimation() {
+ return layer_->HasActiveAnimation();
+}
+
+void WebLayerImpl::setForceRenderSurface(bool force_render_surface) {
+ layer_->SetForceRenderSurface(force_render_surface);
+}
+
+void WebLayerImpl::setScrollPosition(blink::WebPoint position) {
+ layer_->SetScrollOffset(gfx::Point(position).OffsetFromOrigin());
+}
+
+blink::WebPoint WebLayerImpl::scrollPosition() const {
+ return gfx::PointAtOffsetFromOrigin(layer_->scroll_offset());
+}
+
+void WebLayerImpl::setScrollClipLayer(WebLayer* clip_layer) {
+ if (!clip_layer) {
+ layer_->SetScrollClipLayerId(Layer::INVALID_ID);
+ return;
+ }
+ layer_->SetScrollClipLayerId(clip_layer->id());
+}
+
+bool WebLayerImpl::scrollable() const {
+ return layer_->scrollable();
+}
+
+void WebLayerImpl::setUserScrollable(bool horizontal, bool vertical) {
+ layer_->SetUserScrollable(horizontal, vertical);
+}
+
+bool WebLayerImpl::userScrollableHorizontal() const {
+ return layer_->user_scrollable_horizontal();
+}
+
+bool WebLayerImpl::userScrollableVertical() const {
+ return layer_->user_scrollable_vertical();
+}
+
+void WebLayerImpl::setHaveWheelEventHandlers(bool have_wheel_event_handlers) {
+ layer_->SetHaveWheelEventHandlers(have_wheel_event_handlers);
+}
+
+bool WebLayerImpl::haveWheelEventHandlers() const {
+ return layer_->have_wheel_event_handlers();
+}
+
+void WebLayerImpl::setHaveScrollEventHandlers(bool have_scroll_event_handlers) {
+ layer_->SetHaveScrollEventHandlers(have_scroll_event_handlers);
+}
+
+bool WebLayerImpl::haveScrollEventHandlers() const {
+ return layer_->have_scroll_event_handlers();
+}
+
+void WebLayerImpl::setShouldScrollOnMainThread(
+ bool should_scroll_on_main_thread) {
+ layer_->SetShouldScrollOnMainThread(should_scroll_on_main_thread);
+}
+
+bool WebLayerImpl::shouldScrollOnMainThread() const {
+ return layer_->should_scroll_on_main_thread();
+}
+
+void WebLayerImpl::setNonFastScrollableRegion(const WebVector<WebRect>& rects) {
+ cc::Region region;
+ for (size_t i = 0; i < rects.size(); ++i)
+ region.Union(rects[i]);
+ layer_->SetNonFastScrollableRegion(region);
+}
+
+WebVector<WebRect> WebLayerImpl::nonFastScrollableRegion() const {
+ size_t num_rects = 0;
+ for (cc::Region::Iterator region_rects(layer_->non_fast_scrollable_region());
+ region_rects.has_rect();
+ region_rects.next())
+ ++num_rects;
+
+ WebVector<WebRect> result(num_rects);
+ size_t i = 0;
+ for (cc::Region::Iterator region_rects(layer_->non_fast_scrollable_region());
+ region_rects.has_rect();
+ region_rects.next()) {
+ result[i] = region_rects.rect();
+ ++i;
+ }
+ return result;
+}
+
+void WebLayerImpl::setTouchEventHandlerRegion(const WebVector<WebRect>& rects) {
+ cc::Region region;
+ for (size_t i = 0; i < rects.size(); ++i)
+ region.Union(rects[i]);
+ layer_->SetTouchEventHandlerRegion(region);
+}
+
+WebVector<WebRect> WebLayerImpl::touchEventHandlerRegion() const {
+ size_t num_rects = 0;
+ for (cc::Region::Iterator region_rects(layer_->touch_event_handler_region());
+ region_rects.has_rect();
+ region_rects.next())
+ ++num_rects;
+
+ WebVector<WebRect> result(num_rects);
+ size_t i = 0;
+ for (cc::Region::Iterator region_rects(layer_->touch_event_handler_region());
+ region_rects.has_rect();
+ region_rects.next()) {
+ result[i] = region_rects.rect();
+ ++i;
+ }
+ return result;
+}
+
+void WebLayerImpl::setIsContainerForFixedPositionLayers(bool enable) {
+ layer_->SetIsContainerForFixedPositionLayers(enable);
+}
+
+bool WebLayerImpl::isContainerForFixedPositionLayers() const {
+ return layer_->IsContainerForFixedPositionLayers();
+}
+
+static blink::WebLayerPositionConstraint ToWebLayerPositionConstraint(
+ const cc::LayerPositionConstraint& constraint) {
+ blink::WebLayerPositionConstraint web_constraint;
+ web_constraint.isFixedPosition = constraint.is_fixed_position();
+ web_constraint.isFixedToRightEdge = constraint.is_fixed_to_right_edge();
+ web_constraint.isFixedToBottomEdge = constraint.is_fixed_to_bottom_edge();
+ return web_constraint;
+}
+
+static cc::LayerPositionConstraint ToLayerPositionConstraint(
+ const blink::WebLayerPositionConstraint& web_constraint) {
+ cc::LayerPositionConstraint constraint;
+ constraint.set_is_fixed_position(web_constraint.isFixedPosition);
+ constraint.set_is_fixed_to_right_edge(web_constraint.isFixedToRightEdge);
+ constraint.set_is_fixed_to_bottom_edge(web_constraint.isFixedToBottomEdge);
+ return constraint;
+}
+
+void WebLayerImpl::setPositionConstraint(
+ const blink::WebLayerPositionConstraint& constraint) {
+ layer_->SetPositionConstraint(ToLayerPositionConstraint(constraint));
+}
+
+blink::WebLayerPositionConstraint WebLayerImpl::positionConstraint() const {
+ return ToWebLayerPositionConstraint(layer_->position_constraint());
+}
+
+void WebLayerImpl::setScrollClient(blink::WebLayerScrollClient* scroll_client) {
+ if (scroll_client) {
+ layer_->set_did_scroll_callback(
+ base::Bind(&blink::WebLayerScrollClient::didScroll,
+ base::Unretained(scroll_client)));
+ } else {
+ layer_->set_did_scroll_callback(base::Closure());
+ }
+}
+
+bool WebLayerImpl::isOrphan() const {
+ return !layer_->layer_tree_host();
+}
+
+void WebLayerImpl::setWebLayerClient(blink::WebLayerClient* client) {
+ web_layer_client_ = client;
+}
+
+class TracedDebugInfo : public base::debug::ConvertableToTraceFormat {
+ public:
+ // This object takes ownership of the debug_info object.
+ explicit TracedDebugInfo(blink::WebGraphicsLayerDebugInfo* debug_info)
+ : debug_info_(debug_info) {}
+ virtual void AppendAsTraceFormat(std::string* out) const OVERRIDE {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ blink::WebString web_string;
+ debug_info_->appendAsTraceFormat(&web_string);
+ out->append(web_string.utf8());
+ }
+
+ private:
+ virtual ~TracedDebugInfo() {}
+ scoped_ptr<blink::WebGraphicsLayerDebugInfo> debug_info_;
+ base::ThreadChecker thread_checker_;
+};
+
+scoped_refptr<base::debug::ConvertableToTraceFormat>
+WebLayerImpl::TakeDebugInfo() {
+ if (!web_layer_client_)
+ return NULL;
+ blink::WebGraphicsLayerDebugInfo* debug_info =
+ web_layer_client_->takeDebugInfoFor(this);
+
+ if (debug_info)
+ return new TracedDebugInfo(debug_info);
+ else
+ return NULL;
+}
+
+void WebLayerImpl::setScrollParent(blink::WebLayer* parent) {
+ cc::Layer* scroll_parent = NULL;
+ if (parent)
+ scroll_parent = static_cast<WebLayerImpl*>(parent)->layer();
+ layer_->SetScrollParent(scroll_parent);
+}
+
+void WebLayerImpl::setClipParent(blink::WebLayer* parent) {
+ cc::Layer* clip_parent = NULL;
+ if (parent)
+ clip_parent = static_cast<WebLayerImpl*>(parent)->layer();
+ layer_->SetClipParent(clip_parent);
+}
+
+Layer* WebLayerImpl::layer() const {
+ return layer_.get();
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_layer_impl.h b/content/renderer/compositor_bindings/web_layer_impl.h
new file mode 100644
index 0000000..72f2b347
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_layer_impl.h
@@ -0,0 +1,161 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_
+
+#include <string>
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "cc/layers/layer_client.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebAnimation.h"
+#include "third_party/WebKit/public/platform/WebCString.h"
+#include "third_party/WebKit/public/platform/WebColor.h"
+#include "third_party/WebKit/public/platform/WebFloatPoint.h"
+#include "third_party/WebKit/public/platform/WebLayer.h"
+#include "third_party/WebKit/public/platform/WebPoint.h"
+#include "third_party/WebKit/public/platform/WebRect.h"
+#include "third_party/WebKit/public/platform/WebSize.h"
+#include "third_party/WebKit/public/platform/WebString.h"
+#include "third_party/WebKit/public/platform/WebVector.h"
+#include "third_party/skia/include/utils/SkMatrix44.h"
+
+namespace cc {
+class Layer;
+}
+
+namespace blink {
+class WebFilterOperations;
+class WebLayerClient;
+struct WebFloatRect;
+}
+
+namespace base {
+namespace debug {
+class ConvertableToTraceFormat;
+}
+}
+
+namespace content {
+
+class WebToCCAnimationDelegateAdapter;
+
+class WebLayerImpl : public blink::WebLayer, public cc::LayerClient {
+ public:
+ CONTENT_EXPORT WebLayerImpl();
+ CONTENT_EXPORT explicit WebLayerImpl(
+ scoped_refptr<cc::Layer>);
+ virtual ~WebLayerImpl();
+
+ static bool UsingPictureLayer();
+ CONTENT_EXPORT static void SetImplSidePaintingEnabled(
+ bool enabled);
+
+ CONTENT_EXPORT cc::Layer* layer() const;
+
+ // WebLayer implementation.
+ virtual int id() const;
+ virtual void invalidateRect(const blink::WebFloatRect&);
+ virtual void invalidate();
+ virtual void addChild(blink::WebLayer* child);
+ virtual void insertChild(blink::WebLayer* child, size_t index);
+ virtual void replaceChild(blink::WebLayer* reference,
+ blink::WebLayer* new_layer);
+ virtual void removeFromParent();
+ virtual void removeAllChildren();
+ virtual void setBounds(const blink::WebSize& bounds);
+ virtual blink::WebSize bounds() const;
+ virtual void setMasksToBounds(bool masks_to_bounds);
+ virtual bool masksToBounds() const;
+ virtual void setMaskLayer(blink::WebLayer* mask);
+ virtual void setReplicaLayer(blink::WebLayer* replica);
+ virtual void setOpacity(float opacity);
+ virtual float opacity() const;
+ virtual void setBlendMode(blink::WebBlendMode blend_mode);
+ virtual blink::WebBlendMode blendMode() const;
+ virtual void setIsRootForIsolatedGroup(bool root);
+ virtual bool isRootForIsolatedGroup();
+ virtual void setOpaque(bool opaque);
+ virtual bool opaque() const;
+ virtual void setPosition(const blink::WebFloatPoint& position);
+ virtual blink::WebFloatPoint position() const;
+ virtual void setTransform(const SkMatrix44& transform);
+ virtual void setTransformOrigin(const blink::WebFloatPoint3D& point);
+ virtual blink::WebFloatPoint3D transformOrigin() const;
+
+ // FIXME: get rid of these once Blink is no longer using them.
+ virtual void setAnchorPoint(const blink::WebFloatPoint&);
+ virtual blink::WebFloatPoint anchorPoint() const;
+ virtual void setAnchorPointZ(float);
+ virtual float anchorPointZ() const ;
+
+ virtual SkMatrix44 transform() const;
+ virtual void setDrawsContent(bool draws_content);
+ virtual bool drawsContent() const;
+ virtual void setShouldFlattenTransform(bool flatten);
+ virtual void setRenderingContext(int context);
+ virtual void setUseParentBackfaceVisibility(bool visible);
+ virtual void setBackgroundColor(blink::WebColor color);
+ virtual blink::WebColor backgroundColor() const;
+ virtual void setFilters(const blink::WebFilterOperations& filters);
+ virtual void setBackgroundFilters(const blink::WebFilterOperations& filters);
+ virtual void setAnimationDelegate(blink::WebAnimationDelegate* delegate);
+ virtual bool addAnimation(blink::WebAnimation* animation);
+ virtual void removeAnimation(int animation_id);
+ virtual void removeAnimation(int animation_id,
+ blink::WebAnimation::TargetProperty);
+ virtual void pauseAnimation(int animation_id, double time_offset);
+ virtual bool hasActiveAnimation();
+ virtual void setForceRenderSurface(bool force);
+ virtual void setScrollPosition(blink::WebPoint position);
+ virtual blink::WebPoint scrollPosition() const;
+ virtual void setScrollClipLayer(blink::WebLayer* clip_layer);
+ virtual bool scrollable() const;
+ virtual void setUserScrollable(bool horizontal, bool vertical);
+ virtual bool userScrollableHorizontal() const;
+ virtual bool userScrollableVertical() const;
+ virtual void setHaveWheelEventHandlers(bool have_wheel_event_handlers);
+ virtual bool haveWheelEventHandlers() const;
+ virtual void setHaveScrollEventHandlers(bool have_scroll_event_handlers);
+ virtual bool haveScrollEventHandlers() const;
+ virtual void setShouldScrollOnMainThread(bool scroll_on_main);
+ virtual bool shouldScrollOnMainThread() const;
+ virtual void setNonFastScrollableRegion(
+ const blink::WebVector<blink::WebRect>& region);
+ virtual blink::WebVector<blink::WebRect> nonFastScrollableRegion() const;
+ virtual void setTouchEventHandlerRegion(
+ const blink::WebVector<blink::WebRect>& region);
+ virtual blink::WebVector<blink::WebRect> touchEventHandlerRegion() const;
+ virtual void setIsContainerForFixedPositionLayers(bool is_container);
+ virtual bool isContainerForFixedPositionLayers() const;
+ virtual void setPositionConstraint(
+ const blink::WebLayerPositionConstraint& constraint);
+ virtual blink::WebLayerPositionConstraint positionConstraint() const;
+ virtual void setScrollClient(blink::WebLayerScrollClient* client);
+ virtual bool isOrphan() const;
+ virtual void setWebLayerClient(blink::WebLayerClient* client);
+
+ // LayerClient implementation.
+ virtual scoped_refptr<base::debug::ConvertableToTraceFormat>
+ TakeDebugInfo() OVERRIDE;
+
+ virtual void setScrollParent(blink::WebLayer* parent);
+ virtual void setClipParent(blink::WebLayer* parent);
+
+ protected:
+ scoped_refptr<cc::Layer> layer_;
+ blink::WebLayerClient* web_layer_client_;
+
+ private:
+ scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebLayerImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_
+
diff --git a/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc b/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc
new file mode 100644
index 0000000..b3195f9
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc
@@ -0,0 +1,101 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h"
+
+#include "cc/layers/layer.h"
+#include "third_party/WebKit/public/platform/WebFloatPoint.h"
+#include "third_party/WebKit/public/platform/WebSize.h"
+#include "third_party/skia/include/utils/SkMatrix44.h"
+
+using cc::Layer;
+
+namespace content {
+
+WebLayerImplFixedBounds::WebLayerImplFixedBounds() {
+}
+
+WebLayerImplFixedBounds::WebLayerImplFixedBounds(scoped_refptr<Layer> layer)
+ : WebLayerImpl(layer) {
+}
+
+WebLayerImplFixedBounds::~WebLayerImplFixedBounds() {
+}
+
+void WebLayerImplFixedBounds::invalidateRect(const blink::WebFloatRect& rect) {
+ // Partial invalidations seldom occur for such layers.
+ // Simply invalidate the whole layer to avoid transformation of coordinates.
+ invalidate();
+}
+
+void WebLayerImplFixedBounds::setTransformOrigin(
+ const blink::WebFloatPoint3D& transform_origin) {
+ if (transform_origin != this->transformOrigin()) {
+ layer_->SetTransformOrigin(transform_origin);
+ UpdateLayerBoundsAndTransform();
+ }
+}
+
+void WebLayerImplFixedBounds::setBounds(const blink::WebSize& bounds) {
+ if (original_bounds_ != gfx::Size(bounds)) {
+ original_bounds_ = bounds;
+ UpdateLayerBoundsAndTransform();
+ }
+}
+
+blink::WebSize WebLayerImplFixedBounds::bounds() const {
+ return original_bounds_;
+}
+
+void WebLayerImplFixedBounds::setTransform(const SkMatrix44& matrix) {
+ gfx::Transform transform;
+ transform.matrix() = matrix;
+ SetTransformInternal(transform);
+}
+
+SkMatrix44 WebLayerImplFixedBounds::transform() const {
+ return original_transform_.matrix();
+}
+
+void WebLayerImplFixedBounds::SetFixedBounds(gfx::Size fixed_bounds) {
+ if (fixed_bounds_ != fixed_bounds) {
+ fixed_bounds_ = fixed_bounds;
+ UpdateLayerBoundsAndTransform();
+ }
+}
+
+void WebLayerImplFixedBounds::SetTransformInternal(
+ const gfx::Transform& transform) {
+ if (original_transform_ != transform) {
+ original_transform_ = transform;
+ UpdateLayerBoundsAndTransform();
+ }
+}
+
+void WebLayerImplFixedBounds::UpdateLayerBoundsAndTransform() {
+ if (fixed_bounds_.IsEmpty() || original_bounds_.IsEmpty() ||
+ fixed_bounds_ == original_bounds_ ||
+ // For now fall back to non-fixed bounds for non-zero transform origin.
+ // TODO(wangxianzhu): Support non-zero anchor point for fixed bounds.
+ transformOrigin().x ||
+ transformOrigin().y) {
+ layer_->SetBounds(original_bounds_);
+ layer_->SetTransform(original_transform_);
+ return;
+ }
+
+ layer_->SetBounds(fixed_bounds_);
+
+ // Apply bounds scale (bounds/fixed_bounds) over original transform.
+ gfx::Transform transform_with_bounds_scale(original_transform_);
+ float bounds_scale_x =
+ static_cast<float>(original_bounds_.width()) / fixed_bounds_.width();
+ float bounds_scale_y =
+ static_cast<float>(original_bounds_.height()) / fixed_bounds_.height();
+ transform_with_bounds_scale.Scale(bounds_scale_x, bounds_scale_y);
+ layer_->SetTransform(transform_with_bounds_scale);
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h b/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h
new file mode 100644
index 0000000..2048666
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h
@@ -0,0 +1,52 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_FIXED_BOUNDS_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_FIXED_BOUNDS_H_
+
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
+#include "ui/gfx/size.h"
+#include "ui/gfx/transform.h"
+
+namespace content {
+
+// A special implementation of WebLayerImpl for layers that its contents
+// need to be automatically scaled when the bounds changes. The compositor
+// can efficiently handle the bounds change of such layers if the bounds
+// is fixed to a given value and the change of bounds are converted to
+// transformation scales.
+class WebLayerImplFixedBounds : public WebLayerImpl {
+ public:
+ CONTENT_EXPORT WebLayerImplFixedBounds();
+ CONTENT_EXPORT explicit WebLayerImplFixedBounds(
+ scoped_refptr<cc::Layer>);
+ virtual ~WebLayerImplFixedBounds();
+
+ // WebLayerImpl overrides.
+ virtual void invalidateRect(const blink::WebFloatRect& rect);
+ virtual void setTransformOrigin(
+ const blink::WebFloatPoint3D& transform_origin);
+ virtual void setBounds(const blink::WebSize& bounds);
+ virtual blink::WebSize bounds() const;
+ virtual void setTransform(const SkMatrix44& transform);
+ virtual SkMatrix44 transform() const;
+
+ CONTENT_EXPORT void SetFixedBounds(gfx::Size bounds);
+
+ protected:
+ void SetTransformInternal(const gfx::Transform& transform);
+ void UpdateLayerBoundsAndTransform();
+
+ gfx::Transform original_transform_;
+ gfx::Size original_bounds_;
+ gfx::Size fixed_bounds_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WebLayerImplFixedBounds);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_FIXED_BOUNDS_H_
+
diff --git a/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc b/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc
new file mode 100644
index 0000000..1ab52f0
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc
@@ -0,0 +1,181 @@
+// Copyright 2014 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 <vector>
+#include "cc/layers/picture_image_layer.h"
+#include "cc/test/fake_layer_tree_host.h"
+#include "cc/test/geometry_test_utils.h"
+#include "cc/trees/layer_tree_host_common.h"
+#include "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/WebKit/public/platform/WebFloatPoint.h"
+#include "third_party/WebKit/public/platform/WebSize.h"
+#include "third_party/skia/include/utils/SkMatrix44.h"
+#include "ui/gfx/point3_f.h"
+
+using blink::WebFloatPoint;
+using blink::WebSize;
+
+namespace content {
+namespace {
+
+TEST(WebLayerImplFixedBoundsTest, IdentityBounds) {
+ scoped_ptr<WebLayerImplFixedBounds> layer(new WebLayerImplFixedBounds());
+ layer->setAnchorPoint(WebFloatPoint(0, 0));
+ layer->SetFixedBounds(gfx::Size(100, 100));
+ layer->setBounds(WebSize(100, 100));
+ EXPECT_EQ(WebSize(100, 100), layer->bounds());
+ EXPECT_EQ(gfx::Size(100, 100), layer->layer()->bounds());
+ EXPECT_EQ(gfx::Transform(), layer->layer()->transform());
+}
+
+gfx::Point3F TransformPoint(const gfx::Transform& transform,
+ const gfx::Point3F& point) {
+ gfx::Point3F result = point;
+ transform.TransformPoint(&result);
+ return result;
+}
+
+void CheckBoundsScaleSimple(WebLayerImplFixedBounds* layer,
+ const WebSize& bounds,
+ const gfx::Size& fixed_bounds) {
+ layer->setBounds(bounds);
+ layer->SetFixedBounds(fixed_bounds);
+
+ EXPECT_EQ(bounds, layer->bounds());
+ EXPECT_EQ(fixed_bounds, layer->layer()->bounds());
+ EXPECT_TRUE(layer->transform().isIdentity());
+
+ // An arbitrary point to check the scale and transforms.
+ gfx::Point3F original_point(10, 20, 1);
+ gfx::Point3F scaled_point(
+ original_point.x() * bounds.width / fixed_bounds.width(),
+ original_point.y() * bounds.height / fixed_bounds.height(),
+ original_point.z());
+ // Test if the bounds scale is correctly applied in transform.
+ EXPECT_POINT3F_EQ(
+ scaled_point,
+ TransformPoint(layer->layer()->transform(), original_point));
+}
+
+TEST(WebLayerImplFixedBoundsTest, BoundsScaleSimple) {
+ scoped_ptr<WebLayerImplFixedBounds> layer(new WebLayerImplFixedBounds());
+ layer->setAnchorPoint(WebFloatPoint(0, 0));
+ CheckBoundsScaleSimple(layer.get(), WebSize(100, 200), gfx::Size(150, 250));
+ // Change fixed_bounds.
+ CheckBoundsScaleSimple(layer.get(), WebSize(100, 200), gfx::Size(75, 100));
+ // Change bounds.
+ CheckBoundsScaleSimple(layer.get(), WebSize(300, 100), gfx::Size(75, 100));
+}
+
+void ExpectEqualLayerRectsInTarget(cc::Layer* layer1, cc::Layer* layer2) {
+ gfx::RectF layer1_rect_in_target(layer1->content_bounds());
+ layer1->draw_transform().TransformRect(&layer1_rect_in_target);
+
+ gfx::RectF layer2_rect_in_target(layer2->content_bounds());
+ layer2->draw_transform().TransformRect(&layer2_rect_in_target);
+
+ EXPECT_FLOAT_RECT_EQ(layer1_rect_in_target, layer2_rect_in_target);
+}
+
+void CompareFixedBoundsLayerAndNormalLayer(const WebFloatPoint& anchor_point,
+ const gfx::Transform& transform) {
+ const gfx::Size kDeviceViewportSize(800, 600);
+ const float kDeviceScaleFactor = 2.f;
+ const float kPageScaleFactor = 1.5f;
+
+ WebSize bounds(150, 200);
+ WebFloatPoint position(20, 30);
+ gfx::Size fixed_bounds(160, 70);
+
+ scoped_ptr<WebLayerImplFixedBounds> root_layer(new WebLayerImplFixedBounds());
+
+ WebLayerImplFixedBounds* fixed_bounds_layer =
+ new WebLayerImplFixedBounds(cc::PictureImageLayer::Create());
+ fixed_bounds_layer->setBounds(bounds);
+ fixed_bounds_layer->SetFixedBounds(fixed_bounds);
+ fixed_bounds_layer->setAnchorPoint(anchor_point);
+ fixed_bounds_layer->setTransform(transform.matrix());
+ fixed_bounds_layer->setPosition(position);
+ root_layer->addChild(fixed_bounds_layer);
+
+ WebLayerImpl* normal_layer(new WebLayerImpl(cc::PictureImageLayer::Create()));
+
+ normal_layer->setBounds(bounds);
+ normal_layer->setAnchorPoint(anchor_point);
+ normal_layer->setTransform(transform.matrix());
+ normal_layer->setPosition(position);
+ root_layer->addChild(normal_layer);
+
+ scoped_ptr<cc::FakeLayerTreeHost> host = cc::FakeLayerTreeHost::Create();
+ host->SetRootLayer(root_layer->layer());
+
+ {
+ cc::RenderSurfaceLayerList render_surface_layer_list;
+ cc::LayerTreeHostCommon::CalcDrawPropsMainInputsForTesting inputs(
+ root_layer->layer(), kDeviceViewportSize, &render_surface_layer_list);
+ inputs.device_scale_factor = kDeviceScaleFactor;
+ inputs.page_scale_factor = kPageScaleFactor;
+ inputs.page_scale_application_layer = root_layer->layer(),
+ cc::LayerTreeHostCommon::CalculateDrawProperties(&inputs);
+
+ ExpectEqualLayerRectsInTarget(normal_layer->layer(),
+ fixed_bounds_layer->layer());
+ }
+
+ // Change of fixed bounds should not affect the target geometries.
+ fixed_bounds_layer->SetFixedBounds(
+ gfx::Size(fixed_bounds.width() / 2, fixed_bounds.height() * 2));
+
+ {
+ cc::RenderSurfaceLayerList render_surface_layer_list;
+ cc::LayerTreeHostCommon::CalcDrawPropsMainInputsForTesting inputs(
+ root_layer->layer(), kDeviceViewportSize, &render_surface_layer_list);
+ inputs.device_scale_factor = kDeviceScaleFactor;
+ inputs.page_scale_factor = kPageScaleFactor;
+ inputs.page_scale_application_layer = root_layer->layer(),
+ cc::LayerTreeHostCommon::CalculateDrawProperties(&inputs);
+
+ ExpectEqualLayerRectsInTarget(normal_layer->layer(),
+ fixed_bounds_layer->layer());
+ }
+}
+
+// TODO(perkj): CompareToWebLayerImplSimple disabled on LSAN due to crbug/386080
+#if defined(LEAK_SANITIZER)
+#define MAYBE_CompareToWebLayerImplSimple DISABLED_CompareToWebLayerImplSimple
+#else
+#define MAYBE_CompareToWebLayerImplSimple CompareToWebLayerImplSimple
+#endif
+// A black box test that ensures WebLayerImplFixedBounds won't change target
+// geometries. Simple case: identity transforms and zero anchor point.
+TEST(WebLayerImplFixedBoundsTest, MAYBE_CompareToWebLayerImplSimple) {
+ CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0, 0), gfx::Transform());
+}
+
+// TODO(perkj): CompareToWebLayerImplComplex disabled on LSAN due to
+// crbug/386080
+#if defined(LEAK_SANITIZER)
+#define MAYBE_CompareToWebLayerImplComplex DISABLED_CompareToWebLayerImplComplex
+#else
+#define MAYBE_CompareToWebLayerImplComplex CompareToWebLayerImplComplex
+#endif
+// A black box test that ensures WebLayerImplFixedBounds won't change target
+// geometries. Complex case: complex transforms and non-zero anchor point.
+TEST(WebLayerImplFixedBoundsTest, MAYBE_CompareToWebLayerImplComplex) {
+ gfx::Transform transform;
+ // These are arbitrary values that should not affect the results.
+ transform.Translate3d(50, 60, 70);
+ transform.Scale3d(2, 3, 4);
+ transform.RotateAbout(gfx::Vector3dF(33, 44, 55), 99);
+
+ CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0, 0), transform);
+
+ // With non-zero anchor point, WebLayerImplFixedBounds will fall back to
+ // WebLayerImpl.
+ CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0.4f, 0.6f), transform);
+}
+
+} // namespace
+} // namespace content
diff --git a/content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc b/content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc
new file mode 100644
index 0000000..55a7501
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc
@@ -0,0 +1,62 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_nine_patch_layer_impl.h"
+
+#include "base/command_line.h"
+#include "cc/base/switches.h"
+#include "cc/layers/nine_patch_layer.h"
+#include "cc/layers/picture_image_layer.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
+#include "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h"
+
+namespace content {
+
+WebNinePatchLayerImpl::WebNinePatchLayerImpl() {
+ layer_.reset(new WebLayerImpl(cc::NinePatchLayer::Create()));
+}
+
+WebNinePatchLayerImpl::~WebNinePatchLayerImpl() {
+}
+
+blink::WebLayer* WebNinePatchLayerImpl::layer() {
+ return layer_.get();
+}
+
+void WebNinePatchLayerImpl::setBitmap(SkBitmap bitmap,
+ const blink::WebRect& aperture) {
+ setBitmap(bitmap);
+ setAperture(aperture);
+ setBorder(blink::WebRect(aperture.x,
+ aperture.y,
+ bitmap.width() - aperture.width,
+ bitmap.height() - aperture.height));
+}
+
+void WebNinePatchLayerImpl::setBitmap(SkBitmap bitmap) {
+ cc::NinePatchLayer* nine_patch =
+ static_cast<cc::NinePatchLayer*>(layer_->layer());
+ nine_patch->SetBitmap(bitmap);
+}
+
+void WebNinePatchLayerImpl::setAperture(const blink::WebRect& aperture) {
+ cc::NinePatchLayer* nine_patch =
+ static_cast<cc::NinePatchLayer*>(layer_->layer());
+ nine_patch->SetAperture(gfx::Rect(aperture));
+}
+
+void WebNinePatchLayerImpl::setBorder(const blink::WebRect& border) {
+ cc::NinePatchLayer* nine_patch =
+ static_cast<cc::NinePatchLayer*>(layer_->layer());
+ nine_patch->SetBorder(gfx::Rect(border));
+}
+
+void WebNinePatchLayerImpl::setFillCenter(bool fill_center) {
+ cc::NinePatchLayer* nine_patch =
+ static_cast<cc::NinePatchLayer*>(layer_->layer());
+ nine_patch->SetFillCenter(fill_center);
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_nine_patch_layer_impl.h b/content/renderer/compositor_bindings/web_nine_patch_layer_impl.h
new file mode 100644
index 0000000..cad69d7
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_nine_patch_layer_impl.h
@@ -0,0 +1,42 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_NINE_PATCH_LAYER_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_NINE_PATCH_LAYER_IMPL_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebNinePatchLayer.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+
+namespace content {
+
+class WebLayerImpl;
+
+class WebNinePatchLayerImpl : public blink::WebNinePatchLayer {
+ public:
+ CONTENT_EXPORT WebNinePatchLayerImpl();
+ virtual ~WebNinePatchLayerImpl();
+
+ // blink::WebNinePatchLayer implementation.
+ virtual blink::WebLayer* layer();
+
+ // TODO(ccameron): Remove setBitmap(SkBitmap, blink::WebRect) in favor of
+ // setBitmap(), setAperture(), and setBorder();
+ virtual void setBitmap(SkBitmap bitmap, const blink::WebRect& aperture);
+ virtual void setBitmap(SkBitmap bitmap);
+ virtual void setAperture(const blink::WebRect& aperture);
+ virtual void setBorder(const blink::WebRect& border);
+ virtual void setFillCenter(bool fill_center);
+
+ private:
+ scoped_ptr<WebLayerImpl> layer_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebNinePatchLayerImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_NINE_PATCH_LAYER_IMPL_H_
+
diff --git a/content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc b/content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc
new file mode 100644
index 0000000..3b75271
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc
@@ -0,0 +1,55 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h"
+
+#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
+
+#include "cc/animation/scroll_offset_animation_curve.h"
+#include "cc/animation/timing_function.h"
+#include "content/renderer/compositor_bindings/web_animation_curve_common.h"
+
+using blink::WebFloatPoint;
+
+namespace content {
+
+WebScrollOffsetAnimationCurveImpl::WebScrollOffsetAnimationCurveImpl(
+ WebFloatPoint target_value,
+ TimingFunctionType timing_function)
+ : curve_(cc::ScrollOffsetAnimationCurve::Create(
+ gfx::Vector2dF(target_value.x, target_value.y),
+ CreateTimingFunction(timing_function))) {
+}
+
+WebScrollOffsetAnimationCurveImpl::~WebScrollOffsetAnimationCurveImpl() {
+}
+
+blink::WebAnimationCurve::AnimationCurveType
+WebScrollOffsetAnimationCurveImpl::type() const {
+ return WebAnimationCurve::AnimationCurveTypeScrollOffset;
+}
+
+void WebScrollOffsetAnimationCurveImpl::setInitialValue(
+ WebFloatPoint initial_value) {
+ curve_->SetInitialValue(gfx::Vector2dF(initial_value.x, initial_value.y));
+}
+
+WebFloatPoint WebScrollOffsetAnimationCurveImpl::getValue(double time) const {
+ gfx::Vector2dF value = curve_->GetValue(time);
+ return WebFloatPoint(value.x(), value.y());
+}
+
+double WebScrollOffsetAnimationCurveImpl::duration() const {
+ return curve_->Duration();
+}
+
+scoped_ptr<cc::AnimationCurve>
+WebScrollOffsetAnimationCurveImpl::CloneToAnimationCurve() const {
+ return curve_->Clone();
+}
+
+} // namespace content
+
+#endif // WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
+
diff --git a/content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h b/content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h
new file mode 100644
index 0000000..4c29f8f
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h
@@ -0,0 +1,52 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_
+
+#include "third_party/WebKit/public/platform/WebAnimationCurve.h"
+
+#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
+
+#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebScrollOffsetAnimationCurve.h"
+
+namespace cc {
+class AnimationCurve;
+class ScrollOffsetAnimationCurve;
+}
+
+namespace content {
+
+class WebScrollOffsetAnimationCurveImpl
+ : public blink::WebScrollOffsetAnimationCurve {
+ public:
+ CONTENT_EXPORT WebScrollOffsetAnimationCurveImpl(
+ blink::WebFloatPoint target_value,
+ TimingFunctionType timing_function);
+ virtual ~WebScrollOffsetAnimationCurveImpl();
+
+ // blink::WebAnimationCurve implementation.
+ virtual AnimationCurveType type() const;
+
+ // blink::WebScrollOffsetAnimationCurve implementation.
+ virtual void setInitialValue(blink::WebFloatPoint initial_value);
+ virtual blink::WebFloatPoint getValue(double time) const;
+ virtual double duration() const;
+
+ scoped_ptr<cc::AnimationCurve> CloneToAnimationCurve() const;
+
+ private:
+ scoped_ptr<cc::ScrollOffsetAnimationCurve> curve_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebScrollOffsetAnimationCurveImpl);
+};
+
+} // namespace content
+
+#endif // WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_
+
diff --git a/content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc b/content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc
new file mode 100644
index 0000000..0d3be19
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc
@@ -0,0 +1,74 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_scrollbar_layer_impl.h"
+
+#include "cc/layers/layer.h"
+#include "cc/layers/painted_scrollbar_layer.h"
+#include "cc/layers/scrollbar_layer_interface.h"
+#include "cc/layers/solid_color_scrollbar_layer.h"
+#include "content/renderer/compositor_bindings/scrollbar_impl.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
+
+using cc::PaintedScrollbarLayer;
+using cc::SolidColorScrollbarLayer;
+
+namespace {
+
+cc::ScrollbarOrientation ConvertOrientation(
+ blink::WebScrollbar::Orientation orientation) {
+ return orientation == blink::WebScrollbar::Horizontal ? cc::HORIZONTAL
+ : cc::VERTICAL;
+}
+
+} // namespace
+
+namespace content {
+
+WebScrollbarLayerImpl::WebScrollbarLayerImpl(
+ blink::WebScrollbar* scrollbar,
+ blink::WebScrollbarThemePainter painter,
+ blink::WebScrollbarThemeGeometry* geometry)
+ : layer_(new WebLayerImpl(PaintedScrollbarLayer::Create(
+ scoped_ptr<cc::Scrollbar>(
+ new ScrollbarImpl(make_scoped_ptr(scrollbar),
+ painter,
+ make_scoped_ptr(geometry))).Pass(),
+ 0))) {
+}
+
+WebScrollbarLayerImpl::WebScrollbarLayerImpl(
+ blink::WebScrollbar::Orientation orientation,
+ int thumb_thickness,
+ int track_start,
+ bool is_left_side_vertical_scrollbar)
+ : layer_(new WebLayerImpl(
+ SolidColorScrollbarLayer::Create(ConvertOrientation(orientation),
+ thumb_thickness,
+ track_start,
+ is_left_side_vertical_scrollbar,
+ 0))) {
+}
+
+WebScrollbarLayerImpl::~WebScrollbarLayerImpl() {
+}
+
+blink::WebLayer* WebScrollbarLayerImpl::layer() {
+ return layer_.get();
+}
+
+void WebScrollbarLayerImpl::setScrollLayer(blink::WebLayer* layer) {
+ cc::Layer* scroll_layer =
+ layer ? static_cast<WebLayerImpl*>(layer)->layer() : 0;
+ layer_->layer()->ToScrollbarLayer()->SetScrollLayer(scroll_layer->id());
+}
+
+void WebScrollbarLayerImpl::setClipLayer(blink::WebLayer* layer) {
+ cc::Layer* clip_layer =
+ layer ? static_cast<WebLayerImpl*>(layer)->layer() : 0;
+ layer_->layer()->ToScrollbarLayer()->SetClipLayer(clip_layer->id());
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_scrollbar_layer_impl.h b/content/renderer/compositor_bindings/web_scrollbar_layer_impl.h
new file mode 100644
index 0000000..47719e1
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_scrollbar_layer_impl.h
@@ -0,0 +1,48 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLLBAR_LAYER_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLLBAR_LAYER_IMPL_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebScrollbar.h"
+#include "third_party/WebKit/public/platform/WebScrollbarLayer.h"
+
+namespace blink {
+class WebScrollbarThemeGeometry;
+class WebScrollbarThemePainter;
+}
+
+namespace content {
+
+class WebLayerImpl;
+
+class WebScrollbarLayerImpl : public blink::WebScrollbarLayer {
+ public:
+ CONTENT_EXPORT WebScrollbarLayerImpl(
+ blink::WebScrollbar* scrollbar,
+ blink::WebScrollbarThemePainter painter,
+ blink::WebScrollbarThemeGeometry* geometry);
+ CONTENT_EXPORT WebScrollbarLayerImpl(
+ blink::WebScrollbar::Orientation orientation,
+ int thumb_thickness,
+ int track_start,
+ bool is_left_side_vertical_scrollbar);
+ virtual ~WebScrollbarLayerImpl();
+
+ // blink::WebScrollbarLayer implementation.
+ virtual blink::WebLayer* layer();
+ virtual void setScrollLayer(blink::WebLayer* layer);
+ virtual void setClipLayer(blink::WebLayer* layer);
+
+ private:
+ scoped_ptr<WebLayerImpl> layer_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebScrollbarLayerImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLLBAR_LAYER_IMPL_H_
diff --git a/content/renderer/compositor_bindings/web_solid_color_layer_impl.cc b/content/renderer/compositor_bindings/web_solid_color_layer_impl.cc
new file mode 100644
index 0000000..6cd9c19
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_solid_color_layer_impl.cc
@@ -0,0 +1,31 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_solid_color_layer_impl.h"
+
+#include "cc/layers/solid_color_layer.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
+
+using cc::SolidColorLayer;
+
+namespace content {
+
+WebSolidColorLayerImpl::WebSolidColorLayerImpl()
+ : layer_(new WebLayerImpl(SolidColorLayer::Create())) {
+ layer_->layer()->SetIsDrawable(true);
+}
+
+WebSolidColorLayerImpl::~WebSolidColorLayerImpl() {
+}
+
+blink::WebLayer* WebSolidColorLayerImpl::layer() {
+ return layer_.get();
+}
+
+void WebSolidColorLayerImpl::setBackgroundColor(blink::WebColor color) {
+ layer_->setBackgroundColor(color);
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_solid_color_layer_impl.h b/content/renderer/compositor_bindings/web_solid_color_layer_impl.h
new file mode 100644
index 0000000..fe6eefe
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_solid_color_layer_impl.h
@@ -0,0 +1,34 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SOLID_COLOR_LAYER_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SOLID_COLOR_LAYER_IMPL_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebColor.h"
+#include "third_party/WebKit/public/platform/WebSolidColorLayer.h"
+
+namespace content {
+class WebLayerImpl;
+
+class WebSolidColorLayerImpl : public blink::WebSolidColorLayer {
+ public:
+ CONTENT_EXPORT WebSolidColorLayerImpl();
+ virtual ~WebSolidColorLayerImpl();
+
+ // blink::WebSolidColorLayer implementation.
+ virtual blink::WebLayer* layer();
+ virtual void setBackgroundColor(blink::WebColor);
+
+ private:
+ scoped_ptr<WebLayerImpl> layer_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebSolidColorLayerImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SOLID_COLOR_LAYER_IMPL_H_
+
diff --git a/content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc b/content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc
new file mode 100644
index 0000000..5a953bd
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc
@@ -0,0 +1,33 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h"
+
+#include "third_party/WebKit/public/platform/WebAnimationDelegate.h"
+
+namespace content {
+
+WebToCCAnimationDelegateAdapter::WebToCCAnimationDelegateAdapter(
+ blink::WebAnimationDelegate* delegate)
+ : delegate_(delegate) {
+}
+
+void WebToCCAnimationDelegateAdapter::NotifyAnimationStarted(
+ base::TimeTicks monotonic_time,
+ cc::Animation::TargetProperty target_property) {
+ delegate_->notifyAnimationStarted(
+ (monotonic_time - base::TimeTicks()).InSecondsF(),
+ static_cast<blink::WebAnimation::TargetProperty>(target_property));
+}
+
+void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished(
+ base::TimeTicks monotonic_time,
+ cc::Animation::TargetProperty target_property) {
+ delegate_->notifyAnimationFinished(
+ (monotonic_time - base::TimeTicks()).InSecondsF(),
+ static_cast<blink::WebAnimation::TargetProperty>(target_property));
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h b/content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h
new file mode 100644
index 0000000..b80b627
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h
@@ -0,0 +1,39 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "cc/animation/animation_delegate.h"
+
+namespace blink {
+class WebAnimationDelegate;
+}
+
+namespace content {
+
+class WebToCCAnimationDelegateAdapter : public cc::AnimationDelegate {
+ public:
+ explicit WebToCCAnimationDelegateAdapter(
+ blink::WebAnimationDelegate* delegate);
+
+ private:
+ virtual void NotifyAnimationStarted(
+ base::TimeTicks monotonic_time,
+ cc::Animation::TargetProperty target_property) OVERRIDE;
+ virtual void NotifyAnimationFinished(
+ base::TimeTicks monotonic_time,
+ cc::Animation::TargetProperty target_property) OVERRIDE;
+
+ blink::WebAnimationDelegate* delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebToCCAnimationDelegateAdapter);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_
+
diff --git a/content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc b/content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc
new file mode 100644
index 0000000..8b03f48
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc
@@ -0,0 +1,63 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_transform_animation_curve_impl.h"
+
+#include "cc/animation/keyframed_animation_curve.h"
+#include "cc/animation/timing_function.h"
+#include "cc/animation/transform_operations.h"
+#include "content/renderer/compositor_bindings/web_animation_curve_common.h"
+#include "content/renderer/compositor_bindings/web_transform_operations_impl.h"
+
+using blink::WebTransformKeyframe;
+
+namespace content {
+
+WebTransformAnimationCurveImpl::WebTransformAnimationCurveImpl()
+ : curve_(cc::KeyframedTransformAnimationCurve::Create()) {
+}
+
+WebTransformAnimationCurveImpl::~WebTransformAnimationCurveImpl() {
+}
+
+blink::WebAnimationCurve::AnimationCurveType
+WebTransformAnimationCurveImpl::type() const {
+ return WebAnimationCurve::AnimationCurveTypeTransform;
+}
+
+void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe) {
+ add(keyframe, TimingFunctionTypeEase);
+}
+
+void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe,
+ TimingFunctionType type) {
+ const cc::TransformOperations& transform_operations =
+ static_cast<const WebTransformOperationsImpl&>(keyframe.value())
+ .AsTransformOperations();
+ curve_->AddKeyframe(cc::TransformKeyframe::Create(
+ keyframe.time(), transform_operations, CreateTimingFunction(type)));
+}
+
+void WebTransformAnimationCurveImpl::add(const WebTransformKeyframe& keyframe,
+ double x1,
+ double y1,
+ double x2,
+ double y2) {
+ const cc::TransformOperations& transform_operations =
+ static_cast<const WebTransformOperationsImpl&>(keyframe.value())
+ .AsTransformOperations();
+ curve_->AddKeyframe(cc::TransformKeyframe::Create(
+ keyframe.time(),
+ transform_operations,
+ cc::CubicBezierTimingFunction::Create(x1, y1, x2, y2)
+ .PassAs<cc::TimingFunction>()));
+}
+
+scoped_ptr<cc::AnimationCurve>
+WebTransformAnimationCurveImpl::CloneToAnimationCurve() const {
+ return curve_->Clone();
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_transform_animation_curve_impl.h b/content/renderer/compositor_bindings/web_transform_animation_curve_impl.h
new file mode 100644
index 0000000..5a0576d
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_transform_animation_curve_impl.h
@@ -0,0 +1,53 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebTransformAnimationCurve.h"
+
+namespace cc {
+class AnimationCurve;
+class KeyframedTransformAnimationCurve;
+}
+
+namespace blink {
+class WebTransformKeyframe;
+}
+
+namespace content {
+
+class WebTransformAnimationCurveImpl
+ : public blink::WebTransformAnimationCurve {
+ public:
+ CONTENT_EXPORT WebTransformAnimationCurveImpl();
+ virtual ~WebTransformAnimationCurveImpl();
+
+ // blink::WebAnimationCurve implementation.
+ virtual AnimationCurveType type() const;
+
+ // blink::WebTransformAnimationCurve implementation.
+ virtual void add(const blink::WebTransformKeyframe& keyframe);
+ virtual void add(const blink::WebTransformKeyframe& keyframe,
+ TimingFunctionType type);
+ virtual void add(const blink::WebTransformKeyframe& keyframe,
+ double x1,
+ double y1,
+ double x2,
+ double y2);
+
+ scoped_ptr<cc::AnimationCurve> CloneToAnimationCurve() const;
+
+ private:
+ scoped_ptr<cc::KeyframedTransformAnimationCurve> curve_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebTransformAnimationCurveImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_
+
diff --git a/content/renderer/compositor_bindings/web_transform_operations_impl.cc b/content/renderer/compositor_bindings/web_transform_operations_impl.cc
new file mode 100644
index 0000000..cfec1b4
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_transform_operations_impl.cc
@@ -0,0 +1,69 @@
+// Copyright 2014 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 "content/renderer/compositor_bindings/web_transform_operations_impl.h"
+
+#include <algorithm>
+
+#include "ui/gfx/transform.h"
+
+namespace content {
+
+WebTransformOperationsImpl::WebTransformOperationsImpl() {
+}
+
+const cc::TransformOperations&
+WebTransformOperationsImpl::AsTransformOperations() const {
+ return transform_operations_;
+}
+
+bool WebTransformOperationsImpl::canBlendWith(
+ const blink::WebTransformOperations& other) const {
+ const WebTransformOperationsImpl& other_impl =
+ static_cast<const WebTransformOperationsImpl&>(other);
+ return transform_operations_.CanBlendWith(other_impl.transform_operations_);
+}
+
+void WebTransformOperationsImpl::appendTranslate(double x, double y, double z) {
+ transform_operations_.AppendTranslate(x, y, z);
+}
+
+void WebTransformOperationsImpl::appendRotate(double x,
+ double y,
+ double z,
+ double degrees) {
+ transform_operations_.AppendRotate(x, y, z, degrees);
+}
+
+void WebTransformOperationsImpl::appendScale(double x, double y, double z) {
+ transform_operations_.AppendScale(x, y, z);
+}
+
+void WebTransformOperationsImpl::appendSkew(double x, double y) {
+ transform_operations_.AppendSkew(x, y);
+}
+
+void WebTransformOperationsImpl::appendPerspective(double depth) {
+ transform_operations_.AppendPerspective(depth);
+}
+
+void WebTransformOperationsImpl::appendMatrix(const SkMatrix44& matrix) {
+ gfx::Transform transform(gfx::Transform::kSkipInitialization);
+ transform.matrix() = matrix;
+ transform_operations_.AppendMatrix(transform);
+}
+
+void WebTransformOperationsImpl::appendIdentity() {
+ transform_operations_.AppendIdentity();
+}
+
+bool WebTransformOperationsImpl::isIdentity() const {
+ return transform_operations_.IsIdentity();
+}
+
+WebTransformOperationsImpl::~WebTransformOperationsImpl() {
+}
+
+} // namespace content
+
diff --git a/content/renderer/compositor_bindings/web_transform_operations_impl.h b/content/renderer/compositor_bindings/web_transform_operations_impl.h
new file mode 100644
index 0000000..f0f7b47
--- /dev/null
+++ b/content/renderer/compositor_bindings/web_transform_operations_impl.h
@@ -0,0 +1,42 @@
+// Copyright 2014 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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_OPERATIONS_IMPL_H_
+#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_OPERATIONS_IMPL_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "cc/animation/transform_operations.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebTransformOperations.h"
+
+namespace content {
+
+class WebTransformOperationsImpl : public blink::WebTransformOperations {
+ public:
+ CONTENT_EXPORT WebTransformOperationsImpl();
+ virtual ~WebTransformOperationsImpl();
+
+ const cc::TransformOperations& AsTransformOperations() const;
+
+ // Implementation of blink::WebTransformOperations methods
+ virtual bool canBlendWith(const blink::WebTransformOperations& other) const;
+ virtual void appendTranslate(double x, double y, double z);
+ virtual void appendRotate(double x, double y, double z, double degrees);
+ virtual void appendScale(double x, double y, double z);
+ virtual void appendSkew(double x, double y);
+ virtual void appendPerspective(double depth);
+ virtual void appendMatrix(const SkMatrix44&);
+ virtual void appendIdentity();
+ virtual bool isIdentity() const;
+
+ private:
+ cc::TransformOperations transform_operations_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebTransformOperationsImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_OPERATIONS_IMPL_H_
+
diff --git a/content/renderer/devtools/devtools_agent.cc b/content/renderer/devtools/devtools_agent.cc
index 4341d02..c10a790 100644
--- a/content/renderer/devtools/devtools_agent.cc
+++ b/content/renderer/devtools/devtools_agent.cc
@@ -125,6 +125,10 @@
return routing_id();
}
+int DevToolsAgent::debuggerId() {
+ return routing_id();
+}
+
void DevToolsAgent::saveAgentRuntimeState(
const blink::WebString& state) {
Send(new DevToolsHostMsg_SaveAgentRuntimeState(routing_id(), state.utf8()));
@@ -273,26 +277,28 @@
}
// static
-DevToolsAgent* DevToolsAgent::FromHostId(int host_id) {
- IdToAgentMap::iterator it = g_agent_for_routing_id.Get().find(host_id);
+DevToolsAgent* DevToolsAgent::FromRoutingId(int routing_id) {
+ IdToAgentMap::iterator it = g_agent_for_routing_id.Get().find(routing_id);
if (it != g_agent_for_routing_id.Get().end()) {
return it->second;
}
return NULL;
}
-void DevToolsAgent::OnAttach() {
+void DevToolsAgent::OnAttach(const std::string& host_id) {
WebDevToolsAgent* web_agent = GetWebAgent();
if (web_agent) {
- web_agent->attach();
+ web_agent->attach(WebString::fromUTF8(host_id));
is_attached_ = true;
}
}
-void DevToolsAgent::OnReattach(const std::string& agent_state) {
+void DevToolsAgent::OnReattach(const std::string& host_id,
+ const std::string& agent_state) {
WebDevToolsAgent* web_agent = GetWebAgent();
if (web_agent) {
- web_agent->reattach(WebString::fromUTF8(agent_state));
+ web_agent->reattach(WebString::fromUTF8(host_id),
+ WebString::fromUTF8(agent_state));
is_attached_ = true;
}
}
@@ -312,11 +318,13 @@
web_agent->dispatchOnInspectorBackend(WebString::fromUTF8(message));
}
-void DevToolsAgent::OnInspectElement(int x, int y) {
+void DevToolsAgent::OnInspectElement(
+ const std::string& host_id, int x, int y) {
WebDevToolsAgent* web_agent = GetWebAgent();
if (web_agent) {
- web_agent->attach();
+ web_agent->attach(WebString::fromUTF8(host_id));
web_agent->inspectElementAt(WebPoint(x, y));
+ is_attached_ = true;
}
}
diff --git a/content/renderer/devtools/devtools_agent.h b/content/renderer/devtools/devtools_agent.h
index 4c285cd..3dee087 100644
--- a/content/renderer/devtools/devtools_agent.h
+++ b/content/renderer/devtools/devtools_agent.h
@@ -36,8 +36,8 @@
explicit DevToolsAgent(RenderViewImpl* render_view);
virtual ~DevToolsAgent();
- // Returns agent instance for its host id.
- static DevToolsAgent* FromHostId(int host_id);
+ // Returns agent instance for its routing id.
+ static DevToolsAgent* FromRoutingId(int routing_id);
blink::WebDevToolsAgent* GetWebAgent();
@@ -51,6 +51,7 @@
virtual void sendMessageToInspectorFrontend(const blink::WebString& data);
virtual int hostIdentifier() OVERRIDE;
+ virtual int debuggerId() OVERRIDE;
virtual void saveAgentRuntimeState(const blink::WebString& state) OVERRIDE;
virtual blink::WebDevToolsAgentClient::WebKitClientMessageLoop*
createClientMessageLoop() OVERRIDE;
@@ -77,11 +78,12 @@
virtual void setTouchEventEmulationEnabled(bool enabled,
bool allow_pinch) OVERRIDE;
- void OnAttach();
- void OnReattach(const std::string& agent_state);
+ void OnAttach(const std::string& host_id);
+ void OnReattach(const std::string& host_id,
+ const std::string& agent_state);
void OnDetach();
void OnDispatchOnInspectorBackend(const std::string& message);
- void OnInspectElement(int x, int y);
+ void OnInspectElement(const std::string& host_id, int x, int y);
void OnAddMessageToConsole(ConsoleMessageLevel level,
const std::string& message);
void OnGpuTasksChunk(const std::vector<GpuTaskInfo>& tasks);
diff --git a/content/renderer/devtools/devtools_agent_filter.cc b/content/renderer/devtools/devtools_agent_filter.cc
index 5273462..b0a60f0 100644
--- a/content/renderer/devtools/devtools_agent_filter.cc
+++ b/content/renderer/devtools/devtools_agent_filter.cc
@@ -21,21 +21,21 @@
class MessageImpl : public WebDevToolsAgent::MessageDescriptor {
public:
- MessageImpl(const std::string& message, int host_id)
- : msg(message),
- host_id(host_id) {
+ MessageImpl(const std::string& message, int routing_id)
+ : msg_(message),
+ routing_id_(routing_id) {
}
virtual ~MessageImpl() {}
virtual WebDevToolsAgent* agent() {
- DevToolsAgent* agent = DevToolsAgent::FromHostId(host_id);
+ DevToolsAgent* agent = DevToolsAgent::FromRoutingId(routing_id_);
if (!agent)
return 0;
return agent->GetWebAgent();
}
- virtual WebString message() { return WebString::fromUTF8(msg); }
+ virtual WebString message() { return WebString::fromUTF8(msg_); }
private:
- std::string msg;
- int host_id;
+ std::string msg_;
+ int routing_id_;
};
} // namespace
diff --git a/content/renderer/dom_serializer_browsertest.cc b/content/renderer/dom_serializer_browsertest.cc
index 4c513d0..5f5ebfe 100644
--- a/content/renderer/dom_serializer_browsertest.cc
+++ b/content/renderer/dom_serializer_browsertest.cc
@@ -979,16 +979,8 @@
base::Unretained(this), file_url, path_dir_url));
}
-#if defined(THREAD_SANITIZER)
-// TSan reports a use-after-free in this test, see http://crbug.com/375672.
-#define MAYBE_SerializeHTMLDOMWithEmptyHead \
- DISABLED_SerializeHTMLDOMWithEmptyHead
-#else
-#define MAYBE_SerializeHTMLDOMWithEmptyHead SerializeHTMLDOMWithEmptyHead
-#endif
// Serializing page which has an empty HEAD tag.
-IN_PROC_BROWSER_TEST_F(DomSerializerTests,
- MAYBE_SerializeHTMLDOMWithEmptyHead) {
+IN_PROC_BROWSER_TEST_F(DomSerializerTests, SerializeHTMLDOMWithEmptyHead) {
// Need to spin up the renderer and also navigate to a file url so that the
// renderer code doesn't attempt a fork when it sees a load to file scheme
// from non-file scheme.
diff --git a/content/renderer/gamepad_shared_memory_reader.cc b/content/renderer/gamepad_shared_memory_reader.cc
index f1b1e83..3bfe0d0 100644
--- a/content/renderer/gamepad_shared_memory_reader.cc
+++ b/content/renderer/gamepad_shared_memory_reader.cc
@@ -101,16 +101,12 @@
memcpy(&gamepads, &read_into, sizeof(gamepads));
if (!ever_interacted_with_) {
- if (GamepadsHaveUserGesture(gamepads)) {
- ever_interacted_with_ = true;
- } else {
- // Clear the connected flag if the user hasn't interacted with any of the
- // gamepads to prevent fingerprinting. The actual data is not cleared.
- // WebKit will only copy out data into the JS buffers for connected
- // gamepads so this is sufficient.
- for (unsigned i = 0; i < blink::WebGamepads::itemsLengthCap; i++)
- gamepads.items[i].connected = false;
- }
+ // Clear the connected flag if the user hasn't interacted with any of the
+ // gamepads to prevent fingerprinting. The actual data is not cleared.
+ // WebKit will only copy out data into the JS buffers for connected
+ // gamepads so this is sufficient.
+ for (unsigned i = 0; i < blink::WebGamepads::itemsLengthCap; i++)
+ gamepads.items[i].connected = false;
}
}
@@ -144,6 +140,9 @@
void GamepadSharedMemoryReader::OnGamepadConnected(
int index,
const blink::WebGamepad& gamepad) {
+ // The browser already checks if the user actually interacted with a device.
+ ever_interacted_with_ = true;
+
if (gamepad_listener_)
gamepad_listener_->didConnectGamepad(index, gamepad);
}
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc
index f1f6101..fe393c7 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -31,6 +31,7 @@
#include "content/common/content_switches_internal.h"
#include "content/common/gpu/client/context_provider_command_buffer.h"
#include "content/public/common/content_switches.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
#include "content/renderer/input/input_handler_manager.h"
#include "content/renderer/render_thread_impl.h"
#include "gpu/command_buffer/client/gles2_interface.h"
@@ -40,7 +41,6 @@
#include "ui/gfx/frame_time.h"
#include "ui/gl/gl_switches.h"
#include "ui/native_theme/native_theme_switches.h"
-#include "webkit/renderer/compositor_bindings/web_layer_impl.h"
namespace base {
class Value;
@@ -452,7 +452,7 @@
void RenderWidgetCompositor::setRootLayer(const blink::WebLayer& layer) {
layer_tree_host_->SetRootLayer(
- static_cast<const webkit::WebLayerImpl*>(&layer)->layer());
+ static_cast<const WebLayerImpl*>(&layer)->layer());
}
void RenderWidgetCompositor::clearRootLayer() {
@@ -545,7 +545,7 @@
}
void RenderWidgetCompositor::registerForAnimations(blink::WebLayer* layer) {
- cc::Layer* cc_layer = static_cast<webkit::WebLayerImpl*>(layer)->layer();
+ cc::Layer* cc_layer = static_cast<WebLayerImpl*>(layer)->layer();
cc_layer->layer_animation_controller()->SetAnimationRegistrar(
layer_tree_host_->animation_registrar());
}
@@ -555,14 +555,13 @@
const blink::WebLayer* innerViewportScrollLayer,
const blink::WebLayer* outerViewportScrollLayer) {
layer_tree_host_->RegisterViewportLayers(
- static_cast<const webkit::WebLayerImpl*>(pageScaleLayer)->layer(),
- static_cast<const webkit::WebLayerImpl*>(innerViewportScrollLayer)
- ->layer(),
+ static_cast<const WebLayerImpl*>(pageScaleLayer)->layer(),
+ static_cast<const WebLayerImpl*>(innerViewportScrollLayer)->layer(),
// The outer viewport layer will only exist when using pinch virtual
// viewports.
- outerViewportScrollLayer ? static_cast<const webkit::WebLayerImpl*>(
- outerViewportScrollLayer)->layer()
- : NULL);
+ outerViewportScrollLayer
+ ? static_cast<const WebLayerImpl*>(outerViewportScrollLayer)->layer()
+ : NULL);
}
void RenderWidgetCompositor::clearViewportLayers() {
@@ -710,4 +709,8 @@
provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
}
+bool RenderWidgetCompositor::usesGpuRasterization() {
+ return layer_tree_host_->UseGpuRasterization();
+}
+
} // namespace content
diff --git a/content/renderer/gpu/render_widget_compositor.h b/content/renderer/gpu/render_widget_compositor.h
index 4160df2..d973c20 100644
--- a/content/renderer/gpu/render_widget_compositor.h
+++ b/content/renderer/gpu/render_widget_compositor.h
@@ -120,6 +120,7 @@
virtual void setShowDebugBorders(bool show);
virtual void setContinuousPaintingEnabled(bool enabled);
virtual void setShowScrollBottleneckRects(bool show);
+ virtual bool usesGpuRasterization() OVERRIDE;
// cc::LayerTreeHostClient implementation.
virtual void WillBeginMainFrame(int frame_id) OVERRIDE;
diff --git a/content/renderer/input/input_event_filter.cc b/content/renderer/input/input_event_filter.cc
index 06d07a9..fa31658 100644
--- a/content/renderer/input/input_event_filter.cc
+++ b/content/renderer/input/input_event_filter.cc
@@ -16,8 +16,8 @@
#include "content/common/input_messages.h"
#include "content/common/view_messages.h"
#include "content/public/common/content_switches.h"
-#include "ipc/ipc_channel.h"
#include "ipc/ipc_listener.h"
+#include "ipc/ipc_sender.h"
#include "ui/gfx/vector2d_f.h"
using blink::WebInputEvent;
@@ -89,9 +89,9 @@
scoped_ptr<IPC::Message>(new ViewHostMsg_DidStopFlinging(routing_id)));
}
-void InputEventFilter::OnFilterAdded(IPC::Channel* channel) {
+void InputEventFilter::OnFilterAdded(IPC::Sender* sender) {
io_loop_ = base::MessageLoopProxy::current();
- sender_ = channel;
+ sender_ = sender;
}
void InputEventFilter::OnFilterRemoved() {
diff --git a/content/renderer/input/input_event_filter.h b/content/renderer/input/input_event_filter.h
index 1088cf9..a80b9f8 100644
--- a/content/renderer/input/input_event_filter.h
+++ b/content/renderer/input/input_event_filter.h
@@ -60,7 +60,7 @@
virtual void DidStopFlinging(int routing_id) OVERRIDE;
// IPC::MessageFilter methods:
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
virtual void OnChannelClosing() OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
diff --git a/content/renderer/java/OWNERS b/content/renderer/java/OWNERS
index d378671..0cebb68 100644
--- a/content/renderer/java/OWNERS
+++ b/content/renderer/java/OWNERS
@@ -1,2 +1,2 @@
-steveblock@chromium.org
+mnaganov@chromium.org
torne@chromium.org
diff --git a/content/renderer/media/OWNERS b/content/renderer/media/OWNERS
index 5bcffbc..b1afdbb 100644
--- a/content/renderer/media/OWNERS
+++ b/content/renderer/media/OWNERS
@@ -1,7 +1,6 @@
acolwell@chromium.org
dalecurtis@chromium.org
ddorwin@chromium.org
-fischman@chromium.org
perkj@chromium.org
scherkus@chromium.org
shadi@chromium.org
diff --git a/content/renderer/media/aec_dump_message_filter.cc b/content/renderer/media/aec_dump_message_filter.cc
new file mode 100644
index 0000000..ed6aa4a
--- /dev/null
+++ b/content/renderer/media/aec_dump_message_filter.cc
@@ -0,0 +1,191 @@
+// Copyright 2014 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 "content/renderer/media/aec_dump_message_filter.h"
+
+#include "base/message_loop/message_loop_proxy.h"
+#include "content/common/media/aec_dump_messages.h"
+#include "content/renderer/media/webrtc_logging.h"
+#include "ipc/ipc_logging.h"
+#include "ipc/ipc_sender.h"
+
+namespace {
+const int kInvalidDelegateId = -1;
+}
+
+namespace content {
+
+AecDumpMessageFilter* AecDumpMessageFilter::g_filter = NULL;
+
+AecDumpMessageFilter::AecDumpMessageFilter(
+ const scoped_refptr<base::MessageLoopProxy>& io_message_loop,
+ const scoped_refptr<base::MessageLoopProxy>& main_message_loop)
+ : sender_(NULL),
+ delegate_id_counter_(0),
+ io_message_loop_(io_message_loop),
+ main_message_loop_(main_message_loop) {
+ DCHECK(!g_filter);
+ g_filter = this;
+}
+
+AecDumpMessageFilter::~AecDumpMessageFilter() {
+ DCHECK_EQ(g_filter, this);
+ g_filter = NULL;
+}
+
+// static
+scoped_refptr<AecDumpMessageFilter> AecDumpMessageFilter::Get() {
+ return g_filter;
+}
+
+void AecDumpMessageFilter::AddDelegate(
+ AecDumpMessageFilter::AecDumpDelegate* delegate) {
+ DCHECK(main_message_loop_->BelongsToCurrentThread());
+ DCHECK(delegate);
+ DCHECK_EQ(kInvalidDelegateId, GetIdForDelegate(delegate));
+
+ int id = delegate_id_counter_++;
+ delegates_[id] = delegate;
+
+ io_message_loop_->PostTask(
+ FROM_HERE,
+ base::Bind(
+ &AecDumpMessageFilter::RegisterAecDumpConsumer,
+ this,
+ id));
+}
+
+void AecDumpMessageFilter::RemoveDelegate(
+ AecDumpMessageFilter::AecDumpDelegate* delegate) {
+ DCHECK(main_message_loop_->BelongsToCurrentThread());
+ DCHECK(delegate);
+
+ int id = GetIdForDelegate(delegate);
+ DCHECK_NE(kInvalidDelegateId, id);
+ delegates_.erase(id);
+
+ io_message_loop_->PostTask(
+ FROM_HERE,
+ base::Bind(
+ &AecDumpMessageFilter::UnregisterAecDumpConsumer,
+ this,
+ id));
+}
+
+void AecDumpMessageFilter::Send(IPC::Message* message) {
+ DCHECK(io_message_loop_->BelongsToCurrentThread());
+ if (sender_)
+ sender_->Send(message);
+ else
+ delete message;
+}
+
+void AecDumpMessageFilter::RegisterAecDumpConsumer(int id) {
+ Send(new AecDumpMsg_RegisterAecDumpConsumer(id));
+}
+
+void AecDumpMessageFilter::UnregisterAecDumpConsumer(int id) {
+ Send(new AecDumpMsg_UnregisterAecDumpConsumer(id));
+}
+
+bool AecDumpMessageFilter::OnMessageReceived(const IPC::Message& message) {
+ DCHECK(io_message_loop_->BelongsToCurrentThread());
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP(AecDumpMessageFilter, message)
+ IPC_MESSAGE_HANDLER(AecDumpMsg_EnableAecDump, OnEnableAecDump)
+ IPC_MESSAGE_HANDLER(AecDumpMsg_DisableAecDump, OnDisableAecDump)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP()
+ return handled;
+}
+
+void AecDumpMessageFilter::OnFilterAdded(IPC::Sender* sender) {
+ DCHECK(io_message_loop_->BelongsToCurrentThread());
+ sender_ = sender;
+}
+
+void AecDumpMessageFilter::OnFilterRemoved() {
+ DCHECK(io_message_loop_->BelongsToCurrentThread());
+
+ // Once removed, a filter will not be used again. At this time the
+ // observer must be notified so it releases its reference.
+ OnChannelClosing();
+}
+
+void AecDumpMessageFilter::OnChannelClosing() {
+ DCHECK(io_message_loop_->BelongsToCurrentThread());
+ sender_ = NULL;
+ main_message_loop_->PostTask(
+ FROM_HERE,
+ base::Bind(
+ &AecDumpMessageFilter::DoChannelClosingOnDelegates,
+ this));
+}
+
+void AecDumpMessageFilter::OnEnableAecDump(
+ int id,
+ IPC::PlatformFileForTransit file_handle) {
+ DCHECK(io_message_loop_->BelongsToCurrentThread());
+ main_message_loop_->PostTask(
+ FROM_HERE,
+ base::Bind(
+ &AecDumpMessageFilter::DoEnableAecDump,
+ this,
+ id,
+ file_handle));
+}
+
+void AecDumpMessageFilter::OnDisableAecDump() {
+ DCHECK(io_message_loop_->BelongsToCurrentThread());
+ main_message_loop_->PostTask(
+ FROM_HERE,
+ base::Bind(
+ &AecDumpMessageFilter::DoDisableAecDump,
+ this));
+}
+
+void AecDumpMessageFilter::DoEnableAecDump(
+ int id,
+ IPC::PlatformFileForTransit file_handle) {
+ DCHECK(main_message_loop_->BelongsToCurrentThread());
+ DelegateMap::iterator it = delegates_.find(id);
+ if (it != delegates_.end()) {
+ it->second->OnAecDumpFile(file_handle);
+ } else {
+ // Delegate has been removed, we must close the file.
+ base::File file = IPC::PlatformFileForTransitToFile(file_handle);
+ DCHECK(file.IsValid());
+ file.Close();
+ }
+}
+
+void AecDumpMessageFilter::DoDisableAecDump() {
+ DCHECK(main_message_loop_->BelongsToCurrentThread());
+ for (DelegateMap::iterator it = delegates_.begin();
+ it != delegates_.end(); ++it) {
+ it->second->OnDisableAecDump();
+ }
+}
+
+void AecDumpMessageFilter::DoChannelClosingOnDelegates() {
+ DCHECK(main_message_loop_->BelongsToCurrentThread());
+ for (DelegateMap::iterator it = delegates_.begin();
+ it != delegates_.end(); ++it) {
+ it->second->OnIpcClosing();
+ }
+ delegates_.clear();
+}
+
+int AecDumpMessageFilter::GetIdForDelegate(
+ AecDumpMessageFilter::AecDumpDelegate* delegate) {
+ DCHECK(main_message_loop_->BelongsToCurrentThread());
+ for (DelegateMap::iterator it = delegates_.begin();
+ it != delegates_.end(); ++it) {
+ if (it->second == delegate)
+ return it->first;
+ }
+ return kInvalidDelegateId;
+}
+
+} // namespace content
diff --git a/content/renderer/media/aec_dump_message_filter.h b/content/renderer/media/aec_dump_message_filter.h
new file mode 100644
index 0000000..7268132
--- /dev/null
+++ b/content/renderer/media/aec_dump_message_filter.h
@@ -0,0 +1,108 @@
+// Copyright 2014 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 CONTENT_RENDERER_MEDIA_AEC_DUMP_MESSAGE_FILTER_H_
+#define CONTENT_RENDERER_MEDIA_AEC_DUMP_MESSAGE_FILTER_H_
+
+#include "base/gtest_prod_util.h"
+#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
+#include "content/renderer/render_thread_impl.h"
+#include "ipc/ipc_platform_file.h"
+#include "ipc/message_filter.h"
+
+namespace base {
+class MessageLoopProxy;
+}
+
+namespace content {
+
+// MessageFilter that handles AEC dump messages and forwards them to an
+// observer.
+class CONTENT_EXPORT AecDumpMessageFilter : public IPC::MessageFilter {
+ public:
+ class AecDumpDelegate {
+ public:
+ virtual void OnAecDumpFile(
+ const IPC::PlatformFileForTransit& file_handle) = 0;
+ virtual void OnDisableAecDump() = 0;
+ virtual void OnIpcClosing() = 0;
+ };
+
+ AecDumpMessageFilter(
+ const scoped_refptr<base::MessageLoopProxy>& io_message_loop,
+ const scoped_refptr<base::MessageLoopProxy>& main_message_loop);
+
+ // Getter for the one AecDumpMessageFilter object.
+ static scoped_refptr<AecDumpMessageFilter> Get();
+
+ // Adds a delegate that receives the enable and disable notifications.
+ void AddDelegate(AecDumpMessageFilter::AecDumpDelegate* delegate);
+
+ // Removes a delegate.
+ void RemoveDelegate(AecDumpMessageFilter::AecDumpDelegate* delegate);
+
+ // IO message loop associated with this message filter.
+ scoped_refptr<base::MessageLoopProxy> io_message_loop() const {
+ return io_message_loop_;
+ }
+
+ protected:
+ virtual ~AecDumpMessageFilter();
+
+ private:
+ // Sends an IPC message using |sender_|.
+ void Send(IPC::Message* message);
+
+ // Registers a consumer of AEC dump in the browser process. This consumer will
+ // get a file handle when the AEC dump is enabled and a notification when it
+ // is disabled.
+ void RegisterAecDumpConsumer(int id);
+
+ // Unregisters a consumer of AEC dump in the browser process.
+ void UnregisterAecDumpConsumer(int id);
+
+ // IPC::MessageFilter override. Called on |io_message_loop|.
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE;
+ virtual void OnFilterRemoved() OVERRIDE;
+ virtual void OnChannelClosing() OVERRIDE;
+
+ // Accessed on |io_message_loop|.
+ void OnEnableAecDump(int id, IPC::PlatformFileForTransit file_handle);
+ void OnDisableAecDump();
+
+ // Accessed on |main_message_loop_|.
+ void DoEnableAecDump(int id, IPC::PlatformFileForTransit file_handle);
+ void DoDisableAecDump();
+ void DoChannelClosingOnDelegates();
+ int GetIdForDelegate(AecDumpMessageFilter::AecDumpDelegate* delegate);
+
+ // Accessed on |io_message_loop_|.
+ IPC::Sender* sender_;
+
+ // The delgates for this filter. Must only be accessed on
+ // |main_message_loop_|.
+ typedef std::map<int, AecDumpMessageFilter::AecDumpDelegate*> DelegateMap;
+ DelegateMap delegates_;
+
+ // Counter for generating unique IDs to delegates. Accessed on
+ // |main_message_loop_|.
+ int delegate_id_counter_;
+
+ // Message loop on which IPC calls are driven.
+ const scoped_refptr<base::MessageLoopProxy> io_message_loop_;
+
+ // Main message loop.
+ const scoped_refptr<base::MessageLoopProxy> main_message_loop_;
+
+ // The singleton instance for this filter.
+ static AecDumpMessageFilter* g_filter;
+
+ DISALLOW_COPY_AND_ASSIGN(AecDumpMessageFilter);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_MEDIA_AEC_DUMP_MESSAGE_FILTER_H_
diff --git a/content/renderer/media/android/media_source_delegate.cc b/content/renderer/media/android/media_source_delegate.cc
index 107684b..eeb4c7e 100644
--- a/content/renderer/media/android/media_source_delegate.cc
+++ b/content/renderer/media/android/media_source_delegate.cc
@@ -509,8 +509,7 @@
// Notify demuxer ready when both streams are not encrypted.
is_demuxer_ready_ = true;
- if (CanNotifyDemuxerReady())
- NotifyDemuxerReady();
+ NotifyDemuxerReady();
}
void MediaSourceDelegate::InitAudioDecryptingDemuxerStream() {
@@ -558,8 +557,7 @@
// Try to notify demuxer ready when audio DDS initialization finished and
// video is not encrypted.
is_demuxer_ready_ = true;
- if (CanNotifyDemuxerReady())
- NotifyDemuxerReady();
+ NotifyDemuxerReady();
}
void MediaSourceDelegate::OnVideoDecryptingDemuxerStreamInitDone(
@@ -575,8 +573,7 @@
// Try to notify demuxer ready when video DDS initialization finished.
is_demuxer_ready_ = true;
- if (CanNotifyDemuxerReady())
- NotifyDemuxerReady();
+ NotifyDemuxerReady();
}
void MediaSourceDelegate::OnDemuxerSeekDone(media::PipelineStatus status) {
@@ -644,15 +641,10 @@
delete this;
}
-bool MediaSourceDelegate::CanNotifyDemuxerReady() {
- DCHECK(media_loop_->BelongsToCurrentThread());
- return is_demuxer_ready_;
-}
-
void MediaSourceDelegate::NotifyDemuxerReady() {
DCHECK(media_loop_->BelongsToCurrentThread());
DVLOG(1) << __FUNCTION__ << " : " << demuxer_client_id_;
- DCHECK(CanNotifyDemuxerReady());
+ DCHECK(is_demuxer_ready_);
scoped_ptr<DemuxerConfigs> configs(new DemuxerConfigs());
GetDemuxerConfigFromStream(configs.get(), true);
@@ -745,7 +737,7 @@
bool MediaSourceDelegate::GetDemuxerConfigFromStream(
media::DemuxerConfigs* configs, bool is_audio) {
DCHECK(media_loop_->BelongsToCurrentThread());
- if (!CanNotifyDemuxerReady())
+ if (!is_demuxer_ready_)
return false;
if (is_audio && audio_stream_) {
media::AudioDecoderConfig config = audio_stream_->audio_decoder_config();
diff --git a/content/renderer/media/android/media_source_delegate.h b/content/renderer/media/android/media_source_delegate.h
index 45854f2..28b1832 100644
--- a/content/renderer/media/android/media_source_delegate.h
+++ b/content/renderer/media/android/media_source_delegate.h
@@ -151,7 +151,6 @@
void OnNeedKey(const std::string& type,
const std::vector<uint8>& init_data);
void NotifyDemuxerReady();
- bool CanNotifyDemuxerReady();
void StopDemuxer();
void InitializeDemuxer();
diff --git a/content/renderer/media/android/renderer_media_player_manager.cc b/content/renderer/media/android/renderer_media_player_manager.cc
index 1c65ab5..f3e0bc0 100644
--- a/content/renderer/media/android/renderer_media_player_manager.cc
+++ b/content/renderer/media/android/renderer_media_player_manager.cc
@@ -23,14 +23,9 @@
}
RendererMediaPlayerManager::~RendererMediaPlayerManager() {
- std::map<int, WebMediaPlayerAndroid*>::iterator player_it;
- for (player_it = media_players_.begin();
- player_it != media_players_.end(); ++player_it) {
- WebMediaPlayerAndroid* player = player_it->second;
- player->Detach();
- }
-
- Send(new MediaPlayerHostMsg_DestroyAllMediaPlayers(routing_id()));
+ DCHECK(media_players_.empty())
+ << "RendererMediaPlayerManager is owned by RenderFrameImpl and is "
+ "destroyed only after all media players are destroyed.";
}
bool RendererMediaPlayerManager::OnMessageReceived(const IPC::Message& msg) {
@@ -71,10 +66,18 @@
int player_id,
const GURL& url,
const GURL& first_party_for_cookies,
- int demuxer_client_id) {
- Send(new MediaPlayerHostMsg_Initialize(
- routing_id(), type, player_id, url, first_party_for_cookies,
- demuxer_client_id));
+ int demuxer_client_id,
+ const GURL& frame_url) {
+
+ MediaPlayerHostMsg_Initialize_Params media_player_params;
+ media_player_params.type = type;
+ media_player_params.player_id = player_id;
+ media_player_params.demuxer_client_id = demuxer_client_id;
+ media_player_params.url = url;
+ media_player_params.first_party_for_cookies = first_party_for_cookies;
+ media_player_params.frame_url = frame_url;
+
+ Send(new MediaPlayerHostMsg_Initialize(routing_id(), media_player_params));
}
void RendererMediaPlayerManager::Start(int player_id) {
diff --git a/content/renderer/media/android/renderer_media_player_manager.h b/content/renderer/media/android/renderer_media_player_manager.h
index 3ce079f..4bcb288 100644
--- a/content/renderer/media/android/renderer_media_player_manager.h
+++ b/content/renderer/media/android/renderer_media_player_manager.h
@@ -23,8 +23,9 @@
class RectF;
}
-namespace content {
+struct MediaPlayerHostMsg_Initialize_Params;
+namespace content {
class WebMediaPlayerAndroid;
// Class for managing all the WebMediaPlayerAndroid objects in the same
@@ -43,7 +44,8 @@
int player_id,
const GURL& url,
const GURL& first_party_for_cookies,
- int demuxer_client_id);
+ int demuxer_client_id,
+ const GURL& frame_url);
// Starts the player.
void Start(int player_id);
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index 132fb9e..9833546 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -19,6 +19,7 @@
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/renderer/render_frame.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
#include "content/renderer/media/android/renderer_demuxer_android.h"
#include "content/renderer/media/android/renderer_media_player_manager.h"
#include "content/renderer/media/crypto/key_systems.h"
@@ -51,7 +52,6 @@
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkTypeface.h"
#include "ui/gfx/image/image.h"
-#include "webkit/renderer/compositor_bindings/web_layer_impl.h"
static const uint32 kGLTextureExternalOES = 0x8D65;
@@ -173,6 +173,8 @@
void WebMediaPlayerAndroid::load(LoadType load_type,
const blink::WebURL& url,
CORSMode cors_mode) {
+ ReportMediaSchemeUma(GURL(url));
+
switch (load_type) {
case LoadTypeURL:
player_type_ = MEDIA_PLAYER_TYPE_URL;
@@ -237,7 +239,8 @@
url_ = url;
GURL first_party_url = frame_->document().firstPartyForCookies();
player_manager_->Initialize(
- player_type_, player_id_, url, first_party_url, demuxer_client_id);
+ player_type_, player_id_, url, first_party_url, demuxer_client_id,
+ frame_->document().url());
if (player_manager_->ShouldEnterFullscreen(frame_))
player_manager_->EnterFullscreen(player_id_, frame_);
@@ -727,8 +730,7 @@
// Lazily allocate compositing layer.
if (!video_weblayer_) {
- video_weblayer_.reset(
- new webkit::WebLayerImpl(cc::VideoLayer::Create(this)));
+ video_weblayer_.reset(new WebLayerImpl(cc::VideoLayer::Create(this)));
client_->setWebLayer(video_weblayer_.get());
}
@@ -877,27 +879,9 @@
}
void WebMediaPlayerAndroid::OnDestruct() {
- if (player_manager_)
- player_manager_->UnregisterMediaPlayer(player_id_);
- Detach();
-}
-
-void WebMediaPlayerAndroid::Detach() {
- if (stream_id_) {
- GLES2Interface* gl = stream_texture_factory_->ContextGL();
- gl->DeleteTextures(1, &texture_id_);
- texture_id_ = 0;
- texture_mailbox_ = gpu::Mailbox();
- stream_id_ = 0;
- }
-
- media_source_delegate_.reset();
- {
- base::AutoLock auto_lock(current_frame_lock_);
- current_frame_ = NULL;
- }
- is_remote_ = false;
- player_manager_ = NULL;
+ NOTREACHED() << "WebMediaPlayer should be destroyed before any "
+ "RenderFrameObserver::OnDestruct() gets called when "
+ "the RenderFrame goes away.";
}
void WebMediaPlayerAndroid::Pause(bool is_media_related_action) {
diff --git a/content/renderer/media/android/webmediaplayer_android.h b/content/renderer/media/android/webmediaplayer_android.h
index 8c65d26..67d09e0 100644
--- a/content/renderer/media/android/webmediaplayer_android.h
+++ b/content/renderer/media/android/webmediaplayer_android.h
@@ -49,14 +49,11 @@
class MediaLog;
}
-namespace webkit {
-class WebLayerImpl;
-}
-
namespace content {
class RendererCdmManager;
class RendererMediaPlayerManager;
class WebContentDecryptionModuleImpl;
+class WebLayerImpl;
class WebMediaPlayerDelegate;
// This class implements blink::WebMediaPlayer by keeping the android
@@ -193,9 +190,6 @@
// RenderFrameObserver implementation.
virtual void OnDestruct() OVERRIDE;
- // Detach the player from its manager.
- void Detach();
-
#if defined(VIDEO_HOLE)
// Calculate the boundary rectangle of the media player (i.e. location and
// size of the video frame).
@@ -395,7 +389,7 @@
// not NULL while the compositor is actively using this webmediaplayer.
cc::VideoFrameProvider::Client* video_frame_provider_client_;
- scoped_ptr<webkit::WebLayerImpl> video_weblayer_;
+ scoped_ptr<WebLayerImpl> video_weblayer_;
#if defined(VIDEO_HOLE)
// A rectangle represents the geometry of video frame, when computed last
diff --git a/content/renderer/media/audio_input_message_filter.cc b/content/renderer/media/audio_input_message_filter.cc
index 11928ea..412196c 100644
--- a/content/renderer/media/audio_input_message_filter.cc
+++ b/content/renderer/media/audio_input_message_filter.cc
@@ -9,8 +9,8 @@
#include "base/strings/stringprintf.h"
#include "content/common/media/audio_messages.h"
#include "content/renderer/media/webrtc_logging.h"
-#include "ipc/ipc_channel.h"
#include "ipc/ipc_logging.h"
+#include "ipc/ipc_sender.h"
namespace content {
@@ -45,7 +45,7 @@
AudioInputMessageFilter::AudioInputMessageFilter(
const scoped_refptr<base::MessageLoopProxy>& io_message_loop)
- : channel_(NULL),
+ : sender_(NULL),
io_message_loop_(io_message_loop) {
DCHECK(!g_filter);
g_filter = this;
@@ -63,10 +63,10 @@
void AudioInputMessageFilter::Send(IPC::Message* message) {
DCHECK(io_message_loop_->BelongsToCurrentThread());
- if (!channel_) {
+ if (!sender_) {
delete message;
} else {
- channel_->Send(message);
+ sender_->Send(message);
}
}
@@ -84,11 +84,11 @@
return handled;
}
-void AudioInputMessageFilter::OnFilterAdded(IPC::Channel* channel) {
+void AudioInputMessageFilter::OnFilterAdded(IPC::Sender* sender) {
DCHECK(io_message_loop_->BelongsToCurrentThread());
- // Captures the channel for IPC.
- channel_ = channel;
+ // Captures the sender for IPC.
+ sender_ = sender;
}
void AudioInputMessageFilter::OnFilterRemoved() {
@@ -101,7 +101,7 @@
void AudioInputMessageFilter::OnChannelClosing() {
DCHECK(io_message_loop_->BelongsToCurrentThread());
- channel_ = NULL;
+ sender_ = NULL;
DLOG_IF(WARNING, !delegates_.IsEmpty())
<< "Not all audio devices have been closed.";
diff --git a/content/renderer/media/audio_input_message_filter.h b/content/renderer/media/audio_input_message_filter.h
index 82b4dd0..1107463 100644
--- a/content/renderer/media/audio_input_message_filter.h
+++ b/content/renderer/media/audio_input_message_filter.h
@@ -54,7 +54,7 @@
// IPC::MessageFilter override. Called on |io_message_loop_|.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
virtual void OnChannelClosing() OVERRIDE;
@@ -80,8 +80,8 @@
// A map of stream ids to delegates.
IDMap<media::AudioInputIPCDelegate> delegates_;
- // IPC channel for Send(), must only be accesed on |io_message_loop_|.
- IPC::Channel* channel_;
+ // IPC sender for Send(), must only be accesed on |io_message_loop_|.
+ IPC::Sender* sender_;
// Message loop on which IPC calls are driven.
const scoped_refptr<base::MessageLoopProxy> io_message_loop_;
diff --git a/content/renderer/media/audio_message_filter.cc b/content/renderer/media/audio_message_filter.cc
index 42187be..fde42fb 100644
--- a/content/renderer/media/audio_message_filter.cc
+++ b/content/renderer/media/audio_message_filter.cc
@@ -46,7 +46,7 @@
AudioMessageFilter::AudioMessageFilter(
const scoped_refptr<base::MessageLoopProxy>& io_message_loop)
- : channel_(NULL),
+ : sender_(NULL),
audio_hardware_config_(NULL),
io_message_loop_(io_message_loop) {
DCHECK(!g_filter);
@@ -118,10 +118,10 @@
void AudioMessageFilter::Send(IPC::Message* message) {
DCHECK(io_message_loop_->BelongsToCurrentThread());
- if (!channel_) {
+ if (!sender_) {
delete message;
} else {
- channel_->Send(message);
+ sender_->Send(message);
}
}
@@ -137,9 +137,9 @@
return handled;
}
-void AudioMessageFilter::OnFilterAdded(IPC::Channel* channel) {
+void AudioMessageFilter::OnFilterAdded(IPC::Sender* sender) {
DCHECK(io_message_loop_->BelongsToCurrentThread());
- channel_ = channel;
+ sender_ = sender;
}
void AudioMessageFilter::OnFilterRemoved() {
@@ -152,7 +152,7 @@
void AudioMessageFilter::OnChannelClosing() {
DCHECK(io_message_loop_->BelongsToCurrentThread());
- channel_ = NULL;
+ sender_ = NULL;
DLOG_IF(WARNING, !delegates_.IsEmpty())
<< "Not all audio devices have been closed.";
diff --git a/content/renderer/media/audio_message_filter.h b/content/renderer/media/audio_message_filter.h
index 71bf012..ed4d5b2 100644
--- a/content/renderer/media/audio_message_filter.h
+++ b/content/renderer/media/audio_message_filter.h
@@ -65,12 +65,12 @@
// stream_id and the source render_view_id.
class AudioOutputIPCImpl;
- // Sends an IPC message using |channel_|.
+ // Sends an IPC message using |sender_|.
void Send(IPC::Message* message);
// IPC::MessageFilter override. Called on |io_message_loop|.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
virtual void OnChannelClosing() OVERRIDE;
@@ -92,8 +92,8 @@
void OnOutputDeviceChanged(int stream_id, int new_buffer_size,
int new_sample_rate);
- // IPC channel for Send(); must only be accesed on |io_message_loop_|.
- IPC::Channel* channel_;
+ // IPC sender for Send(); must only be accesed on |io_message_loop_|.
+ IPC::Sender* sender_;
// A map of stream ids to delegates; must only be accessed on
// |io_message_loop_|.
diff --git a/content/renderer/media/buffered_data_source.cc b/content/renderer/media/buffered_data_source.cc
index 19e9f00..f4a3094 100644
--- a/content/renderer/media/buffered_data_source.cc
+++ b/content/renderer/media/buffered_data_source.cc
@@ -511,10 +511,9 @@
}
void BufferedDataSource::UpdateDeferStrategy(bool paused) {
- // 200 responses end up not being reused to satisfy future range requests,
- // and we don't want to get too far ahead of the read-head (and thus require
- // a restart), so keep to the thresholds.
- if (!loader_->range_supported()) {
+ // No need to aggressively buffer when we are assuming the resource is fully
+ // buffered.
+ if (assume_fully_buffered()) {
loader_->UpdateDeferStrategy(BufferedResourceLoader::kCapacityDefer);
return;
}
@@ -523,14 +522,15 @@
// and we're paused, then try to load as much as possible (the loader will
// fall back to kCapacityDefer if it knows the current response won't be
// useful from the cache in the future).
- if (media_has_played_ && paused) {
+ if (media_has_played_ && paused && loader_->range_supported()) {
loader_->UpdateDeferStrategy(BufferedResourceLoader::kNeverDefer);
return;
}
- // If media is currently playing or the page indicated preload=auto,
- // use threshold strategy to enable/disable deferring when the buffer
- // is full/depleted.
+ // If media is currently playing or the page indicated preload=auto or the
+ // the server does not support the byte range request or we do not want to go
+ // too far ahead of the read head, use threshold strategy to enable/disable
+ // deferring when the buffer is full/depleted.
loader_->UpdateDeferStrategy(BufferedResourceLoader::kCapacityDefer);
}
diff --git a/content/renderer/media/buffered_data_source_unittest.cc b/content/renderer/media/buffered_data_source_unittest.cc
index 37ff6f8..403a93b 100644
--- a/content/renderer/media/buffered_data_source_unittest.cc
+++ b/content/renderer/media/buffered_data_source_unittest.cc
@@ -110,7 +110,9 @@
class BufferedDataSourceTest : public testing::Test {
public:
BufferedDataSourceTest()
- : view_(WebView::create(NULL)), frame_(WebLocalFrame::create(&client_)) {
+ : view_(WebView::create(NULL)),
+ frame_(WebLocalFrame::create(&client_)),
+ preload_(AUTO) {
view_->setMainFrame(frame_);
}
@@ -128,6 +130,7 @@
message_loop_.message_loop_proxy(),
view_->mainFrame()->toWebLocalFrame(),
&host_));
+ data_source_->SetPreload(preload_);
response_generator_.reset(new TestResponseGenerator(gurl, kFileSize));
ExpectCreateResourceLoader();
@@ -140,6 +143,14 @@
EXPECT_EQ(data_source_->downloading(), is_http);
}
+ // Helper to initialize tests with a valid 200 response.
+ void InitializeWith200Response() {
+ Initialize(kHttpUrl, true);
+
+ EXPECT_CALL(host_, SetTotalBytes(response_generator_->content_length()));
+ Respond(response_generator_->Generate200());
+ }
+
// Helper to initialize tests with a valid 206 response.
void InitializeWith206Response() {
Initialize(kHttpUrl, true);
@@ -215,6 +226,7 @@
}
Preload preload() { return data_source_->preload_; }
+ void set_preload(Preload preload) { preload_ = preload; }
BufferedResourceLoader::DeferStrategy defer_strategy() {
return loader()->defer_strategy_;
}
@@ -222,6 +234,10 @@
int data_source_playback_rate() { return data_source_->playback_rate_; }
int loader_bitrate() { return loader()->bitrate_; }
int loader_playback_rate() { return loader()->playback_rate_; }
+ bool is_local_source() { return data_source_->assume_fully_buffered(); }
+ void set_might_be_reused_from_cache_in_future(bool value) {
+ loader()->might_be_reused_from_cache_in_future_ = value;
+ }
scoped_ptr<MockBufferedDataSource> data_source_;
@@ -237,14 +253,13 @@
// Used for calling BufferedDataSource::Read().
uint8 buffer_[kDataSize];
+ Preload preload_;
+
DISALLOW_COPY_AND_ASSIGN(BufferedDataSourceTest);
};
TEST_F(BufferedDataSourceTest, Range_Supported) {
- Initialize(kHttpUrl, true);
-
- EXPECT_CALL(host_, SetTotalBytes(response_generator_->content_length()));
- Respond(response_generator_->Generate206(0));
+ InitializeWith206Response();
EXPECT_TRUE(data_source_->loading());
EXPECT_FALSE(data_source_->IsStreaming());
@@ -271,9 +286,7 @@
}
TEST_F(BufferedDataSourceTest, Range_NotSupported) {
- Initialize(kHttpUrl, true);
- EXPECT_CALL(host_, SetTotalBytes(response_generator_->content_length()));
- Respond(response_generator_->Generate200());
+ InitializeWith200Response();
EXPECT_TRUE(data_source_->loading());
EXPECT_TRUE(data_source_->IsStreaming());
@@ -672,4 +685,121 @@
Stop();
}
+TEST_F(BufferedDataSourceTest, LocalResource_DeferStrategy) {
+ InitializeWithFileResponse();
+
+ EXPECT_EQ(AUTO, preload());
+ EXPECT_TRUE(is_local_source());
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+
+ data_source_->MediaIsPlaying();
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+
+ data_source_->MediaIsPaused();
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+
+ Stop();
+}
+
+TEST_F(BufferedDataSourceTest, LocalResource_PreloadMetadata_DeferStrategy) {
+ set_preload(METADATA);
+ InitializeWithFileResponse();
+
+ EXPECT_EQ(METADATA, preload());
+ EXPECT_TRUE(is_local_source());
+ EXPECT_EQ(BufferedResourceLoader::kReadThenDefer, defer_strategy());
+
+ data_source_->MediaIsPlaying();
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+
+ data_source_->MediaIsPaused();
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+
+ Stop();
+}
+
+TEST_F(BufferedDataSourceTest, ExternalResource_Reponse200_DeferStrategy) {
+ InitializeWith200Response();
+
+ EXPECT_EQ(AUTO, preload());
+ EXPECT_FALSE(is_local_source());
+ EXPECT_FALSE(loader()->range_supported());
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+
+ data_source_->MediaIsPlaying();
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+
+ data_source_->MediaIsPaused();
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+
+ Stop();
+}
+
+TEST_F(BufferedDataSourceTest,
+ ExternalResource_Response200_PreloadMetadata_DeferStrategy) {
+ set_preload(METADATA);
+ InitializeWith200Response();
+
+ EXPECT_EQ(METADATA, preload());
+ EXPECT_FALSE(is_local_source());
+ EXPECT_FALSE(loader()->range_supported());
+ EXPECT_EQ(BufferedResourceLoader::kReadThenDefer, defer_strategy());
+
+ data_source_->MediaIsPlaying();
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+
+ data_source_->MediaIsPaused();
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+
+ Stop();
+}
+
+TEST_F(BufferedDataSourceTest, ExternalResource_Reponse206_DeferStrategy) {
+ InitializeWith206Response();
+
+ EXPECT_EQ(AUTO, preload());
+ EXPECT_FALSE(is_local_source());
+ EXPECT_TRUE(loader()->range_supported());
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+
+ data_source_->MediaIsPlaying();
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+ set_might_be_reused_from_cache_in_future(true);
+ data_source_->MediaIsPaused();
+ EXPECT_EQ(BufferedResourceLoader::kNeverDefer, defer_strategy());
+
+ data_source_->MediaIsPlaying();
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+ set_might_be_reused_from_cache_in_future(false);
+ data_source_->MediaIsPaused();
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+
+ Stop();
+}
+
+TEST_F(BufferedDataSourceTest,
+ ExternalResource_Response206_PreloadMetadata_DeferStrategy) {
+ set_preload(METADATA);
+ InitializeWith206Response();
+
+ EXPECT_EQ(METADATA, preload());
+ EXPECT_FALSE(is_local_source());
+ EXPECT_TRUE(loader()->range_supported());
+ EXPECT_EQ(BufferedResourceLoader::kReadThenDefer, defer_strategy());
+
+ data_source_->MediaIsPlaying();
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+ set_might_be_reused_from_cache_in_future(true);
+ data_source_->MediaIsPaused();
+ EXPECT_EQ(BufferedResourceLoader::kNeverDefer, defer_strategy());
+
+ data_source_->MediaIsPlaying();
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+ set_might_be_reused_from_cache_in_future(false);
+ data_source_->MediaIsPaused();
+ EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
+
+ Stop();
+}
+
} // namespace content
diff --git a/content/renderer/media/buffered_resource_loader.cc b/content/renderer/media/buffered_resource_loader.cc
index 128340d..24b1213 100644
--- a/content/renderer/media/buffered_resource_loader.cc
+++ b/content/renderer/media/buffered_resource_loader.cc
@@ -389,7 +389,7 @@
// received a response from HTTP/HTTPS protocol or the request was
// successful (in particular range request). So we only verify the partial
// response for HTTP and HTTPS protocol.
- if (url_.SchemeIs(url::kHttpScheme) || url_.SchemeIs(url::kHttpsScheme)) {
+ if (url_.SchemeIsHTTPOrHTTPS()) {
bool partial_response = (response.httpStatusCode() == kHttpPartialContent);
bool ok_response = (response.httpStatusCode() == kHttpOK);
diff --git a/content/renderer/media/cdm_session_adapter.cc b/content/renderer/media/cdm_session_adapter.cc
index 71e3479..5550c44 100644
--- a/content/renderer/media/cdm_session_adapter.cc
+++ b/content/renderer/media/cdm_session_adapter.cc
@@ -7,20 +7,17 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/memory/weak_ptr.h"
+#include "base/stl_util.h"
#include "content/renderer/media/crypto/content_decryption_module_factory.h"
#include "content/renderer/media/webcontentdecryptionmodulesession_impl.h"
+#include "media/base/cdm_promise.h"
#include "media/base/media_keys.h"
#include "url/gurl.h"
namespace content {
-const uint32 kStartingSessionId = 1;
-uint32 CdmSessionAdapter::next_session_id_ = kStartingSessionId;
-COMPILE_ASSERT(kStartingSessionId > media::MediaKeys::kInvalidSessionId,
- invalid_starting_value);
-
CdmSessionAdapter::CdmSessionAdapter() :
-#if defined(OS_ANDROID)
+#if defined(ENABLE_BROWSER_CDMS)
cdm_id_(0),
#endif
weak_ptr_factory_(this) {}
@@ -30,7 +27,7 @@
bool CdmSessionAdapter::Initialize(
#if defined(ENABLE_PEPPER_CDMS)
const CreatePepperCdmCB& create_pepper_cdm_cb,
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
RendererCdmManager* manager,
#endif // defined(ENABLE_PEPPER_CDMS)
const std::string& key_system,
@@ -41,11 +38,10 @@
security_origin,
#if defined(ENABLE_PEPPER_CDMS)
create_pepper_cdm_cb,
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
manager,
&cdm_id_,
#endif // defined(ENABLE_PEPPER_CDMS)
- base::Bind(&CdmSessionAdapter::OnSessionCreated, weak_this),
base::Bind(&CdmSessionAdapter::OnSessionMessage, weak_this),
base::Bind(&CdmSessionAdapter::OnSessionReady, weak_this),
base::Bind(&CdmSessionAdapter::OnSessionClosed, weak_this),
@@ -57,103 +53,104 @@
WebContentDecryptionModuleSessionImpl* CdmSessionAdapter::CreateSession(
blink::WebContentDecryptionModuleSession::Client* client) {
- // Generate a unique internal session id for the new session.
- uint32 session_id = next_session_id_++;
- DCHECK(sessions_.find(session_id) == sessions_.end());
- WebContentDecryptionModuleSessionImpl* session =
- new WebContentDecryptionModuleSessionImpl(session_id, client, this);
- sessions_[session_id] = session;
- return session;
+ return new WebContentDecryptionModuleSessionImpl(client, this);
}
-void CdmSessionAdapter::RemoveSession(uint32 session_id) {
- DCHECK(sessions_.find(session_id) != sessions_.end());
- sessions_.erase(session_id);
+void CdmSessionAdapter::RegisterSession(
+ const std::string& web_session_id,
+ base::WeakPtr<WebContentDecryptionModuleSessionImpl> session) {
+ DCHECK(!ContainsKey(sessions_, web_session_id));
+ sessions_[web_session_id] = session;
}
-void CdmSessionAdapter::InitializeNewSession(uint32 session_id,
- const std::string& content_type,
- const uint8* init_data,
- int init_data_length) {
- DCHECK(sessions_.find(session_id) != sessions_.end());
- media_keys_->CreateSession(
- session_id, content_type, init_data, init_data_length);
+void CdmSessionAdapter::RemoveSession(const std::string& web_session_id) {
+ DCHECK(ContainsKey(sessions_, web_session_id));
+ sessions_.erase(web_session_id);
}
-void CdmSessionAdapter::UpdateSession(uint32 session_id,
- const uint8* response,
- int response_length) {
- DCHECK(sessions_.find(session_id) != sessions_.end());
- media_keys_->UpdateSession(session_id, response, response_length);
+void CdmSessionAdapter::InitializeNewSession(
+ const std::string& init_data_type,
+ const uint8* init_data,
+ int init_data_length,
+ media::MediaKeys::SessionType session_type,
+ scoped_ptr<media::NewSessionCdmPromise> promise) {
+ media_keys_->CreateSession(init_data_type,
+ init_data,
+ init_data_length,
+ session_type,
+ promise.Pass());
}
-void CdmSessionAdapter::ReleaseSession(uint32 session_id) {
- DCHECK(sessions_.find(session_id) != sessions_.end());
- media_keys_->ReleaseSession(session_id);
+void CdmSessionAdapter::UpdateSession(
+ const std::string& web_session_id,
+ const uint8* response,
+ int response_length,
+ scoped_ptr<media::SimpleCdmPromise> promise) {
+ media_keys_->UpdateSession(
+ web_session_id, response, response_length, promise.Pass());
+}
+
+void CdmSessionAdapter::ReleaseSession(
+ const std::string& web_session_id,
+ scoped_ptr<media::SimpleCdmPromise> promise) {
+ media_keys_->ReleaseSession(web_session_id, promise.Pass());
}
media::Decryptor* CdmSessionAdapter::GetDecryptor() {
return media_keys_->GetDecryptor();
}
-#if defined(OS_ANDROID)
+#if defined(ENABLE_BROWSER_CDMS)
int CdmSessionAdapter::GetCdmId() const {
return cdm_id_;
}
-#endif // defined(OS_ANDROID)
+#endif // defined(ENABLE_BROWSER_CDMS)
-void CdmSessionAdapter::OnSessionCreated(uint32 session_id,
- const std::string& web_session_id) {
- WebContentDecryptionModuleSessionImpl* session = GetSession(session_id);
- DLOG_IF(WARNING, !session) << __FUNCTION__ << " for unknown session "
- << session_id;
- if (session)
- session->OnSessionCreated(web_session_id);
-}
-
-void CdmSessionAdapter::OnSessionMessage(uint32 session_id,
+void CdmSessionAdapter::OnSessionMessage(const std::string& web_session_id,
const std::vector<uint8>& message,
const GURL& destination_url) {
- WebContentDecryptionModuleSessionImpl* session = GetSession(session_id);
+ WebContentDecryptionModuleSessionImpl* session = GetSession(web_session_id);
DLOG_IF(WARNING, !session) << __FUNCTION__ << " for unknown session "
- << session_id;
+ << web_session_id;
if (session)
session->OnSessionMessage(message, destination_url);
}
-void CdmSessionAdapter::OnSessionReady(uint32 session_id) {
- WebContentDecryptionModuleSessionImpl* session = GetSession(session_id);
+void CdmSessionAdapter::OnSessionReady(const std::string& web_session_id) {
+ WebContentDecryptionModuleSessionImpl* session = GetSession(web_session_id);
DLOG_IF(WARNING, !session) << __FUNCTION__ << " for unknown session "
- << session_id;
+ << web_session_id;
if (session)
session->OnSessionReady();
}
-void CdmSessionAdapter::OnSessionClosed(uint32 session_id) {
- WebContentDecryptionModuleSessionImpl* session = GetSession(session_id);
+void CdmSessionAdapter::OnSessionClosed(const std::string& web_session_id) {
+ WebContentDecryptionModuleSessionImpl* session = GetSession(web_session_id);
DLOG_IF(WARNING, !session) << __FUNCTION__ << " for unknown session "
- << session_id;
+ << web_session_id;
if (session)
session->OnSessionClosed();
}
-void CdmSessionAdapter::OnSessionError(uint32 session_id,
- media::MediaKeys::KeyError error_code,
- uint32 system_code) {
- WebContentDecryptionModuleSessionImpl* session = GetSession(session_id);
+void CdmSessionAdapter::OnSessionError(
+ const std::string& web_session_id,
+ media::MediaKeys::Exception exception_code,
+ uint32 system_code,
+ const std::string& error_message) {
+ WebContentDecryptionModuleSessionImpl* session = GetSession(web_session_id);
DLOG_IF(WARNING, !session) << __FUNCTION__ << " for unknown session "
- << session_id;
+ << web_session_id;
if (session)
- session->OnSessionError(error_code, system_code);
+ session->OnSessionError(exception_code, system_code, error_message);
}
WebContentDecryptionModuleSessionImpl* CdmSessionAdapter::GetSession(
- uint32 session_id) {
+ const std::string& web_session_id) {
// Since session objects may get garbage collected, it is possible that there
// are events coming back from the CDM and the session has been unregistered.
// We can not tell if the CDM is firing events at sessions that never existed.
- SessionMap::iterator session = sessions_.find(session_id);
- return (session != sessions_.end()) ? session->second : NULL;
+ SessionMap::iterator session = sessions_.find(web_session_id);
+ return (session != sessions_.end()) ? session->second.get() : NULL;
}
} // namespace content
diff --git a/content/renderer/media/cdm_session_adapter.h b/content/renderer/media/cdm_session_adapter.h
index 0a3c81c..de27125 100644
--- a/content/renderer/media/cdm_session_adapter.h
+++ b/content/renderer/media/cdm_session_adapter.h
@@ -6,8 +6,10 @@
#define CONTENT_RENDERER_MEDIA_CDM_SESSION_ADAPTER_H_
#include <map>
+#include <string>
#include "base/basictypes.h"
+#include "base/containers/hash_tables.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "media/base/media_keys.h"
@@ -21,13 +23,14 @@
namespace content {
-#if defined(OS_ANDROID)
+#if defined(ENABLE_BROWSER_CDMS)
class RendererCdmManager;
#endif
+
class WebContentDecryptionModuleSessionImpl;
// Owns the CDM instance and makes calls from session objects to the CDM.
-// Forwards the session ID-based callbacks of the MediaKeys interface to the
+// Forwards the web session ID-based callbacks of the MediaKeys interface to the
// appropriate session object. Callers should hold references to this class
// as long as they need the CDM instance.
class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> {
@@ -38,34 +41,46 @@
bool Initialize(
#if defined(ENABLE_PEPPER_CDMS)
const CreatePepperCdmCB& create_pepper_cdm_cb,
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
RendererCdmManager* manager,
#endif
const std::string& key_system,
const GURL& security_origin);
// Creates a new session and adds it to the internal map. The caller owns the
- // created session. RemoveSession() must be called when destroying it.
+ // created session. RemoveSession() must be called when destroying it, if
+ // RegisterSession() was called.
WebContentDecryptionModuleSessionImpl* CreateSession(
blink::WebContentDecryptionModuleSession::Client* client);
+ // Adds a session to the internal map. Called once the session is successfully
+ // initialized.
+ void RegisterSession(
+ const std::string& web_session_id,
+ base::WeakPtr<WebContentDecryptionModuleSessionImpl> session);
+
// Removes a session from the internal map.
- void RemoveSession(uint32 session_id);
+ void RemoveSession(const std::string& web_session_id);
- // Initializes the session specified by |session_id| with the |content_type|
- // and |init_data| provided.
- void InitializeNewSession(uint32 session_id,
- const std::string& content_type,
+ // Initializes a session with the |init_data_type|, |init_data| and
+ // |session_type| provided. Takes ownership of |promise|.
+ void InitializeNewSession(const std::string& init_data_type,
const uint8* init_data,
- int init_data_length);
+ int init_data_length,
+ media::MediaKeys::SessionType session_type,
+ scoped_ptr<media::NewSessionCdmPromise> promise);
- // Updates the session specified by |session_id| with |response|.
- void UpdateSession(uint32 session_id,
+ // Updates the session specified by |web_session_id| with |response|.
+ // Takes ownership of |promise|.
+ void UpdateSession(const std::string& web_session_id,
const uint8* response,
- int response_length);
+ int response_length,
+ scoped_ptr<media::SimpleCdmPromise> promise);
- // Releases the session specified by |session_id|.
- void ReleaseSession(uint32 session_id);
+ // Releases the session specified by |web_session_id|.
+ // Takes ownership of |promise|.
+ void ReleaseSession(const std::string& web_session_id,
+ scoped_ptr<media::SimpleCdmPromise> promise);
// Returns the Decryptor associated with this CDM. May be NULL if no
// Decryptor is associated with the MediaKeys object.
@@ -73,7 +88,7 @@
// after WebContentDecryptionModule is freed. http://crbug.com/330324
media::Decryptor* GetDecryptor();
-#if defined(OS_ANDROID)
+#if defined(ENABLE_BROWSER_CDMS)
// Returns the CDM ID associated with the |media_keys_|. May be kInvalidCdmId
// if no CDM ID is associated.
int GetCdmId() const;
@@ -81,32 +96,32 @@
private:
friend class base::RefCounted<CdmSessionAdapter>;
- typedef std::map<uint32, WebContentDecryptionModuleSessionImpl*> SessionMap;
+ typedef base::hash_map<std::string,
+ base::WeakPtr<WebContentDecryptionModuleSessionImpl> >
+ SessionMap;
~CdmSessionAdapter();
// Callbacks for firing session events.
- void OnSessionCreated(uint32 session_id, const std::string& web_session_id);
- void OnSessionMessage(uint32 session_id,
+ void OnSessionMessage(const std::string& web_session_id,
const std::vector<uint8>& message,
const GURL& destination_url);
- void OnSessionReady(uint32 session_id);
- void OnSessionClosed(uint32 session_id);
- void OnSessionError(uint32 session_id,
- media::MediaKeys::KeyError error_code,
- uint32 system_code);
+ void OnSessionReady(const std::string& web_session_id);
+ void OnSessionClosed(const std::string& web_session_id);
+ void OnSessionError(const std::string& web_session_id,
+ media::MediaKeys::Exception exception_code,
+ uint32 system_code,
+ const std::string& error_message);
// Helper function of the callbacks.
- WebContentDecryptionModuleSessionImpl* GetSession(uint32 session_id);
-
- // Session ID should be unique per renderer process for debugging purposes.
- static uint32 next_session_id_;
+ WebContentDecryptionModuleSessionImpl* GetSession(
+ const std::string& web_session_id);
scoped_ptr<media::MediaKeys> media_keys_;
SessionMap sessions_;
-#if defined(OS_ANDROID)
+#if defined(ENABLE_BROWSER_CDMS)
int cdm_id_;
#endif
diff --git a/content/renderer/media/crypto/content_decryption_module_factory.cc b/content/renderer/media/crypto/content_decryption_module_factory.cc
index 159e7f1..e56962f 100644
--- a/content/renderer/media/crypto/content_decryption_module_factory.cc
+++ b/content/renderer/media/crypto/content_decryption_module_factory.cc
@@ -11,7 +11,7 @@
#if defined(ENABLE_PEPPER_CDMS)
#include "content/renderer/media/crypto/ppapi_decryptor.h"
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
#include "content/renderer/media/crypto/proxy_media_keys.h"
#include "content/renderer/media/crypto/renderer_cdm_manager.h"
#endif // defined(ENABLE_PEPPER_CDMS)
@@ -23,11 +23,10 @@
const GURL& security_origin,
#if defined(ENABLE_PEPPER_CDMS)
const CreatePepperCdmCB& create_pepper_cdm_cb,
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
RendererCdmManager* manager,
int* cdm_id,
#endif // defined(ENABLE_PEPPER_CDMS)
- const media::SessionCreatedCB& session_created_cb,
const media::SessionMessageCB& session_message_cb,
const media::SessionReadyCB& session_ready_cb,
const media::SessionClosedCB& session_closed_cb,
@@ -37,34 +36,28 @@
// check the security origin before calling.
// DCHECK(security_origin.is_valid());
-#if defined(OS_ANDROID)
+#if defined(ENABLE_BROWSER_CDMS)
*cdm_id = RendererCdmManager::kInvalidCdmId;
#endif
if (CanUseAesDecryptor(key_system)) {
return scoped_ptr<media::MediaKeys>(
- new media::AesDecryptor(session_created_cb,
- session_message_cb,
- session_ready_cb,
- session_closed_cb,
- session_error_cb));
+ new media::AesDecryptor(session_message_cb, session_closed_cb));
}
#if defined(ENABLE_PEPPER_CDMS)
return scoped_ptr<media::MediaKeys>(
PpapiDecryptor::Create(key_system,
security_origin,
create_pepper_cdm_cb,
- session_created_cb,
session_message_cb,
session_ready_cb,
session_closed_cb,
session_error_cb));
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
scoped_ptr<ProxyMediaKeys> proxy_media_keys =
ProxyMediaKeys::Create(key_system,
security_origin,
manager,
- session_created_cb,
session_message_cb,
session_ready_cb,
session_closed_cb,
diff --git a/content/renderer/media/crypto/content_decryption_module_factory.h b/content/renderer/media/crypto/content_decryption_module_factory.h
index 805a11e..c18bf9d 100644
--- a/content/renderer/media/crypto/content_decryption_module_factory.h
+++ b/content/renderer/media/crypto/content_decryption_module_factory.h
@@ -18,7 +18,9 @@
namespace content {
+#if defined(ENABLE_BROWSER_CDMS)
class RendererCdmManager;
+#endif
class ContentDecryptionModuleFactory {
public:
@@ -29,11 +31,10 @@
const GURL& security_origin,
#if defined(ENABLE_PEPPER_CDMS)
const CreatePepperCdmCB& create_pepper_cdm_cb,
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
RendererCdmManager* manager,
int* cdm_id, // Output parameter indicating the CDM ID of the MediaKeys.
#endif // defined(ENABLE_PEPPER_CDMS)
- const media::SessionCreatedCB& session_created_cb,
const media::SessionMessageCB& session_message_cb,
const media::SessionReadyCB& session_ready_cb,
const media::SessionClosedCB& session_closed_cb,
diff --git a/content/renderer/media/crypto/ppapi_decryptor.cc b/content/renderer/media/crypto/ppapi_decryptor.cc
index 7ab6cf9..dd07aaa 100644
--- a/content/renderer/media/crypto/ppapi_decryptor.cc
+++ b/content/renderer/media/crypto/ppapi_decryptor.cc
@@ -7,6 +7,7 @@
#include <string>
#include "base/bind.h"
+#include "base/callback.h"
#include "base/callback_helpers.h"
#include "base/location.h"
#include "base/logging.h"
@@ -16,6 +17,7 @@
#include "content/renderer/pepper/content_decryptor_delegate.h"
#include "content/renderer/pepper/pepper_plugin_instance_impl.h"
#include "media/base/audio_decoder_config.h"
+#include "media/base/cdm_promise.h"
#include "media/base/data_buffer.h"
#include "media/base/decoder_buffer.h"
#include "media/base/video_decoder_config.h"
@@ -23,11 +25,40 @@
namespace content {
+// This class is needed so that resolving an Update() promise triggers playback
+// of the stream. It intercepts the resolve() call to invoke an additional
+// callback.
+class SessionUpdatedPromise : public media::SimpleCdmPromise {
+ public:
+ SessionUpdatedPromise(scoped_ptr<media::SimpleCdmPromise> caller_promise,
+ base::Closure additional_resolve_cb)
+ : caller_promise_(caller_promise.Pass()),
+ additional_resolve_cb_(additional_resolve_cb) {}
+
+ virtual void resolve() OVERRIDE {
+ DCHECK(is_pending_);
+ is_pending_ = false;
+ additional_resolve_cb_.Run();
+ caller_promise_->resolve();
+ }
+
+ virtual void reject(media::MediaKeys::Exception exception_code,
+ uint32 system_code,
+ const std::string& error_message) OVERRIDE {
+ DCHECK(is_pending_);
+ is_pending_ = false;
+ caller_promise_->reject(exception_code, system_code, error_message);
+ }
+
+ protected:
+ scoped_ptr<media::SimpleCdmPromise> caller_promise_;
+ base::Closure additional_resolve_cb_;
+};
+
scoped_ptr<PpapiDecryptor> PpapiDecryptor::Create(
const std::string& key_system,
const GURL& security_origin,
const CreatePepperCdmCB& create_pepper_cdm_cb,
- const media::SessionCreatedCB& session_created_cb,
const media::SessionMessageCB& session_message_cb,
const media::SessionReadyCB& session_ready_cb,
const media::SessionClosedCB& session_closed_cb,
@@ -44,7 +75,6 @@
return scoped_ptr<PpapiDecryptor>(
new PpapiDecryptor(key_system,
pepper_cdm_wrapper.Pass(),
- session_created_cb,
session_message_cb,
session_ready_cb,
session_closed_cb,
@@ -54,13 +84,11 @@
PpapiDecryptor::PpapiDecryptor(
const std::string& key_system,
scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper,
- const media::SessionCreatedCB& session_created_cb,
const media::SessionMessageCB& session_message_cb,
const media::SessionReadyCB& session_ready_cb,
const media::SessionClosedCB& session_closed_cb,
const media::SessionErrorCB& session_error_cb)
: pepper_cdm_wrapper_(pepper_cdm_wrapper.Pass()),
- session_created_cb_(session_created_cb),
session_message_cb_(session_message_cb),
session_ready_cb_(session_ready_cb),
session_closed_cb_(session_closed_cb),
@@ -68,7 +96,6 @@
render_loop_proxy_(base::MessageLoopProxy::current()),
weak_ptr_factory_(this) {
DCHECK(pepper_cdm_wrapper_.get());
- DCHECK(!session_created_cb_.is_null());
DCHECK(!session_message_cb_.is_null());
DCHECK(!session_ready_cb_.is_null());
DCHECK(!session_closed_cb_.is_null());
@@ -77,7 +104,6 @@
base::WeakPtr<PpapiDecryptor> weak_this = weak_ptr_factory_.GetWeakPtr();
CdmDelegate()->Initialize(
key_system,
- base::Bind(&PpapiDecryptor::OnSessionCreated, weak_this),
base::Bind(&PpapiDecryptor::OnSessionMessage, weak_this),
base::Bind(&PpapiDecryptor::OnSessionReady, weak_this),
base::Bind(&PpapiDecryptor::OnSessionClosed, weak_this),
@@ -89,57 +115,75 @@
pepper_cdm_wrapper_.reset();
}
-bool PpapiDecryptor::CreateSession(uint32 session_id,
- const std::string& content_type,
- const uint8* init_data,
- int init_data_length) {
- DVLOG(2) << __FUNCTION__;
- DCHECK(render_loop_proxy_->BelongsToCurrentThread());
-
- if (!CdmDelegate() ||
- !CdmDelegate()->CreateSession(
- session_id, content_type, init_data, init_data_length)) {
- ReportFailureToCallPlugin(session_id);
- return false;
- }
-
- return true;
-}
-
-void PpapiDecryptor::LoadSession(uint32 session_id,
- const std::string& web_session_id) {
+void PpapiDecryptor::CreateSession(
+ const std::string& init_data_type,
+ const uint8* init_data,
+ int init_data_length,
+ SessionType session_type,
+ scoped_ptr<media::NewSessionCdmPromise> promise) {
DVLOG(2) << __FUNCTION__;
DCHECK(render_loop_proxy_->BelongsToCurrentThread());
if (!CdmDelegate()) {
- ReportFailureToCallPlugin(session_id);
+ promise->reject(INVALID_STATE_ERROR, 0, "CdmDelegate() does not exist.");
return;
}
- CdmDelegate()->LoadSession(session_id, web_session_id);
+ CdmDelegate()->CreateSession(init_data_type,
+ init_data,
+ init_data_length,
+ session_type,
+ promise.Pass());
}
-void PpapiDecryptor::UpdateSession(uint32 session_id,
- const uint8* response,
- int response_length) {
+void PpapiDecryptor::LoadSession(
+ const std::string& web_session_id,
+ scoped_ptr<media::NewSessionCdmPromise> promise) {
DVLOG(2) << __FUNCTION__;
DCHECK(render_loop_proxy_->BelongsToCurrentThread());
- if (!CdmDelegate() ||
- !CdmDelegate()->UpdateSession(session_id, response, response_length)) {
- ReportFailureToCallPlugin(session_id);
+ if (!CdmDelegate()) {
+ promise->reject(INVALID_STATE_ERROR, 0, "CdmDelegate() does not exist.");
return;
}
+
+ CdmDelegate()->LoadSession(web_session_id, promise.Pass());
}
-void PpapiDecryptor::ReleaseSession(uint32 session_id) {
- DVLOG(2) << __FUNCTION__;
+void PpapiDecryptor::UpdateSession(
+ const std::string& web_session_id,
+ const uint8* response,
+ int response_length,
+ scoped_ptr<media::SimpleCdmPromise> promise) {
DCHECK(render_loop_proxy_->BelongsToCurrentThread());
- if (!CdmDelegate() || !CdmDelegate()->ReleaseSession(session_id)) {
- ReportFailureToCallPlugin(session_id);
+ if (!CdmDelegate()) {
+ promise->reject(INVALID_STATE_ERROR, 0, "CdmDelegate() does not exist.");
return;
}
+
+ scoped_ptr<SessionUpdatedPromise> session_updated_promise(
+ new SessionUpdatedPromise(promise.Pass(),
+ base::Bind(&PpapiDecryptor::ResumePlayback,
+ weak_ptr_factory_.GetWeakPtr())));
+ CdmDelegate()->UpdateSession(
+ web_session_id,
+ response,
+ response_length,
+ session_updated_promise.PassAs<media::SimpleCdmPromise>());
+}
+
+void PpapiDecryptor::ReleaseSession(
+ const std::string& web_session_id,
+ scoped_ptr<media::SimpleCdmPromise> promise) {
+ DCHECK(render_loop_proxy_->BelongsToCurrentThread());
+
+ if (!CdmDelegate()) {
+ promise->reject(INVALID_STATE_ERROR, 0, "CdmDelegate() does not exist.");
+ return;
+ }
+
+ CdmDelegate()->ReleaseSession(web_session_id, promise.Pass());
}
media::Decryptor* PpapiDecryptor::GetDecryptor() {
@@ -330,12 +374,6 @@
CdmDelegate()->DeinitializeDecoder(stream_type);
}
-void PpapiDecryptor::ReportFailureToCallPlugin(uint32 session_id) {
- DCHECK(render_loop_proxy_->BelongsToCurrentThread());
- DVLOG(1) << "Failed to call plugin.";
- session_error_cb_.Run(session_id, kUnknownError, 0);
-}
-
void PpapiDecryptor::OnDecoderInitialized(StreamType stream_type,
bool success) {
DCHECK(render_loop_proxy_->BelongsToCurrentThread());
@@ -353,47 +391,43 @@
}
}
-void PpapiDecryptor::OnSessionCreated(uint32 session_id,
- const std::string& web_session_id) {
- DCHECK(render_loop_proxy_->BelongsToCurrentThread());
- session_created_cb_.Run(session_id, web_session_id);
-}
-
-void PpapiDecryptor::OnSessionMessage(uint32 session_id,
+void PpapiDecryptor::OnSessionMessage(const std::string& web_session_id,
const std::vector<uint8>& message,
const GURL& destination_url) {
DCHECK(render_loop_proxy_->BelongsToCurrentThread());
- session_message_cb_.Run(session_id, message, destination_url);
+ session_message_cb_.Run(web_session_id, message, destination_url);
}
-void PpapiDecryptor::OnSessionReady(uint32 session_id) {
+void PpapiDecryptor::OnSessionReady(const std::string& web_session_id) {
DCHECK(render_loop_proxy_->BelongsToCurrentThread());
+ ResumePlayback();
+ session_ready_cb_.Run(web_session_id);
+}
+
+void PpapiDecryptor::OnSessionClosed(const std::string& web_session_id) {
+ DCHECK(render_loop_proxy_->BelongsToCurrentThread());
+ session_closed_cb_.Run(web_session_id);
+}
+
+void PpapiDecryptor::OnSessionError(const std::string& web_session_id,
+ MediaKeys::Exception exception_code,
+ uint32 system_code,
+ const std::string& error_description) {
+ DCHECK(render_loop_proxy_->BelongsToCurrentThread());
+ session_error_cb_.Run(
+ web_session_id, exception_code, system_code, error_description);
+}
+
+void PpapiDecryptor::ResumePlayback() {
// Based on the spec, we need to resume playback when update() completes
- // successfully, or when a session is successfully loaded. In both cases,
- // the CDM fires OnSessionReady() event. So we choose to call the NewKeyCBs
- // here.
- // TODO(xhwang): Rename OnSessionReady to indicate that the playback may
- // resume successfully (e.g. a new key is available or available again).
+ // successfully, or when a session is successfully loaded (triggered by
+ // OnSessionReady()). So we choose to call the NewKeyCBs here.
if (!new_audio_key_cb_.is_null())
new_audio_key_cb_.Run();
if (!new_video_key_cb_.is_null())
new_video_key_cb_.Run();
-
- session_ready_cb_.Run(session_id);
-}
-
-void PpapiDecryptor::OnSessionClosed(uint32 session_id) {
- DCHECK(render_loop_proxy_->BelongsToCurrentThread());
- session_closed_cb_.Run(session_id);
-}
-
-void PpapiDecryptor::OnSessionError(uint32 session_id,
- media::MediaKeys::KeyError error_code,
- uint32 system_code) {
- DCHECK(render_loop_proxy_->BelongsToCurrentThread());
- session_error_cb_.Run(session_id, error_code, system_code);
}
void PpapiDecryptor::OnFatalPluginError() {
diff --git a/content/renderer/media/crypto/ppapi_decryptor.h b/content/renderer/media/crypto/ppapi_decryptor.h
index 54caebb..c09e4b0 100644
--- a/content/renderer/media/crypto/ppapi_decryptor.h
+++ b/content/renderer/media/crypto/ppapi_decryptor.h
@@ -35,7 +35,6 @@
const std::string& key_system,
const GURL& security_origin,
const CreatePepperCdmCB& create_pepper_cdm_cb,
- const media::SessionCreatedCB& session_created_cb,
const media::SessionMessageCB& session_message_cb,
const media::SessionReadyCB& session_ready_cb,
const media::SessionClosedCB& session_closed_cb,
@@ -44,16 +43,23 @@
virtual ~PpapiDecryptor();
// media::MediaKeys implementation.
- virtual bool CreateSession(uint32 session_id,
- const std::string& content_type,
- const uint8* init_data,
- int init_data_length) OVERRIDE;
- virtual void LoadSession(uint32 session_id,
- const std::string& web_session_id) OVERRIDE;
- virtual void UpdateSession(uint32 session_id,
- const uint8* response,
- int response_length) OVERRIDE;
- virtual void ReleaseSession(uint32 session_id) OVERRIDE;
+ virtual void CreateSession(
+ const std::string& init_data_type,
+ const uint8* init_data,
+ int init_data_length,
+ SessionType session_type,
+ scoped_ptr<media::NewSessionCdmPromise> promise) OVERRIDE;
+ virtual void LoadSession(
+ const std::string& web_session_id,
+ scoped_ptr<media::NewSessionCdmPromise> promise) OVERRIDE;
+ virtual void UpdateSession(
+ const std::string& web_session_id,
+ const uint8* response,
+ int response_length,
+ scoped_ptr<media::SimpleCdmPromise> promise) OVERRIDE;
+ virtual void ReleaseSession(
+ const std::string& web_session_id,
+ scoped_ptr<media::SimpleCdmPromise> promise) OVERRIDE;
virtual Decryptor* GetDecryptor() OVERRIDE;
// media::Decryptor implementation.
@@ -79,26 +85,26 @@
private:
PpapiDecryptor(const std::string& key_system,
scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper,
- const media::SessionCreatedCB& session_created_cb,
const media::SessionMessageCB& session_message_cb,
const media::SessionReadyCB& session_ready_cb,
const media::SessionClosedCB& session_closed_cb,
const media::SessionErrorCB& session_error_cb);
- void ReportFailureToCallPlugin(uint32 session_id);
-
void OnDecoderInitialized(StreamType stream_type, bool success);
// Callbacks for |plugin_cdm_delegate_| to fire session events.
- void OnSessionCreated(uint32 session_id, const std::string& web_session_id);
- void OnSessionMessage(uint32 session_id,
+ void OnSessionMessage(const std::string& web_session_id,
const std::vector<uint8>& message,
const GURL& destination_url);
- void OnSessionReady(uint32 session_id);
- void OnSessionClosed(uint32 session_id);
- void OnSessionError(uint32 session_id,
- media::MediaKeys::KeyError error_code,
- uint32 system_code);
+ void OnSessionReady(const std::string& web_session_id);
+ void OnSessionClosed(const std::string& web_session_id);
+ void OnSessionError(const std::string& web_session_id,
+ MediaKeys::Exception exception_code,
+ uint32 system_code,
+ const std::string& error_description);
+
+ // On a successful Update() or SessionReady event, trigger playback to resume.
+ void ResumePlayback();
// Callback to notify that a fatal error happened in |plugin_cdm_delegate_|.
// The error is terminal and |plugin_cdm_delegate_| should not be used after
@@ -112,7 +118,6 @@
scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper_;
// Callbacks for firing session events.
- media::SessionCreatedCB session_created_cb_;
media::SessionMessageCB session_message_cb_;
media::SessionReadyCB session_ready_cb_;
media::SessionClosedCB session_closed_cb_;
diff --git a/content/renderer/media/crypto/proxy_decryptor.cc b/content/renderer/media/crypto/proxy_decryptor.cc
index be9893b..28cd421 100644
--- a/content/renderer/media/crypto/proxy_decryptor.cc
+++ b/content/renderer/media/crypto/proxy_decryptor.cc
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "content/renderer/media/crypto/content_decryption_module_factory.h"
+#include "media/base/cdm_promise.h"
#include "media/cdm/json_web_key.h"
#include "media/cdm/key_system_names.h"
@@ -18,20 +19,12 @@
#include "content/renderer/media/crypto/pepper_cdm_wrapper.h"
#endif // defined(ENABLE_PEPPER_CDMS)
-#if defined(OS_ANDROID)
+#if defined(ENABLE_BROWSER_CDMS)
#include "content/renderer/media/crypto/renderer_cdm_manager.h"
-#endif // defined(OS_ANDROID)
+#endif // defined(ENABLE_BROWSER_CDMS)
namespace content {
-// Since these reference IDs may conflict with the ones generated in
-// WebContentDecryptionModuleSessionImpl for the short time both paths are
-// active, start with 100000 and generate the IDs from there.
-// TODO(jrummell): Only allow one path http://crbug.com/306680.
-uint32 ProxyDecryptor::next_session_id_ = 100000;
-
-const uint32 kInvalidSessionId = 0;
-
// Special system code to signal a closed persistent session in a SessionError()
// call. This is needed because there is no SessionClosed() call in the prefixed
// EME API.
@@ -40,7 +33,7 @@
ProxyDecryptor::ProxyDecryptor(
#if defined(ENABLE_PEPPER_CDMS)
const CreatePepperCdmCB& create_pepper_cdm_cb,
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
RendererCdmManager* manager,
#endif // defined(ENABLE_PEPPER_CDMS)
const KeyAddedCB& key_added_cb,
@@ -49,7 +42,7 @@
:
#if defined(ENABLE_PEPPER_CDMS)
create_pepper_cdm_cb_(create_pepper_cdm_cb),
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
manager_(manager),
cdm_id_(RendererCdmManager::kInvalidCdmId),
#endif // defined(ENABLE_PEPPER_CDMS)
@@ -75,7 +68,7 @@
return media_keys_ ? media_keys_->GetDecryptor() : NULL;
}
-#if defined(OS_ANDROID)
+#if defined(ENABLE_BROWSER_CDMS)
int ProxyDecryptor::GetCdmId() {
return cdm_id_;
}
@@ -105,28 +98,39 @@
bool ProxyDecryptor::GenerateKeyRequest(const std::string& content_type,
const uint8* init_data,
int init_data_length) {
- // Use a unique reference id for this request.
- uint32 session_id = next_session_id_++;
-
+ DVLOG(1) << "GenerateKeyRequest()";
const char kPrefixedApiPersistentSessionHeader[] = "PERSISTENT|";
const char kPrefixedApiLoadSessionHeader[] = "LOAD_SESSION|";
- if (HasHeader(init_data, init_data_length, kPrefixedApiLoadSessionHeader)) {
- persistent_sessions_.insert(session_id);
+ bool loadSession =
+ HasHeader(init_data, init_data_length, kPrefixedApiLoadSessionHeader);
+ bool persistent = HasHeader(
+ init_data, init_data_length, kPrefixedApiPersistentSessionHeader);
+
+ scoped_ptr<media::NewSessionCdmPromise> promise(
+ new media::NewSessionCdmPromise(
+ base::Bind(&ProxyDecryptor::SetSessionId,
+ weak_ptr_factory_.GetWeakPtr(),
+ persistent || loadSession),
+ base::Bind(&ProxyDecryptor::OnSessionError,
+ weak_ptr_factory_.GetWeakPtr(),
+ std::string()))); // No session id until created.
+
+ if (loadSession) {
media_keys_->LoadSession(
- session_id,
std::string(reinterpret_cast<const char*>(
init_data + strlen(kPrefixedApiLoadSessionHeader)),
- init_data_length - strlen(kPrefixedApiLoadSessionHeader)));
+ init_data_length - strlen(kPrefixedApiLoadSessionHeader)),
+ promise.Pass());
return true;
}
- if (HasHeader(
- init_data, init_data_length, kPrefixedApiPersistentSessionHeader))
- persistent_sessions_.insert(session_id);
-
- return media_keys_->CreateSession(
- session_id, content_type, init_data, init_data_length);
+ media::MediaKeys::SessionType session_type =
+ persistent ? media::MediaKeys::PERSISTENT_SESSION
+ : media::MediaKeys::TEMPORARY_SESSION;
+ media_keys_->CreateSession(
+ content_type, init_data, init_data_length, session_type, promise.Pass());
+ return true;
}
void ProxyDecryptor::AddKey(const uint8* key,
@@ -136,18 +140,31 @@
const std::string& web_session_id) {
DVLOG(1) << "AddKey()";
- // WebMediaPlayerImpl ensures GenerateKeyRequest() has been called.
- uint32 session_id = LookupSessionId(web_session_id);
- if (session_id == kInvalidSessionId) {
- // Session hasn't been referenced before, so it is an error.
- // Note that the specification says "If sessionId is not null and is
- // unrecognized, throw an INVALID_ACCESS_ERR." However, for backwards
- // compatibility the error is not thrown, but rather reported as a
- // KeyError.
- key_error_cb_.Run(std::string(), media::MediaKeys::kUnknownError, 0);
- return;
+ // In the prefixed API, the session parameter provided to addKey() is
+ // optional, so use the single existing session if it exists.
+ // TODO(jrummell): remove when the prefixed API is removed.
+ std::string session_id(web_session_id);
+ if (session_id.empty()) {
+ if (active_sessions_.size() == 1) {
+ base::hash_map<std::string, bool>::iterator it = active_sessions_.begin();
+ session_id = it->first;
+ } else {
+ OnSessionError(std::string(),
+ media::MediaKeys::NOT_SUPPORTED_ERROR,
+ 0,
+ "SessionId not specified.");
+ return;
+ }
}
+ scoped_ptr<media::SimpleCdmPromise> promise(
+ new media::SimpleCdmPromise(base::Bind(&ProxyDecryptor::OnSessionReady,
+ weak_ptr_factory_.GetWeakPtr(),
+ web_session_id),
+ base::Bind(&ProxyDecryptor::OnSessionError,
+ weak_ptr_factory_.GetWeakPtr(),
+ web_session_id)));
+
// EME WD spec only supports a single array passed to the CDM. For
// Clear Key using v0.1b, both arrays are used (|init_data| is key_id).
// Since the EME WD spec supports the key as a JSON Web Key,
@@ -164,27 +181,27 @@
std::string jwk =
media::GenerateJWKSet(key, key_length, init_data, init_data_length);
DCHECK(!jwk.empty());
- media_keys_->UpdateSession(
- session_id, reinterpret_cast<const uint8*>(jwk.data()), jwk.size());
+ media_keys_->UpdateSession(session_id,
+ reinterpret_cast<const uint8*>(jwk.data()),
+ jwk.size(),
+ promise.Pass());
return;
}
- media_keys_->UpdateSession(session_id, key, key_length);
+ media_keys_->UpdateSession(session_id, key, key_length, promise.Pass());
}
-void ProxyDecryptor::CancelKeyRequest(const std::string& session_id) {
+void ProxyDecryptor::CancelKeyRequest(const std::string& web_session_id) {
DVLOG(1) << "CancelKeyRequest()";
- // WebMediaPlayerImpl ensures GenerateKeyRequest() has been called.
- uint32 session_reference_id = LookupSessionId(session_id);
- if (session_reference_id == kInvalidSessionId) {
- // Session hasn't been created, so it is an error.
- key_error_cb_.Run(
- std::string(), media::MediaKeys::kUnknownError, 0);
- }
- else {
- media_keys_->ReleaseSession(session_reference_id);
- }
+ scoped_ptr<media::SimpleCdmPromise> promise(
+ new media::SimpleCdmPromise(base::Bind(&ProxyDecryptor::OnSessionClosed,
+ weak_ptr_factory_.GetWeakPtr(),
+ web_session_id),
+ base::Bind(&ProxyDecryptor::OnSessionError,
+ weak_ptr_factory_.GetWeakPtr(),
+ web_session_id)));
+ media_keys_->ReleaseSession(web_session_id, promise.Pass());
}
scoped_ptr<media::MediaKeys> ProxyDecryptor::CreateMediaKeys(
@@ -195,12 +212,10 @@
security_origin,
#if defined(ENABLE_PEPPER_CDMS)
create_pepper_cdm_cb_,
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
manager_,
&cdm_id_,
#endif // defined(ENABLE_PEPPER_CDMS)
- base::Bind(&ProxyDecryptor::OnSessionCreated,
- weak_ptr_factory_.GetWeakPtr()),
base::Bind(&ProxyDecryptor::OnSessionMessage,
weak_ptr_factory_.GetWeakPtr()),
base::Bind(&ProxyDecryptor::OnSessionReady,
@@ -211,68 +226,69 @@
weak_ptr_factory_.GetWeakPtr()));
}
-void ProxyDecryptor::OnSessionCreated(uint32 session_id,
- const std::string& web_session_id) {
- // Due to heartbeat messages, OnSessionCreated() can get called multiple
- // times.
- SessionIdMap::iterator it = sessions_.find(session_id);
- DCHECK(it == sessions_.end() || it->second == web_session_id);
- if (it == sessions_.end())
- sessions_[session_id] = web_session_id;
-}
-
-void ProxyDecryptor::OnSessionMessage(uint32 session_id,
+void ProxyDecryptor::OnSessionMessage(const std::string& web_session_id,
const std::vector<uint8>& message,
const GURL& destination_url) {
// Assumes that OnSessionCreated() has been called before this.
- key_message_cb_.Run(
- LookupWebSessionId(session_id), message, destination_url);
+ key_message_cb_.Run(web_session_id, message, destination_url);
}
-void ProxyDecryptor::OnSessionReady(uint32 session_id) {
- // Assumes that OnSessionCreated() has been called before this.
- key_added_cb_.Run(LookupWebSessionId(session_id));
+void ProxyDecryptor::OnSessionReady(const std::string& web_session_id) {
+ key_added_cb_.Run(web_session_id);
}
-void ProxyDecryptor::OnSessionClosed(uint32 session_id) {
- std::set<uint32>::iterator it = persistent_sessions_.find(session_id);
- if (it != persistent_sessions_.end()) {
- persistent_sessions_.erase(it);
- OnSessionError(
- session_id, media::MediaKeys::kUnknownError, kSessionClosedSystemCode);
+void ProxyDecryptor::OnSessionClosed(const std::string& web_session_id) {
+ base::hash_map<std::string, bool>::iterator it =
+ active_sessions_.find(web_session_id);
+
+ // Latest EME spec separates closing a session ("allows an application to
+ // indicate that it no longer needs the session") and actually closing the
+ // session (done by the CDM at any point "such as in response to a close()
+ // call, when the session is no longer needed, or when system resources are
+ // lost.") Thus the CDM may cause 2 close() events -- one to resolve the
+ // close() promise, and a second to actually close the session. Prefixed EME
+ // only expects 1 close event, so drop the second (and subsequent) events.
+ // However, this means we can't tell if the CDM is generating spurious close()
+ // events.
+ if (it == active_sessions_.end())
+ return;
+
+ if (it->second) {
+ OnSessionError(web_session_id,
+ media::MediaKeys::NOT_SUPPORTED_ERROR,
+ kSessionClosedSystemCode,
+ "Do not close persistent sessions.");
}
-
- sessions_.erase(session_id);
+ active_sessions_.erase(it);
}
-void ProxyDecryptor::OnSessionError(uint32 session_id,
- media::MediaKeys::KeyError error_code,
- uint32 system_code) {
- // Assumes that OnSessionCreated() has been called before this.
- key_error_cb_.Run(LookupWebSessionId(session_id), error_code, system_code);
-}
-
-uint32 ProxyDecryptor::LookupSessionId(const std::string& session_id) const {
- for (SessionIdMap::const_iterator it = sessions_.begin();
- it != sessions_.end();
- ++it) {
- if (it->second == session_id)
- return it->first;
+void ProxyDecryptor::OnSessionError(const std::string& web_session_id,
+ media::MediaKeys::Exception exception_code,
+ uint32 system_code,
+ const std::string& error_message) {
+ // Convert |error_name| back to MediaKeys::KeyError if possible. Prefixed
+ // EME has different error message, so all the specific error events will
+ // get lost.
+ media::MediaKeys::KeyError error_code;
+ switch (exception_code) {
+ case media::MediaKeys::CLIENT_ERROR:
+ error_code = media::MediaKeys::kClientError;
+ break;
+ case media::MediaKeys::OUTPUT_ERROR:
+ error_code = media::MediaKeys::kOutputError;
+ break;
+ default:
+ // This will include all other CDM4 errors and any error generated
+ // by CDM5 or later.
+ error_code = media::MediaKeys::kUnknownError;
+ break;
}
-
- // If |session_id| is null, then use the single reference id.
- if (session_id.empty() && sessions_.size() == 1)
- return sessions_.begin()->first;
-
- return kInvalidSessionId;
+ key_error_cb_.Run(web_session_id, error_code, system_code);
}
-const std::string& ProxyDecryptor::LookupWebSessionId(uint32 session_id) const {
- DCHECK_NE(session_id, kInvalidSessionId);
-
- // Session may not exist if error happens during GenerateKeyRequest().
- SessionIdMap::const_iterator it = sessions_.find(session_id);
- return (it != sessions_.end()) ? it->second : base::EmptyString();
+void ProxyDecryptor::SetSessionId(bool persistent,
+ const std::string& web_session_id) {
+ active_sessions_.insert(std::make_pair(web_session_id, persistent));
}
} // namespace content
diff --git a/content/renderer/media/crypto/proxy_decryptor.h b/content/renderer/media/crypto/proxy_decryptor.h
index 668d81f..e4fd7ea 100644
--- a/content/renderer/media/crypto/proxy_decryptor.h
+++ b/content/renderer/media/crypto/proxy_decryptor.h
@@ -5,15 +5,13 @@
#ifndef CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_
#define CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_
-#include <map>
-#include <set>
#include <string>
#include <vector>
#include "base/basictypes.h"
+#include "base/containers/hash_tables.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "base/synchronization/lock.h"
#include "media/base/decryptor.h"
#include "media/base/media_keys.h"
@@ -25,20 +23,14 @@
namespace content {
-#if defined(OS_ANDROID)
+#if defined(ENABLE_BROWSER_CDMS)
class RendererCdmManager;
-#endif // defined(OS_ANDROID)
+#endif // defined(ENABLE_BROWSER_CDMS)
// ProxyDecryptor is for EME v0.1b only. It should not be used for the WD API.
// A decryptor proxy that creates a real decryptor object on demand and
// forwards decryptor calls to it.
//
-// Now that the Pepper API calls use session ID to match responses with
-// requests, this class maintains a mapping between session ID and web session
-// ID. Callers of this class expect web session IDs in the responses.
-// Session IDs are internal unique references to the session. Web session IDs
-// are the CDM generated ID for the session, and are what are visible to users.
-//
// TODO(xhwang): Currently we don't support run-time switching among decryptor
// objects. Fix this when needed.
// TODO(xhwang): The ProxyDecryptor is not a Decryptor. Find a better name!
@@ -57,7 +49,7 @@
ProxyDecryptor(
#if defined(ENABLE_PEPPER_CDMS)
const CreatePepperCdmCB& create_pepper_cdm_cb,
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
RendererCdmManager* manager,
#endif // defined(ENABLE_PEPPER_CDMS)
const KeyAddedCB& key_added_cb,
@@ -69,7 +61,7 @@
// Decryptor is associated.
media::Decryptor* GetDecryptor();
-#if defined(OS_ANDROID)
+#if defined(ENABLE_BROWSER_CDMS)
// Returns the CDM ID associated with this object. May be kInvalidCdmId if no
// CDM ID is associated, such as when Clear Key is used.
int GetCdmId();
@@ -89,36 +81,28 @@
void CancelKeyRequest(const std::string& session_id);
private:
- // Session_id <-> web_session_id map.
- typedef std::map<uint32, std::string> SessionIdMap;
-
// Helper function to create MediaKeys to handle the given |key_system|.
scoped_ptr<media::MediaKeys> CreateMediaKeys(const std::string& key_system,
const GURL& security_origin);
// Callbacks for firing session events.
- void OnSessionCreated(uint32 session_id, const std::string& web_session_id);
- void OnSessionMessage(uint32 session_id,
+ void OnSessionMessage(const std::string& web_session_id,
const std::vector<uint8>& message,
const GURL& default_url);
- void OnSessionReady(uint32 session_id);
- void OnSessionClosed(uint32 session_id);
- void OnSessionError(uint32 session_id,
- media::MediaKeys::KeyError error_code,
- uint32 system_code);
+ void OnSessionReady(const std::string& web_session_id);
+ void OnSessionClosed(const std::string& web_session_id);
+ void OnSessionError(const std::string& web_session_id,
+ media::MediaKeys::Exception exception_code,
+ uint32 system_code,
+ const std::string& error_message);
- // Helper function to determine session_id for the provided |web_session_id|.
- uint32 LookupSessionId(const std::string& web_session_id) const;
-
- // Helper function to determine web_session_id for the provided |session_id|.
- // The returned web_session_id is only valid on the main thread, and should be
- // stored by copy.
- const std::string& LookupWebSessionId(uint32 session_id) const;
+ // Called when a session is actually created or loaded.
+ void SetSessionId(bool persistent, const std::string& web_session_id);
#if defined(ENABLE_PEPPER_CDMS)
// Callback to create the Pepper plugin.
CreatePepperCdmCB create_pepper_cdm_cb_;
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
RendererCdmManager* manager_;
int cdm_id_;
#endif // defined(ENABLE_PEPPER_CDMS)
@@ -131,14 +115,8 @@
KeyErrorCB key_error_cb_;
KeyMessageCB key_message_cb_;
- // Session IDs are used to uniquely track sessions so that CDM callbacks
- // can get mapped to the correct session ID. Session ID should be unique
- // per renderer process for debugging purposes.
- static uint32 next_session_id_;
-
- SessionIdMap sessions_;
-
- std::set<uint32> persistent_sessions_;
+ // Keep track of both persistent and non-persistent sessions.
+ base::hash_map<std::string, bool> active_sessions_;
bool is_clear_key_;
diff --git a/content/renderer/media/crypto/proxy_media_keys.cc b/content/renderer/media/crypto/proxy_media_keys.cc
index 354211f..68a68b3 100644
--- a/content/renderer/media/crypto/proxy_media_keys.cc
+++ b/content/renderer/media/crypto/proxy_media_keys.cc
@@ -8,8 +8,10 @@
#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/stl_util.h"
#include "content/renderer/media/crypto/key_systems.h"
#include "content/renderer/media/crypto/renderer_cdm_manager.h"
+#include "media/base/cdm_promise.h"
namespace content {
@@ -17,7 +19,6 @@
const std::string& key_system,
const GURL& security_origin,
RendererCdmManager* manager,
- const media::SessionCreatedCB& session_created_cb,
const media::SessionMessageCB& session_message_cb,
const media::SessionReadyCB& session_ready_cb,
const media::SessionClosedCB& session_closed_cb,
@@ -25,7 +26,6 @@
DCHECK(manager);
scoped_ptr<ProxyMediaKeys> proxy_media_keys(
new ProxyMediaKeys(manager,
- session_created_cb,
session_message_cb,
session_ready_cb,
session_closed_cb,
@@ -37,77 +37,163 @@
ProxyMediaKeys::~ProxyMediaKeys() {
manager_->DestroyCdm(cdm_id_);
manager_->UnregisterMediaKeys(cdm_id_);
+
+ // Reject any outstanding promises.
+ for (PromiseMap::iterator it = session_id_to_promise_map_.begin();
+ it != session_id_to_promise_map_.end();
+ ++it) {
+ it->second->reject(
+ media::MediaKeys::NOT_SUPPORTED_ERROR, 0, "The operation was aborted.");
+ }
+ session_id_to_promise_map_.clear();
}
-bool ProxyMediaKeys::CreateSession(uint32 session_id,
- const std::string& content_type,
- const uint8* init_data,
- int init_data_length) {
+void ProxyMediaKeys::CreateSession(
+ const std::string& init_data_type,
+ const uint8* init_data,
+ int init_data_length,
+ SessionType session_type,
+ scoped_ptr<media::NewSessionCdmPromise> promise) {
// TODO(xhwang): Move these checks up to blink and DCHECK here.
// See http://crbug.com/342510
- CdmHostMsg_CreateSession_ContentType session_type;
- if (content_type == "audio/mp4" || content_type == "video/mp4") {
- session_type = CREATE_SESSION_TYPE_MP4;
- } else if (content_type == "audio/webm" || content_type == "video/webm") {
- session_type = CREATE_SESSION_TYPE_WEBM;
+ CdmHostMsg_CreateSession_ContentType create_session_content_type;
+ if (init_data_type == "audio/mp4" || init_data_type == "video/mp4") {
+ create_session_content_type = CREATE_SESSION_TYPE_MP4;
+ } else if (init_data_type == "audio/webm" || init_data_type == "video/webm") {
+ create_session_content_type = CREATE_SESSION_TYPE_WEBM;
} else {
DLOG(ERROR) << "Unsupported EME CreateSession content type of "
- << content_type;
- return false;
+ << init_data_type;
+ promise->reject(
+ NOT_SUPPORTED_ERROR,
+ 0,
+ "Unsupported EME CreateSession init data type of " + init_data_type);
+ return;
}
+ uint32 session_id = CreateSessionId();
+ SavePromise(session_id, promise.PassAs<media::CdmPromise>());
manager_->CreateSession(
cdm_id_,
session_id,
- session_type,
+ create_session_content_type,
std::vector<uint8>(init_data, init_data + init_data_length));
- return true;
}
-void ProxyMediaKeys::LoadSession(uint32 session_id,
- const std::string& web_session_id) {
+void ProxyMediaKeys::LoadSession(
+ const std::string& web_session_id,
+ scoped_ptr<media::NewSessionCdmPromise> promise) {
// TODO(xhwang): Check key system and platform support for LoadSession in
// blink and add NOTREACHED() here.
DLOG(ERROR) << "ProxyMediaKeys doesn't support session loading.";
- OnSessionError(session_id, media::MediaKeys::kUnknownError, 0);
+ promise->reject(NOT_SUPPORTED_ERROR, 0, "LoadSession() is not supported.");
}
-void ProxyMediaKeys::UpdateSession(uint32 session_id,
- const uint8* response,
- int response_length) {
+void ProxyMediaKeys::UpdateSession(
+ const std::string& web_session_id,
+ const uint8* response,
+ int response_length,
+ scoped_ptr<media::SimpleCdmPromise> promise) {
+ uint32 session_id = LookupSessionId(web_session_id);
+ if (!session_id) {
+ promise->reject(INVALID_ACCESS_ERROR, 0, "Session does not exist.");
+ return;
+ }
+
+ SavePromise(session_id, promise.PassAs<media::CdmPromise>());
manager_->UpdateSession(
cdm_id_,
session_id,
std::vector<uint8>(response, response + response_length));
}
-void ProxyMediaKeys::ReleaseSession(uint32 session_id) {
+void ProxyMediaKeys::ReleaseSession(
+ const std::string& web_session_id,
+ scoped_ptr<media::SimpleCdmPromise> promise) {
+ uint32 session_id = LookupSessionId(web_session_id);
+ if (!session_id) {
+ promise->reject(INVALID_ACCESS_ERROR, 0, "Session does not exist.");
+ return;
+ }
+
+ SavePromise(session_id, promise.PassAs<media::CdmPromise>());
manager_->ReleaseSession(cdm_id_, session_id);
}
void ProxyMediaKeys::OnSessionCreated(uint32 session_id,
const std::string& web_session_id) {
- session_created_cb_.Run(session_id, web_session_id);
+ AssignWebSessionId(session_id, web_session_id);
+ scoped_ptr<media::CdmPromise> promise = TakePromise(session_id);
+ if (promise) {
+ media::NewSessionCdmPromise* session_promise(
+ static_cast<media::NewSessionCdmPromise*>(promise.get()));
+ session_promise->resolve(web_session_id);
+ }
}
void ProxyMediaKeys::OnSessionMessage(uint32 session_id,
const std::vector<uint8>& message,
const GURL& destination_url) {
- session_message_cb_.Run(session_id, message, destination_url);
+ session_message_cb_.Run(
+ LookupWebSessionId(session_id), message, destination_url);
}
void ProxyMediaKeys::OnSessionReady(uint32 session_id) {
- session_ready_cb_.Run(session_id);
+ scoped_ptr<media::CdmPromise> promise = TakePromise(session_id);
+ if (promise) {
+ media::SimpleCdmPromise* simple_promise(
+ static_cast<media::SimpleCdmPromise*>(promise.get()));
+ simple_promise->resolve();
+ } else {
+ // Still needed for keyadded.
+ const std::string web_session_id = LookupWebSessionId(session_id);
+ session_ready_cb_.Run(web_session_id);
+ }
}
void ProxyMediaKeys::OnSessionClosed(uint32 session_id) {
- session_closed_cb_.Run(session_id);
+ const std::string web_session_id = LookupWebSessionId(session_id);
+ DropWebSessionId(web_session_id);
+ scoped_ptr<media::CdmPromise> promise = TakePromise(session_id);
+ if (promise) {
+ media::SimpleCdmPromise* simple_promise(
+ static_cast<media::SimpleCdmPromise*>(promise.get()));
+ simple_promise->resolve();
+ } else {
+ // It is possible for the CDM to close a session independent of a
+ // Release() request.
+ session_closed_cb_.Run(web_session_id);
+ }
}
void ProxyMediaKeys::OnSessionError(uint32 session_id,
media::MediaKeys::KeyError error_code,
uint32 system_code) {
- session_error_cb_.Run(session_id, error_code, system_code);
+ const std::string web_session_id = LookupWebSessionId(session_id);
+ media::MediaKeys::Exception exception_code;
+ switch (error_code) {
+ case media::MediaKeys::kClientError:
+ exception_code = media::MediaKeys::CLIENT_ERROR;
+ break;
+ case media::MediaKeys::kOutputError:
+ exception_code = media::MediaKeys::OUTPUT_ERROR;
+ break;
+ case media::MediaKeys::kUnknownError:
+ default:
+ exception_code = media::MediaKeys::UNKNOWN_ERROR;
+ break;
+ }
+
+ scoped_ptr<media::CdmPromise> promise = TakePromise(session_id);
+ if (promise) {
+ promise->reject(exception_code, system_code, std::string());
+ return;
+ }
+
+ // Errors generally happen in response to a request, but it is possible
+ // for something bad to happen in the CDM and it needs to tell the client.
+ session_error_cb_.Run(
+ web_session_id, exception_code, system_code, std::string());
}
int ProxyMediaKeys::GetCdmId() const {
@@ -116,17 +202,16 @@
ProxyMediaKeys::ProxyMediaKeys(
RendererCdmManager* manager,
- const media::SessionCreatedCB& session_created_cb,
const media::SessionMessageCB& session_message_cb,
const media::SessionReadyCB& session_ready_cb,
const media::SessionClosedCB& session_closed_cb,
const media::SessionErrorCB& session_error_cb)
: manager_(manager),
- session_created_cb_(session_created_cb),
session_message_cb_(session_message_cb),
session_ready_cb_(session_ready_cb),
session_closed_cb_(session_closed_cb),
- session_error_cb_(session_error_cb) {
+ session_error_cb_(session_error_cb),
+ next_session_id_(1) {
cdm_id_ = manager->RegisterMediaKeys(this);
}
@@ -135,4 +220,54 @@
manager_->InitializeCdm(cdm_id_, this, key_system, security_origin);
}
+uint32_t ProxyMediaKeys::CreateSessionId() {
+ return next_session_id_++;
+}
+
+void ProxyMediaKeys::AssignWebSessionId(uint32_t session_id,
+ const std::string& web_session_id) {
+ DCHECK(!ContainsKey(web_session_to_session_id_map_, web_session_id));
+ DCHECK(session_id);
+ web_session_to_session_id_map_.insert(
+ std::make_pair(web_session_id, session_id));
+}
+
+uint32_t ProxyMediaKeys::LookupSessionId(
+ const std::string& web_session_id) const {
+ SessionIdMap::const_iterator it =
+ web_session_to_session_id_map_.find(web_session_id);
+ return (it != web_session_to_session_id_map_.end()) ? it->second : 0;
+}
+
+std::string ProxyMediaKeys::LookupWebSessionId(uint32_t session_id) const {
+ for (SessionIdMap::const_iterator it = web_session_to_session_id_map_.begin();
+ it != web_session_to_session_id_map_.end();
+ ++it) {
+ if (it->second == session_id)
+ return it->first;
+ }
+ // Possible to get an error creating a session, so no |web_session_id|
+ // available.
+ return std::string();
+}
+
+void ProxyMediaKeys::DropWebSessionId(const std::string& web_session_id) {
+ web_session_to_session_id_map_.erase(web_session_id);
+}
+
+void ProxyMediaKeys::SavePromise(uint32_t session_id,
+ scoped_ptr<media::CdmPromise> promise) {
+ // Should only be one promise outstanding for any |session_id|.
+ DCHECK(!ContainsKey(session_id_to_promise_map_, session_id));
+ session_id_to_promise_map_.add(session_id, promise.Pass());
+}
+
+scoped_ptr<media::CdmPromise> ProxyMediaKeys::TakePromise(uint32_t session_id) {
+ PromiseMap::iterator it = session_id_to_promise_map_.find(session_id);
+ // May not be a promise associated with this session for asynchronous events.
+ if (it == session_id_to_promise_map_.end())
+ return scoped_ptr<media::CdmPromise>();
+ return session_id_to_promise_map_.take_and_erase(it);
+}
+
} // namespace content
diff --git a/content/renderer/media/crypto/proxy_media_keys.h b/content/renderer/media/crypto/proxy_media_keys.h
index 87dd495..4ebd4c1 100644
--- a/content/renderer/media/crypto/proxy_media_keys.h
+++ b/content/renderer/media/crypto/proxy_media_keys.h
@@ -5,7 +5,13 @@
#ifndef CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_MEDIA_KEYS_H_
#define CONTENT_RENDERER_MEDIA_CRYPTO_PROXY_MEDIA_KEYS_H_
+#include <map>
+#include <string>
+
#include "base/basictypes.h"
+#include "base/containers/hash_tables.h"
+#include "base/containers/scoped_ptr_hash_map.h"
+#include "media/base/cdm_promise.h"
#include "media/base/media_keys.h"
class GURL;
@@ -21,7 +27,6 @@
const std::string& key_system,
const GURL& security_origin,
RendererCdmManager* manager,
- const media::SessionCreatedCB& session_created_cb,
const media::SessionMessageCB& session_message_cb,
const media::SessionReadyCB& session_ready_cb,
const media::SessionClosedCB& session_closed_cb,
@@ -30,16 +35,23 @@
virtual ~ProxyMediaKeys();
// MediaKeys implementation.
- virtual bool CreateSession(uint32 session_id,
- const std::string& content_type,
- const uint8* init_data,
- int init_data_length) OVERRIDE;
- virtual void LoadSession(uint32 session_id,
- const std::string& web_session_id) OVERRIDE;
- virtual void UpdateSession(uint32 session_id,
- const uint8* response,
- int response_length) OVERRIDE;
- virtual void ReleaseSession(uint32 session_id) OVERRIDE;
+ virtual void CreateSession(
+ const std::string& init_data_type,
+ const uint8* init_data,
+ int init_data_length,
+ SessionType session_type,
+ scoped_ptr<media::NewSessionCdmPromise> promise) OVERRIDE;
+ virtual void LoadSession(
+ const std::string& web_session_id,
+ scoped_ptr<media::NewSessionCdmPromise> promise) OVERRIDE;
+ virtual void UpdateSession(
+ const std::string& web_session_id,
+ const uint8* response,
+ int response_length,
+ scoped_ptr<media::SimpleCdmPromise> promise) OVERRIDE;
+ virtual void ReleaseSession(
+ const std::string& web_session_id,
+ scoped_ptr<media::SimpleCdmPromise> promise) OVERRIDE;
// Callbacks.
void OnSessionCreated(uint32 session_id, const std::string& web_session_id);
@@ -55,8 +67,19 @@
int GetCdmId() const;
private:
+ // The Android-specific code that handles sessions uses integer session ids
+ // (basically a reference id), but media::MediaKeys bases everything on
+ // web_session_id (a string representing the actual session id as generated
+ // by the CDM). SessionIdMap is used to map between the web_session_id and
+ // the session_id used by the Android-specific code.
+ typedef base::hash_map<std::string, uint32_t> SessionIdMap;
+
+ // The following types keep track of Promises. The index is the
+ // Android-specific session_id, so that returning results can be matched to
+ // the corresponding promise.
+ typedef base::ScopedPtrHashMap<uint32_t, media::CdmPromise> PromiseMap;
+
ProxyMediaKeys(RendererCdmManager* manager,
- const media::SessionCreatedCB& session_created_cb,
const media::SessionMessageCB& session_message_cb,
const media::SessionReadyCB& session_ready_cb,
const media::SessionClosedCB& session_closed_cb,
@@ -65,15 +88,37 @@
void InitializeCdm(const std::string& key_system,
const GURL& security_origin);
+ // These functions keep track of Android-specific session_ids <->
+ // web_session_ids mappings.
+ // TODO(jrummell): Remove this once the Android-specific code changes to
+ // support string web session ids.
+ uint32_t CreateSessionId();
+ void AssignWebSessionId(uint32_t session_id,
+ const std::string& web_session_id);
+ uint32_t LookupSessionId(const std::string& web_session_id) const;
+ std::string LookupWebSessionId(uint32_t session_id) const;
+ void DropWebSessionId(const std::string& web_session_id);
+
+ // Helper function to keep track of promises. Adding takes ownership of the
+ // promise, transferred back to caller on take.
+ void SavePromise(uint32_t session_id, scoped_ptr<media::CdmPromise> promise);
+ scoped_ptr<media::CdmPromise> TakePromise(uint32_t session_id);
+
RendererCdmManager* manager_;
int cdm_id_;
- media::SessionCreatedCB session_created_cb_;
media::SessionMessageCB session_message_cb_;
media::SessionReadyCB session_ready_cb_;
media::SessionClosedCB session_closed_cb_;
media::SessionErrorCB session_error_cb_;
+ // Android-specific. See comment above CreateSessionId().
+ uint32_t next_session_id_;
+ SessionIdMap web_session_to_session_id_map_;
+
+ // Keep track of outstanding promises. This map owns the promise object.
+ PromiseMap session_id_to_promise_map_;
+
DISALLOW_COPY_AND_ASSIGN(ProxyMediaKeys);
};
diff --git a/content/renderer/media/crypto/renderer_cdm_manager.cc b/content/renderer/media/crypto/renderer_cdm_manager.cc
index 986455f..ba2e878 100644
--- a/content/renderer/media/crypto/renderer_cdm_manager.cc
+++ b/content/renderer/media/crypto/renderer_cdm_manager.cc
@@ -21,7 +21,11 @@
next_cdm_id_(kInvalidCdmId + 1) {
}
-RendererCdmManager::~RendererCdmManager() {}
+RendererCdmManager::~RendererCdmManager() {
+ DCHECK(proxy_media_keys_map_.empty())
+ << "RendererCdmManager is owned by RenderFrameImpl and is destroyed only "
+ "after all ProxyMediaKeys are destroyed and unregistered.";
+}
bool RendererCdmManager::OnMessageReceived(const IPC::Message& msg) {
bool handled = true;
diff --git a/content/renderer/media/media_stream_audio_processor.cc b/content/renderer/media/media_stream_audio_processor.cc
index 2c0fcc3..12e8d34 100644
--- a/content/renderer/media/media_stream_audio_processor.cc
+++ b/content/renderer/media/media_stream_audio_processor.cc
@@ -177,10 +177,22 @@
capture_thread_checker_.DetachFromThread();
render_thread_checker_.DetachFromThread();
InitializeAudioProcessingModule(constraints, effects);
+ if (IsAudioTrackProcessingEnabled()) {
+ aec_dump_message_filter_ = AecDumpMessageFilter::Get();
+ // In unit tests not creating a message filter, |aec_dump_message_filter_|
+ // will be NULL. We can just ignore that. Other unit tests and browser tests
+ // ensure that we do get the filter when we should.
+ if (aec_dump_message_filter_)
+ aec_dump_message_filter_->AddDelegate(this);
+ }
}
MediaStreamAudioProcessor::~MediaStreamAudioProcessor() {
DCHECK(main_thread_checker_.CalledOnValidThread());
+ if (aec_dump_message_filter_) {
+ aec_dump_message_filter_->RemoveDelegate(this);
+ aec_dump_message_filter_ = NULL;
+ }
StopAudioProcessing();
}
@@ -238,17 +250,30 @@
return capture_converter_->sink_parameters();
}
-void MediaStreamAudioProcessor::StartAecDump(base::File aec_dump_file) {
+void MediaStreamAudioProcessor::OnAecDumpFile(
+ const IPC::PlatformFileForTransit& file_handle) {
+ DCHECK(main_thread_checker_.CalledOnValidThread());
+
+ base::File file = IPC::PlatformFileForTransitToFile(file_handle);
+ DCHECK(file.IsValid());
+
if (audio_processing_)
- StartEchoCancellationDump(audio_processing_.get(),
- aec_dump_file.TakePlatformFile());
+ StartEchoCancellationDump(audio_processing_.get(), file.Pass());
+ else
+ file.Close();
}
-void MediaStreamAudioProcessor::StopAecDump() {
+void MediaStreamAudioProcessor::OnDisableAecDump() {
+ DCHECK(main_thread_checker_.CalledOnValidThread());
if (audio_processing_)
StopEchoCancellationDump(audio_processing_.get());
}
+void MediaStreamAudioProcessor::OnIpcClosing() {
+ DCHECK(main_thread_checker_.CalledOnValidThread());
+ aec_dump_message_filter_ = NULL;
+}
+
void MediaStreamAudioProcessor::OnPlayoutData(media::AudioBus* audio_bus,
int sample_rate,
int audio_delay_milliseconds) {
@@ -495,7 +520,7 @@
if (!audio_processing_.get())
return;
- StopAecDump();
+ StopEchoCancellationDump(audio_processing_.get());
if (playout_data_source_)
playout_data_source_->RemovePlayoutSink(this);
diff --git a/content/renderer/media/media_stream_audio_processor.h b/content/renderer/media/media_stream_audio_processor.h
index b97cb39..2dddff5 100644
--- a/content/renderer/media/media_stream_audio_processor.h
+++ b/content/renderer/media/media_stream_audio_processor.h
@@ -11,6 +11,7 @@
#include "base/threading/thread_checker.h"
#include "base/time/time.h"
#include "content/common/content_export.h"
+#include "content/renderer/media/aec_dump_message_filter.h"
#include "content/renderer/media/webrtc_audio_device_impl.h"
#include "media/base/audio_converter.h"
#include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h"
@@ -44,7 +45,8 @@
// of 10 ms data chunk.
class CONTENT_EXPORT MediaStreamAudioProcessor :
NON_EXPORTED_BASE(public WebRtcPlayoutDataSource::Sink),
- NON_EXPORTED_BASE(public AudioProcessorInterface) {
+ NON_EXPORTED_BASE(public AudioProcessorInterface),
+ NON_EXPORTED_BASE(public AecDumpMessageFilter::AecDumpDelegate) {
public:
// Returns false if |kDisableAudioTrackProcessing| is set to true, otherwise
// returns true.
@@ -96,11 +98,12 @@
// Accessor to check if the audio processing is enabled or not.
bool has_audio_processing() const { return audio_processing_ != NULL; }
- // Starts/Stops the Aec dump on the |audio_processing_|.
+ // AecDumpMessageFilter::AecDumpDelegate implementation.
// Called on the main render thread.
- // This method takes the ownership of |aec_dump_file|.
- void StartAecDump(base::File aec_dump_file);
- void StopAecDump();
+ virtual void OnAecDumpFile(
+ const IPC::PlatformFileForTransit& file_handle) OVERRIDE;
+ virtual void OnDisableAecDump() OVERRIDE;
+ virtual void OnIpcClosing() OVERRIDE;
protected:
friend class base::RefCountedThreadSafe<MediaStreamAudioProcessor>;
@@ -191,6 +194,9 @@
// It can be accessed by the capture audio thread and by the libjingle thread
// which calls GetStats().
base::subtle::Atomic32 typing_detected_;
+
+ // Communication with browser for AEC dump.
+ scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_;
};
} // namespace content
diff --git a/content/renderer/media/media_stream_audio_processor_options.cc b/content/renderer/media/media_stream_audio_processor_options.cc
index eda4a39..5ebb2a2 100644
--- a/content/renderer/media/media_stream_audio_processor_options.cc
+++ b/content/renderer/media/media_stream_audio_processor_options.cc
@@ -4,6 +4,7 @@
#include "content/renderer/media/media_stream_audio_processor_options.h"
+#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/metrics/field_trial.h"
@@ -258,10 +259,10 @@
}
void StartEchoCancellationDump(AudioProcessing* audio_processing,
- const base::PlatformFile& aec_dump_file) {
- DCHECK_NE(aec_dump_file, base::kInvalidPlatformFileValue);
+ base::File aec_dump_file) {
+ DCHECK(aec_dump_file.IsValid());
- FILE* stream = base::FdopenPlatformFile(aec_dump_file, "w");
+ FILE* stream = base::FileToFILE(aec_dump_file.Pass(), "w");
if (!stream) {
LOG(ERROR) << "Failed to open AEC dump file";
return;
diff --git a/content/renderer/media/media_stream_audio_processor_options.h b/content/renderer/media/media_stream_audio_processor_options.h
index a051fa4..4683555 100644
--- a/content/renderer/media/media_stream_audio_processor_options.h
+++ b/content/renderer/media/media_stream_audio_processor_options.h
@@ -7,7 +7,7 @@
#include <string>
-#include "base/platform_file.h"
+#include "base/files/file.h"
#include "content/common/content_export.h"
#include "third_party/WebKit/public/platform/WebMediaConstraints.h"
#include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h"
@@ -109,7 +109,7 @@
// Starts the echo cancellation dump in |audio_processing|.
void StartEchoCancellationDump(AudioProcessing* audio_processing,
- const base::PlatformFile& aec_dump_file);
+ base::File aec_dump_file);
// Stops the echo cancellation dump in |audio_processing|.
// This method has no impact if echo cancellation dump has not been started on
diff --git a/content/renderer/media/media_stream_dispatcher.cc b/content/renderer/media/media_stream_dispatcher.cc
index 0a2da78..2f93d53 100644
--- a/content/renderer/media/media_stream_dispatcher.cc
+++ b/content/renderer/media/media_stream_dispatcher.cc
@@ -134,7 +134,8 @@
int request_id,
const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler,
MediaStreamType type,
- const GURL& security_origin) {
+ const GURL& security_origin,
+ bool hide_labels_if_no_access) {
DCHECK(main_loop_->BelongsToCurrentThread());
DCHECK(type == MEDIA_DEVICE_AUDIO_CAPTURE ||
type == MEDIA_DEVICE_VIDEO_CAPTURE ||
@@ -151,7 +152,8 @@
Send(new MediaStreamHostMsg_EnumerateDevices(routing_id(),
next_ipc_id_++,
type,
- security_origin));
+ security_origin,
+ hide_labels_if_no_access));
}
void MediaStreamDispatcher::StopEnumerateDevices(
diff --git a/content/renderer/media/media_stream_dispatcher.h b/content/renderer/media/media_stream_dispatcher.h
index a52cb09..b7c6660 100644
--- a/content/renderer/media/media_stream_dispatcher.h
+++ b/content/renderer/media/media_stream_dispatcher.h
@@ -56,11 +56,15 @@
virtual void StopStreamDevice(const StreamDeviceInfo& device_info);
// Request to enumerate devices.
+ // If |hide_labels_if_no_access| is true, labels will be empty in the
+ // response if permission has not been granted for the device type. This
+ // should normally be true.
virtual void EnumerateDevices(
int request_id,
const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler,
MediaStreamType type,
- const GURL& security_origin);
+ const GURL& security_origin,
+ bool hide_labels_if_no_access);
// Request to stop enumerating devices.
void StopEnumerateDevices(
diff --git a/content/renderer/media/media_stream_dispatcher_unittest.cc b/content/renderer/media/media_stream_dispatcher_unittest.cc
index 3df5d85..7637e4f 100644
--- a/content/renderer/media/media_stream_dispatcher_unittest.cc
+++ b/content/renderer/media/media_stream_dispatcher_unittest.cc
@@ -226,13 +226,15 @@
dispatcher->EnumerateDevices(
kRequestId1, handler1.get()->AsWeakPtr(),
kVideoType,
- security_origin);
+ security_origin,
+ false);
int ipc_request_id2 = dispatcher->next_ipc_id_;
EXPECT_NE(ipc_request_id1, ipc_request_id2);
dispatcher->EnumerateDevices(
kRequestId2, handler2.get()->AsWeakPtr(),
kVideoType,
- security_origin);
+ security_origin,
+ false);
EXPECT_EQ(dispatcher->requests_.size(), size_t(2));
StreamDeviceInfoArray video_device_array(1);
diff --git a/content/renderer/media/media_stream_impl.cc b/content/renderer/media/media_stream_impl.cc
index 8bb9fd5..79f86a8 100644
--- a/content/renderer/media/media_stream_impl.cc
+++ b/content/renderer/media/media_stream_impl.cc
@@ -228,19 +228,22 @@
audio_input_request_id,
AsWeakPtr(),
MEDIA_DEVICE_AUDIO_CAPTURE,
- security_origin);
+ security_origin,
+ true);
media_stream_dispatcher_->EnumerateDevices(
video_input_request_id,
AsWeakPtr(),
MEDIA_DEVICE_VIDEO_CAPTURE,
- security_origin);
+ security_origin,
+ true);
media_stream_dispatcher_->EnumerateDevices(
audio_output_request_id,
AsWeakPtr(),
MEDIA_DEVICE_AUDIO_OUTPUT,
- security_origin);
+ security_origin,
+ true);
}
void MediaStreamImpl::cancelMediaDevicesRequest(
diff --git a/content/renderer/media/midi_dispatcher.cc b/content/renderer/media/midi_dispatcher.cc
index c8903ac..cbbd876 100644
--- a/content/renderer/media/midi_dispatcher.cc
+++ b/content/renderer/media/midi_dispatcher.cc
@@ -7,7 +7,7 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "content/common/media/midi_messages.h"
-#include "content/renderer/render_view_impl.h"
+#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/web/WebMIDIPermissionRequest.h"
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
#include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
@@ -17,8 +17,8 @@
namespace content {
-MidiDispatcher::MidiDispatcher(RenderViewImpl* render_view)
- : RenderViewObserver(render_view) {
+MidiDispatcher::MidiDispatcher(RenderFrame* render_frame)
+ : RenderFrameObserver(render_frame) {
}
MidiDispatcher::~MidiDispatcher() {}
@@ -44,9 +44,7 @@
void MidiDispatcher::cancelSysexPermissionRequest(
const WebMIDIPermissionRequest& request) {
- for (IDMap<WebMIDIPermissionRequest>::iterator it(&requests_);
- !it.IsAtEnd();
- it.Advance()) {
+ for (Requests::iterator it(&requests_); !it.IsAtEnd(); it.Advance()) {
WebMIDIPermissionRequest* value = it.GetCurrentValue();
if (value->equals(request)) {
base::string16 origin = request.securityOrigin().toString();
diff --git a/content/renderer/media/midi_dispatcher.h b/content/renderer/media/midi_dispatcher.h
index 1e6c8e3..0d40f46 100644
--- a/content/renderer/media/midi_dispatcher.h
+++ b/content/renderer/media/midi_dispatcher.h
@@ -6,7 +6,7 @@
#define CONTENT_RENDERER_MEDIA_MIDI_DISPATCHER_H_
#include "base/id_map.h"
-#include "content/public/renderer/render_view_observer.h"
+#include "content/public/renderer/render_frame_observer.h"
#include "third_party/WebKit/public/web/WebMIDIClient.h"
namespace blink {
@@ -15,21 +15,19 @@
namespace content {
-class RenderViewImpl;
-
// MidiDispatcher implements WebMIDIClient to handle permissions for using
// system exclusive messages.
-// It works as RenderViewObserver to handle IPC messages between
-// MidiDispatcherHost owned by RenderViewHost since permissions are managed in
+// It works as RenderFrameObserver to handle IPC messages between
+// MidiDispatcherHost owned by WebContents since permissions are managed in
// the browser process.
-class MidiDispatcher : public RenderViewObserver,
+class MidiDispatcher : public RenderFrameObserver,
public blink::WebMIDIClient {
public:
- explicit MidiDispatcher(RenderViewImpl* render_view);
+ explicit MidiDispatcher(RenderFrame* render_frame);
virtual ~MidiDispatcher();
private:
- // RenderView::Observer implementation.
+ // RenderFrameObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
// blink::WebMIDIClient implementation.
@@ -44,7 +42,8 @@
// Each WebMIDIPermissionRequest object is valid until
// cancelSysexPermissionRequest() is called with the object, or used to call
// WebMIDIPermissionRequest::setIsAllowed().
- IDMap<blink::WebMIDIPermissionRequest> requests_;
+ typedef IDMap<blink::WebMIDIPermissionRequest, IDMapOwnPointer> Requests;
+ Requests requests_;
DISALLOW_COPY_AND_ASSIGN(MidiDispatcher);
};
diff --git a/content/renderer/media/midi_message_filter.cc b/content/renderer/media/midi_message_filter.cc
index cf950f7..e6a7f80 100644
--- a/content/renderer/media/midi_message_filter.cc
+++ b/content/renderer/media/midi_message_filter.cc
@@ -24,7 +24,7 @@
MidiMessageFilter::MidiMessageFilter(
const scoped_refptr<base::MessageLoopProxy>& io_message_loop)
- : channel_(NULL),
+ : sender_(NULL),
io_message_loop_(io_message_loop),
main_message_loop_(base::MessageLoopProxy::current()),
next_available_id_(0),
@@ -35,10 +35,10 @@
void MidiMessageFilter::Send(IPC::Message* message) {
DCHECK(io_message_loop_->BelongsToCurrentThread());
- if (!channel_) {
+ if (!sender_) {
delete message;
} else {
- channel_->Send(message);
+ sender_->Send(message);
}
}
@@ -54,9 +54,9 @@
return handled;
}
-void MidiMessageFilter::OnFilterAdded(IPC::Channel* channel) {
+void MidiMessageFilter::OnFilterAdded(IPC::Sender* sender) {
DCHECK(io_message_loop_->BelongsToCurrentThread());
- channel_ = channel;
+ sender_ = sender;
}
void MidiMessageFilter::OnFilterRemoved() {
@@ -69,7 +69,7 @@
void MidiMessageFilter::OnChannelClosing() {
DCHECK(io_message_loop_->BelongsToCurrentThread());
- channel_ = NULL;
+ sender_ = NULL;
}
void MidiMessageFilter::StartSession(blink::WebMIDIAccessorClient* client) {
diff --git a/content/renderer/media/midi_message_filter.h b/content/renderer/media/midi_message_filter.h
index 017585c..e8de64d 100644
--- a/content/renderer/media/midi_message_filter.h
+++ b/content/renderer/media/midi_message_filter.h
@@ -50,12 +50,12 @@
virtual ~MidiMessageFilter();
private:
- // Sends an IPC message using |channel_|.
+ // Sends an IPC message using |sender_|.
void Send(IPC::Message* message);
// IPC::MessageFilter override. Called on |io_message_loop|.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
virtual void OnChannelClosing() OVERRIDE;
@@ -94,8 +94,8 @@
blink::WebMIDIAccessorClient* GetClientFromId(int client_id);
- // IPC channel for Send(); must only be accessed on |io_message_loop_|.
- IPC::Channel* channel_;
+ // IPC sender for Send(); must only be accessed on |io_message_loop_|.
+ IPC::Sender* sender_;
// Message loop on which IPC calls are driven.
const scoped_refptr<base::MessageLoopProxy> io_message_loop_;
diff --git a/content/renderer/media/mock_media_stream_dispatcher.cc b/content/renderer/media/mock_media_stream_dispatcher.cc
index 7854a8d..32ac1de 100644
--- a/content/renderer/media/mock_media_stream_dispatcher.cc
+++ b/content/renderer/media/mock_media_stream_dispatcher.cc
@@ -59,7 +59,8 @@
int request_id,
const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler,
MediaStreamType type,
- const GURL& security_origin) {
+ const GURL& security_origin,
+ bool hide_labels_if_no_access) {
if (type == MEDIA_DEVICE_AUDIO_CAPTURE) {
audio_input_request_id_ = request_id;
audio_input_array_.clear();
diff --git a/content/renderer/media/mock_media_stream_dispatcher.h b/content/renderer/media/mock_media_stream_dispatcher.h
index 1548853..eed1f57 100644
--- a/content/renderer/media/mock_media_stream_dispatcher.h
+++ b/content/renderer/media/mock_media_stream_dispatcher.h
@@ -31,7 +31,8 @@
int request_id,
const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler,
MediaStreamType type,
- const GURL& security_origin) OVERRIDE;
+ const GURL& security_origin,
+ bool hide_labels_if_no_access) OVERRIDE;
virtual void StopStreamDevice(const StreamDeviceInfo& device_info) OVERRIDE;
virtual bool IsStream(const std::string& label) OVERRIDE;
virtual int video_session_id(const std::string& label, int index) OVERRIDE;
diff --git a/content/renderer/media/video_capture_message_filter.cc b/content/renderer/media/video_capture_message_filter.cc
index f58347b..5034526 100644
--- a/content/renderer/media/video_capture_message_filter.cc
+++ b/content/renderer/media/video_capture_message_filter.cc
@@ -6,13 +6,13 @@
#include "content/common/media/video_capture_messages.h"
#include "content/common/view_messages.h"
-#include "ipc/ipc_channel.h"
+#include "ipc/ipc_sender.h"
namespace content {
VideoCaptureMessageFilter::VideoCaptureMessageFilter()
: last_device_id_(0),
- channel_(NULL) {
+ sender_(NULL) {
}
void VideoCaptureMessageFilter::AddDelegate(Delegate* delegate) {
@@ -21,7 +21,7 @@
while (delegates_.find(last_device_id_) != delegates_.end())
last_device_id_++;
- if (channel_) {
+ if (sender_) {
delegates_[last_device_id_] = delegate;
delegate->OnDelegateAdded(last_device_id_);
} else {
@@ -47,12 +47,12 @@
}
bool VideoCaptureMessageFilter::Send(IPC::Message* message) {
- if (!channel_) {
+ if (!sender_) {
delete message;
return false;
}
- return channel_->Send(message);
+ return sender_->Send(message);
}
bool VideoCaptureMessageFilter::OnMessageReceived(const IPC::Message& message) {
@@ -73,9 +73,9 @@
return handled;
}
-void VideoCaptureMessageFilter::OnFilterAdded(IPC::Channel* channel) {
+void VideoCaptureMessageFilter::OnFilterAdded(IPC::Sender* sender) {
DVLOG(1) << "VideoCaptureMessageFilter::OnFilterAdded()";
- channel_ = channel;
+ sender_ = sender;
for (Delegates::iterator it = pending_delegates_.begin();
it != pending_delegates_.end(); it++) {
@@ -86,11 +86,11 @@
}
void VideoCaptureMessageFilter::OnFilterRemoved() {
- channel_ = NULL;
+ sender_ = NULL;
}
void VideoCaptureMessageFilter::OnChannelClosing() {
- channel_ = NULL;
+ sender_ = NULL;
}
VideoCaptureMessageFilter::~VideoCaptureMessageFilter() {}
diff --git a/content/renderer/media/video_capture_message_filter.h b/content/renderer/media/video_capture_message_filter.h
index e6e4194..b6faa03 100644
--- a/content/renderer/media/video_capture_message_filter.h
+++ b/content/renderer/media/video_capture_message_filter.h
@@ -80,7 +80,7 @@
// IPC::MessageFilter override. Called on IO thread.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
virtual void OnChannelClosing() OVERRIDE;
@@ -134,7 +134,7 @@
Delegates pending_delegates_;
int32 last_device_id_;
- IPC::Channel* channel_;
+ IPC::Sender* sender_;
DISALLOW_COPY_AND_ASSIGN(VideoCaptureMessageFilter);
};
diff --git a/content/renderer/media/webcontentdecryptionmodule_impl.cc b/content/renderer/media/webcontentdecryptionmodule_impl.cc
index 99c44a1..c1e455e 100644
--- a/content/renderer/media/webcontentdecryptionmodule_impl.cc
+++ b/content/renderer/media/webcontentdecryptionmodule_impl.cc
@@ -29,14 +29,14 @@
WebContentDecryptionModuleImpl* WebContentDecryptionModuleImpl::Create(
#if defined(ENABLE_PEPPER_CDMS)
blink::WebLocalFrame* frame,
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
RendererCdmManager* manager,
#endif
const blink::WebSecurityOrigin& security_origin,
const base::string16& key_system) {
#if defined(ENABLE_PEPPER_CDMS)
DCHECK(frame);
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
DCHECK(manager);
#endif
DCHECK(!security_origin.isNull());
@@ -65,7 +65,7 @@
if (!adapter->Initialize(
#if defined(ENABLE_PEPPER_CDMS)
base::Bind(&PepperCdmWrapperImpl::Create, frame),
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
manager,
#endif
key_system_ascii,
@@ -94,10 +94,10 @@
return adapter_->GetDecryptor();
}
-#if defined(OS_ANDROID)
+#if defined(ENABLE_BROWSER_CDMS)
int WebContentDecryptionModuleImpl::GetCdmId() const {
return adapter_->GetCdmId();
}
-#endif // defined(OS_ANDROID)
+#endif // defined(ENABLE_BROWSER_CDMS)
} // namespace content
diff --git a/content/renderer/media/webcontentdecryptionmodule_impl.h b/content/renderer/media/webcontentdecryptionmodule_impl.h
index 152f962..871ca27 100644
--- a/content/renderer/media/webcontentdecryptionmodule_impl.h
+++ b/content/renderer/media/webcontentdecryptionmodule_impl.h
@@ -27,7 +27,7 @@
namespace content {
class CdmSessionAdapter;
-#if defined(OS_ANDROID)
+#if defined(ENABLE_BROWSER_CDMS)
class RendererCdmManager;
#endif
class WebContentDecryptionModuleSessionImpl;
@@ -38,7 +38,7 @@
static WebContentDecryptionModuleImpl* Create(
#if defined(ENABLE_PEPPER_CDMS)
blink::WebLocalFrame* frame,
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
RendererCdmManager* manager,
#endif
const blink::WebSecurityOrigin& security_origin,
@@ -52,11 +52,11 @@
// after WebContentDecryptionModule is freed. http://crbug.com/330324
media::Decryptor* GetDecryptor();
-#if defined(OS_ANDROID)
+#if defined(ENABLE_BROWSER_CDMS)
// Returns the CDM ID associated with this object. May be kInvalidCdmId if no
// CDM ID is associated, such as when Clear Key is used.
int GetCdmId() const;
-#endif // defined(OS_ANDROID)
+#endif // defined(ENABLE_BROWSER_CDMS)
// blink::WebContentDecryptionModule implementation.
virtual blink::WebContentDecryptionModuleSession* createSession(
diff --git a/content/renderer/media/webcontentdecryptionmodulesession_impl.cc b/content/renderer/media/webcontentdecryptionmodulesession_impl.cc
index 343397f..50ebcd0 100644
--- a/content/renderer/media/webcontentdecryptionmodulesession_impl.cc
+++ b/content/renderer/media/webcontentdecryptionmodulesession_impl.cc
@@ -4,69 +4,88 @@
#include "content/renderer/media/webcontentdecryptionmodulesession_impl.h"
+#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "content/renderer/media/cdm_session_adapter.h"
+#include "media/base/cdm_promise.h"
#include "third_party/WebKit/public/platform/WebURL.h"
namespace content {
WebContentDecryptionModuleSessionImpl::WebContentDecryptionModuleSessionImpl(
- uint32 session_id,
Client* client,
const scoped_refptr<CdmSessionAdapter>& adapter)
: adapter_(adapter),
client_(client),
- session_id_(session_id) {
+ is_closed_(false),
+ weak_ptr_factory_(this) {
}
WebContentDecryptionModuleSessionImpl::
~WebContentDecryptionModuleSessionImpl() {
- adapter_->RemoveSession(session_id_);
+ if (!web_session_id_.empty())
+ adapter_->RemoveSession(web_session_id_);
}
blink::WebString WebContentDecryptionModuleSessionImpl::sessionId() const {
- return web_session_id_;
+ return blink::WebString::fromUTF8(web_session_id_);
}
void WebContentDecryptionModuleSessionImpl::initializeNewSession(
- const blink::WebString& mime_type,
- const uint8* init_data, size_t init_data_length) {
+ const blink::WebString& init_data_type,
+ const uint8* init_data,
+ size_t init_data_length) {
// TODO(ddorwin): Guard against this in supported types check and remove this.
// Chromium only supports ASCII MIME types.
- if (!base::IsStringASCII(mime_type)) {
+ if (!base::IsStringASCII(init_data_type)) {
NOTREACHED();
- OnSessionError(media::MediaKeys::kUnknownError, 0);
+ OnSessionError(media::MediaKeys::NOT_SUPPORTED_ERROR,
+ 0,
+ "The initialization data type " + init_data_type.utf8() +
+ " is not supported by the key system.");
return;
}
- adapter_->InitializeNewSession(
- session_id_, base::UTF16ToASCII(mime_type), init_data, init_data_length);
+ std::string init_data_type_as_ascii = base::UTF16ToASCII(init_data_type);
+ DLOG_IF(WARNING, init_data_type_as_ascii.find('/') != std::string::npos)
+ << "init_data_type '" << init_data_type_as_ascii
+ << "' may be a MIME type";
+
+ scoped_ptr<media::NewSessionCdmPromise> promise(
+ new media::NewSessionCdmPromise(
+ base::Bind(&WebContentDecryptionModuleSessionImpl::SessionCreated,
+ weak_ptr_factory_.GetWeakPtr()),
+ base::Bind(&WebContentDecryptionModuleSessionImpl::OnSessionError,
+ weak_ptr_factory_.GetWeakPtr())));
+ adapter_->InitializeNewSession(init_data_type_as_ascii,
+ init_data,
+ init_data_length,
+ media::MediaKeys::TEMPORARY_SESSION,
+ promise.Pass());
}
void WebContentDecryptionModuleSessionImpl::update(const uint8* response,
size_t response_length) {
DCHECK(response);
- adapter_->UpdateSession(session_id_, response, response_length);
+ scoped_ptr<media::SimpleCdmPromise> promise(new media::SimpleCdmPromise(
+ base::Bind(&WebContentDecryptionModuleSessionImpl::OnSessionReady,
+ weak_ptr_factory_.GetWeakPtr()),
+ base::Bind(&WebContentDecryptionModuleSessionImpl::OnSessionError,
+ weak_ptr_factory_.GetWeakPtr())));
+ adapter_->UpdateSession(
+ web_session_id_, response, response_length, promise.Pass());
}
void WebContentDecryptionModuleSessionImpl::release() {
- adapter_->ReleaseSession(session_id_);
-}
-
-void WebContentDecryptionModuleSessionImpl::OnSessionCreated(
- const std::string& web_session_id) {
- // Due to heartbeat messages, OnSessionCreated() can get called multiple
- // times.
- // TODO(jrummell): Once all CDMs are updated to support reference ids,
- // OnSessionCreated() should only be called once, and the second check can be
- // removed.
- blink::WebString id = blink::WebString::fromUTF8(web_session_id);
- DCHECK(web_session_id_.isEmpty() || web_session_id_ == id)
- << "Session ID may not be changed once set.";
- web_session_id_ = id;
+ scoped_ptr<media::SimpleCdmPromise> promise(new media::SimpleCdmPromise(
+ base::Bind(&WebContentDecryptionModuleSessionImpl::OnSessionClosed,
+ weak_ptr_factory_.GetWeakPtr()),
+ base::Bind(&WebContentDecryptionModuleSessionImpl::OnSessionError,
+ weak_ptr_factory_.GetWeakPtr())));
+ adapter_->ReleaseSession(web_session_id_, promise.Pass());
}
void WebContentDecryptionModuleSessionImpl::OnSessionMessage(
@@ -81,14 +100,36 @@
}
void WebContentDecryptionModuleSessionImpl::OnSessionClosed() {
- client_->close();
+ if (!is_closed_) {
+ is_closed_ = true;
+ client_->close();
+ }
}
void WebContentDecryptionModuleSessionImpl::OnSessionError(
- media::MediaKeys::KeyError error_code,
- uint32 system_code) {
- client_->error(static_cast<Client::MediaKeyErrorCode>(error_code),
- system_code);
+ media::MediaKeys::Exception exception_code,
+ uint32 system_code,
+ const std::string& error_message) {
+ // Convert |exception_code| back to MediaKeyErrorCode if possible.
+ // TODO(jrummell): Update this conversion when promises flow
+ // back into blink:: (as blink:: will have its own error definition).
+ switch (exception_code) {
+ case media::MediaKeys::CLIENT_ERROR:
+ client_->error(Client::MediaKeyErrorCodeClient, system_code);
+ break;
+ default:
+ // This will include all other CDM4 errors and any error generated
+ // by CDM5 or later.
+ client_->error(Client::MediaKeyErrorCodeUnknown, system_code);
+ break;
+ }
+}
+
+void WebContentDecryptionModuleSessionImpl::SessionCreated(
+ const std::string& web_session_id) {
+ DCHECK(web_session_id_.empty()) << "Session ID may not be changed once set.";
+ web_session_id_ = web_session_id;
+ adapter_->RegisterSession(web_session_id_, weak_ptr_factory_.GetWeakPtr());
}
} // namespace content
diff --git a/content/renderer/media/webcontentdecryptionmodulesession_impl.h b/content/renderer/media/webcontentdecryptionmodulesession_impl.h
index f61a713..f1d889b 100644
--- a/content/renderer/media/webcontentdecryptionmodulesession_impl.h
+++ b/content/renderer/media/webcontentdecryptionmodulesession_impl.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "media/base/media_keys.h"
#include "third_party/WebKit/public/platform/WebContentDecryptionModuleSession.h"
#include "third_party/WebKit/public/platform/WebString.h"
@@ -26,7 +27,6 @@
: public blink::WebContentDecryptionModuleSession {
public:
WebContentDecryptionModuleSessionImpl(
- uint32 session_id,
Client* client,
const scoped_refptr<CdmSessionAdapter>& adapter);
virtual ~WebContentDecryptionModuleSessionImpl();
@@ -40,27 +40,36 @@
virtual void release();
// Callbacks.
- void OnSessionCreated(const std::string& web_session_id);
void OnSessionMessage(const std::vector<uint8>& message,
const GURL& destination_url);
void OnSessionReady();
void OnSessionClosed();
- void OnSessionError(media::MediaKeys::KeyError error_code,
- uint32 system_code);
+ void OnSessionError(media::MediaKeys::Exception exception_code,
+ uint32 system_code,
+ const std::string& error_message);
private:
+ void SessionCreated(const std::string& web_session_id);
+
scoped_refptr<CdmSessionAdapter> adapter_;
// Non-owned pointer.
Client* client_;
// Web session ID is the app visible ID for this session generated by the CDM.
- // This value is not set until the CDM calls OnSessionCreated().
- blink::WebString web_session_id_;
+ // This value is not set until the CDM resolves the initializeNewSession()
+ // promise.
+ std::string web_session_id_;
- // Session ID is used to uniquely track this object so that CDM callbacks
- // can get routed to the correct object.
- const uint32 session_id_;
+ // Don't pass more than 1 close() event to blink::
+ // TODO(jrummell): Remove this once blink tests handle close() promise and
+ // closed() event.
+ bool is_closed_;
+
+ // Since promises will live until they are fired, use a weak reference when
+ // creating a promise in case this class disappears before the promise
+ // actually fires.
+ base::WeakPtrFactory<WebContentDecryptionModuleSessionImpl> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(WebContentDecryptionModuleSessionImpl);
};
diff --git a/content/renderer/media/webmediaplayer_impl.cc b/content/renderer/media/webmediaplayer_impl.cc
index d73f6bc..088d545 100644
--- a/content/renderer/media/webmediaplayer_impl.cc
+++ b/content/renderer/media/webmediaplayer_impl.cc
@@ -24,6 +24,7 @@
#include "cc/layers/video_layer.h"
#include "content/public/common/content_switches.h"
#include "content/public/renderer/render_frame.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
#include "content/renderer/media/buffered_data_source.h"
#include "content/renderer/media/crypto/key_systems.h"
#include "content/renderer/media/render_media_log.h"
@@ -71,7 +72,6 @@
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "v8/include/v8.h"
-#include "webkit/renderer/compositor_bindings/web_layer_impl.h"
#if defined(ENABLE_PEPPER_CDMS)
#include "content/renderer/media/crypto/pepper_cdm_wrapper_impl.h"
@@ -243,40 +243,6 @@
}
}
-namespace {
-
-// Helper enum for reporting scheme histograms.
-enum URLSchemeForHistogram {
- kUnknownURLScheme,
- kMissingURLScheme,
- kHttpURLScheme,
- kHttpsURLScheme,
- kFtpURLScheme,
- kChromeExtensionURLScheme,
- kJavascriptURLScheme,
- kFileURLScheme,
- kBlobURLScheme,
- kDataURLScheme,
- kFileSystemScheme,
- kMaxURLScheme = kFileSystemScheme // Must be equal to highest enum value.
-};
-
-URLSchemeForHistogram URLScheme(const GURL& url) {
- if (!url.has_scheme()) return kMissingURLScheme;
- if (url.SchemeIs("http")) return kHttpURLScheme;
- if (url.SchemeIs("https")) return kHttpsURLScheme;
- if (url.SchemeIs("ftp")) return kFtpURLScheme;
- if (url.SchemeIs("chrome-extension")) return kChromeExtensionURLScheme;
- if (url.SchemeIs("javascript")) return kJavascriptURLScheme;
- if (url.SchemeIs("file")) return kFileURLScheme;
- if (url.SchemeIs("blob")) return kBlobURLScheme;
- if (url.SchemeIs("data")) return kDataURLScheme;
- if (url.SchemeIs("filesystem")) return kFileSystemScheme;
- return kUnknownURLScheme;
-}
-
-} // namespace
-
void WebMediaPlayerImpl::load(LoadType load_type, const blink::WebURL& url,
CORSMode cors_mode) {
DVLOG(1) << __FUNCTION__ << "(" << load_type << ", " << url << ", "
@@ -295,7 +261,7 @@
DCHECK(main_loop_->BelongsToCurrentThread());
GURL gurl(url);
- UMA_HISTOGRAM_ENUMERATION("Media.URLScheme", URLScheme(gurl), kMaxURLScheme);
+ ReportMediaSchemeUma(gurl);
// Set subresource URL for crash reporting.
base::debug::SetCrashKeyValue("subresource_url", gurl.spec());
@@ -796,6 +762,8 @@
// Create() must be called synchronously as |frame_| may not be
// valid afterwards.
base::Bind(&PepperCdmWrapperImpl::Create, frame_),
+#elif defined(ENABLE_BROWSER_CDMS)
+#error Browser side CDM in WMPI for prefixed EME API not supported yet.
#endif
BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyAdded),
BIND_TO_RENDER_LOOP(&WebMediaPlayerImpl::OnKeyError),
@@ -996,7 +964,7 @@
if (hasVideo()) {
DCHECK(!video_weblayer_);
video_weblayer_.reset(
- new webkit::WebLayerImpl(cc::VideoLayer::Create(compositor_)));
+ new WebLayerImpl(cc::VideoLayer::Create(compositor_)));
video_weblayer_->setOpaque(opaque_);
client_->setWebLayer(video_weblayer_.get());
}
diff --git a/content/renderer/media/webmediaplayer_impl.h b/content/renderer/media/webmediaplayer_impl.h
index 8911e3b..87c180e 100644
--- a/content/renderer/media/webmediaplayer_impl.h
+++ b/content/renderer/media/webmediaplayer_impl.h
@@ -47,15 +47,13 @@
class MediaLog;
}
-namespace webkit {
-class WebLayerImpl;
-}
namespace content {
class BufferedDataSource;
class VideoFrameCompositor;
class WebAudioSourceProviderImpl;
class WebContentDecryptionModuleImpl;
+class WebLayerImpl;
class WebMediaPlayerDelegate;
class WebMediaPlayerParams;
class WebTextTrackImpl;
@@ -337,7 +335,7 @@
// The compositor layer for displaying the video content when using composited
// playback.
- scoped_ptr<webkit::WebLayerImpl> video_weblayer_;
+ scoped_ptr<WebLayerImpl> video_weblayer_;
// Text track objects get a unique index value when they're created.
int text_track_index_;
diff --git a/content/renderer/media/webmediaplayer_ms.cc b/content/renderer/media/webmediaplayer_ms.cc
index 7227eee..b466d31 100644
--- a/content/renderer/media/webmediaplayer_ms.cc
+++ b/content/renderer/media/webmediaplayer_ms.cc
@@ -12,6 +12,7 @@
#include "base/metrics/histogram.h"
#include "cc/layers/video_layer.h"
#include "content/public/renderer/render_view.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
#include "content/renderer/media/media_stream_audio_renderer.h"
#include "content/renderer/media/media_stream_renderer_factory.h"
#include "content/renderer/media/video_frame_provider.h"
@@ -28,7 +29,6 @@
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "third_party/skia/include/core/SkBitmap.h"
-#include "webkit/renderer/compositor_bindings/web_layer_impl.h"
using blink::WebCanvas;
using blink::WebMediaPlayer;
@@ -94,7 +94,6 @@
pending_repaint_(false),
video_frame_provider_client_(NULL),
received_first_frame_(false),
- sequence_started_(false),
total_frame_count_(0),
dropped_frame_count_(0),
media_log_(media_log),
@@ -415,8 +414,7 @@
GetClient()->sizeChanged();
if (video_frame_provider_) {
- video_weblayer_.reset(
- new webkit::WebLayerImpl(cc::VideoLayer::Create(this)));
+ video_weblayer_.reset(new WebLayerImpl(cc::VideoLayer::Create(this)));
video_weblayer_->setOpaque(true);
GetClient()->setWebLayer(video_weblayer_.get());
}
@@ -426,10 +424,6 @@
if (paused_)
return;
- if (!sequence_started_) {
- sequence_started_ = true;
- start_time_ = frame->timestamp();
- }
bool size_changed = !current_frame_.get() ||
current_frame_->natural_size() != frame->natural_size();
@@ -438,7 +432,7 @@
if (!current_frame_used_ && current_frame_.get())
++dropped_frame_count_;
current_frame_ = frame;
- current_time_ = frame->timestamp() - start_time_;
+ current_time_ = frame->timestamp();
current_frame_used_ = false;
}
diff --git a/content/renderer/media/webmediaplayer_ms.h b/content/renderer/media/webmediaplayer_ms.h
index 0405b69..7e8944a 100644
--- a/content/renderer/media/webmediaplayer_ms.h
+++ b/content/renderer/media/webmediaplayer_ms.h
@@ -25,14 +25,12 @@
class MediaLog;
}
-namespace webkit {
-class WebLayerImpl;
-}
namespace content {
class MediaStreamAudioRenderer;
class MediaStreamRendererFactory;
class VideoFrameProvider;
+class WebLayerImpl;
class WebMediaPlayerDelegate;
// WebMediaPlayerMS delegates calls from WebCore::MediaPlayerPrivate to
@@ -168,15 +166,13 @@
base::Lock current_frame_lock_;
bool pending_repaint_;
- scoped_ptr<webkit::WebLayerImpl> video_weblayer_;
+ scoped_ptr<WebLayerImpl> video_weblayer_;
// A pointer back to the compositor to inform it about state changes. This is
// not NULL while the compositor is actively using this webmediaplayer.
cc::VideoFrameProvider::Client* video_frame_provider_client_;
bool received_first_frame_;
- bool sequence_started_;
- base::TimeDelta start_time_;
base::TimeDelta current_time_;
unsigned total_frame_count_;
unsigned dropped_frame_count_;
diff --git a/content/renderer/media/webmediaplayer_util.cc b/content/renderer/media/webmediaplayer_util.cc
index 7187743..6d1b1e2 100644
--- a/content/renderer/media/webmediaplayer_util.cc
+++ b/content/renderer/media/webmediaplayer_util.cc
@@ -6,6 +6,7 @@
#include <math.h>
+#include "base/metrics/histogram.h"
#include "media/base/media_keys.h"
#include "third_party/WebKit/public/platform/WebMediaPlayerClient.h"
@@ -76,4 +77,43 @@
return blink::WebMediaPlayer::NetworkStateFormatError;
}
+namespace {
+
+// Helper enum for reporting scheme histograms.
+enum URLSchemeForHistogram {
+ kUnknownURLScheme,
+ kMissingURLScheme,
+ kHttpURLScheme,
+ kHttpsURLScheme,
+ kFtpURLScheme,
+ kChromeExtensionURLScheme,
+ kJavascriptURLScheme,
+ kFileURLScheme,
+ kBlobURLScheme,
+ kDataURLScheme,
+ kFileSystemScheme,
+ kMaxURLScheme = kFileSystemScheme // Must be equal to highest enum value.
+};
+
+URLSchemeForHistogram URLScheme(const GURL& url) {
+ if (!url.has_scheme()) return kMissingURLScheme;
+ if (url.SchemeIs("http")) return kHttpURLScheme;
+ if (url.SchemeIs("https")) return kHttpsURLScheme;
+ if (url.SchemeIs("ftp")) return kFtpURLScheme;
+ if (url.SchemeIs("chrome-extension")) return kChromeExtensionURLScheme;
+ if (url.SchemeIs("javascript")) return kJavascriptURLScheme;
+ if (url.SchemeIs("file")) return kFileURLScheme;
+ if (url.SchemeIs("blob")) return kBlobURLScheme;
+ if (url.SchemeIs("data")) return kDataURLScheme;
+ if (url.SchemeIs("filesystem")) return kFileSystemScheme;
+
+ return kUnknownURLScheme;
+}
+
+} // namespace
+
+void ReportMediaSchemeUma(const GURL& url) {
+ UMA_HISTOGRAM_ENUMERATION("Media.URLScheme", URLScheme(url), kMaxURLScheme);
+}
+
} // namespace content
diff --git a/content/renderer/media/webmediaplayer_util.h b/content/renderer/media/webmediaplayer_util.h
index 3c2dacc..d401c39 100644
--- a/content/renderer/media/webmediaplayer_util.h
+++ b/content/renderer/media/webmediaplayer_util.h
@@ -10,6 +10,7 @@
#include "media/base/ranges.h"
#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
#include "third_party/WebKit/public/platform/WebTimeRange.h"
+#include "url/gurl.h"
namespace content {
@@ -25,6 +26,9 @@
blink::WebMediaPlayer::NetworkState PipelineErrorToNetworkState(
media::PipelineStatus error);
+// Report the scheme of Media URIs.
+void ReportMediaSchemeUma(const GURL& url);
+
} // namespace content
#endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_UTIL_H_
diff --git a/content/renderer/media/webrtc/media_stream_remote_video_source.cc b/content/renderer/media/webrtc/media_stream_remote_video_source.cc
index 4a28be4..3b93cdf 100644
--- a/content/renderer/media/webrtc/media_stream_remote_video_source.cc
+++ b/content/renderer/media/webrtc/media_stream_remote_video_source.cc
@@ -71,8 +71,8 @@
void MediaStreamRemoteVideoSource::
RemoteVideoSourceDelegate::RenderFrame(
const cricket::VideoFrame* frame) {
- base::TimeDelta timestamp = base::TimeDelta::FromMilliseconds(
- frame->GetTimeStamp() / talk_base::kNumNanosecsPerMillisec);
+ base::TimeDelta timestamp = base::TimeDelta::FromMicroseconds(
+ frame->GetElapsedTime() / talk_base::kNumNanosecsPerMicrosec);
scoped_refptr<media::VideoFrame> video_frame;
if (frame->GetNativeHandle() != NULL) {
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
index c4d69dd..f2f7f1d 100644
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
@@ -172,6 +172,8 @@
PeerConnectionDependencyFactory::~PeerConnectionDependencyFactory() {
CleanupPeerConnectionFactory();
+ if (aec_dump_message_filter_)
+ aec_dump_message_filter_->RemoveDelegate(this);
}
blink::WebRTCPeerConnectionHandler*
@@ -347,9 +349,16 @@
cmd_line->HasSwitch(switches::kDisableWebRtcEncryption);
pc_factory_->SetOptions(factory_options);
- // |aec_dump_file| will be invalid when dump is not enabled.
- if (aec_dump_file_.IsValid())
- StartAecDump(aec_dump_file_.Pass());
+ // TODO(xians): Remove the following code after kDisableAudioTrackProcessing
+ // is removed.
+ if (!MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled()) {
+ aec_dump_message_filter_ = AecDumpMessageFilter::Get();
+ // In unit tests not creating a message filter, |aec_dump_message_filter_|
+ // will be NULL. We can just ignore that. Other unit tests and browser tests
+ // ensure that we do get the filter when we should.
+ if (aec_dump_message_filter_)
+ aec_dump_message_filter_->AddDelegate(this);
+ }
}
bool PeerConnectionDependencyFactory::PeerConnectionFactoryCreated() {
@@ -447,9 +456,11 @@
void PeerConnectionDependencyFactory::StartLocalAudioTrack(
WebRtcLocalAudioTrack* audio_track) {
// Add the WebRtcAudioDevice as the sink to the local audio track.
- // TODO(xians): Implement a PeerConnection sink adapter and remove this
- // AddSink() call.
- audio_track->AddSink(GetWebRtcAudioDevice());
+ // TODO(xians): Remove the following line of code after the APM in WebRTC is
+ // completely deprecated. See http://crbug/365672.
+ if (!MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled())
+ audio_track->AddSink(GetWebRtcAudioDevice());
+
// Start the audio track. This will hook the |audio_track| to the capturer
// as the sink of the audio, and only start the source of the capturer if
// it is the first audio track connecting to the capturer.
@@ -610,56 +621,30 @@
return chrome_worker_thread_.message_loop_proxy();
}
-bool PeerConnectionDependencyFactory::OnControlMessageReceived(
- const IPC::Message& message) {
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(PeerConnectionDependencyFactory, message)
- IPC_MESSAGE_HANDLER(MediaStreamMsg_EnableAecDump, OnAecDumpFile)
- IPC_MESSAGE_HANDLER(MediaStreamMsg_DisableAecDump, OnDisableAecDump)
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
- return handled;
-}
-
void PeerConnectionDependencyFactory::OnAecDumpFile(
- IPC::PlatformFileForTransit file_handle) {
- DCHECK(!aec_dump_file_.IsValid());
+ const IPC::PlatformFileForTransit& file_handle) {
+ DCHECK(CalledOnValidThread());
+ DCHECK(!MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled());
+ DCHECK(PeerConnectionFactoryCreated());
+
base::File file = IPC::PlatformFileForTransitToFile(file_handle);
DCHECK(file.IsValid());
- if (MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled()) {
- EnsureWebRtcAudioDeviceImpl();
- GetWebRtcAudioDevice()->EnableAecDump(file.Pass());
- return;
- }
-
- // TODO(xians): Remove the following code after kDisableAudioTrackProcessing
- // is removed.
- if (PeerConnectionFactoryCreated())
- StartAecDump(file.Pass());
- else
- aec_dump_file_ = file.Pass();
+ // |pc_factory_| always takes ownership of |aec_dump_file|. If StartAecDump()
+ // fails, |aec_dump_file| will be closed.
+ if (!GetPcFactory()->StartAecDump(file.TakePlatformFile()))
+ VLOG(1) << "Could not start AEC dump.";
}
void PeerConnectionDependencyFactory::OnDisableAecDump() {
- if (MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled()) {
- // Do nothing if OnAecDumpFile() has never been called.
- if (GetWebRtcAudioDevice())
- GetWebRtcAudioDevice()->DisableAecDump();
- return;
- }
-
- // TODO(xians): Remove the following code after kDisableAudioTrackProcessing
- // is removed.
- if (aec_dump_file_.IsValid())
- aec_dump_file_.Close();
+ DCHECK(CalledOnValidThread());
+ DCHECK(!MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled());
+ // Do nothing. We never disable AEC dump for non-track-processing case.
}
-void PeerConnectionDependencyFactory::StartAecDump(base::File aec_dump_file) {
- // |pc_factory_| always takes ownership of |aec_dump_file|. If StartAecDump()
- // fails, |aec_dump_file| will be closed.
- if (!GetPcFactory()->StartAecDump(aec_dump_file.TakePlatformFile()))
- VLOG(1) << "Could not start AEC dump.";
+void PeerConnectionDependencyFactory::OnIpcClosing() {
+ DCHECK(CalledOnValidThread());
+ aec_dump_message_filter_ = NULL;
}
void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() {
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.h b/content/renderer/media/webrtc/peer_connection_dependency_factory.h
index 969fb6b..5169935 100644
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.h
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.h
@@ -12,6 +12,7 @@
#include "base/threading/thread.h"
#include "content/common/content_export.h"
#include "content/public/renderer/render_process_observer.h"
+#include "content/renderer/media/aec_dump_message_filter.h"
#include "content/renderer/p2p/socket_dispatcher.h"
#include "ipc/ipc_platform_file.h"
#include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h"
@@ -55,7 +56,7 @@
// Object factory for RTC PeerConnections.
class CONTENT_EXPORT PeerConnectionDependencyFactory
: NON_EXPORTED_BASE(public base::NonThreadSafe),
- public RenderProcessObserver {
+ NON_EXPORTED_BASE(public AecDumpMessageFilter::AecDumpDelegate) {
public:
PeerConnectionDependencyFactory(
P2PSocketDispatcher* p2p_socket_dispatcher);
@@ -129,6 +130,14 @@
scoped_refptr<base::MessageLoopProxy> GetWebRtcWorkerThread() const;
+ // AecDumpMessageFilter::AecDumpDelegate implementation.
+ // TODO(xians): Remove when option to disable audio track processing is
+ // removed.
+ virtual void OnAecDumpFile(
+ const IPC::PlatformFileForTransit& file_handle) OVERRIDE;
+ virtual void OnDisableAecDump() OVERRIDE;
+ virtual void OnIpcClosing() OVERRIDE;
+
protected:
// Asks the PeerConnection factory to create a Local Audio Source.
virtual scoped_refptr<webrtc::AudioSourceInterface>
@@ -177,14 +186,6 @@
void DeleteIpcNetworkManager();
void CleanupPeerConnectionFactory();
- // RenderProcessObserver implementation.
- virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
-
- void OnAecDumpFile(IPC::PlatformFileForTransit file_handle);
- void OnDisableAecDump();
-
- void StartAecDump(base::File aec_dump_file);
-
// Helper method to create a WebRtcAudioDeviceImpl.
void EnsureWebRtcAudioDeviceImpl();
@@ -198,14 +199,17 @@
scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_;
scoped_refptr<WebRtcAudioDeviceImpl> audio_device_;
+ // This is only used if audio track processing is disabled.
+ // TODO(xians): Remove when option to disable audio track processing is
+ // removed.
+ scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_;
+
// PeerConnection threads. signaling_thread_ is created from the
// "current" chrome thread.
talk_base::Thread* signaling_thread_;
talk_base::Thread* worker_thread_;
base::Thread chrome_worker_thread_;
- base::File aec_dump_file_;
-
DISALLOW_COPY_AND_ASSIGN(PeerConnectionDependencyFactory);
};
diff --git a/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc b/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc
index 95958a8..d94edb8 100644
--- a/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc
+++ b/content/renderer/media/webrtc/webrtc_local_audio_track_adapter.cc
@@ -143,7 +143,16 @@
}
cricket::AudioRenderer* WebRtcLocalAudioTrackAdapter::GetRenderer() {
- return this;
+ // When the audio track processing is enabled, return a NULL so that capture
+ // data goes through Libjingle LocalAudioTrackHandler::LocalAudioSinkAdapter
+ // ==> WebRtcVoiceMediaChannel::WebRtcVoiceChannelRenderer ==> WebRTC.
+ // When the audio track processing is disabled, WebRtcLocalAudioTrackAdapter
+ // is used to pass the channel ids to WebRtcAudioDeviceImpl, the data flow
+ // becomes WebRtcAudioDeviceImpl ==> WebRTC.
+ // TODO(xians): Only return NULL after the APM in WebRTC is deprecated.
+ // See See http://crbug/365672 for details.
+ return MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled()?
+ NULL : this;
}
} // namespace content
diff --git a/content/renderer/media/webrtc_audio_capturer.cc b/content/renderer/media/webrtc_audio_capturer.cc
index 2ff0d43..6212a8e 100644
--- a/content/renderer/media/webrtc_audio_capturer.cc
+++ b/content/renderer/media/webrtc_audio_capturer.cc
@@ -417,9 +417,6 @@
if (audio_device_)
audio_device_->RemoveAudioCapturer(this);
- // Stop the Aec dump.
- StopAecDump();
-
for (TrackList::ItemList::const_iterator it = tracks.begin();
it != tracks.end();
++it) {
@@ -615,15 +612,4 @@
static_cast<float>(params.sample_rate()));
}
-void WebRtcAudioCapturer::StartAecDump(base::File aec_dump_file) {
- DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(aec_dump_file.IsValid());
- audio_processor_->StartAecDump(aec_dump_file.Pass());
-}
-
-void WebRtcAudioCapturer::StopAecDump() {
- DCHECK(thread_checker_.CalledOnValidThread());
- audio_processor_->StopAecDump();
-}
-
} // namespace content
diff --git a/content/renderer/media/webrtc_audio_capturer.h b/content/renderer/media/webrtc_audio_capturer.h
index f433a1a..89ac7a9 100644
--- a/content/renderer/media/webrtc_audio_capturer.h
+++ b/content/renderer/media/webrtc_audio_capturer.h
@@ -117,9 +117,6 @@
const scoped_refptr<media::AudioCapturerSource>& source,
media::AudioParameters params);
- void StartAecDump(base::File aec_dump_file);
- void StopAecDump();
-
protected:
friend class base::RefCountedThreadSafe<WebRtcAudioCapturer>;
virtual ~WebRtcAudioCapturer();
diff --git a/content/renderer/media/webrtc_audio_device_impl.cc b/content/renderer/media/webrtc_audio_device_impl.cc
index aca12bd..1339a6f 100644
--- a/content/renderer/media/webrtc_audio_device_impl.cc
+++ b/content/renderer/media/webrtc_audio_device_impl.cc
@@ -126,7 +126,8 @@
void WebRtcAudioDeviceImpl::RenderData(media::AudioBus* audio_bus,
int sample_rate,
- int audio_delay_milliseconds) {
+ int audio_delay_milliseconds,
+ base::TimeDelta* current_time) {
render_buffer_.resize(audio_bus->frames() * audio_bus->channels());
{
@@ -179,7 +180,9 @@
&ntp_time_ms);
accumulated_audio_frames += num_audio_frames;
}
-
+ if (elapsed_time_ms >= 0) {
+ *current_time = base::TimeDelta::FromMilliseconds(elapsed_time_ms);
+ }
audio_data += bytes_per_10_ms;
}
@@ -246,9 +249,16 @@
DCHECK(!renderer_.get() || !renderer_->IsStarted())
<< "The shared audio renderer shouldn't be running";
- DisableAecDump();
-
- capturers_.clear();
+ // Stop all the capturers to ensure no further OnData() and
+ // RemoveAudioCapturer() callback.
+ // Cache the capturers in a local list since WebRtcAudioCapturer::Stop()
+ // will trigger RemoveAudioCapturer() callback.
+ CapturerList capturers;
+ capturers.swap(capturers_);
+ for (CapturerList::const_iterator iter = capturers.begin();
+ iter != capturers.end(); ++iter) {
+ (*iter)->Stop();
+ }
initialized_ = false;
return 0;
@@ -465,11 +475,6 @@
capturers_.end());
capturers_.push_back(capturer);
}
-
- // Start the Aec dump if the Aec dump has been enabled and has not been
- // started.
- if (aec_dump_file_.IsValid())
- MaybeStartAecDump();
}
void WebRtcAudioDeviceImpl::RemoveAudioCapturer(
@@ -521,48 +526,4 @@
session_id, output_sample_rate, output_frames_per_buffer);
}
-void WebRtcAudioDeviceImpl::EnableAecDump(base::File aec_dump_file) {
- DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(aec_dump_file.IsValid());
-
- // Close the previous AEC dump file description if it has not been consumed.
- // This can happen if no getUserMedia has been made yet.
- // TODO(xians): DCHECK(!aec_dump_file_.IsValid()) after the browser
- // guarantees it won't call EnableAecDump() more than once in a row.
- if (aec_dump_file_.IsValid())
- aec_dump_file_.Close();
-
- aec_dump_file_ = aec_dump_file.Pass();
- MaybeStartAecDump();
-}
-
-void WebRtcAudioDeviceImpl::DisableAecDump() {
- DCHECK(thread_checker_.CalledOnValidThread());
- // Simply invalidate the |aec_dump_file_| if we have not pass the ownership
- // to WebRtc.
- if (aec_dump_file_.IsValid()) {
- aec_dump_file_.Close();
- return;
- }
-
- // We might have call StartAecDump() on one of the capturer. Loop
- // through all the capturers and call StopAecDump() on each of them.
- for (CapturerList::const_iterator iter = capturers_.begin();
- iter != capturers_.end(); ++iter) {
- (*iter)->StopAecDump();
- }
-}
-
-void WebRtcAudioDeviceImpl::MaybeStartAecDump() {
- DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(aec_dump_file_.IsValid());
-
- // Start the Aec dump on the current default capturer.
- scoped_refptr<WebRtcAudioCapturer> default_capturer(GetDefaultCapturer());
- if (!default_capturer)
- return;
-
- default_capturer->StartAecDump(aec_dump_file_.Pass());
-}
-
} // namespace content
diff --git a/content/renderer/media/webrtc_audio_device_impl.h b/content/renderer/media/webrtc_audio_device_impl.h
index b8e6741..e53125d 100644
--- a/content/renderer/media/webrtc_audio_device_impl.h
+++ b/content/renderer/media/webrtc_audio_device_impl.h
@@ -189,7 +189,8 @@
// Callback to get the rendered data.
virtual void RenderData(media::AudioBus* audio_bus,
int sample_rate,
- int audio_delay_milliseconds) = 0;
+ int audio_delay_milliseconds,
+ base::TimeDelta* current_time) = 0;
// Callback to notify the client that the renderer is going away.
virtual void RemoveAudioRenderer(WebRtcAudioRenderer* renderer) = 0;
@@ -352,15 +353,6 @@
return renderer_;
}
- // Enables the Aec dump. If the default capturer exists, it will call
- // StartAecDump() on the capturer and pass the ownership of the file to
- // WebRtc. Otherwise it will hold the file until a capturer is added.
- void EnableAecDump(base::File aec_dump_file);
-
- // Disables the Aec dump. When this method is called, the ongoing Aec dump
- // on WebRtc will be stopped.
- void DisableAecDump();
-
private:
typedef std::list<scoped_refptr<WebRtcAudioCapturer> > CapturerList;
typedef std::list<WebRtcPlayoutDataSource::Sink*> PlayoutDataSinkList;
@@ -390,7 +382,8 @@
// Called on the AudioOutputDevice worker thread.
virtual void RenderData(media::AudioBus* audio_bus,
int sample_rate,
- int audio_delay_milliseconds) OVERRIDE;
+ int audio_delay_milliseconds,
+ base::TimeDelta* current_time) OVERRIDE;
// Called on the main render thread.
virtual void RemoveAudioRenderer(WebRtcAudioRenderer* renderer) OVERRIDE;
@@ -399,9 +392,6 @@
virtual void AddPlayoutSink(WebRtcPlayoutDataSource::Sink* sink) OVERRIDE;
virtual void RemovePlayoutSink(WebRtcPlayoutDataSource::Sink* sink) OVERRIDE;
- // Helper to start the Aec dump if the default capturer exists.
- void MaybeStartAecDump();
-
// Used to DCHECK that we are called on the correct thread.
base::ThreadChecker thread_checker_;
@@ -450,9 +440,6 @@
// It is only accessed by the audio render thread.
std::vector<int16> render_buffer_;
- // Used for start the Aec dump on the default capturer.
- base::File aec_dump_file_;
-
// Flag to tell if audio processing is enabled in MediaStreamAudioProcessor.
const bool is_audio_track_processing_enabled_;
diff --git a/content/renderer/media/webrtc_audio_renderer.cc b/content/renderer/media/webrtc_audio_renderer.cc
index 28252eb..f86c8cc 100644
--- a/content/renderer/media/webrtc_audio_renderer.cc
+++ b/content/renderer/media/webrtc_audio_renderer.cc
@@ -450,7 +450,9 @@
}
base::TimeDelta WebRtcAudioRenderer::GetCurrentRenderTime() const {
- return base::TimeDelta();
+ DCHECK(thread_checker_.CalledOnValidThread());
+ base::AutoLock auto_lock(lock_);
+ return current_time_;
}
bool WebRtcAudioRenderer::IsLocalRenderer() const {
@@ -495,7 +497,8 @@
// We need to keep render data for the |source_| regardless of |state_|,
// otherwise the data will be buffered up inside |source_|.
source_->RenderData(audio_bus, sink_params_.sample_rate(),
- output_delay_milliseconds);
+ output_delay_milliseconds,
+ ¤t_time_);
// Avoid filling up the audio bus if we are not playing; instead
// return here and ensure that the returned value in Render() is 0.
diff --git a/content/renderer/media/webrtc_audio_renderer.h b/content/renderer/media/webrtc_audio_renderer.h
index 74f996f..61b0b24 100644
--- a/content/renderer/media/webrtc_audio_renderer.h
+++ b/content/renderer/media/webrtc_audio_renderer.h
@@ -194,8 +194,8 @@
// Audio data source from the browser process.
WebRtcAudioRendererSource* source_;
- // Protects access to |state_|, |source_| and |sink_|.
- base::Lock lock_;
+ // Protects access to |state_|, |source_|, |sink_| and |current_time_|.
+ mutable base::Lock lock_;
// Ref count for the MediaPlayers which are playing audio.
int play_ref_count_;
@@ -214,6 +214,8 @@
// Delay due to the FIFO in milliseconds.
int fifo_delay_milliseconds_;
+ base::TimeDelta current_time_;
+
// Saved volume and playing state of the root renderer.
PlayingState playing_state_;
diff --git a/content/renderer/media/webrtc_audio_renderer_unittest.cc b/content/renderer/media/webrtc_audio_renderer_unittest.cc
index fa64dbc..3cf1b52 100644
--- a/content/renderer/media/webrtc_audio_renderer_unittest.cc
+++ b/content/renderer/media/webrtc_audio_renderer_unittest.cc
@@ -68,9 +68,10 @@
public:
MockAudioRendererSource() {}
virtual ~MockAudioRendererSource() {}
- MOCK_METHOD3(RenderData, void(media::AudioBus* audio_bus,
+ MOCK_METHOD4(RenderData, void(media::AudioBus* audio_bus,
int sample_rate,
- int audio_delay_milliseconds));
+ int audio_delay_milliseconds,
+ base::TimeDelta* current_time));
MOCK_METHOD1(RemoveAudioRenderer, void(WebRtcAudioRenderer* renderer));
};
diff --git a/content/renderer/media/webrtc_local_audio_track_unittest.cc b/content/renderer/media/webrtc_local_audio_track_unittest.cc
index 64f4ef3..3f542fb 100644
--- a/content/renderer/media/webrtc_local_audio_track_unittest.cc
+++ b/content/renderer/media/webrtc_local_audio_track_unittest.cc
@@ -208,17 +208,11 @@
track->Start();
EXPECT_TRUE(track->GetAudioAdapter()->enabled());
- // Connect a number of network channels to the audio track.
- static const int kNumberOfNetworkChannels = 4;
- for (int i = 0; i < kNumberOfNetworkChannels; ++i) {
- static_cast<webrtc::AudioTrackInterface*>(
- adapter.get())->GetRenderer()->AddChannel(i);
- }
scoped_ptr<MockMediaStreamAudioSink> sink(new MockMediaStreamAudioSink());
base::WaitableEvent event(false, false);
EXPECT_CALL(*sink, FormatIsSet());
EXPECT_CALL(*sink,
- CaptureData(kNumberOfNetworkChannels,
+ CaptureData(0,
0,
0,
_,
@@ -246,8 +240,6 @@
scoped_ptr<WebRtcLocalAudioTrack> track(
new WebRtcLocalAudioTrack(adapter, capturer_, NULL));
track->Start();
- static_cast<webrtc::AudioTrackInterface*>(
- adapter.get())->GetRenderer()->AddChannel(0);
EXPECT_TRUE(track->GetAudioAdapter()->enabled());
EXPECT_TRUE(track->GetAudioAdapter()->set_enabled(false));
scoped_ptr<MockMediaStreamAudioSink> sink(new MockMediaStreamAudioSink());
@@ -255,15 +247,14 @@
base::WaitableEvent event(false, false);
EXPECT_CALL(*sink, FormatIsSet()).Times(1);
EXPECT_CALL(*sink,
- CaptureData(1, 0, 0, _, false)).Times(0);
+ CaptureData(0, 0, 0, _, false)).Times(0);
EXPECT_EQ(sink->audio_params().frames_per_buffer(),
params.sample_rate() / 100);
track->AddSink(sink.get());
EXPECT_FALSE(event.TimedWait(TestTimeouts::tiny_timeout()));
event.Reset();
- EXPECT_CALL(*sink,
- CaptureData(1, 0, 0, _, false)).Times(AtLeast(1))
+ EXPECT_CALL(*sink, CaptureData(0, 0, 0, _, false)).Times(AtLeast(1))
.WillRepeatedly(SignalEvent(&event));
EXPECT_TRUE(track->GetAudioAdapter()->set_enabled(true));
EXPECT_TRUE(event.TimedWait(TestTimeouts::tiny_timeout()));
@@ -283,15 +274,13 @@
scoped_ptr<WebRtcLocalAudioTrack> track_1(
new WebRtcLocalAudioTrack(adapter_1, capturer_, NULL));
track_1->Start();
- static_cast<webrtc::AudioTrackInterface*>(
- adapter_1.get())->GetRenderer()->AddChannel(0);
EXPECT_TRUE(track_1->GetAudioAdapter()->enabled());
scoped_ptr<MockMediaStreamAudioSink> sink_1(new MockMediaStreamAudioSink());
const media::AudioParameters params = capturer_->source_audio_parameters();
base::WaitableEvent event_1(false, false);
EXPECT_CALL(*sink_1, FormatIsSet()).WillOnce(Return());
EXPECT_CALL(*sink_1,
- CaptureData(1, 0, 0, _, false)).Times(AtLeast(1))
+ CaptureData(0, 0, 0, _, false)).Times(AtLeast(1))
.WillRepeatedly(SignalEvent(&event_1));
EXPECT_EQ(sink_1->audio_params().frames_per_buffer(),
params.sample_rate() / 100);
@@ -303,8 +292,6 @@
scoped_ptr<WebRtcLocalAudioTrack> track_2(
new WebRtcLocalAudioTrack(adapter_2, capturer_, NULL));
track_2->Start();
- static_cast<webrtc::AudioTrackInterface*>(
- adapter_2.get())->GetRenderer()->AddChannel(1);
EXPECT_TRUE(track_2->GetAudioAdapter()->enabled());
// Verify both |sink_1| and |sink_2| get data.
@@ -313,11 +300,11 @@
scoped_ptr<MockMediaStreamAudioSink> sink_2(new MockMediaStreamAudioSink());
EXPECT_CALL(*sink_2, FormatIsSet()).WillOnce(Return());
- EXPECT_CALL(*sink_1, CaptureData(1, 0, 0, _, false)).Times(AtLeast(1))
+ EXPECT_CALL(*sink_1, CaptureData(0, 0, 0, _, false)).Times(AtLeast(1))
.WillRepeatedly(SignalEvent(&event_1));
EXPECT_EQ(sink_1->audio_params().frames_per_buffer(),
params.sample_rate() / 100);
- EXPECT_CALL(*sink_2, CaptureData(1, 0, 0, _, false)).Times(AtLeast(1))
+ EXPECT_CALL(*sink_2, CaptureData(0, 0, 0, _, false)).Times(AtLeast(1))
.WillRepeatedly(SignalEvent(&event_2));
EXPECT_EQ(sink_2->audio_params().frames_per_buffer(),
params.sample_rate() / 100);
@@ -382,8 +369,6 @@
WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
scoped_ptr<WebRtcLocalAudioTrack> track_1(
new WebRtcLocalAudioTrack(adapter_1, capturer_, NULL));
- static_cast<webrtc::AudioTrackInterface*>(
- adapter_1.get())->GetRenderer()->AddChannel(0);
track_1->Start();
// Verify the data flow by connecting the sink to |track_1|.
@@ -403,8 +388,6 @@
scoped_ptr<WebRtcLocalAudioTrack> track_2(
new WebRtcLocalAudioTrack(adapter_2, capturer_, NULL));
track_2->Start();
- static_cast<webrtc::AudioTrackInterface*>(
- adapter_2.get())->GetRenderer()->AddChannel(1);
// Stop the capturer will clear up the track lists in the capturer.
EXPECT_CALL(*capturer_source_.get(), OnStop());
@@ -430,17 +413,9 @@
new WebRtcLocalAudioTrack(adapter_1, capturer_, NULL));
track_1->Start();
- // Connect a number of network channels to the |track_1|.
- static const int kNumberOfNetworkChannelsForTrack1 = 2;
- for (int i = 0; i < kNumberOfNetworkChannelsForTrack1; ++i) {
- static_cast<webrtc::AudioTrackInterface*>(
- adapter_1.get())->GetRenderer()->AddChannel(i);
- }
// Verify the data flow by connecting the |sink_1| to |track_1|.
scoped_ptr<MockMediaStreamAudioSink> sink_1(new MockMediaStreamAudioSink());
- EXPECT_CALL(*sink_1.get(),
- CaptureData(kNumberOfNetworkChannelsForTrack1,
- 0, 0, _, false))
+ EXPECT_CALL(*sink_1.get(), CaptureData(0, 0, 0, _, false))
.Times(AnyNumber()).WillRepeatedly(Return());
EXPECT_CALL(*sink_1.get(), FormatIsSet()).Times(AnyNumber());
track_1->AddSink(sink_1.get());
@@ -471,17 +446,10 @@
new WebRtcLocalAudioTrack(adapter_2, new_capturer, NULL));
track_2->Start();
- // Connect a number of network channels to the |track_2|.
- static const int kNumberOfNetworkChannelsForTrack2 = 3;
- for (int i = 0; i < kNumberOfNetworkChannelsForTrack2; ++i) {
- static_cast<webrtc::AudioTrackInterface*>(
- adapter_2.get())->GetRenderer()->AddChannel(i);
- }
// Verify the data flow by connecting the |sink_2| to |track_2|.
scoped_ptr<MockMediaStreamAudioSink> sink_2(new MockMediaStreamAudioSink());
base::WaitableEvent event(false, false);
- EXPECT_CALL(*sink_2,
- CaptureData(kNumberOfNetworkChannelsForTrack2, 0, 0, _, false))
+ EXPECT_CALL(*sink_2, CaptureData(0, 0, 0, _, false))
.Times(AnyNumber()).WillRepeatedly(Return());
EXPECT_CALL(*sink_2, FormatIsSet()).WillOnce(SignalEvent(&event));
track_2->AddSink(sink_2.get());
diff --git a/content/renderer/npapi/webplugin_delegate_proxy.cc b/content/renderer/npapi/webplugin_delegate_proxy.cc
index e578b27..1943e80 100644
--- a/content/renderer/npapi/webplugin_delegate_proxy.cc
+++ b/content/renderer/npapi/webplugin_delegate_proxy.cc
@@ -917,11 +917,13 @@
if (!render_view_)
return;
- render_view_->Send(new ViewHostMsg_TextInputTypeChanged(
- render_view_->routing_id(),
- static_cast<ui::TextInputType>(input_type),
- ui::TEXT_INPUT_MODE_DEFAULT,
- true));
+ ViewHostMsg_TextInputState_Params p;
+ p.type = static_cast<ui::TextInputType>(input_type);
+ p.mode = ui::TEXT_INPUT_MODE_DEFAULT;
+ p.can_compose_inline = true;
+
+ render_view_->Send(new ViewHostMsg_TextInputStateChanged(
+ render_view_->routing_id(), p));
ViewHostMsg_SelectionBounds_Params bounds_params;
bounds_params.anchor_rect = bounds_params.focus_rect = caret_rect;
diff --git a/content/renderer/npapi/webplugin_impl.cc b/content/renderer/npapi/webplugin_impl.cc
index 065571b..91e16b0 100644
--- a/content/renderer/npapi/webplugin_impl.cc
+++ b/content/renderer/npapi/webplugin_impl.cc
@@ -24,6 +24,7 @@
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
#include "content/public/renderer/content_renderer_client.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
#include "content/renderer/npapi/webplugin_delegate_proxy.h"
#include "content/renderer/render_frame_impl.h"
#include "content/renderer/render_process.h"
@@ -57,7 +58,6 @@
#include "url/gurl.h"
#include "url/url_util.h"
#include "webkit/child/multipart_response_delegate.h"
-#include "webkit/renderer/compositor_bindings/web_layer_impl.h"
using blink::WebCanvas;
using blink::WebConsoleMessage;
@@ -852,7 +852,7 @@
if (next_io_surface_id_) {
if (!io_surface_layer_.get()) {
io_surface_layer_ = cc::IOSurfaceLayer::Create();
- web_layer_.reset(new webkit::WebLayerImpl(io_surface_layer_));
+ web_layer_.reset(new WebLayerImpl(io_surface_layer_));
container_->setWebLayer(web_layer_.get());
}
io_surface_layer_->SetIOSurfaceProperties(
diff --git a/content/renderer/p2p/ipc_socket_factory.cc b/content/renderer/p2p/ipc_socket_factory.cc
index d035494..43b6d16 100644
--- a/content/renderer/p2p/ipc_socket_factory.cc
+++ b/content/renderer/p2p/ipc_socket_factory.cc
@@ -11,7 +11,9 @@
#include "base/debug/trace_event.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_proxy.h"
+#include "base/strings/stringprintf.h"
#include "base/threading/non_thread_safe.h"
+#include "content/renderer/media/webrtc_logging.h"
#include "content/renderer/p2p/host_address_request.h"
#include "content/renderer/p2p/socket_client_delegate.h"
#include "content/renderer/p2p/socket_client_impl.h"
@@ -310,7 +312,14 @@
TRACE_EVENT_SCOPE_THREAD,
"id",
client_->GetSocketID());
- writable_signal_expected_ = true;
+ if (!writable_signal_expected_) {
+ WebRtcLogMessage(base::StringPrintf(
+ "IpcPacketSocket: sending is blocked. %d packets_in_flight.",
+ static_cast<int>(in_flight_packet_sizes_.size())));
+
+ writable_signal_expected_ = true;
+ }
+
error_ = EWOULDBLOCK;
return -1;
}
@@ -462,11 +471,17 @@
CHECK(!in_flight_packet_sizes_.empty());
send_bytes_available_ += in_flight_packet_sizes_.front();
+
DCHECK_LE(send_bytes_available_, kMaximumInFlightBytes);
+
in_flight_packet_sizes_.pop_front();
TraceSendThrottlingState();
if (writable_signal_expected_ && send_bytes_available_ > 0) {
+ WebRtcLogMessage(base::StringPrintf(
+ "IpcPacketSocket: sending is unblocked. %d packets in flight.",
+ static_cast<int>(in_flight_packet_sizes_.size())));
+
SignalReadyToSend(this);
writable_signal_expected_ = false;
}
diff --git a/content/renderer/p2p/socket_dispatcher.cc b/content/renderer/p2p/socket_dispatcher.cc
index d6b0119..fd8aaf9 100644
--- a/content/renderer/p2p/socket_dispatcher.cc
+++ b/content/renderer/p2p/socket_dispatcher.cc
@@ -13,7 +13,7 @@
#include "content/renderer/p2p/network_list_observer.h"
#include "content/renderer/p2p/socket_client_impl.h"
#include "content/renderer/render_view_impl.h"
-#include "ipc/ipc_channel.h"
+#include "ipc/ipc_sender.h"
namespace content {
@@ -23,7 +23,7 @@
network_notifications_started_(false),
network_list_observers_(
new ObserverListThreadSafe<NetworkListObserver>()),
- channel_(NULL) {
+ sender_(NULL) {
}
P2PSocketDispatcher::~P2PSocketDispatcher() {
@@ -48,13 +48,13 @@
void P2PSocketDispatcher::Send(IPC::Message* message) {
DCHECK(message_loop_->BelongsToCurrentThread());
- if (!channel_) {
- DLOG(WARNING) << "P2PSocketDispatcher::Send() - Channel closed.";
+ if (!sender_) {
+ DLOG(WARNING) << "P2PSocketDispatcher::Send() - Sender closed.";
delete message;
return;
}
- channel_->Send(message);
+ sender_->Send(message);
}
bool P2PSocketDispatcher::OnMessageReceived(const IPC::Message& message) {
@@ -72,17 +72,17 @@
return handled;
}
-void P2PSocketDispatcher::OnFilterAdded(IPC::Channel* channel) {
+void P2PSocketDispatcher::OnFilterAdded(IPC::Sender* sender) {
DVLOG(1) << "P2PSocketDispatcher::OnFilterAdded()";
- channel_ = channel;
+ sender_ = sender;
}
void P2PSocketDispatcher::OnFilterRemoved() {
- channel_ = NULL;
+ sender_ = NULL;
}
void P2PSocketDispatcher::OnChannelClosing() {
- channel_ = NULL;
+ sender_ = NULL;
}
base::MessageLoopProxy* P2PSocketDispatcher::message_loop() {
diff --git a/content/renderer/p2p/socket_dispatcher.h b/content/renderer/p2p/socket_dispatcher.h
index 5bfd264..b0e9b29 100644
--- a/content/renderer/p2p/socket_dispatcher.h
+++ b/content/renderer/p2p/socket_dispatcher.h
@@ -74,7 +74,7 @@
// IPC::MessageFilter override. Called on IO thread.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
virtual void OnChannelClosing() OVERRIDE;
@@ -113,7 +113,7 @@
scoped_refptr<ObserverListThreadSafe<NetworkListObserver> >
network_list_observers_;
- IPC::Channel* channel_;
+ IPC::Sender* sender_;
DISALLOW_COPY_AND_ASSIGN(P2PSocketDispatcher);
};
diff --git a/content/renderer/pepper/content_decryptor_delegate.cc b/content/renderer/pepper/content_decryptor_delegate.cc
index a107617..8692c1c 100644
--- a/content/renderer/pepper/content_decryptor_delegate.cc
+++ b/content/renderer/pepper/content_decryptor_delegate.cc
@@ -12,6 +12,7 @@
#include "media/base/audio_buffer.h"
#include "media/base/audio_decoder_config.h"
#include "media/base/bind_to_current_loop.h"
+#include "media/base/cdm_promise.h"
#include "media/base/channel_layout.h"
#include "media/base/data_buffer.h"
#include "media/base/decoder_buffer.h"
@@ -26,7 +27,11 @@
#include "ppapi/thunk/ppb_buffer_api.h"
#include "ui/gfx/rect.h"
+using media::CdmPromise;
using media::Decryptor;
+using media::MediaKeys;
+using media::NewSessionCdmPromise;
+using media::SimpleCdmPromise;
using ppapi::ArrayBufferVar;
using ppapi::PpapiGlobals;
using ppapi::ScopedPPResource;
@@ -245,6 +250,42 @@
}
}
+PP_SessionType MediaSessionTypeToPpSessionType(
+ MediaKeys::SessionType session_type) {
+ switch (session_type) {
+ case MediaKeys::TEMPORARY_SESSION:
+ return PP_SESSIONTYPE_TEMPORARY;
+ case MediaKeys::PERSISTENT_SESSION:
+ return PP_SESSIONTYPE_PERSISTENT;
+ default:
+ NOTREACHED();
+ return PP_SESSIONTYPE_TEMPORARY;
+ }
+}
+
+MediaKeys::Exception PpExceptionTypeToMediaException(
+ PP_CdmExceptionCode exception_code) {
+ switch (exception_code) {
+ case PP_CDMEXCEPTIONCODE_NOTSUPPORTEDERROR:
+ return MediaKeys::NOT_SUPPORTED_ERROR;
+ case PP_CDMEXCEPTIONCODE_INVALIDSTATEERROR:
+ return MediaKeys::INVALID_STATE_ERROR;
+ case PP_CDMEXCEPTIONCODE_INVALIDACCESSERROR:
+ return MediaKeys::INVALID_ACCESS_ERROR;
+ case PP_CDMEXCEPTIONCODE_QUOTAEXCEEDEDERROR:
+ return MediaKeys::QUOTA_EXCEEDED_ERROR;
+ case PP_CDMEXCEPTIONCODE_UNKNOWNERROR:
+ return MediaKeys::UNKNOWN_ERROR;
+ case PP_CDMEXCEPTIONCODE_CLIENTERROR:
+ return MediaKeys::CLIENT_ERROR;
+ case PP_CDMEXCEPTIONCODE_OUTPUTERROR:
+ return MediaKeys::OUTPUT_ERROR;
+ default:
+ NOTREACHED();
+ return MediaKeys::UNKNOWN_ERROR;
+ }
+}
+
} // namespace
ContentDecryptorDelegate::ContentDecryptorDelegate(
@@ -256,6 +297,7 @@
audio_samples_per_second_(0),
audio_channel_count_(0),
audio_channel_layout_(media::CHANNEL_LAYOUT_NONE),
+ next_promise_id_(1),
weak_ptr_factory_(this) {
weak_this_ = weak_ptr_factory_.GetWeakPtr();
}
@@ -266,7 +308,6 @@
void ContentDecryptorDelegate::Initialize(
const std::string& key_system,
- const media::SessionCreatedCB& session_created_cb,
const media::SessionMessageCB& session_message_cb,
const media::SessionReadyCB& session_ready_cb,
const media::SessionClosedCB& session_closed_cb,
@@ -276,7 +317,6 @@
DCHECK(key_system_.empty());
key_system_ = key_system;
- session_created_cb_ = session_created_cb;
session_message_cb_ = session_message_cb;
session_ready_cb_ = session_ready_cb;
session_closed_cb_ = session_closed_cb;
@@ -292,42 +332,54 @@
SatisfyAllPendingCallbacksOnError();
}
-bool ContentDecryptorDelegate::CreateSession(uint32 session_id,
- const std::string& content_type,
- const uint8* init_data,
- int init_data_length) {
+void ContentDecryptorDelegate::CreateSession(
+ const std::string& init_data_type,
+ const uint8* init_data,
+ int init_data_length,
+ MediaKeys::SessionType session_type,
+ scoped_ptr<NewSessionCdmPromise> promise) {
+ uint32_t promise_id = SavePromise(promise.PassAs<CdmPromise>());
PP_Var init_data_array =
PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar(
init_data_length, init_data);
-
plugin_decryption_interface_->CreateSession(
pp_instance_,
- session_id,
- StringVar::StringToPPVar(content_type),
- init_data_array);
- return true;
+ promise_id,
+ StringVar::StringToPPVar(init_data_type),
+ init_data_array,
+ MediaSessionTypeToPpSessionType(session_type));
}
-void ContentDecryptorDelegate::LoadSession(uint32 session_id,
- const std::string& web_session_id) {
+void ContentDecryptorDelegate::LoadSession(
+ const std::string& web_session_id,
+ scoped_ptr<NewSessionCdmPromise> promise) {
+ uint32_t promise_id = SavePromise(promise.PassAs<CdmPromise>());
plugin_decryption_interface_->LoadSession(
- pp_instance_, session_id, StringVar::StringToPPVar(web_session_id));
+ pp_instance_, promise_id, StringVar::StringToPPVar(web_session_id));
}
-bool ContentDecryptorDelegate::UpdateSession(uint32 session_id,
- const uint8* response,
- int response_length) {
+void ContentDecryptorDelegate::UpdateSession(
+ const std::string& web_session_id,
+ const uint8* response,
+ int response_length,
+ scoped_ptr<SimpleCdmPromise> promise) {
+ uint32_t promise_id = SavePromise(promise.PassAs<CdmPromise>());
PP_Var response_array =
PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar(
response_length, response);
plugin_decryption_interface_->UpdateSession(
- pp_instance_, session_id, response_array);
- return true;
+ pp_instance_,
+ promise_id,
+ StringVar::StringToPPVar(web_session_id),
+ response_array);
}
-bool ContentDecryptorDelegate::ReleaseSession(uint32 session_id) {
- plugin_decryption_interface_->ReleaseSession(pp_instance_, session_id);
- return true;
+void ContentDecryptorDelegate::ReleaseSession(
+ const std::string& web_session_id,
+ scoped_ptr<SimpleCdmPromise> promise) {
+ uint32_t promise_id = SavePromise(promise.PassAs<CdmPromise>());
+ plugin_decryption_interface_->ReleaseSession(
+ pp_instance_, promise_id, StringVar::StringToPPVar(web_session_id));
}
// TODO(xhwang): Remove duplication of code in Decrypt(),
@@ -573,41 +625,64 @@
return true;
}
-void ContentDecryptorDelegate::OnSessionCreated(uint32 session_id,
- PP_Var web_session_id_var) {
- if (session_created_cb_.is_null())
- return;
-
- StringVar* session_id_string = StringVar::FromPPVar(web_session_id_var);
-
- if (!session_id_string) {
- OnSessionError(session_id, media::MediaKeys::kUnknownError, 0);
- return;
+void ContentDecryptorDelegate::OnPromiseResolved(uint32 promise_id) {
+ scoped_ptr<CdmPromise> promise = TakePromise(promise_id);
+ if (promise) {
+ SimpleCdmPromise* simple_promise(
+ static_cast<SimpleCdmPromise*>(promise.get()));
+ simple_promise->resolve();
}
-
- session_created_cb_.Run(session_id, session_id_string->value());
}
-void ContentDecryptorDelegate::OnSessionMessage(uint32 session_id,
- PP_Var message_var,
- PP_Var destination_url_var) {
+void ContentDecryptorDelegate::OnPromiseResolvedWithSession(
+ uint32 promise_id,
+ PP_Var web_session_id) {
+ scoped_ptr<CdmPromise> promise = TakePromise(promise_id);
+
+ StringVar* web_session_id_string = StringVar::FromPPVar(web_session_id);
+ DCHECK(web_session_id_string);
+
+ if (promise) {
+ NewSessionCdmPromise* session_promise(
+ static_cast<NewSessionCdmPromise*>(promise.get()));
+ session_promise->resolve(web_session_id_string->value());
+ }
+}
+
+void ContentDecryptorDelegate::OnPromiseRejected(
+ uint32 promise_id,
+ PP_CdmExceptionCode exception_code,
+ uint32 system_code,
+ PP_Var error_description) {
+ StringVar* error_description_string = StringVar::FromPPVar(error_description);
+ DCHECK(error_description_string);
+
+ scoped_ptr<CdmPromise> promise = TakePromise(promise_id);
+ if (promise) {
+ promise->reject(PpExceptionTypeToMediaException(exception_code),
+ system_code,
+ error_description_string->value());
+ }
+}
+
+void ContentDecryptorDelegate::OnSessionMessage(PP_Var web_session_id,
+ PP_Var message,
+ PP_Var destination_url) {
if (session_message_cb_.is_null())
return;
- ArrayBufferVar* message_array_buffer = ArrayBufferVar::FromPPVar(message_var);
+ StringVar* web_session_id_string = StringVar::FromPPVar(web_session_id);
+ DCHECK(web_session_id_string);
- std::vector<uint8> message;
+ ArrayBufferVar* message_array_buffer = ArrayBufferVar::FromPPVar(message);
+ std::vector<uint8> message_vector;
if (message_array_buffer) {
const uint8* data = static_cast<const uint8*>(message_array_buffer->Map());
- message.assign(data, data + message_array_buffer->ByteLength());
+ message_vector.assign(data, data + message_array_buffer->ByteLength());
}
- StringVar* destination_url_string = StringVar::FromPPVar(destination_url_var);
-
- if (!destination_url_string) {
- OnSessionError(session_id, media::MediaKeys::kUnknownError, 0);
- return;
- }
+ StringVar* destination_url_string = StringVar::FromPPVar(destination_url);
+ DCHECK(destination_url_string);
GURL verified_gurl = GURL(destination_url_string->value());
if (!verified_gurl.is_valid() && !verified_gurl.is_empty()) {
@@ -616,32 +691,48 @@
verified_gurl = GURL::EmptyGURL(); // Replace invalid destination_url.
}
- session_message_cb_.Run(session_id, message, verified_gurl);
+ session_message_cb_.Run(
+ web_session_id_string->value(), message_vector, verified_gurl);
}
-void ContentDecryptorDelegate::OnSessionReady(uint32 session_id) {
+void ContentDecryptorDelegate::OnSessionReady(PP_Var web_session_id) {
if (session_ready_cb_.is_null())
return;
- session_ready_cb_.Run(session_id);
+ StringVar* web_session_id_string = StringVar::FromPPVar(web_session_id);
+ DCHECK(web_session_id_string);
+
+ session_ready_cb_.Run(web_session_id_string->value());
}
-void ContentDecryptorDelegate::OnSessionClosed(uint32 session_id) {
+void ContentDecryptorDelegate::OnSessionClosed(PP_Var web_session_id) {
if (session_closed_cb_.is_null())
return;
- session_closed_cb_.Run(session_id);
+ StringVar* web_session_id_string = StringVar::FromPPVar(web_session_id);
+ DCHECK(web_session_id_string);
+
+ session_closed_cb_.Run(web_session_id_string->value());
}
-void ContentDecryptorDelegate::OnSessionError(uint32 session_id,
- int32_t media_error,
- uint32_t system_code) {
+void ContentDecryptorDelegate::OnSessionError(
+ PP_Var web_session_id,
+ PP_CdmExceptionCode exception_code,
+ uint32 system_code,
+ PP_Var error_description) {
if (session_error_cb_.is_null())
return;
- session_error_cb_.Run(session_id,
- static_cast<media::MediaKeys::KeyError>(media_error),
- system_code);
+ StringVar* web_session_id_string = StringVar::FromPPVar(web_session_id);
+ DCHECK(web_session_id_string);
+
+ StringVar* error_description_string = StringVar::FromPPVar(error_description);
+ DCHECK(error_description_string);
+
+ session_error_cb_.Run(web_session_id_string->value(),
+ PpExceptionTypeToMediaException(exception_code),
+ system_code,
+ error_description_string->value());
}
void ContentDecryptorDelegate::DecoderInitializeDone(
@@ -1067,6 +1158,28 @@
if (!video_decode_cb_.is_null())
video_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError, NULL);
+
+ // Reject all outstanding promises.
+ for (PromiseMap::iterator it = promises_.begin(); it != promises_.end();
+ ++it) {
+ it->second->reject(
+ media::MediaKeys::UNKNOWN_ERROR, 0, "Failure calling plugin.");
+ }
+ promises_.clear();
+}
+
+uint32_t ContentDecryptorDelegate::SavePromise(scoped_ptr<CdmPromise> promise) {
+ uint32_t promise_id = next_promise_id_++;
+ promises_.add(promise_id, promise.Pass());
+ return promise_id;
+}
+
+scoped_ptr<CdmPromise> ContentDecryptorDelegate::TakePromise(
+ uint32_t promise_id) {
+ PromiseMap::iterator it = promises_.find(promise_id);
+ if (it == promises_.end())
+ return scoped_ptr<CdmPromise>();
+ return promises_.take_and_erase(it);
}
} // namespace content
diff --git a/content/renderer/pepper/content_decryptor_delegate.h b/content/renderer/pepper/content_decryptor_delegate.h
index 2efdacb..182d6a6 100644
--- a/content/renderer/pepper/content_decryptor_delegate.h
+++ b/content/renderer/pepper/content_decryptor_delegate.h
@@ -5,14 +5,17 @@
#ifndef CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_
#define CONTENT_RENDERER_PEPPER_CONTENT_DECRYPTOR_DELEGATE_H_
+#include <map>
#include <queue>
#include <string>
#include "base/basictypes.h"
#include "base/callback_helpers.h"
#include "base/compiler_specific.h"
+#include "base/containers/scoped_ptr_hash_map.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "media/base/cdm_promise.h"
#include "media/base/channel_layout.h"
#include "media/base/decryptor.h"
#include "media/base/media_keys.h"
@@ -43,7 +46,6 @@
// This object should not be accessed after |fatal_plugin_error_cb| is called.
void Initialize(const std::string& key_system,
- const media::SessionCreatedCB& session_created_cb,
const media::SessionMessageCB& session_message_cb,
const media::SessionReadyCB& session_ready_cb,
const media::SessionClosedCB& session_closed_cb,
@@ -53,15 +55,19 @@
void InstanceCrashed();
// Provides access to PPP_ContentDecryptor_Private.
- bool CreateSession(uint32 session_id,
- const std::string& content_type,
+ void CreateSession(const std::string& init_data_type,
const uint8* init_data,
- int init_data_length);
- void LoadSession(uint32 session_id, const std::string& web_session_id);
- bool UpdateSession(uint32 session_id,
+ int init_data_length,
+ media::MediaKeys::SessionType session_type,
+ scoped_ptr<media::NewSessionCdmPromise> promise);
+ void LoadSession(const std::string& web_session_id,
+ scoped_ptr<media::NewSessionCdmPromise> promise);
+ void UpdateSession(const std::string& web_session_id,
const uint8* response,
- int response_length);
- bool ReleaseSession(uint32 session_id);
+ int response_length,
+ scoped_ptr<media::SimpleCdmPromise> promise);
+ void ReleaseSession(const std::string& web_session_id,
+ scoped_ptr<media::SimpleCdmPromise> promise);
bool Decrypt(media::Decryptor::StreamType stream_type,
const scoped_refptr<media::DecoderBuffer>& encrypted_buffer,
const media::Decryptor::DecryptCB& decrypt_cb);
@@ -85,15 +91,21 @@
const media::Decryptor::VideoDecodeCB& video_decode_cb);
// PPB_ContentDecryptor_Private dispatching methods.
- void OnSessionCreated(uint32 session_id, PP_Var web_session_id_var);
- void OnSessionMessage(uint32 session_id,
+ void OnPromiseResolved(uint32 promise_id);
+ void OnPromiseResolvedWithSession(uint32 promise_id, PP_Var web_session_id);
+ void OnPromiseRejected(uint32 promise_id,
+ PP_CdmExceptionCode exception_code,
+ uint32 system_code,
+ PP_Var error_description);
+ void OnSessionMessage(PP_Var web_session_id,
PP_Var message,
- PP_Var destination_url_var);
- void OnSessionReady(uint32 session_id);
- void OnSessionClosed(uint32 session_id);
- void OnSessionError(uint32 session_id,
- int32_t media_error,
- uint32_t system_code);
+ PP_Var destination_url);
+ void OnSessionReady(PP_Var web_session_id);
+ void OnSessionClosed(PP_Var web_session_id);
+ void OnSessionError(PP_Var web_session_id,
+ PP_CdmExceptionCode exception_code,
+ uint32 system_code,
+ PP_Var error_description);
void DeliverBlock(PP_Resource decrypted_block,
const PP_DecryptedBlockInfo* block_info);
void DecoderInitializeDone(PP_DecryptorStreamType decoder_type,
@@ -109,6 +121,10 @@
const PP_DecryptedSampleInfo* sample_info);
private:
+ // The following types keep track of Promises. The index is the promise_id,
+ // so that returning results can be matched to the corresponding promise.
+ typedef base::ScopedPtrHashMap<uint32_t, media::CdmPromise> PromiseMap;
+
template <typename Callback>
class TrackableCallback {
public:
@@ -171,6 +187,14 @@
void SatisfyAllPendingCallbacksOnError();
+ // Takes ownership of |promise| and returns an identifier to be passed via
+ // Pepper.
+ uint32_t SavePromise(scoped_ptr<media::CdmPromise> promise);
+
+ // Find the promise for a specified |promise_id|. Caller is responsible to
+ // delete the CdmPromise<> once done with it.
+ scoped_ptr<media::CdmPromise> TakePromise(uint32_t promise_id);
+
const PP_Instance pp_instance_;
const PPP_ContentDecryptor_Private* const plugin_decryption_interface_;
@@ -178,7 +202,6 @@
std::string key_system_;
// Callbacks for firing session events.
- media::SessionCreatedCB session_created_cb_;
media::SessionMessageCB session_message_cb_;
media::SessionReadyCB session_ready_cb_;
media::SessionClosedCB session_closed_cb_;
@@ -214,6 +237,10 @@
int audio_channel_count_;
media::ChannelLayout audio_channel_layout_;
+ // Keep track of outstanding promises. Maps have ownership of the promises.
+ uint32_t next_promise_id_;
+ PromiseMap promises_;
+
base::WeakPtr<ContentDecryptorDelegate> weak_this_;
base::WeakPtrFactory<ContentDecryptorDelegate> weak_ptr_factory_;
diff --git a/content/renderer/pepper/content_renderer_pepper_host_factory.cc b/content/renderer/pepper/content_renderer_pepper_host_factory.cc
index 26604f1..07afe47 100644
--- a/content/renderer/pepper/content_renderer_pepper_host_factory.cc
+++ b/content/renderer/pepper/content_renderer_pepper_host_factory.cc
@@ -9,6 +9,7 @@
#include "content/public/common/content_client.h"
#include "content/public/renderer/content_renderer_client.h"
#include "content/renderer/pepper/pepper_audio_input_host.h"
+#include "content/renderer/pepper/pepper_compositor_host.h"
#include "content/renderer/pepper/pepper_file_chooser_host.h"
#include "content/renderer/pepper/pepper_file_ref_renderer_host.h"
#include "content/renderer/pepper/pepper_file_system_host.h"
@@ -82,6 +83,10 @@
// Public interfaces.
switch (message.type()) {
+ case PpapiHostMsg_Compositor_Create::ID: {
+ return scoped_ptr<ResourceHost>(
+ new PepperCompositorHost(host_, instance, params.pp_resource()));
+ }
case PpapiHostMsg_FileRef_CreateForFileAPI::ID: {
PP_Resource file_system;
std::string internal_path;
diff --git a/content/renderer/pepper/gfx_conversion.h b/content/renderer/pepper/gfx_conversion.h
index 3b504ba..1c1fa11 100644
--- a/content/renderer/pepper/gfx_conversion.h
+++ b/content/renderer/pepper/gfx_conversion.h
@@ -10,6 +10,7 @@
#include "ppapi/c/pp_size.h"
#include "ui/gfx/point.h"
#include "ui/gfx/rect.h"
+#include "ui/gfx/rect_f.h"
#include "ui/gfx/size.h"
// Conversions for graphics types between our gfx library and PPAPI.
@@ -29,6 +30,10 @@
return gfx::Rect(r.point.x, r.point.y, r.size.width, r.size.height);
}
+inline gfx::RectF PP_ToGfxRectF(const PP_FloatRect& r) {
+ return gfx::RectF(r.point.x, r.point.y, r.size.width, r.size.height);
+}
+
inline PP_Rect PP_FromGfxRect(const gfx::Rect& r) {
return PP_MakeRectFromXYWH(r.x(), r.y(), r.width(), r.height());
}
diff --git a/content/renderer/pepper/message_channel.cc b/content/renderer/pepper/message_channel.cc
index 12d24ba..2fd4410 100644
--- a/content/renderer/pepper/message_channel.cc
+++ b/content/renderer/pepper/message_channel.cc
@@ -45,6 +45,7 @@
namespace {
const char kPostMessage[] = "postMessage";
+const char kPostMessageAndAwaitResponse[] = "postMessageAndAwaitResponse";
const char kV8ToVarConversionError[] =
"Failed to convert a PostMessage "
"argument from a JavaScript value to a PP_Var. It may have cycles or be of "
@@ -71,6 +72,14 @@
return WebBindings::getStringIdentifier(string) == identifier;
}
+bool HasDevChannelPermission(NPObject* channel_object) {
+ MessageChannel* channel = ToMessageChannel(channel_object);
+ if (!channel)
+ return false;
+ return channel->instance()->module()->permissions().HasPermission(
+ ppapi::PERMISSION_DEV_CHANNEL);
+}
+
//------------------------------------------------------------------------------
// Implementations of NPClass functions. These are here to:
// - Implement postMessage behavior.
@@ -93,7 +102,10 @@
if (IdentifierIs(name, kPostMessage))
return true;
-
+ if (IdentifierIs(name, kPostMessageAndAwaitResponse) &&
+ HasDevChannelPermission(np_obj)) {
+ return true;
+ }
// Other method names we will pass to the passthrough object, if we have one.
NPObject* passthrough = ToPassThroughObject(np_obj);
if (passthrough)
@@ -113,12 +125,17 @@
if (!message_channel)
return false;
- // Check to see if we should handle this function ourselves. We only handle
- // kPostMessage.
+ // Check to see if we should handle this function ourselves.
if (IdentifierIs(name, kPostMessage) && (arg_count == 1)) {
message_channel->PostMessageToNative(&args[0]);
return true;
+ } else if (IdentifierIs(name, kPostMessageAndAwaitResponse) &&
+ (arg_count == 1) &&
+ HasDevChannelPermission(np_obj)) {
+ message_channel->PostBlockingMessageToNative(&args[0], result);
+ return true;
}
+
// Other method calls we will pass to the passthrough object, if we have one.
NPObject* passthrough = ToPassThroughObject(np_obj);
if (passthrough) {
@@ -167,10 +184,13 @@
if (!np_obj)
return false;
- // Don't allow getting the postMessage function.
+ // Don't allow getting the postMessage functions.
if (IdentifierIs(name, kPostMessage))
return false;
-
+ if (IdentifierIs(name, kPostMessageAndAwaitResponse) &&
+ HasDevChannelPermission(np_obj)) {
+ return false;
+ }
MessageChannel* message_channel = ToMessageChannel(np_obj);
if (message_channel) {
if (message_channel->GetReadOnlyProperty(name, result))
@@ -190,10 +210,13 @@
if (!np_obj)
return false;
- // Don't allow setting the postMessage function.
+ // Don't allow setting the postMessage functions.
if (IdentifierIs(name, kPostMessage))
return false;
-
+ if (IdentifierIs(name, kPostMessageAndAwaitResponse) &&
+ HasDevChannelPermission(np_obj)) {
+ return false;
+ }
// Invoke on the passthrough object, if we have one.
NPObject* passthrough = ToPassThroughObject(np_obj);
if (passthrough)
@@ -294,12 +317,18 @@
// won't result in a deep copy.
v8::Handle<v8::Value> v8_value = WebBindings::toV8Value(variant);
V8VarConverter v8_var_converter(instance_->pp_instance());
- v8_var_converter.FromV8Value(
- v8_value,
- v8::Isolate::GetCurrent()->GetCurrentContext(),
- base::Bind(&MessageChannel::FromV8ValueComplete,
- weak_ptr_factory_.GetWeakPtr(),
- &plugin_message_queue_.back()));
+ V8VarConverter::VarResult conversion_result =
+ v8_var_converter.FromV8Value(
+ v8_value,
+ v8::Isolate::GetCurrent()->GetCurrentContext(),
+ base::Bind(&MessageChannel::FromV8ValueComplete,
+ weak_ptr_factory_.GetWeakPtr(),
+ &plugin_message_queue_.back()));
+ if (conversion_result.completed_synchronously) {
+ plugin_message_queue_.back().ConversionCompleted(
+ conversion_result.var,
+ conversion_result.success);
+ }
} else {
plugin_message_queue_.back().ConversionCompleted(
ScopedPPVar(ScopedPPVar::PassRef(),
@@ -441,6 +470,80 @@
DrainCompletedPluginMessages();
}
+void MessageChannel::PostBlockingMessageToNative(const NPVariant* message_data,
+ NPVariant* np_result) {
+ if (early_message_queue_state_ == QUEUE_MESSAGES) {
+ WebBindings::setException(
+ np_object_,
+ "Attempted to call a synchronous method on a plugin that was not "
+ "yet loaded.");
+ return;
+ }
+
+ // If the queue of messages to the plugin is non-empty, we're still waiting on
+ // pending Var conversions. This means at some point in the past, JavaScript
+ // called postMessage (the async one) and passed us something with a browser-
+ // side host (e.g., FileSystem) and we haven't gotten a response from the
+ // browser yet. We can't currently support sending a sync message if the
+ // plugin does this, because it will break the ordering of the messages
+ // arriving at the plugin.
+ // TODO(dmichael): Fix this.
+ // See https://code.google.com/p/chromium/issues/detail?id=367896#c4
+ if (!plugin_message_queue_.empty()) {
+ WebBindings::setException(
+ np_object_,
+ "Failed to convert parameter synchronously, because a prior "
+ "call to postMessage contained a type which required asynchronous "
+ "transfer which has not completed. Not all types are supported yet by "
+ "postMessageAndAwaitResponse. See crbug.com/367896.");
+ return;
+ }
+ ScopedPPVar param;
+ if (message_data->type == NPVariantType_Object) {
+ // Convert NPVariantType_Object in to an appropriate PP_Var like Dictionary,
+ // Array, etc. Note NPVariantToVar would convert to an "Object" PP_Var,
+ // which we don't support for Messaging.
+ v8::Handle<v8::Value> v8_value = WebBindings::toV8Value(message_data);
+ V8VarConverter v8_var_converter(instance_->pp_instance());
+ bool success = v8_var_converter.FromV8ValueSync(
+ v8_value,
+ v8::Isolate::GetCurrent()->GetCurrentContext(),
+ ¶m);
+ if (!success) {
+ WebBindings::setException(
+ np_object_,
+ "Failed to convert the given parameter to a PP_Var to send to "
+ "the plugin.");
+ return;
+ }
+ } else {
+ param = ScopedPPVar(ScopedPPVar::PassRef(),
+ NPVariantToPPVar(instance(), message_data));
+ }
+ ScopedPPVar pp_result;
+ bool was_handled = instance_->HandleBlockingMessage(param, &pp_result);
+ if (!was_handled) {
+ WebBindings::setException(
+ np_object_,
+ "The plugin has not registered a handler for synchronous messages. "
+ "See the documentation for PPB_Messaging::RegisterMessageHandler "
+ "and PPP_MessageHandler.");
+ return;
+ }
+ v8::Handle<v8::Value> v8_val;
+ if (!V8VarConverter(instance_->pp_instance()).ToV8Value(
+ pp_result.get(),
+ v8::Isolate::GetCurrent()->GetCurrentContext(),
+ &v8_val)) {
+ WebBindings::setException(
+ np_object_,
+ "Failed to convert the plugin's result to a JavaScript type.");
+ return;
+ }
+ // Success! Convert the result to an NPVariant.
+ WebBindings::toNPVariant(v8_val, NULL, np_result);
+}
+
MessageChannel::~MessageChannel() {
WebBindings::releaseObject(np_object_);
if (passthrough_object_)
diff --git a/content/renderer/pepper/message_channel.h b/content/renderer/pepper/message_channel.h
index 077a68d..8c744a0 100644
--- a/content/renderer/pepper/message_channel.h
+++ b/content/renderer/pepper/message_channel.h
@@ -60,6 +60,10 @@
// Post a message to the plugin's HandleMessage function for this channel's
// instance.
void PostMessageToNative(const NPVariant* message_data);
+ // Post a message to the plugin's HandleBlocking Message function for this
+ // channel's instance synchronously, and return a result.
+ void PostBlockingMessageToNative(const NPVariant* message_data,
+ NPVariant* np_result);
// Return the NPObject* to which we should forward any calls which aren't
// related to postMessage. Note that this can be NULL; it only gets set if
diff --git a/content/renderer/pepper/pepper_compositor_host.cc b/content/renderer/pepper/pepper_compositor_host.cc
new file mode 100644
index 0000000..47c0fcc
--- /dev/null
+++ b/content/renderer/pepper/pepper_compositor_host.cc
@@ -0,0 +1,372 @@
+// Copyright 2014 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 "content/renderer/pepper/pepper_compositor_host.h"
+
+#include "base/logging.h"
+#include "base/memory/shared_memory.h"
+#include "cc/layers/layer.h"
+#include "cc/layers/solid_color_layer.h"
+#include "cc/layers/texture_layer.h"
+#include "cc/resources/texture_mailbox.h"
+#include "content/public/renderer/renderer_ppapi_host.h"
+#include "content/renderer/pepper/gfx_conversion.h"
+#include "content/renderer/pepper/host_globals.h"
+#include "content/renderer/pepper/pepper_plugin_instance_impl.h"
+#include "content/renderer/pepper/ppb_image_data_impl.h"
+#include "ppapi/c/pp_errors.h"
+#include "ppapi/host/dispatch_host_message.h"
+#include "ppapi/host/ppapi_host.h"
+#include "ppapi/proxy/ppapi_messages.h"
+#include "ppapi/thunk/enter.h"
+#include "ppapi/thunk/ppb_image_data_api.h"
+#include "third_party/khronos/GLES2/gl2.h"
+#include "ui/gfx/transform.h"
+
+using ppapi::host::HostMessageContext;
+using ppapi::thunk::EnterResourceNoLock;
+using ppapi::thunk::PPB_ImageData_API;
+
+namespace content {
+
+namespace {
+
+int32_t VerifyCommittedLayer(
+ const ppapi::CompositorLayerData* old_layer,
+ const ppapi::CompositorLayerData* new_layer,
+ scoped_ptr<base::SharedMemory>* image_shm) {
+ if (!new_layer->is_valid())
+ return PP_ERROR_BADARGUMENT;
+
+ if (new_layer->color) {
+ // Make sure the old layer is a color layer too.
+ if (old_layer && !old_layer->color)
+ return PP_ERROR_BADARGUMENT;
+ return PP_OK;
+ }
+
+ if (new_layer->texture) {
+ if (old_layer) {
+ // Make sure the old layer is a texture layer too.
+ if (!new_layer->texture)
+ return PP_ERROR_BADARGUMENT;
+ // The mailbox should be same, if the resource_id is not changed.
+ if (new_layer->common.resource_id == old_layer->common.resource_id) {
+ if (new_layer->texture->mailbox != old_layer->texture->mailbox)
+ return PP_ERROR_BADARGUMENT;
+ return PP_OK;
+ }
+ }
+ if (!new_layer->texture->mailbox.Verify())
+ return PP_ERROR_BADARGUMENT;
+ return PP_OK;
+ }
+
+ if (new_layer->image) {
+ if (old_layer) {
+ // Make sure the old layer is an image layer too.
+ if (!new_layer->image)
+ return PP_ERROR_BADARGUMENT;
+ // The image data resource should be same, if the resource_id is not
+ // changed.
+ if (new_layer->common.resource_id == old_layer->common.resource_id) {
+ if (new_layer->image->resource != old_layer->image->resource)
+ return PP_ERROR_BADARGUMENT;
+ return PP_OK;
+ }
+ }
+ EnterResourceNoLock<PPB_ImageData_API> enter(new_layer->image->resource,
+ true);
+ if (enter.failed())
+ return PP_ERROR_BADRESOURCE;
+
+ // TODO(penghuang): support all kinds of image.
+ PP_ImageDataDesc desc;
+ if (enter.object()->Describe(&desc) != PP_TRUE ||
+ desc.stride != desc.size.width * 4 ||
+ desc.format != PP_IMAGEDATAFORMAT_RGBA_PREMUL) {
+ return PP_ERROR_BADARGUMENT;
+ }
+
+ int handle;
+ uint32_t byte_count;
+ if (enter.object()->GetSharedMemory(&handle, &byte_count) != PP_OK)
+ return PP_ERROR_FAILED;
+
+#if defined(OS_WIN)
+ base::SharedMemoryHandle shm_handle;
+ if (!::DuplicateHandle(::GetCurrentProcess(),
+ reinterpret_cast<base::SharedMemoryHandle>(handle),
+ ::GetCurrentProcess(),
+ &shm_handle,
+ 0,
+ FALSE,
+ DUPLICATE_SAME_ACCESS)) {
+ return PP_ERROR_FAILED;
+ }
+#else
+ base::SharedMemoryHandle shm_handle(dup(handle), false);
+#endif
+ image_shm->reset(new base::SharedMemory(shm_handle, true));
+ if (!(*image_shm)->Map(desc.stride * desc.size.height)) {
+ image_shm->reset();
+ return PP_ERROR_NOMEMORY;
+ }
+ return PP_OK;
+ }
+
+ return PP_ERROR_BADARGUMENT;
+}
+
+} // namespace
+
+PepperCompositorHost::LayerData::LayerData(
+ const scoped_refptr<cc::Layer>& cc,
+ const ppapi::CompositorLayerData& pp) : cc_layer(cc), pp_layer(pp) {}
+
+PepperCompositorHost::LayerData::~LayerData() {}
+
+PepperCompositorHost::PepperCompositorHost(
+ RendererPpapiHost* host,
+ PP_Instance instance,
+ PP_Resource resource)
+ : ResourceHost(host->GetPpapiHost(), instance, resource),
+ bound_instance_(NULL),
+ weak_factory_(this) {
+ layer_ = cc::Layer::Create();
+ // TODO(penghuang): SetMasksToBounds() can be expensive if the layer is
+ // transformed. Possibly better could be to explicitly clip the child layers
+ // (by modifying their bounds).
+ layer_->SetMasksToBounds(true);
+ layer_->SetIsDrawable(true);
+}
+
+PepperCompositorHost::~PepperCompositorHost() {
+ // Unbind from the instance when destroyed if we're still bound.
+ if (bound_instance_)
+ bound_instance_->BindGraphics(bound_instance_->pp_instance(), 0);
+}
+
+bool PepperCompositorHost::BindToInstance(
+ PepperPluginInstanceImpl* new_instance) {
+ if (new_instance && new_instance->pp_instance() != pp_instance())
+ return false; // Can't bind other instance's contexts.
+ if (bound_instance_ == new_instance)
+ return true; // Rebinding the same device, nothing to do.
+ if (bound_instance_ && new_instance)
+ return false; // Can't change a bound device.
+ bound_instance_ = new_instance;
+ return true;
+}
+
+void PepperCompositorHost::ViewInitiatedPaint() {
+ if (!commit_layers_reply_context_.is_valid())
+ return;
+ host()->SendReply(commit_layers_reply_context_,
+ PpapiPluginMsg_Compositor_CommitLayersReply());
+ commit_layers_reply_context_ = ppapi::host::ReplyMessageContext();
+}
+
+void PepperCompositorHost::ViewFlushedPaint() {}
+
+void PepperCompositorHost::UpdateLayer(
+ const scoped_refptr<cc::Layer>& layer,
+ const ppapi::CompositorLayerData* old_layer,
+ const ppapi::CompositorLayerData* new_layer,
+ scoped_ptr<base::SharedMemory> image_shm) {
+ // Always update properties on cc::Layer, because cc::Layer
+ // will ignore any setting with unchanged value.
+ layer->SetIsDrawable(true);
+ layer->SetBlendMode(SkXfermode::kSrcOver_Mode);
+ layer->SetOpacity(new_layer->common.opacity);
+ layer->SetBounds(PP_ToGfxSize(new_layer->common.size));
+ layer->SetTransformOrigin(gfx::Point3F(new_layer->common.size.width / 2,
+ new_layer->common.size.height / 2,
+ 0.0f));
+
+ gfx::Transform transform(gfx::Transform::kSkipInitialization);
+ transform.matrix().setColMajorf(new_layer->common.transform.matrix);
+ layer->SetTransform(transform);
+
+ // Consider a (0,0,0,0) rect as no clip rect.
+ if (new_layer->common.clip_rect.point.x != 0 ||
+ new_layer->common.clip_rect.point.y != 0 ||
+ new_layer->common.clip_rect.size.width != 0 ||
+ new_layer->common.clip_rect.size.height != 0) {
+ scoped_refptr<cc::Layer> clip_parent = layer->parent();
+ if (clip_parent == layer_) {
+ // Create a clip parent layer, if it does not exist.
+ clip_parent = cc::Layer::Create();
+ clip_parent->SetMasksToBounds(true);
+ clip_parent->SetIsDrawable(true);
+ layer_->ReplaceChild(layer, clip_parent);
+ clip_parent->AddChild(layer);
+ }
+ gfx::Point position = PP_ToGfxPoint(new_layer->common.clip_rect.point);
+ clip_parent->SetPosition(position);
+ clip_parent->SetBounds(PP_ToGfxSize(new_layer->common.clip_rect.size));
+ layer->SetPosition(gfx::Point(-position.x(), -position.y()));
+ } else if (layer->parent() != layer_) {
+ // Remove the clip parent layer.
+ layer_->ReplaceChild(layer->parent(), layer);
+ layer->SetPosition(gfx::Point());
+ }
+
+ if (new_layer->color) {
+ layer->SetBackgroundColor(SkColorSetARGBMacro(
+ new_layer->color->alpha * 255,
+ new_layer->color->red * 255,
+ new_layer->color->green * 255,
+ new_layer->color->blue * 255));
+ return;
+ }
+
+ if (new_layer->texture) {
+ scoped_refptr<cc::TextureLayer> texture_layer(
+ static_cast<cc::TextureLayer*>(layer.get()));
+ if (!old_layer ||
+ new_layer->common.resource_id != old_layer->common.resource_id) {
+ cc::TextureMailbox mailbox(new_layer->texture->mailbox,
+ GL_TEXTURE_2D,
+ new_layer->texture->sync_point);
+ texture_layer->SetTextureMailbox(mailbox,
+ cc::SingleReleaseCallback::Create(
+ base::Bind(&PepperCompositorHost::ResourceReleased,
+ weak_factory_.GetWeakPtr(),
+ new_layer->common.resource_id)));;
+ }
+ texture_layer->SetPremultipliedAlpha(new_layer->texture->premult_alpha);
+ gfx::RectF rect = PP_ToGfxRectF(new_layer->texture->source_rect);
+ texture_layer->SetUV(rect.origin(), rect.bottom_right());
+ return;
+ }
+
+ if (new_layer->image) {
+ if (!old_layer ||
+ new_layer->common.resource_id != old_layer->common.resource_id) {
+ scoped_refptr<cc::TextureLayer> image_layer(
+ static_cast<cc::TextureLayer*>(layer.get()));
+ EnterResourceNoLock<PPB_ImageData_API> enter(new_layer->image->resource,
+ true);
+ DCHECK(enter.succeeded());
+
+ // TODO(penghuang): support all kinds of image.
+ PP_ImageDataDesc desc;
+ PP_Bool rv = enter.object()->Describe(&desc);
+ DCHECK_EQ(rv, PP_TRUE);
+ DCHECK_EQ(desc.stride, desc.size.width * 4);
+ DCHECK_EQ(desc.format, PP_IMAGEDATAFORMAT_RGBA_PREMUL);
+
+ cc::TextureMailbox mailbox(image_shm.get(),
+ PP_ToGfxSize(desc.size));
+ image_layer->SetTextureMailbox(mailbox,
+ cc::SingleReleaseCallback::Create(
+ base::Bind(&PepperCompositorHost::ImageReleased,
+ weak_factory_.GetWeakPtr(),
+ new_layer->common.resource_id,
+ base::Passed(&image_shm))));
+
+ // ImageData is always premultiplied alpha.
+ image_layer->SetPremultipliedAlpha(true);
+ }
+ return;
+ }
+ // Should not be reached.
+ NOTREACHED();
+}
+
+void PepperCompositorHost::ResourceReleased(int32_t id,
+ uint32_t sync_point,
+ bool is_lost) {
+ host()->SendUnsolicitedReply(
+ pp_resource(),
+ PpapiPluginMsg_Compositor_ReleaseResource(id, sync_point, is_lost));
+}
+
+void PepperCompositorHost::ImageReleased(
+ int32_t id,
+ const scoped_ptr<base::SharedMemory>& shared_memory,
+ uint32_t sync_point,
+ bool is_lost) {
+ ResourceReleased(id, sync_point, is_lost);
+}
+
+int32_t PepperCompositorHost::OnResourceMessageReceived(
+ const IPC::Message& msg,
+ HostMessageContext* context) {
+ PPAPI_BEGIN_MESSAGE_MAP(PepperCompositorHost, msg)
+ PPAPI_DISPATCH_HOST_RESOURCE_CALL(
+ PpapiHostMsg_Compositor_CommitLayers, OnHostMsgCommitLayers)
+ PPAPI_END_MESSAGE_MAP()
+ return ppapi::host::ResourceHost::OnResourceMessageReceived(msg, context);
+}
+
+bool PepperCompositorHost::IsCompositorHost() {
+ return true;
+}
+
+int32_t PepperCompositorHost::OnHostMsgCommitLayers(
+ HostMessageContext* context,
+ const std::vector<ppapi::CompositorLayerData>& layers,
+ bool reset) {
+ // Do not support CommitLayers() on an unbounded compositor.
+ if (!bound_instance_)
+ return PP_ERROR_FAILED;
+
+ if (commit_layers_reply_context_.is_valid())
+ return PP_ERROR_INPROGRESS;
+
+ commit_layers_reply_context_ = context->MakeReplyMessageContext();
+
+ scoped_ptr<scoped_ptr<base::SharedMemory>[]> image_shms;
+ if (layers.size() > 0) {
+ image_shms.reset(new scoped_ptr<base::SharedMemory>[layers.size()]);
+ if (!image_shms)
+ return PP_ERROR_NOMEMORY;
+ // Verfiy the layers first, if an error happens, we will return the error to
+ // plugin and keep current layers set by the previous CommitLayers()
+ // unchanged.
+ for (size_t i = 0; i < layers.size(); ++i) {
+ const ppapi::CompositorLayerData* old_layer = NULL;
+ if (!reset && i < layers_.size())
+ old_layer = &layers_[i].pp_layer;
+ int32_t rv = VerifyCommittedLayer(old_layer, &layers[i], &image_shms[i]);
+ if (rv != PP_OK)
+ return rv;
+ }
+ }
+
+ // ResetLayers() has been called, we need rebuild layer stack.
+ if (reset) {
+ layer_->RemoveAllChildren();
+ layers_.clear();
+ }
+
+ for (size_t i = 0; i < layers.size(); ++i) {
+ const ppapi::CompositorLayerData* pp_layer = &layers[i];
+ LayerData* data = i >= layers_.size() ? NULL : &layers_[i];
+ DCHECK(!data || data->cc_layer);
+ scoped_refptr<cc::Layer> cc_layer = data ? data->cc_layer : NULL;
+ ppapi::CompositorLayerData* old_layer = data ? &data->pp_layer : NULL;
+
+ if (!cc_layer) {
+ if (pp_layer->color)
+ cc_layer = cc::SolidColorLayer::Create();
+ else if (pp_layer->texture || pp_layer->image)
+ cc_layer = cc::TextureLayer::CreateForMailbox(NULL);
+ layer_->AddChild(cc_layer);
+ }
+
+ UpdateLayer(cc_layer, old_layer, pp_layer, image_shms[i].Pass());
+
+ if (old_layer)
+ *old_layer = *pp_layer;
+ else
+ layers_.push_back(LayerData(cc_layer, *pp_layer));
+ }
+
+ return PP_OK_COMPLETIONPENDING;
+}
+
+} // namespace content
diff --git a/content/renderer/pepper/pepper_compositor_host.h b/content/renderer/pepper/pepper_compositor_host.h
new file mode 100644
index 0000000..6d5a3ef
--- /dev/null
+++ b/content/renderer/pepper/pepper_compositor_host.h
@@ -0,0 +1,101 @@
+// Copyright 2014 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 CONTENT_RENDERER_PEPPER_PEPPER_COMPOSITOR_H_
+#define CONTENT_RENDERER_PEPPER_PEPPER_COMPOSITOR_H_
+
+#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
+#include "ppapi/host/host_message_context.h"
+#include "ppapi/host/resource_host.h"
+#include "ppapi/shared_impl/compositor_layer_data.h"
+
+namespace base {
+class SharedMemory;
+} // namespace
+
+namespace cc {
+class Layer;
+} // namespace cc
+
+namespace content {
+
+class PepperPluginInstanceImpl;
+class RendererPpapiHost;
+
+class PepperCompositorHost : public ppapi::host::ResourceHost {
+ public:
+ PepperCompositorHost(RendererPpapiHost* host,
+ PP_Instance instance,
+ PP_Resource resource);
+ // Associates this device with the given plugin instance. You can pass NULL
+ // to clear the existing device. Returns true on success. In this case, a
+ // repaint of the page will also be scheduled. Failure means that the device
+ // is already bound to a different instance, and nothing will happen.
+ bool BindToInstance(PepperPluginInstanceImpl* new_instance);
+
+ const scoped_refptr<cc::Layer> layer() { return layer_; };
+
+ void ViewInitiatedPaint();
+ void ViewFlushedPaint();
+
+ private:
+ virtual ~PepperCompositorHost();
+
+ void UpdateLayer(const scoped_refptr<cc::Layer>& layer,
+ const ppapi::CompositorLayerData* old_layer,
+ const ppapi::CompositorLayerData* new_layer,
+ scoped_ptr<base::SharedMemory> image_shm);
+ void ResourceReleased(int32_t id,
+ uint32_t sync_point,
+ bool is_lost);
+ void ImageReleased(int32_t id,
+ const scoped_ptr<base::SharedMemory>& shared_memory,
+ uint32_t sync_point,
+ bool is_lost);
+
+ // ResourceMessageHandler overrides:
+ virtual int32_t OnResourceMessageReceived(
+ const IPC::Message& msg,
+ ppapi::host::HostMessageContext* context) OVERRIDE;
+
+ // ppapi::host::ResourceHost overrides:
+ virtual bool IsCompositorHost() OVERRIDE;
+
+ // Message handlers:
+ int32_t OnHostMsgCommitLayers(
+ ppapi::host::HostMessageContext* context,
+ const std::vector<ppapi::CompositorLayerData>& layers,
+ bool reset);
+
+ // Non-owning pointer to the plugin instance this context is currently bound
+ // to, if any. If the context is currently unbound, this will be NULL.
+ PepperPluginInstanceImpl* bound_instance_;
+
+ // The toplevel cc::Layer. It is the parent of other cc::Layers.
+ scoped_refptr<cc::Layer> layer_;
+
+ // A list of layers. It is used for updating layers' properties in
+ // subsequent CommitLayers() calls.
+ struct LayerData {
+ LayerData(const scoped_refptr<cc::Layer>& cc,
+ const ppapi::CompositorLayerData& pp);
+ ~LayerData();
+
+ scoped_refptr<cc::Layer> cc_layer;
+ ppapi::CompositorLayerData pp_layer;
+ };
+ std::vector<LayerData> layers_;
+
+ ppapi::host::ReplyMessageContext commit_layers_reply_context_;
+
+ base::WeakPtrFactory<PepperCompositorHost> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(PepperCompositorHost);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_PEPPER_PEPPER_COMPOSITOR_H_
diff --git a/content/renderer/pepper/pepper_hung_plugin_filter.cc b/content/renderer/pepper/pepper_hung_plugin_filter.cc
index 57fc4a6..942dd6e 100644
--- a/content/renderer/pepper/pepper_hung_plugin_filter.cc
+++ b/content/renderer/pepper/pepper_hung_plugin_filter.cc
@@ -55,7 +55,7 @@
MayHaveBecomeUnhung();
}
-void PepperHungPluginFilter::OnFilterAdded(IPC::Channel* channel) {}
+void PepperHungPluginFilter::OnFilterAdded(IPC::Sender* sender) {}
void PepperHungPluginFilter::OnFilterRemoved() {
base::AutoLock lock(lock_);
diff --git a/content/renderer/pepper/pepper_hung_plugin_filter.h b/content/renderer/pepper/pepper_hung_plugin_filter.h
index ee83674..e7457fd 100644
--- a/content/renderer/pepper/pepper_hung_plugin_filter.h
+++ b/content/renderer/pepper/pepper_hung_plugin_filter.h
@@ -43,7 +43,7 @@
virtual void EndBlockOnSyncMessage() OVERRIDE;
// MessageFilter implementation.
- virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
+ virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
virtual void OnChannelError() OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
diff --git a/content/renderer/pepper/pepper_in_process_router.cc b/content/renderer/pepper/pepper_in_process_router.cc
index d4dd854..9194f12 100644
--- a/content/renderer/pepper/pepper_in_process_router.cc
+++ b/content/renderer/pepper/pepper_in_process_router.cc
@@ -103,42 +103,14 @@
bool PepperInProcessRouter::SendToHost(IPC::Message* msg) {
scoped_ptr<IPC::Message> message(msg);
- // Unpack the message so we can peek at its nested type.
- uint32 call_type = 0;
- if (message->type() == PpapiHostMsg_ResourceCall::ID) {
- ppapi::proxy::ResourceMessageCallParams call_params;
- IPC::Message nested_msg;
- if (!UnpackMessage<PpapiHostMsg_ResourceCall>(*msg, &call_params,
- &nested_msg)) {
- NOTREACHED();
- return false;
- }
- call_type = nested_msg.type();
- // Repack the message.
- message.reset(new PpapiHostMsg_ResourceCall(call_params, nested_msg));
- }
-
if (!message->is_sync()) {
+ // If this is a resource destroyed message, post a task to dispatch it.
+ // Dispatching it synchronously can cause the host to re-enter the proxy
+ // code while we're still in the resource destructor, leading to a crash.
+ // http://crbug.com/276368.
+ // This won't cause message reordering problems because the resource
+ // destroyed message is always the last one sent for a resource.
if (message->type() == PpapiHostMsg_ResourceDestroyed::ID) {
- // If this is a resource destroyed message, post a task to dispatch it.
- // Dispatching it synchronously can cause the host to re-enter the proxy
- // code while we're still in the resource destructor, leading to a crash.
- // http://crbug.com/276368.
- // This won't cause message reordering problems because the resource
- // destroyed message is always the last one sent for a resource.
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&PepperInProcessRouter::DispatchHostMsg,
- weak_factory_.GetWeakPtr(),
- base::Owned(message.release())));
- return true;
- } else if (call_type == PpapiHostMsg_URLLoader_Close::ID) {
- // If this is a PpapiHostMsg_URLLoader_Close, it could trigger the
- // destruction of the instance (crbug.com/372548) so post a task to
- // dispatch it as well. Because PpapiHostMsg_ResourceDestroyed messages
- // are also posted above, ordering with respect to those messages will
- // still be correct. Ordering with respect to other messages should not
- // be important.
base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&PepperInProcessRouter::DispatchHostMsg,
diff --git a/content/renderer/pepper/pepper_media_device_manager.cc b/content/renderer/pepper/pepper_media_device_manager.cc
index 9ef815c..b36df31 100644
--- a/content/renderer/pepper/pepper_media_device_manager.cc
+++ b/content/renderer/pepper/pepper_media_device_manager.cc
@@ -54,7 +54,8 @@
request_id,
AsWeakPtr(),
PepperMediaDeviceManager::FromPepperDeviceType(type),
- document_url.GetOrigin());
+ document_url.GetOrigin(),
+ false);
#else
base::MessageLoop::current()->PostTask(
FROM_HERE,
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index ec4091e..a26b13b 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -24,6 +24,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/page_zoom.h"
#include "content/public/renderer/content_renderer_client.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
#include "content/renderer/gpu/render_widget_compositor.h"
#include "content/renderer/pepper/common.h"
#include "content/renderer/pepper/content_decryptor_delegate.h"
@@ -35,6 +36,7 @@
#include "content/renderer/pepper/message_channel.h"
#include "content/renderer/pepper/npapi_glue.h"
#include "content/renderer/pepper/pepper_browser_connection.h"
+#include "content/renderer/pepper/pepper_compositor_host.h"
#include "content/renderer/pepper/pepper_file_ref_renderer_host.h"
#include "content/renderer/pepper/pepper_graphics_2d_host.h"
#include "content/renderer/pepper/pepper_in_process_router.h"
@@ -125,7 +127,6 @@
#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
#include "v8/include/v8.h"
-#include "webkit/renderer/compositor_bindings/web_layer_impl.h"
#if defined(OS_CHROMEOS)
#include "ui/events/keycodes/keyboard_codes_posix.h"
@@ -524,6 +525,7 @@
full_frame_(false),
sent_initial_did_change_view_(false),
bound_graphics_2d_platform_(NULL),
+ bound_compositor_(NULL),
has_webkit_focus_(false),
has_content_area_focus_(false),
find_identifier_(-1),
@@ -731,11 +733,14 @@
else
container_->invalidateRect(rect);
}
- if (texture_layer_) {
+
+ cc::Layer* layer =
+ texture_layer_ ? texture_layer_.get() : compositor_layer_.get();
+ if (layer) {
if (rect.IsEmpty()) {
- texture_layer_->SetNeedsDisplay();
+ layer->SetNeedsDisplay();
} else {
- texture_layer_->SetNeedsDisplayRect(rect);
+ layer->SetNeedsDisplayRect(rect);
}
}
}
@@ -743,7 +748,9 @@
void PepperPluginInstanceImpl::ScrollRect(int dx,
int dy,
const gfx::Rect& rect) {
- if (texture_layer_) {
+ cc::Layer* layer =
+ texture_layer_ ? texture_layer_.get() : compositor_layer_.get();
+ if (layer) {
InvalidateRect(rect);
} else if (fullscreen_container_) {
fullscreen_container_->ScrollRect(dx, dy, rect);
@@ -1161,8 +1168,8 @@
ppapi::proxy::HostDispatcher* dispatcher =
ppapi::proxy::HostDispatcher::GetForInstance(pp_instance());
if (!dispatcher || (message.get().type == PP_VARTYPE_OBJECT)) {
- // The dispatcher should always be valid, and the browser should never send
- // an 'object' var over PPP_Messaging.
+ // The dispatcher should always be valid, and MessageChannel should never
+ // send an 'object' var over PPP_Messaging.
NOTREACHED();
return;
}
@@ -1173,6 +1180,32 @@
pp_instance())));
}
+bool PepperPluginInstanceImpl::HandleBlockingMessage(ScopedPPVar message,
+ ScopedPPVar* result) {
+ TRACE_EVENT0("ppapi", "PepperPluginInstanceImpl::HandleBlockingMessage");
+ ppapi::proxy::HostDispatcher* dispatcher =
+ ppapi::proxy::HostDispatcher::GetForInstance(pp_instance());
+ if (!dispatcher || (message.get().type == PP_VARTYPE_OBJECT)) {
+ // The dispatcher should always be valid, and MessageChannel should never
+ // send an 'object' var over PPP_Messaging.
+ NOTREACHED();
+ return false;
+ }
+ ppapi::proxy::ReceiveSerializedVarReturnValue msg_reply;
+ bool was_handled = false;
+ dispatcher->Send(new PpapiMsg_PPPMessageHandler_HandleBlockingMessage(
+ ppapi::API_ID_PPP_MESSAGING,
+ pp_instance(),
+ ppapi::proxy::SerializedVarSendInputShmem(dispatcher, message.get(),
+ pp_instance()),
+ &msg_reply,
+ &was_handled));
+ *result = ScopedPPVar(ScopedPPVar::PassRef(), msg_reply.Return(dispatcher));
+ TRACE_EVENT0("ppapi",
+ "PepperPluginInstanceImpl::HandleBlockingMessage return.");
+ return was_handled;
+}
+
PP_Var PepperPluginInstanceImpl::GetInstanceObject() {
// Keep a reference on the stack. See NOTE above.
scoped_refptr<PepperPluginInstanceImpl> ref(this);
@@ -1277,6 +1310,8 @@
bound_graphics_2d_platform_->ViewInitiatedPaint();
else if (bound_graphics_3d_.get())
bound_graphics_3d_->ViewInitiatedPaint();
+ else if (bound_compositor_)
+ bound_compositor_->ViewInitiatedPaint();
}
void PepperPluginInstanceImpl::ViewFlushedPaint() {
@@ -1286,6 +1321,8 @@
bound_graphics_2d_platform_->ViewFlushedPaint();
else if (bound_graphics_3d_.get())
bound_graphics_3d_->ViewFlushedPaint();
+ else if (bound_compositor_)
+ bound_compositor_->ViewFlushedPaint();
}
void PepperPluginInstanceImpl::SetSelectedText(
@@ -1986,24 +2023,28 @@
}
bool want_3d_layer = !mailbox.IsZero();
bool want_2d_layer = !!bound_graphics_2d_platform_;
- bool want_layer = want_3d_layer || want_2d_layer;
+ bool want_texture_layer = want_3d_layer || want_2d_layer;
+ bool want_compositor_layer = !!bound_compositor_;
- if ((want_layer == !!texture_layer_.get()) &&
+ if ((want_texture_layer == !!texture_layer_.get()) &&
(want_3d_layer == layer_is_hardware_) &&
+ (want_compositor_layer == !!compositor_layer_) &&
layer_bound_to_fullscreen_ == !!fullscreen_container_) {
UpdateLayerTransform();
return;
}
- if (texture_layer_) {
+ if (texture_layer_ || compositor_layer_) {
if (!layer_bound_to_fullscreen_)
container_->setWebLayer(NULL);
else if (fullscreen_container_)
fullscreen_container_->SetLayer(NULL);
web_layer_.reset();
texture_layer_ = NULL;
+ compositor_layer_ = NULL;
}
- if (want_layer) {
+
+ if (want_texture_layer) {
bool opaque = false;
if (want_3d_layer) {
DCHECK(bound_graphics_3d_.get());
@@ -2018,18 +2059,26 @@
opaque = bound_graphics_2d_platform_->IsAlwaysOpaque();
texture_layer_->SetFlipped(false);
}
- web_layer_.reset(new webkit::WebLayerImpl(texture_layer_));
+
+ // Ignore transparency in fullscreen, since that's what Flash always
+ // wants to do, and that lets it not recreate a context if
+ // wmode=transparent was specified.
+ opaque = opaque || fullscreen_container_;
+ texture_layer_->SetContentsOpaque(opaque);
+ web_layer_.reset(new WebLayerImpl(texture_layer_));
+ } else if (want_compositor_layer) {
+ compositor_layer_ = bound_compositor_->layer();
+ web_layer_.reset(new WebLayerImpl(compositor_layer_));
+ }
+
+ if (web_layer_) {
if (fullscreen_container_) {
fullscreen_container_->SetLayer(web_layer_.get());
- // Ignore transparency in fullscreen, since that's what Flash always
- // wants to do, and that lets it not recreate a context if
- // wmode=transparent was specified.
- texture_layer_->SetContentsOpaque(true);
} else {
container_->setWebLayer(web_layer_.get());
- texture_layer_->SetContentsOpaque(opaque);
}
}
+
layer_bound_to_fullscreen_ = !!fullscreen_container_;
layer_is_hardware_ = want_3d_layer;
UpdateLayerTransform();
@@ -2211,6 +2260,10 @@
bound_graphics_2d_platform_->BindToInstance(NULL);
bound_graphics_2d_platform_ = NULL;
}
+ if (bound_compositor_) {
+ bound_compositor_->BindToInstance(NULL);
+ bound_compositor_ = NULL;
+ }
// Special-case clearing the current device.
if (!device) {
@@ -2229,10 +2282,16 @@
RendererPpapiHost::GetForPPInstance(instance)->GetPpapiHost();
ppapi::host::ResourceHost* host = ppapi_host->GetResourceHost(device);
PepperGraphics2DHost* graphics_2d = NULL;
+ PepperCompositorHost* compositor = NULL;
if (host) {
- if (host->IsGraphics2DHost())
+ if (host->IsGraphics2DHost()) {
graphics_2d = static_cast<PepperGraphics2DHost*>(host);
- DLOG_IF(ERROR, !graphics_2d) << "Resource is not PepperGraphics2DHost.";
+ } else if (host->IsCompositorHost()) {
+ compositor = static_cast<PepperCompositorHost*>(host);
+ } else {
+ DLOG(ERROR) <<
+ "Resource is not PepperCompositorHost or PepperGraphics2DHost.";
+ }
}
EnterResourceNoLock<PPB_Graphics3D_API> enter_3d(device, false);
@@ -2241,7 +2300,13 @@
? static_cast<PPB_Graphics3D_Impl*>(enter_3d.object())
: NULL;
- if (graphics_2d) {
+ if (compositor) {
+ if (compositor->BindToInstance(this)) {
+ bound_compositor_ = compositor;
+ UpdateLayer();
+ return PP_TRUE;
+ }
+ } else if (graphics_2d) {
if (graphics_2d->BindToInstance(this)) {
bound_graphics_2d_platform_ = graphics_2d;
UpdateLayer();
@@ -2365,36 +2430,54 @@
// PPP_ContentDecryptor_Private calls made on |content_decryptor_delegate_|.
// Therefore, |content_decryptor_delegate_| must have been initialized when
// the following methods are called.
-void PepperPluginInstanceImpl::SessionCreated(PP_Instance instance,
- uint32_t session_id,
- PP_Var web_session_id_var) {
- content_decryptor_delegate_->OnSessionCreated(session_id, web_session_id_var);
+void PepperPluginInstanceImpl::PromiseResolved(PP_Instance instance,
+ uint32 promise_id) {
+ content_decryptor_delegate_->OnPromiseResolved(promise_id);
+}
+
+void PepperPluginInstanceImpl::PromiseResolvedWithSession(
+ PP_Instance instance,
+ uint32 promise_id,
+ PP_Var web_session_id_var) {
+ content_decryptor_delegate_->OnPromiseResolvedWithSession(promise_id,
+ web_session_id_var);
+}
+
+void PepperPluginInstanceImpl::PromiseRejected(
+ PP_Instance instance,
+ uint32 promise_id,
+ PP_CdmExceptionCode exception_code,
+ uint32 system_code,
+ PP_Var error_description_var) {
+ content_decryptor_delegate_->OnPromiseRejected(
+ promise_id, exception_code, system_code, error_description_var);
}
void PepperPluginInstanceImpl::SessionMessage(PP_Instance instance,
- uint32_t session_id,
+ PP_Var web_session_id_var,
PP_Var message_var,
- PP_Var destination_url) {
+ PP_Var destination_url_var) {
content_decryptor_delegate_->OnSessionMessage(
- session_id, message_var, destination_url);
+ web_session_id_var, message_var, destination_url_var);
}
void PepperPluginInstanceImpl::SessionReady(PP_Instance instance,
- uint32_t session_id) {
- content_decryptor_delegate_->OnSessionReady(session_id);
+ PP_Var web_session_id_var) {
+ content_decryptor_delegate_->OnSessionReady(web_session_id_var);
}
void PepperPluginInstanceImpl::SessionClosed(PP_Instance instance,
- uint32_t session_id) {
- content_decryptor_delegate_->OnSessionClosed(session_id);
+ PP_Var web_session_id_var) {
+ content_decryptor_delegate_->OnSessionClosed(web_session_id_var);
}
void PepperPluginInstanceImpl::SessionError(PP_Instance instance,
- uint32_t session_id,
- int32_t media_error,
- uint32_t system_code) {
+ PP_Var web_session_id_var,
+ PP_CdmExceptionCode exception_code,
+ uint32 system_code,
+ PP_Var error_description_var) {
content_decryptor_delegate_->OnSessionError(
- session_id, media_error, system_code);
+ web_session_id_var, exception_code, system_code, error_description_var);
}
void PepperPluginInstanceImpl::DeliverBlock(
@@ -2516,7 +2599,6 @@
switch (id) {
case ppapi::BROKER_SINGLETON_ID:
case ppapi::BROWSER_FONT_SINGLETON_ID:
- case ppapi::EXTENSIONS_COMMON_SINGLETON_ID:
case ppapi::FILE_MAPPING_SINGLETON_ID:
case ppapi::FLASH_CLIPBOARD_SINGLETON_ID:
case ppapi::FLASH_FILE_SINGLETON_ID:
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.h b/content/renderer/pepper/pepper_plugin_instance_impl.h
index c4874bf..ea21418 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.h
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.h
@@ -17,6 +17,7 @@
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
#include "cc/layers/content_layer_client.h"
+#include "cc/layers/layer.h"
#include "cc/layers/texture_layer_client.h"
#include "content/common/content_export.h"
#include "content/public/renderer/pepper_plugin_instance.h"
@@ -102,6 +103,7 @@
class ContentDecryptorDelegate;
class FullscreenContainer;
class MessageChannel;
+class PepperCompositorHost;
class PepperGraphics2DHost;
class PluginModule;
class PluginObject;
@@ -301,6 +303,12 @@
// Send the message on to the plugin.
void HandleMessage(ppapi::ScopedPPVar message);
+ // Send the message synchronously to the plugin, and get a result. Returns
+ // true if the plugin handled the message, false if it didn't. The plugin
+ // won't handle the message if it has not registered a PPP_MessageHandler.
+ bool HandleBlockingMessage(ppapi::ScopedPPVar message,
+ ppapi::ScopedPPVar* result);
+
// Returns true if the plugin is processing a user gesture.
bool IsProcessingUserGesture();
@@ -452,20 +460,29 @@
OVERRIDE;
// PPB_ContentDecryptor_Private implementation.
- virtual void SessionCreated(PP_Instance instance,
- uint32_t session_id,
- PP_Var web_session_id_var) OVERRIDE;
+ virtual void PromiseResolved(PP_Instance instance,
+ uint32 promise_id) OVERRIDE;
+ virtual void PromiseResolvedWithSession(PP_Instance instance,
+ uint32 promise_id,
+ PP_Var web_session_id_var) OVERRIDE;
+ virtual void PromiseRejected(PP_Instance instance,
+ uint32 promise_id,
+ PP_CdmExceptionCode exception_code,
+ uint32 system_code,
+ PP_Var error_description_var) OVERRIDE;
virtual void SessionMessage(PP_Instance instance,
- uint32_t session_id,
- PP_Var message,
- PP_Var destination_url) OVERRIDE;
- virtual void SessionReady(PP_Instance instance, uint32_t session_id) OVERRIDE;
+ PP_Var web_session_id_var,
+ PP_Var message_var,
+ PP_Var destination_url_var) OVERRIDE;
+ virtual void SessionReady(PP_Instance instance,
+ PP_Var web_session_id_var) OVERRIDE;
virtual void SessionClosed(PP_Instance instance,
- uint32_t session_id) OVERRIDE;
+ PP_Var web_session_id_var) OVERRIDE;
virtual void SessionError(PP_Instance instance,
- uint32_t session_id,
- int32_t media_error,
- uint32_t system_code) OVERRIDE;
+ PP_Var web_session_id_var,
+ PP_CdmExceptionCode exception_code,
+ uint32 system_code,
+ PP_Var error_description_var) OVERRIDE;
virtual void DeliverBlock(PP_Instance instance,
PP_Resource decrypted_block,
const PP_DecryptedBlockInfo* block_info) OVERRIDE;
@@ -678,6 +695,7 @@
// NULL until we have been initialized.
blink::WebPluginContainer* container_;
+ scoped_refptr<cc::Layer> compositor_layer_;
scoped_refptr<cc::TextureLayer> texture_layer_;
scoped_ptr<blink::WebLayer> web_layer_;
bool layer_bound_to_fullscreen_;
@@ -701,9 +719,10 @@
// same as the default values.
bool sent_initial_did_change_view_;
- // The current device context for painting in 2D and 3D.
+ // The current device context for painting in 2D, 3D or compositor.
scoped_refptr<PPB_Graphics3D_Impl> bound_graphics_3d_;
PepperGraphics2DHost* bound_graphics_2d_platform_;
+ PepperCompositorHost* bound_compositor_;
// We track two types of focus, one from WebKit, which is the focus among
// all elements of the page, one one from the browser, which is whether the
diff --git a/content/renderer/pepper/pepper_plugin_registry.cc b/content/renderer/pepper/pepper_plugin_registry.cc
index c7a560f..11ec935 100644
--- a/content/renderer/pepper/pepper_plugin_registry.cc
+++ b/content/renderer/pepper/pepper_plugin_registry.cc
@@ -122,13 +122,13 @@
AddLiveModule(current.path, module.get());
if (current.is_internal) {
if (!module->InitAsInternalPlugin(current.internal_entry_points)) {
- DLOG(ERROR) << "Failed to load pepper module: " << current.path.value();
+ DVLOG(1) << "Failed to load pepper module: " << current.path.value();
continue;
}
} else {
// Preload all external plugins we're not running out of process.
if (!module->InitAsLibrary(current.path)) {
- DLOG(ERROR) << "Failed to load pepper module: " << current.path.value();
+ DVLOG(1) << "Failed to load pepper module: " << current.path.value();
continue;
}
}
diff --git a/content/renderer/pepper/pepper_url_loader_host.cc b/content/renderer/pepper/pepper_url_loader_host.cc
index 4e505a9..7b01400 100644
--- a/content/renderer/pepper/pepper_url_loader_host.cc
+++ b/content/renderer/pepper/pepper_url_loader_host.cc
@@ -359,10 +359,15 @@
}
void PepperURLLoaderHost::Close() {
- if (loader_.get())
+ if (loader_.get()) {
loader_->cancel();
- else if (main_document_loader_) {
- blink::WebFrame* frame = GetFrame();
+ } else if (main_document_loader_) {
+ // TODO(raymes): Calling WebLocalFrame::stopLoading here is incorrect as it
+ // cancels all URL loaders associated with the frame. If a client has opened
+ // other URLLoaders and then closes the main one, the others should still
+ // remain connected. Work out how to only cancel the main request:
+ // crbug.com/384197.
+ blink::WebLocalFrame* frame = GetFrame();
if (frame)
frame->stopLoading();
}
diff --git a/content/renderer/pepper/pepper_video_decoder_host.cc b/content/renderer/pepper/pepper_video_decoder_host.cc
index 16019f7..2033195 100644
--- a/content/renderer/pepper/pepper_video_decoder_host.cc
+++ b/content/renderer/pepper/pepper_video_decoder_host.cc
@@ -10,9 +10,7 @@
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/renderer_ppapi_host.h"
#include "content/renderer/pepper/ppb_graphics_3d_impl.h"
-#include "content/renderer/render_thread_impl.h"
-#include "content/renderer/render_view_impl.h"
-#include "media/video/picture.h"
+#include "content/renderer/pepper/video_decoder_shim.h"
#include "media/video/video_decode_accelerator.h"
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_errors.h"
@@ -57,6 +55,8 @@
return media::H264PROFILE_MULTIVIEWHIGH;
case PP_VIDEOPROFILE_VP8MAIN:
return media::VP8PROFILE_MAIN;
+ case PP_VIDEOPROFILE_VP9MAIN:
+ return media::VP9PROFILE_MAIN;
// No default case, to catch unhandled PP_VideoProfile values.
}
@@ -119,9 +119,10 @@
graphics_context.host_resource(), true);
if (enter_graphics.failed())
return PP_ERROR_FAILED;
- graphics3d_ = static_cast<PPB_Graphics3D_Impl*>(enter_graphics.object());
+ PPB_Graphics3D_Impl* graphics3d =
+ static_cast<PPB_Graphics3D_Impl*>(enter_graphics.object());
- int command_buffer_route_id = graphics3d_->GetCommandBufferRouteId();
+ int command_buffer_route_id = graphics3d->GetCommandBufferRouteId();
if (!command_buffer_route_id)
return PP_ERROR_FAILED;
@@ -129,7 +130,7 @@
// This is not synchronous, but subsequent IPC messages will be buffered, so
// it is okay to immediately send IPC messages through the returned channel.
- GpuChannelHost* channel = graphics3d_->channel();
+ GpuChannelHost* channel = graphics3d->channel();
DCHECK(channel);
decoder_ = channel->CreateVideoDecoder(command_buffer_route_id);
if (decoder_ && decoder_->Initialize(media_profile, this)) {
@@ -138,8 +139,14 @@
}
decoder_.reset();
- // TODO(bbudge) Implement software fallback.
- return PP_ERROR_NOTSUPPORTED;
+ if (!allow_software_fallback)
+ return PP_ERROR_NOTSUPPORTED;
+
+ decoder_.reset(new VideoDecoderShim(this));
+ initialize_reply_context_ = context->MakeReplyMessageContext();
+ decoder_->Initialize(media_profile, this);
+
+ return PP_OK_COMPLETIONPENDING;
}
int32_t PepperVideoDecoderHost::OnHostMsgGetShm(
@@ -176,8 +183,8 @@
shm_buffers_.push_back(shm.release());
shm_buffer_busy_.push_back(false);
} else {
- // Fill in the new resized buffer. Delete it manually since ScopedVector
- // won't delete the existing element if we just assign it.
+ // Remove the old buffer. Delete manually since ScopedVector won't delete
+ // the existing element if we just assign over it.
delete shm_buffers_[shm_id];
shm_buffers_[shm_id] = shm.release();
}
@@ -262,7 +269,6 @@
return PP_ERROR_FAILED;
decoder_->ReusePictureBuffer(texture_id);
-
return PP_OK;
}
@@ -298,17 +304,13 @@
uint32 requested_num_of_buffers,
const gfx::Size& dimensions,
uint32 texture_target) {
- DCHECK(RenderThreadImpl::current());
- host()->SendUnsolicitedReply(
- pp_resource(),
- PpapiPluginMsg_VideoDecoder_RequestTextures(
- requested_num_of_buffers,
- PP_MakeSize(dimensions.width(), dimensions.height()),
- texture_target));
+ RequestTextures(requested_num_of_buffers,
+ dimensions,
+ texture_target,
+ std::vector<gpu::Mailbox>());
}
void PepperVideoDecoderHost::PictureReady(const media::Picture& picture) {
- DCHECK(RenderThreadImpl::current());
host()->SendUnsolicitedReply(
pp_resource(),
PpapiPluginMsg_VideoDecoder_PictureReady(picture.bitstream_buffer_id(),
@@ -316,15 +318,42 @@
}
void PepperVideoDecoderHost::DismissPictureBuffer(int32 picture_buffer_id) {
- DCHECK(RenderThreadImpl::current());
host()->SendUnsolicitedReply(
pp_resource(),
PpapiPluginMsg_VideoDecoder_DismissPicture(picture_buffer_id));
}
+void PepperVideoDecoderHost::NotifyEndOfBitstreamBuffer(
+ int32 bitstream_buffer_id) {
+ PendingDecodeMap::iterator it = pending_decodes_.find(bitstream_buffer_id);
+ if (it == pending_decodes_.end()) {
+ NOTREACHED();
+ return;
+ }
+ const PendingDecode& pending_decode = it->second;
+ host()->SendReply(
+ pending_decode.reply_context,
+ PpapiPluginMsg_VideoDecoder_DecodeReply(pending_decode.shm_id));
+ shm_buffer_busy_[pending_decode.shm_id] = false;
+ pending_decodes_.erase(it);
+}
+
+void PepperVideoDecoderHost::NotifyFlushDone() {
+ DCHECK(pending_decodes_.empty());
+ host()->SendReply(flush_reply_context_,
+ PpapiPluginMsg_VideoDecoder_FlushReply());
+ flush_reply_context_ = ppapi::host::ReplyMessageContext();
+}
+
+void PepperVideoDecoderHost::NotifyResetDone() {
+ DCHECK(pending_decodes_.empty());
+ host()->SendReply(reset_reply_context_,
+ PpapiPluginMsg_VideoDecoder_ResetReply());
+ reset_reply_context_ = ppapi::host::ReplyMessageContext();
+}
+
void PepperVideoDecoderHost::NotifyError(
media::VideoDecodeAccelerator::Error error) {
- DCHECK(RenderThreadImpl::current());
int32_t pp_error = PP_ERROR_FAILED;
switch (error) {
case media::VideoDecodeAccelerator::UNREADABLE_INPUT:
@@ -342,34 +371,35 @@
pp_resource(), PpapiPluginMsg_VideoDecoder_NotifyError(pp_error));
}
-void PepperVideoDecoderHost::NotifyResetDone() {
- DCHECK(RenderThreadImpl::current());
- host()->SendReply(reset_reply_context_,
- PpapiPluginMsg_VideoDecoder_ResetReply());
- reset_reply_context_ = ppapi::host::ReplyMessageContext();
-}
-
-void PepperVideoDecoderHost::NotifyEndOfBitstreamBuffer(
- int32 bitstream_buffer_id) {
- DCHECK(RenderThreadImpl::current());
- PendingDecodeMap::iterator it = pending_decodes_.find(bitstream_buffer_id);
- if (it == pending_decodes_.end()) {
- NOTREACHED();
- return;
+void PepperVideoDecoderHost::OnInitializeComplete(int32_t result) {
+ if (!initialized_) {
+ if (result == PP_OK)
+ initialized_ = true;
+ initialize_reply_context_.params.set_result(result);
+ host()->SendReply(initialize_reply_context_,
+ PpapiPluginMsg_VideoDecoder_InitializeReply());
}
- const PendingDecode& pending_decode = it->second;
- host()->SendReply(
- pending_decode.reply_context,
- PpapiPluginMsg_VideoDecoder_DecodeReply(pending_decode.shm_id));
- shm_buffer_busy_[pending_decode.shm_id] = false;
- pending_decodes_.erase(it);
}
-void PepperVideoDecoderHost::NotifyFlushDone() {
- DCHECK(RenderThreadImpl::current());
- host()->SendReply(flush_reply_context_,
- PpapiPluginMsg_VideoDecoder_FlushReply());
- flush_reply_context_ = ppapi::host::ReplyMessageContext();
+const uint8_t* PepperVideoDecoderHost::DecodeIdToAddress(uint32_t decode_id) {
+ PendingDecodeMap::const_iterator it = pending_decodes_.find(decode_id);
+ DCHECK(it != pending_decodes_.end());
+ uint32_t shm_id = it->second.shm_id;
+ return static_cast<uint8_t*>(shm_buffers_[shm_id]->memory());
+}
+
+void PepperVideoDecoderHost::RequestTextures(
+ uint32 requested_num_of_buffers,
+ const gfx::Size& dimensions,
+ uint32 texture_target,
+ const std::vector<gpu::Mailbox>& mailboxes) {
+ host()->SendUnsolicitedReply(
+ pp_resource(),
+ PpapiPluginMsg_VideoDecoder_RequestTextures(
+ requested_num_of_buffers,
+ PP_MakeSize(dimensions.width(), dimensions.height()),
+ texture_target,
+ mailboxes));
}
} // namespace content
diff --git a/content/renderer/pepper/pepper_video_decoder_host.h b/content/renderer/pepper/pepper_video_decoder_host.h
index bc44fe8..e76f95c 100644
--- a/content/renderer/pepper/pepper_video_decoder_host.h
+++ b/content/renderer/pepper/pepper_video_decoder_host.h
@@ -10,11 +10,9 @@
#include "base/basictypes.h"
#include "base/containers/hash_tables.h"
-#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "content/common/content_export.h"
-#include "gpu/command_buffer/common/mailbox.h"
#include "media/video/video_decode_accelerator.h"
#include "ppapi/c/pp_codecs.h"
#include "ppapi/host/host_message_context.h"
@@ -30,6 +28,7 @@
class PPB_Graphics3D_Impl;
class RendererPpapiHost;
class RenderViewImpl;
+class VideoDecoderShim;
class CONTENT_EXPORT PepperVideoDecoderHost
: public ppapi::host::ResourceHost,
@@ -50,6 +49,8 @@
const ppapi::host::ReplyMessageContext reply_context;
};
+ friend class VideoDecoderShim;
+
// ResourceHost implementation.
virtual int32_t OnResourceMessageReceived(
const IPC::Message& msg,
@@ -61,10 +62,10 @@
uint32 texture_target) OVERRIDE;
virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE;
virtual void PictureReady(const media::Picture& picture) OVERRIDE;
- virtual void NotifyError(media::VideoDecodeAccelerator::Error error) OVERRIDE;
- virtual void NotifyFlushDone() OVERRIDE;
virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) OVERRIDE;
+ virtual void NotifyFlushDone() OVERRIDE;
virtual void NotifyResetDone() OVERRIDE;
+ virtual void NotifyError(media::VideoDecodeAccelerator::Error error) OVERRIDE;
int32_t OnHostMsgInitialize(ppapi::host::HostMessageContext* context,
const ppapi::HostResource& graphics_context,
@@ -85,11 +86,19 @@
int32_t OnHostMsgFlush(ppapi::host::HostMessageContext* context);
int32_t OnHostMsgReset(ppapi::host::HostMessageContext* context);
+ // These methods are needed by VideoDecodeShim, to look like a
+ // VideoDecodeAccelerator.
+ void OnInitializeComplete(int32_t result);
+ const uint8_t* DecodeIdToAddress(uint32_t decode_id);
+ void RequestTextures(uint32 requested_num_of_buffers,
+ const gfx::Size& dimensions,
+ uint32 texture_target,
+ const std::vector<gpu::Mailbox>& mailboxes);
+
// Non-owning pointer.
RendererPpapiHost* renderer_ppapi_host_;
scoped_ptr<media::VideoDecodeAccelerator> decoder_;
- scoped_refptr<PPB_Graphics3D_Impl> graphics3d_;
// A vector holding our shm buffers, in sync with a similar vector in the
// resource. We use a buffer's index in these vectors as its id on both sides
@@ -106,6 +115,8 @@
ppapi::host::ReplyMessageContext flush_reply_context_;
ppapi::host::ReplyMessageContext reset_reply_context_;
+ // Only used when in software fallback mode.
+ ppapi::host::ReplyMessageContext initialize_reply_context_;
bool initialized_;
diff --git a/content/renderer/pepper/plugin_module.cc b/content/renderer/pepper/plugin_module.cc
index 3d462c1..48add88 100644
--- a/content/renderer/pepper/plugin_module.cc
+++ b/content/renderer/pepper/plugin_module.cc
@@ -29,7 +29,6 @@
#include "content/renderer/pepper/ppb_video_decoder_impl.h"
#include "content/renderer/pepper/renderer_ppapi_host_impl.h"
#include "content/renderer/render_view_impl.h"
-#include "ppapi/c/dev/ppb_alarms_dev.h"
#include "ppapi/c/dev/ppb_audio_input_dev.h"
#include "ppapi/c/dev/ppb_buffer_dev.h"
#include "ppapi/c/dev/ppb_char_set_dev.h"
@@ -649,7 +648,9 @@
DCHECK(entry_points.initialize_module != NULL);
int retval = entry_points.initialize_module(pp_module(), &GetInterface);
if (retval != 0) {
+#if !defined(DISABLE_NACL)
LOG(WARNING) << "PPP_InitializeModule returned failure " << retval;
+#endif // !defined(DISABLE_NACL)
return false;
}
return true;
diff --git a/content/renderer/pepper/plugin_object.cc b/content/renderer/pepper/plugin_object.cc
index 62a9365..6de7ce1 100644
--- a/content/renderer/pepper/plugin_object.cc
+++ b/content/renderer/pepper/plugin_object.cc
@@ -43,10 +43,11 @@
void WrapperClass_Deallocate(NPObject* np_object) {
PluginObject* plugin_object = PluginObject::FromNPObject(np_object);
- if (!plugin_object)
- return;
- plugin_object->ppp_class()->Deallocate(plugin_object->ppp_class_data());
- delete plugin_object;
+ if (plugin_object) {
+ plugin_object->ppp_class()->Deallocate(plugin_object->ppp_class_data());
+ delete plugin_object;
+ }
+ delete np_object;
}
void WrapperClass_Invalidate(NPObject* object) {}
diff --git a/content/renderer/pepper/resource_converter.cc b/content/renderer/pepper/resource_converter.cc
index 4b0c9c9..8192f0c 100644
--- a/content/renderer/pepper/resource_converter.cc
+++ b/content/renderer/pepper/resource_converter.cc
@@ -266,6 +266,15 @@
return true;
}
+void ResourceConverterImpl::Reset() {
+ browser_host_create_messages_.clear();
+ browser_vars_.clear();
+}
+
+bool ResourceConverterImpl::NeedsFlush() {
+ return !browser_host_create_messages_.empty();
+}
+
void ResourceConverterImpl::Flush(const base::Callback<void(bool)>& callback) {
host_->CreateBrowserResourceHosts(
instance_,
diff --git a/content/renderer/pepper/resource_converter.h b/content/renderer/pepper/resource_converter.h
index 5b46adf..842f7c7 100644
--- a/content/renderer/pepper/resource_converter.h
+++ b/content/renderer/pepper/resource_converter.h
@@ -34,8 +34,16 @@
public:
virtual ~ResourceConverter();
- // Flush() must be called before any vars created by the ResourceConverter
- // are valid. It handles creating any resource hosts that need to be created.
+ // Reset the state of the resource converter.
+ virtual void Reset() = 0;
+
+ // Returns true if Flush() needs to be called before using any vars created
+ // by the resource converter.
+ virtual bool NeedsFlush() = 0;
+
+ // If NeedsFlush() is true then Flush() must be called before any vars created
+ // by the ResourceConverter are valid. It handles creating any resource hosts
+ // that need to be created. |callback| will always be called asynchronously.
virtual void Flush(const base::Callback<void(bool)>& callback) = 0;
// Attempts to convert a V8 object to a PP_Var with type PP_VARTYPE_RESOURCE.
@@ -61,6 +69,8 @@
virtual ~ResourceConverterImpl();
// ResourceConverter overrides.
+ virtual void Reset() OVERRIDE;
+ virtual bool NeedsFlush() OVERRIDE;
virtual void Flush(const base::Callback<void(bool)>& callback) OVERRIDE;
virtual bool FromV8Value(v8::Handle<v8::Object> val,
v8::Handle<v8::Context> context,
diff --git a/content/renderer/pepper/v8_var_converter.cc b/content/renderer/pepper/v8_var_converter.cc
index bc1a253..b09fccd 100644
--- a/content/renderer/pepper/v8_var_converter.cc
+++ b/content/renderer/pepper/v8_var_converter.cc
@@ -141,7 +141,7 @@
HostArrayBufferVar* host_buffer =
static_cast<HostArrayBufferVar*>(buffer);
*result = blink::WebArrayBufferConverter::toV8Value(
- &host_buffer->webkit_buffer());
+ &host_buffer->webkit_buffer(), context->Global(), isolate);
break;
}
case PP_VARTYPE_ARRAY:
@@ -214,7 +214,8 @@
*result = (new ArrayVar())->GetPPVar();
} else if (val->IsObject()) {
scoped_ptr<blink::WebArrayBuffer> web_array_buffer(
- blink::WebArrayBufferConverter::createFromV8Value(val));
+ blink::WebArrayBufferConverter::createFromV8Value(
+ val, context->GetIsolate()));
if (web_array_buffer.get()) {
scoped_refptr<HostArrayBufferVar> buffer_var(
new HostArrayBufferVar(*web_array_buffer));
@@ -395,18 +396,31 @@
return true;
}
-void V8VarConverter::FromV8Value(
+V8VarConverter::VarResult V8VarConverter::FromV8Value(
v8::Handle<v8::Value> val,
v8::Handle<v8::Context> context,
const base::Callback<void(const ScopedPPVar&, bool)>& callback) {
- ScopedPPVar result_var;
- if (FromV8ValueInternal(val, context, &result_var)) {
- resource_converter_->Flush(base::Bind(callback, result_var));
- } else {
- message_loop_proxy_->PostTask(
- FROM_HERE,
- base::Bind(callback, result_var, false));
+ VarResult result;
+ result.success = FromV8ValueInternal(val, context, &result.var);
+ if (!result.success)
+ resource_converter_->Reset();
+ result.completed_synchronously = !resource_converter_->NeedsFlush();
+ if (!result.completed_synchronously)
+ resource_converter_->Flush(base::Bind(callback, result.var));
+
+ return result;
+}
+
+bool V8VarConverter::FromV8ValueSync(
+ v8::Handle<v8::Value> val,
+ v8::Handle<v8::Context> context,
+ ppapi::ScopedPPVar* result_var) {
+ bool success = FromV8ValueInternal(val, context, result_var);
+ if (!success || resource_converter_->NeedsFlush()) {
+ resource_converter_->Reset();
+ return false;
}
+ return true;
}
bool V8VarConverter::FromV8ValueInternal(
diff --git a/content/renderer/pepper/v8_var_converter.h b/content/renderer/pepper/v8_var_converter.h
index 3423023..42ef7a6 100644
--- a/content/renderer/pepper/v8_var_converter.h
+++ b/content/renderer/pepper/v8_var_converter.h
@@ -11,13 +11,10 @@
#include "base/message_loop/message_loop_proxy.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_var.h"
+#include "ppapi/shared_impl/scoped_pp_var.h"
#include "v8/include/v8.h"
#include "content/common/content_export.h"
-namespace ppapi {
-class ScopedPPVar;
-}
-
namespace content {
class ResourceConverter;
@@ -35,17 +32,39 @@
v8::Handle<v8::Context> context,
v8::Handle<v8::Value>* result);
+ struct VarResult {
+ public:
+ VarResult() : completed_synchronously(false), success(false) {}
+
+ // True if the conversion completed synchronously and the callback will not
+ // be called.
+ bool completed_synchronously;
+
+ // True if the conversion was successful. Only valid if
+ // |completed_synchronously| is true.
+ bool success;
+
+ // The result if the conversion was successful. Only valid if
+ // |completed_synchronously| and |success| are true.
+ ppapi::ScopedPPVar var;
+ };
+
// Converts the given v8::Value to a PP_Var. Every PP_Var in the reference
// graph in the result will have a refcount equal to the number of references
// to it in the graph. The root of the result will have one additional
// reference. The callback is run when conversion is complete with the
- // resulting var and a bool indicating success or failure. Conversion is
+ // resulting var and a bool indicating success or failure. Conversion may be
// asynchronous because converting some resources may result in communication
- // across IPC. |context| is guaranteed to only be used synchronously.
- void FromV8Value(
+ // across IPC. |context| is guaranteed to only be used synchronously. If
+ // the conversion can occur synchronously, |callback| will not be run,
+ // otherwise it will be run.
+ VarResult FromV8Value(
v8::Handle<v8::Value> val,
v8::Handle<v8::Context> context,
const base::Callback<void(const ppapi::ScopedPPVar&, bool)>& callback);
+ bool FromV8ValueSync(v8::Handle<v8::Value> val,
+ v8::Handle<v8::Context> context,
+ ppapi::ScopedPPVar* result_var);
private:
// Returns true on success, false on failure.
bool FromV8ValueInternal(v8::Handle<v8::Value> val,
diff --git a/content/renderer/pepper/v8_var_converter_unittest.cc b/content/renderer/pepper/v8_var_converter_unittest.cc
index 95d5843..9492a43 100644
--- a/content/renderer/pepper/v8_var_converter_unittest.cc
+++ b/content/renderer/pepper/v8_var_converter_unittest.cc
@@ -43,11 +43,18 @@
namespace {
+void FromV8ValueComplete(const ScopedPPVar& scoped_var,
+ bool success) {
+ NOTREACHED();
+}
+
class MockResourceConverter : public content::ResourceConverter {
public:
virtual ~MockResourceConverter() {}
+ virtual void Reset() OVERRIDE {}
+ virtual bool NeedsFlush() OVERRIDE { return false; }
virtual void Flush(const base::Callback<void(bool)>& callback) OVERRIDE {
- callback.Run(true);
+ NOTREACHED();
}
virtual bool FromV8Value(v8::Handle<v8::Object> val,
v8::Handle<v8::Context> context,
@@ -156,7 +163,7 @@
class V8VarConverterTest : public testing::Test {
public:
V8VarConverterTest()
- : isolate_(v8::Isolate::GetCurrent()), conversion_success_(false) {
+ : isolate_(v8::Isolate::GetCurrent()) {
PP_Instance dummy = 1234;
converter_.reset(new V8VarConverter(
dummy,
@@ -181,27 +188,15 @@
bool FromV8ValueSync(v8::Handle<v8::Value> val,
v8::Handle<v8::Context> context,
PP_Var* result) {
- base::RunLoop loop;
- converter_->FromV8Value(val,
- context,
- base::Bind(&V8VarConverterTest::FromV8ValueComplete,
- base::Unretained(this),
- loop.QuitClosure()));
- loop.Run();
- if (conversion_success_)
- *result = conversion_result_;
- return conversion_success_;
- }
+ V8VarConverter::VarResult conversion_result =
+ converter_->FromV8Value(val,
+ context,
+ base::Bind(&FromV8ValueComplete));
+ DCHECK(conversion_result.completed_synchronously);
+ if (conversion_result.success)
+ *result = conversion_result.var.Release();
- void FromV8ValueComplete(base::Closure quit_closure,
- const ScopedPPVar& scoped_var,
- bool success) {
- conversion_success_ = success;
- if (success) {
- ScopedPPVar var = scoped_var;
- conversion_result_ = var.Release();
- }
- quit_closure.Run();
+ return conversion_result.success;
}
bool RoundTrip(const PP_Var& var, PP_Var* result) {
@@ -239,8 +234,6 @@
private:
TestGlobals globals_;
- PP_Var conversion_result_;
- bool conversion_success_;
base::MessageLoop message_loop_;
};
diff --git a/content/renderer/pepper/video_decoder_shim.cc b/content/renderer/pepper/video_decoder_shim.cc
new file mode 100644
index 0000000..32f80bf
--- /dev/null
+++ b/content/renderer/pepper/video_decoder_shim.cc
@@ -0,0 +1,595 @@
+// Copyright 2014 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 "content/renderer/pepper/video_decoder_shim.h"
+
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
+#include <GLES2/gl2extchromium.h>
+
+#include "base/bind.h"
+#include "base/numerics/safe_conversions.h"
+#include "content/public/renderer/render_thread.h"
+#include "content/renderer/pepper/pepper_video_decoder_host.h"
+#include "content/renderer/render_thread_impl.h"
+#include "gpu/command_buffer/client/gles2_implementation.h"
+#include "media/base/decoder_buffer.h"
+#include "media/base/limits.h"
+#include "media/base/video_decoder.h"
+#include "media/filters/ffmpeg_video_decoder.h"
+#include "media/filters/vpx_video_decoder.h"
+#include "media/video/picture.h"
+#include "media/video/video_decode_accelerator.h"
+#include "ppapi/c/pp_errors.h"
+#include "third_party/libyuv/include/libyuv.h"
+#include "webkit/common/gpu/context_provider_web_context.h"
+
+namespace content {
+
+struct VideoDecoderShim::PendingDecode {
+ PendingDecode(uint32_t decode_id,
+ const scoped_refptr<media::DecoderBuffer>& buffer);
+ ~PendingDecode();
+
+ const uint32_t decode_id;
+ const scoped_refptr<media::DecoderBuffer> buffer;
+};
+
+VideoDecoderShim::PendingDecode::PendingDecode(
+ uint32_t decode_id,
+ const scoped_refptr<media::DecoderBuffer>& buffer)
+ : decode_id(decode_id), buffer(buffer) {
+}
+
+VideoDecoderShim::PendingDecode::~PendingDecode() {
+}
+
+struct VideoDecoderShim::PendingFrame {
+ explicit PendingFrame(uint32_t decode_id);
+ PendingFrame(uint32_t decode_id, const gfx::Size& size);
+ ~PendingFrame();
+
+ const uint32_t decode_id;
+ const gfx::Size size;
+ std::vector<uint8_t> argb_pixels;
+
+ private:
+ // This could be expensive to copy, so guard against that.
+ DISALLOW_COPY_AND_ASSIGN(PendingFrame);
+};
+
+VideoDecoderShim::PendingFrame::PendingFrame(uint32_t decode_id)
+ : decode_id(decode_id) {
+}
+
+VideoDecoderShim::PendingFrame::PendingFrame(uint32_t decode_id,
+ const gfx::Size& size)
+ : decode_id(decode_id),
+ size(size),
+ argb_pixels(size.width() * size.height() * 4) {
+}
+
+VideoDecoderShim::PendingFrame::~PendingFrame() {
+}
+
+// DecoderImpl runs the underlying VideoDecoder on the media thread, receiving
+// calls from the VideoDecodeShim on the main thread and sending results back.
+// This class is constructed on the main thread, but used and destructed on the
+// media thread.
+class VideoDecoderShim::DecoderImpl {
+ public:
+ explicit DecoderImpl(const base::WeakPtr<VideoDecoderShim>& proxy);
+ ~DecoderImpl();
+
+ void Initialize(media::VideoDecoderConfig config);
+ void Decode(uint32_t decode_id, scoped_refptr<media::DecoderBuffer> buffer);
+ void Reset();
+ void Stop();
+
+ private:
+ void OnPipelineStatus(media::PipelineStatus status);
+ void DoDecode();
+ void OnDecodeComplete(uint32_t decode_id, media::VideoDecoder::Status status);
+ void OnOutputComplete(const scoped_refptr<media::VideoFrame>& frame);
+ void OnResetComplete();
+
+ // WeakPtr is bound to main_message_loop_. Use only in shim callbacks.
+ base::WeakPtr<VideoDecoderShim> shim_;
+ scoped_ptr<media::VideoDecoder> decoder_;
+ scoped_refptr<base::MessageLoopProxy> main_message_loop_;
+ // Queue of decodes waiting for the decoder.
+ typedef std::queue<PendingDecode> PendingDecodeQueue;
+ PendingDecodeQueue pending_decodes_;
+ int max_decodes_at_decoder_;
+ int num_decodes_at_decoder_;
+ // VideoDecoder returns pictures without information about the decode buffer
+ // that generated it. Save the decode_id from the last decode that completed,
+ // which is close for most decoders, which only decode one buffer at a time.
+ uint32_t decode_id_;
+};
+
+VideoDecoderShim::DecoderImpl::DecoderImpl(
+ const base::WeakPtr<VideoDecoderShim>& proxy)
+ : shim_(proxy),
+ main_message_loop_(base::MessageLoopProxy::current()),
+ max_decodes_at_decoder_(0),
+ num_decodes_at_decoder_(0),
+ decode_id_(0) {
+}
+
+VideoDecoderShim::DecoderImpl::~DecoderImpl() {
+ DCHECK(pending_decodes_.empty());
+}
+
+void VideoDecoderShim::DecoderImpl::Initialize(
+ media::VideoDecoderConfig config) {
+ DCHECK(!decoder_);
+ if (config.codec() == media::kCodecVP9) {
+ decoder_.reset(
+ new media::VpxVideoDecoder(base::MessageLoopProxy::current()));
+ } else {
+ scoped_ptr<media::FFmpegVideoDecoder> ffmpeg_video_decoder(
+ new media::FFmpegVideoDecoder(base::MessageLoopProxy::current()));
+ ffmpeg_video_decoder->set_decode_nalus(true);
+ decoder_ = ffmpeg_video_decoder.Pass();
+ }
+ max_decodes_at_decoder_ = decoder_->GetMaxDecodeRequests();
+ // We can use base::Unretained() safely in decoder callbacks because we call
+ // VideoDecoder::Stop() before deletion. Stop() guarantees there will be no
+ // outstanding callbacks after it returns.
+ decoder_->Initialize(
+ config,
+ true /* low_delay */,
+ base::Bind(&VideoDecoderShim::DecoderImpl::OnPipelineStatus,
+ base::Unretained(this)),
+ base::Bind(&VideoDecoderShim::DecoderImpl::OnOutputComplete,
+ base::Unretained(this)));
+}
+
+void VideoDecoderShim::DecoderImpl::Decode(
+ uint32_t decode_id,
+ scoped_refptr<media::DecoderBuffer> buffer) {
+ DCHECK(decoder_);
+ pending_decodes_.push(PendingDecode(decode_id, buffer));
+ DoDecode();
+}
+
+void VideoDecoderShim::DecoderImpl::Reset() {
+ DCHECK(decoder_);
+ // Abort all pending decodes.
+ while (!pending_decodes_.empty()) {
+ const PendingDecode& decode = pending_decodes_.front();
+ scoped_ptr<PendingFrame> pending_frame(new PendingFrame(decode.decode_id));
+ main_message_loop_->PostTask(FROM_HERE,
+ base::Bind(&VideoDecoderShim::OnDecodeComplete,
+ shim_,
+ media::VideoDecoder::kAborted,
+ decode.decode_id));
+ pending_decodes_.pop();
+ }
+ decoder_->Reset(base::Bind(&VideoDecoderShim::DecoderImpl::OnResetComplete,
+ base::Unretained(this)));
+}
+
+void VideoDecoderShim::DecoderImpl::Stop() {
+ DCHECK(decoder_);
+ // Clear pending decodes now. We don't want OnDecodeComplete to call DoDecode
+ // again.
+ while (!pending_decodes_.empty())
+ pending_decodes_.pop();
+ decoder_->Stop();
+ // This instance is deleted once we exit this scope.
+}
+
+void VideoDecoderShim::DecoderImpl::OnPipelineStatus(
+ media::PipelineStatus status) {
+ int32_t result;
+ switch (status) {
+ case media::PIPELINE_OK:
+ result = PP_OK;
+ break;
+ case media::DECODER_ERROR_NOT_SUPPORTED:
+ result = PP_ERROR_NOTSUPPORTED;
+ break;
+ default:
+ result = PP_ERROR_FAILED;
+ break;
+ }
+
+ // Calculate how many textures the shim should create.
+ uint32_t shim_texture_pool_size =
+ max_decodes_at_decoder_ + media::limits::kMaxVideoFrames;
+ main_message_loop_->PostTask(
+ FROM_HERE,
+ base::Bind(&VideoDecoderShim::OnInitializeComplete,
+ shim_,
+ result,
+ shim_texture_pool_size));
+}
+
+void VideoDecoderShim::DecoderImpl::DoDecode() {
+ while (!pending_decodes_.empty() &&
+ num_decodes_at_decoder_ < max_decodes_at_decoder_) {
+ num_decodes_at_decoder_++;
+ const PendingDecode& decode = pending_decodes_.front();
+ decoder_->Decode(
+ decode.buffer,
+ base::Bind(&VideoDecoderShim::DecoderImpl::OnDecodeComplete,
+ base::Unretained(this),
+ decode.decode_id));
+ pending_decodes_.pop();
+ }
+}
+
+void VideoDecoderShim::DecoderImpl::OnDecodeComplete(
+ uint32_t decode_id,
+ media::VideoDecoder::Status status) {
+ num_decodes_at_decoder_--;
+ decode_id_ = decode_id;
+
+ int32_t result;
+ switch (status) {
+ case media::VideoDecoder::kOk:
+ case media::VideoDecoder::kAborted:
+ result = PP_OK;
+ break;
+ case media::VideoDecoder::kDecodeError:
+ result = PP_ERROR_RESOURCE_FAILED;
+ break;
+ default:
+ NOTREACHED();
+ result = PP_ERROR_FAILED;
+ break;
+ }
+
+ main_message_loop_->PostTask(
+ FROM_HERE,
+ base::Bind(
+ &VideoDecoderShim::OnDecodeComplete, shim_, result, decode_id));
+
+ DoDecode();
+}
+
+void VideoDecoderShim::DecoderImpl::OnOutputComplete(
+ const scoped_refptr<media::VideoFrame>& frame) {
+ scoped_ptr<PendingFrame> pending_frame;
+ if (!frame->end_of_stream()) {
+ pending_frame.reset(new PendingFrame(decode_id_, frame->coded_size()));
+ // Convert the VideoFrame pixels to ARGB.
+ libyuv::I420ToARGB(frame->data(media::VideoFrame::kYPlane),
+ frame->stride(media::VideoFrame::kYPlane),
+ frame->data(media::VideoFrame::kUPlane),
+ frame->stride(media::VideoFrame::kUPlane),
+ frame->data(media::VideoFrame::kVPlane),
+ frame->stride(media::VideoFrame::kVPlane),
+ &pending_frame->argb_pixels.front(),
+ frame->coded_size().width() * 4,
+ frame->coded_size().width(),
+ frame->coded_size().height());
+ } else {
+ pending_frame.reset(new PendingFrame(decode_id_));
+ }
+
+ main_message_loop_->PostTask(FROM_HERE,
+ base::Bind(&VideoDecoderShim::OnOutputComplete,
+ shim_,
+ base::Passed(&pending_frame)));
+}
+
+void VideoDecoderShim::DecoderImpl::OnResetComplete() {
+ main_message_loop_->PostTask(
+ FROM_HERE, base::Bind(&VideoDecoderShim::OnResetComplete, shim_));
+}
+
+VideoDecoderShim::VideoDecoderShim(PepperVideoDecoderHost* host)
+ : state_(UNINITIALIZED),
+ host_(host),
+ media_message_loop_(
+ RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy()),
+ context_provider_(
+ RenderThreadImpl::current()->SharedMainThreadContextProvider()),
+ texture_pool_size_(0),
+ num_pending_decodes_(0),
+ weak_ptr_factory_(this) {
+ DCHECK(host_);
+ DCHECK(media_message_loop_);
+ DCHECK(context_provider_);
+ decoder_impl_.reset(new DecoderImpl(weak_ptr_factory_.GetWeakPtr()));
+}
+
+VideoDecoderShim::~VideoDecoderShim() {
+ DCHECK(RenderThreadImpl::current());
+ // Delete any remaining textures.
+ TextureIdMap::iterator it = texture_id_map_.begin();
+ for (; it != texture_id_map_.end(); ++it)
+ DeleteTexture(it->second);
+ texture_id_map_.clear();
+
+ FlushCommandBuffer();
+
+ weak_ptr_factory_.InvalidateWeakPtrs();
+ // No more callbacks from the delegate will be received now.
+
+ // The callback now holds the only reference to the DecoderImpl, which will be
+ // deleted when Stop completes.
+ media_message_loop_->PostTask(
+ FROM_HERE,
+ base::Bind(&VideoDecoderShim::DecoderImpl::Stop,
+ base::Owned(decoder_impl_.release())));
+}
+
+bool VideoDecoderShim::Initialize(
+ media::VideoCodecProfile profile,
+ media::VideoDecodeAccelerator::Client* client) {
+ DCHECK_EQ(client, host_);
+ DCHECK(RenderThreadImpl::current());
+ DCHECK_EQ(state_, UNINITIALIZED);
+ media::VideoCodec codec = media::kUnknownVideoCodec;
+ if (profile <= media::H264PROFILE_MAX)
+ codec = media::kCodecH264;
+ else if (profile <= media::VP8PROFILE_MAX)
+ codec = media::kCodecVP8;
+ else if (profile <= media::VP9PROFILE_MAX)
+ codec = media::kCodecVP9;
+ DCHECK_NE(codec, media::kUnknownVideoCodec);
+
+ media::VideoDecoderConfig config(
+ codec,
+ profile,
+ media::VideoFrame::YV12,
+ gfx::Size(32, 24), // Small sizes that won't fail.
+ gfx::Rect(32, 24),
+ gfx::Size(32, 24),
+ NULL /* extra_data */, // TODO(bbudge) Verify this isn't needed.
+ 0 /* extra_data_size */,
+ false /* decryption */);
+
+ media_message_loop_->PostTask(
+ FROM_HERE,
+ base::Bind(&VideoDecoderShim::DecoderImpl::Initialize,
+ base::Unretained(decoder_impl_.get()),
+ config));
+ // Return success, even though we are asynchronous, to mimic
+ // media::VideoDecodeAccelerator.
+ return true;
+}
+
+void VideoDecoderShim::Decode(const media::BitstreamBuffer& bitstream_buffer) {
+ DCHECK(RenderThreadImpl::current());
+ DCHECK_EQ(state_, DECODING);
+
+ // We need the address of the shared memory, so we can copy the buffer.
+ const uint8_t* buffer = host_->DecodeIdToAddress(bitstream_buffer.id());
+ DCHECK(buffer);
+
+ media_message_loop_->PostTask(
+ FROM_HERE,
+ base::Bind(
+ &VideoDecoderShim::DecoderImpl::Decode,
+ base::Unretained(decoder_impl_.get()),
+ bitstream_buffer.id(),
+ media::DecoderBuffer::CopyFrom(buffer, bitstream_buffer.size())));
+ num_pending_decodes_++;
+}
+
+void VideoDecoderShim::AssignPictureBuffers(
+ const std::vector<media::PictureBuffer>& buffers) {
+ DCHECK(RenderThreadImpl::current());
+ DCHECK_EQ(state_, DECODING);
+ if (buffers.empty()) {
+ NOTREACHED();
+ return;
+ }
+ DCHECK_EQ(buffers.size(), pending_texture_mailboxes_.size());
+ GLuint num_textures = base::checked_cast<GLuint>(buffers.size());
+ std::vector<uint32_t> local_texture_ids(num_textures);
+ gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL();
+ gles2->GenTextures(num_textures, &local_texture_ids.front());
+ for (uint32_t i = 0; i < num_textures; i++) {
+ gles2->ActiveTexture(GL_TEXTURE0);
+ gles2->BindTexture(GL_TEXTURE_2D, local_texture_ids[i]);
+ gles2->ConsumeTextureCHROMIUM(GL_TEXTURE_2D,
+ pending_texture_mailboxes_[i].name);
+ // Map the plugin texture id to the local texture id.
+ uint32_t plugin_texture_id = buffers[i].texture_id();
+ texture_id_map_[plugin_texture_id] = local_texture_ids[i];
+ available_textures_.insert(plugin_texture_id);
+ }
+ pending_texture_mailboxes_.clear();
+ SendPictures();
+}
+
+void VideoDecoderShim::ReusePictureBuffer(int32 picture_buffer_id) {
+ DCHECK(RenderThreadImpl::current());
+ uint32_t texture_id = static_cast<uint32_t>(picture_buffer_id);
+ if (textures_to_dismiss_.find(texture_id) != textures_to_dismiss_.end()) {
+ DismissTexture(texture_id);
+ } else if (texture_id_map_.find(texture_id) != texture_id_map_.end()) {
+ available_textures_.insert(texture_id);
+ SendPictures();
+ } else {
+ NOTREACHED();
+ }
+}
+
+void VideoDecoderShim::Flush() {
+ DCHECK(RenderThreadImpl::current());
+ DCHECK_EQ(state_, DECODING);
+ state_ = FLUSHING;
+}
+
+void VideoDecoderShim::Reset() {
+ DCHECK(RenderThreadImpl::current());
+ DCHECK_EQ(state_, DECODING);
+ state_ = RESETTING;
+ media_message_loop_->PostTask(
+ FROM_HERE,
+ base::Bind(&VideoDecoderShim::DecoderImpl::Reset,
+ base::Unretained(decoder_impl_.get())));
+}
+
+void VideoDecoderShim::Destroy() {
+ // This will be called, but our destructor does the actual work.
+}
+
+void VideoDecoderShim::OnInitializeComplete(int32_t result,
+ uint32_t texture_pool_size) {
+ DCHECK(RenderThreadImpl::current());
+ DCHECK(host_);
+
+ if (result == PP_OK) {
+ state_ = DECODING;
+ texture_pool_size_ = texture_pool_size;
+ }
+
+ host_->OnInitializeComplete(result);
+}
+
+void VideoDecoderShim::OnDecodeComplete(int32_t result, uint32_t decode_id) {
+ DCHECK(RenderThreadImpl::current());
+ DCHECK(host_);
+
+ if (result == PP_ERROR_RESOURCE_FAILED) {
+ host_->NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE);
+ return;
+ }
+
+ num_pending_decodes_--;
+ completed_decodes_.push(decode_id);
+
+ // If frames are being queued because we're out of textures, don't notify
+ // the host that decode has completed. This exerts "back pressure" to keep
+ // the host from sending buffers that will cause pending_frames_ to grow.
+ if (pending_frames_.empty())
+ NotifyCompletedDecodes();
+}
+
+void VideoDecoderShim::OnOutputComplete(scoped_ptr<PendingFrame> frame) {
+ DCHECK(RenderThreadImpl::current());
+ DCHECK(host_);
+
+ if (!frame->argb_pixels.empty()) {
+ if (texture_size_ != frame->size) {
+ // If the size has changed, all current textures must be dismissed. Add
+ // all textures to |textures_to_dismiss_| and dismiss any that aren't in
+ // use by the plugin. We will dismiss the rest as they are recycled.
+ for (TextureIdMap::const_iterator it = texture_id_map_.begin();
+ it != texture_id_map_.end();
+ ++it) {
+ textures_to_dismiss_.insert(it->second);
+ }
+ for (TextureIdSet::const_iterator it = available_textures_.begin();
+ it != available_textures_.end();
+ ++it) {
+ DismissTexture(*it);
+ }
+ available_textures_.clear();
+ FlushCommandBuffer();
+
+ DCHECK(pending_texture_mailboxes_.empty());
+ for (uint32_t i = 0; i < texture_pool_size_; i++)
+ pending_texture_mailboxes_.push_back(gpu::Mailbox::Generate());
+
+ host_->RequestTextures(texture_pool_size_,
+ frame->size,
+ GL_TEXTURE_2D,
+ pending_texture_mailboxes_);
+ texture_size_ = frame->size;
+ }
+
+ pending_frames_.push(linked_ptr<PendingFrame>(frame.release()));
+ SendPictures();
+ }
+}
+
+void VideoDecoderShim::SendPictures() {
+ DCHECK(RenderThreadImpl::current());
+ DCHECK(host_);
+ while (!pending_frames_.empty() && !available_textures_.empty()) {
+ const linked_ptr<PendingFrame>& frame = pending_frames_.front();
+
+ TextureIdSet::iterator it = available_textures_.begin();
+ uint32_t texture_id = *it;
+ available_textures_.erase(it);
+
+ uint32_t local_texture_id = texture_id_map_[texture_id];
+ gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL();
+ gles2->ActiveTexture(GL_TEXTURE0);
+ gles2->BindTexture(GL_TEXTURE_2D, local_texture_id);
+ gles2->TexImage2D(GL_TEXTURE_2D,
+ 0,
+ GL_RGBA,
+ texture_size_.width(),
+ texture_size_.height(),
+ 0,
+ GL_RGBA,
+ GL_UNSIGNED_BYTE,
+ &frame->argb_pixels.front());
+
+ host_->PictureReady(media::Picture(texture_id, frame->decode_id));
+ pending_frames_.pop();
+ }
+
+ FlushCommandBuffer();
+
+ if (pending_frames_.empty()) {
+ // If frames aren't backing up, notify the host of any completed decodes so
+ // it can send more buffers.
+ NotifyCompletedDecodes();
+
+ if (state_ == FLUSHING && !num_pending_decodes_) {
+ state_ = DECODING;
+ host_->NotifyFlushDone();
+ }
+ }
+}
+
+void VideoDecoderShim::OnResetComplete() {
+ DCHECK(RenderThreadImpl::current());
+ DCHECK(host_);
+
+ while (!pending_frames_.empty())
+ pending_frames_.pop();
+ NotifyCompletedDecodes();
+
+ // Dismiss any old textures now.
+ while (!textures_to_dismiss_.empty())
+ DismissTexture(*textures_to_dismiss_.begin());
+ // Make all textures available.
+ for (TextureIdMap::const_iterator it = texture_id_map_.begin();
+ it != texture_id_map_.end();
+ ++it) {
+ available_textures_.insert(it->first);
+ }
+
+ state_ = DECODING;
+ host_->NotifyResetDone();
+}
+
+void VideoDecoderShim::NotifyCompletedDecodes() {
+ while (!completed_decodes_.empty()) {
+ host_->NotifyEndOfBitstreamBuffer(completed_decodes_.front());
+ completed_decodes_.pop();
+ }
+}
+
+void VideoDecoderShim::DismissTexture(uint32_t texture_id) {
+ DCHECK(host_);
+ textures_to_dismiss_.erase(texture_id);
+ DCHECK(texture_id_map_.find(texture_id) != texture_id_map_.end());
+ DeleteTexture(texture_id_map_[texture_id]);
+ texture_id_map_.erase(texture_id);
+ host_->DismissPictureBuffer(texture_id);
+}
+
+void VideoDecoderShim::DeleteTexture(uint32_t texture_id) {
+ gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL();
+ gles2->DeleteTextures(1, &texture_id);
+}
+
+void VideoDecoderShim::FlushCommandBuffer() {
+ context_provider_->ContextGL()->Flush();
+}
+
+} // namespace content
diff --git a/content/renderer/pepper/video_decoder_shim.h b/content/renderer/pepper/video_decoder_shim.h
new file mode 100644
index 0000000..aa33a74
--- /dev/null
+++ b/content/renderer/pepper/video_decoder_shim.h
@@ -0,0 +1,129 @@
+// Copyright 2014 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 CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_
+#define CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_
+
+#include <queue>
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/containers/hash_tables.h"
+#include "base/memory/linked_ptr.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
+#include "base/message_loop/message_loop_proxy.h"
+#include "gpu/command_buffer/common/mailbox.h"
+#include "media/base/video_decoder_config.h"
+#include "media/video/video_decode_accelerator.h"
+
+#include "ppapi/c/pp_codecs.h"
+
+namespace gpu {
+namespace gles2 {
+class GLES2Interface;
+}
+}
+
+namespace media {
+class DecoderBuffer;
+}
+
+namespace webkit {
+namespace gpu {
+class ContextProviderWebContext;
+}
+}
+
+namespace content {
+
+class PepperVideoDecoderHost;
+
+// This class is a shim to wrap a media::VideoDecoder so that it can be used
+// by PepperVideoDecoderHost in place of a media::VideoDecodeAccelerator.
+// This class should be constructed, used, and destructed on the main (render)
+// thread.
+class VideoDecoderShim : public media::VideoDecodeAccelerator {
+ public:
+ explicit VideoDecoderShim(PepperVideoDecoderHost* host);
+ virtual ~VideoDecoderShim();
+
+ // media::VideoDecodeAccelerator implementation.
+ virtual bool Initialize(
+ media::VideoCodecProfile profile,
+ media::VideoDecodeAccelerator::Client* client) OVERRIDE;
+ virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE;
+ virtual void AssignPictureBuffers(
+ const std::vector<media::PictureBuffer>& buffers) OVERRIDE;
+ virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE;
+ virtual void Flush() OVERRIDE;
+ virtual void Reset() OVERRIDE;
+ virtual void Destroy() OVERRIDE;
+
+ private:
+ enum State {
+ UNINITIALIZED,
+ DECODING,
+ FLUSHING,
+ RESETTING,
+ };
+
+ struct PendingDecode;
+ struct PendingFrame;
+ class DecoderImpl;
+
+ void OnInitializeComplete(int32_t result, uint32_t texture_pool_size);
+ void OnDecodeComplete(int32_t result, uint32_t decode_id);
+ void OnOutputComplete(scoped_ptr<PendingFrame> frame);
+ void SendPictures();
+ void OnResetComplete();
+ void NotifyCompletedDecodes();
+ void DismissTexture(uint32_t texture_id);
+ void DeleteTexture(uint32_t texture_id);
+ // Call this whenever we change GL state that the plugin relies on, such as
+ // creating picture textures.
+ void FlushCommandBuffer();
+
+ scoped_ptr<DecoderImpl> decoder_impl_;
+ State state_;
+
+ PepperVideoDecoderHost* host_;
+ scoped_refptr<base::MessageLoopProxy> media_message_loop_;
+ scoped_refptr<webkit::gpu::ContextProviderWebContext> context_provider_;
+
+ // The current decoded frame size.
+ gfx::Size texture_size_;
+ // Map that takes the plugin's GL texture id to the renderer's GL texture id.
+ typedef base::hash_map<uint32_t, uint32_t> TextureIdMap;
+ TextureIdMap texture_id_map_;
+ // Available textures (these are plugin ids.)
+ typedef base::hash_set<uint32_t> TextureIdSet;
+ TextureIdSet available_textures_;
+ // Track textures that are no longer needed (these are plugin ids.)
+ TextureIdSet textures_to_dismiss_;
+ // Mailboxes for pending texture requests, to write to plugin's textures.
+ std::vector<gpu::Mailbox> pending_texture_mailboxes_;
+
+ // Queue of completed decode ids, for notifying the host.
+ typedef std::queue<uint32_t> CompletedDecodeQueue;
+ CompletedDecodeQueue completed_decodes_;
+
+ // Queue of decoded frames that have been converted to RGB and await upload to
+ // a GL texture.
+ typedef std::queue<linked_ptr<PendingFrame> > PendingFrameQueue;
+ PendingFrameQueue pending_frames_;
+
+ // The optimal number of textures to allocate for decoder_impl_.
+ uint32_t texture_pool_size_;
+
+ uint32_t num_pending_decodes_;
+
+ base::WeakPtrFactory<VideoDecoderShim> weak_ptr_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(VideoDecoderShim);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 1866bb8..55c5994 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -10,6 +10,7 @@
#include "base/auto_reset.h"
#include "base/command_line.h"
#include "base/debug/alias.h"
+#include "base/debug/asan_invalid_access.h"
#include "base/debug/dump_without_crashing.h"
#include "base/i18n/char_iterator.h"
#include "base/metrics/histogram.h"
@@ -63,6 +64,7 @@
#include "content/renderer/media/media_stream_dispatcher.h"
#include "content/renderer/media/media_stream_impl.h"
#include "content/renderer/media/media_stream_renderer_factory.h"
+#include "content/renderer/media/midi_dispatcher.h"
#include "content/renderer/media/render_media_log.h"
#include "content/renderer/media/webcontentdecryptionmodule_impl.h"
#include "content/renderer/media/webmediaplayer_impl.h"
@@ -76,6 +78,7 @@
#include "content/renderer/render_widget_fullscreen_pepper.h"
#include "content/renderer/renderer_webapplicationcachehost_impl.h"
#include "content/renderer/renderer_webcolorchooser_impl.h"
+#include "content/renderer/screen_orientation/screen_orientation_dispatcher.h"
#include "content/renderer/shared_worker_repository.h"
#include "content/renderer/v8_value_converter_impl.h"
#include "content/renderer/websharedworker_proxy.h"
@@ -103,6 +106,7 @@
#include "third_party/WebKit/public/web/WebSearchableFormData.h"
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
#include "third_party/WebKit/public/web/WebSecurityPolicy.h"
+#include "third_party/WebKit/public/web/WebSurroundingText.h"
#include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "webkit/child/weburlresponse_extradata_impl.h"
@@ -127,6 +131,9 @@
#include "content/renderer/media/android/renderer_media_player_manager.h"
#include "content/renderer/media/android/stream_texture_factory_impl.h"
#include "content/renderer/media/android/webmediaplayer_android.h"
+#endif
+
+#if defined(ENABLE_BROWSER_CDMS)
#include "content/renderer/media/crypto/renderer_cdm_manager.h"
#endif
@@ -200,7 +207,7 @@
void GetRedirectChain(WebDataSource* ds, std::vector<GURL>* result) {
// Replace any occurrences of swappedout:// with about:blank.
- const WebURL& blank_url = GURL(kAboutBlankURL);
+ const WebURL& blank_url = GURL(url::kAboutBlankURL);
WebVector<WebURL> urls;
ds->redirectChain(urls);
result->reserve(urls.size());
@@ -238,37 +245,19 @@
*zero = 0;
}
-#if defined(SYZYASAN)
-NOINLINE static void CorruptMemoryBlock() {
- // NOTE(sebmarchand): We intentionally corrupt a memory block here in order to
- // trigger an Address Sanitizer (ASAN) error report.
- static const int kArraySize = 5;
- int* array = new int[kArraySize];
- // Encapsulate the invalid memory access into a try-catch statement to prevent
- // this function from being instrumented. This way the underflow won't be
- // detected but the corruption will (as the allocator will still be hooked).
- __try {
- int dummy = array[-1]--;
- // Make sure the assignments to the dummy value aren't optimized away.
- base::debug::Alias(&array);
- } __except (EXCEPTION_EXECUTE_HANDLER) {
- }
- delete[] array;
-}
-#endif
-
#if defined(ADDRESS_SANITIZER) || defined(SYZYASAN)
NOINLINE static void MaybeTriggerAsanError(const GURL& url) {
// NOTE(rogerm): We intentionally perform an invalid heap access here in
// order to trigger an Address Sanitizer (ASAN) error report.
- static const char kCrashDomain[] = "crash";
- static const char kHeapOverflow[] = "/heap-overflow";
- static const char kHeapUnderflow[] = "/heap-underflow";
- static const char kUseAfterFree[] = "/use-after-free";
+ const char kCrashDomain[] = "crash";
+ const char kHeapOverflow[] = "/heap-overflow";
+ const char kHeapUnderflow[] = "/heap-underflow";
+ const char kUseAfterFree[] = "/use-after-free";
#if defined(SYZYASAN)
- static const char kCorruptHeapBlock[] = "/corrupt-heap-block";
+ const char kCorruptHeapBlock[] = "/corrupt-heap-block";
+ const char kCorruptHeap[] = "/corrupt-heap";
#endif
- static const int kArraySize = 5;
+ const int kArraySize = 5;
if (!url.DomainIs(kCrashDomain, sizeof(kCrashDomain) - 1))
return;
@@ -276,25 +265,20 @@
if (!url.has_path())
return;
- scoped_ptr<int[]> array(new int[kArraySize]);
std::string crash_type(url.path());
- int dummy = 0;
if (crash_type == kHeapOverflow) {
- dummy = array[kArraySize];
+ base::debug::AsanHeapOverflow();
} else if (crash_type == kHeapUnderflow ) {
- dummy = array[-1];
+ base::debug::AsanHeapUnderflow();
} else if (crash_type == kUseAfterFree) {
- int* dangling = array.get();
- array.reset();
- dummy = dangling[kArraySize / 2];
+ base::debug::AsanHeapUseAfterFree();
#if defined(SYZYASAN)
} else if (crash_type == kCorruptHeapBlock) {
- CorruptMemoryBlock();
+ base::debug::AsanCorruptHeapBlock();
+ } else if (crash_type == kCorruptHeap) {
+ base::debug::AsanCorruptHeap();
#endif
}
-
- // Make sure the assignments to the dummy value aren't optimized away.
- base::debug::Alias(&dummy);
}
#endif // ADDRESS_SANITIZER || SYZYASAN
@@ -414,11 +398,15 @@
handling_select_range_(false),
notification_provider_(NULL),
web_user_media_client_(NULL),
+ midi_dispatcher_(NULL),
#if defined(OS_ANDROID)
media_player_manager_(NULL),
+#endif
+#if defined(ENABLE_BROWSER_CDMS)
cdm_manager_(NULL),
#endif
geolocation_dispatcher_(NULL),
+ screen_orientation_dispatcher_(NULL),
weak_factory_(this) {
RenderThread::Get()->AddRoute(routing_id_, this);
@@ -441,10 +429,10 @@
FOR_EACH_OBSERVER(RenderFrameObserver, observers_, RenderFrameGone());
FOR_EACH_OBSERVER(RenderFrameObserver, observers_, OnDestruct());
-#if defined(VIDEO_HOLE)
+#if defined(OS_ANDROID) && defined(VIDEO_HOLE)
if (media_player_manager_)
render_view_->UnregisterVideoHoleFrame(this);
-#endif // defined(VIDEO_HOLE)
+#endif
render_view_->UnregisterRenderFrame(this);
g_routing_id_frame_map.Get().erase(routing_id_);
@@ -507,7 +495,8 @@
if (instance != render_view_->focused_pepper_plugin())
return;
- GetRenderWidget()->UpdateTextInputType();
+ GetRenderWidget()->UpdateTextInputState(
+ RenderWidget::NO_SHOW_IME, RenderWidget::FROM_NON_IME);
if (render_view_->renderer_accessibility())
render_view_->renderer_accessibility()->FocusedNodeChanged(WebNode());
}
@@ -722,10 +711,12 @@
OnSetCompositionFromExistingText)
IPC_MESSAGE_HANDLER(FrameMsg_ExtendSelectionAndDelete,
OnExtendSelectionAndDelete)
+ IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload)
+ IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest,
+ OnTextSurroundingSelectionRequest)
#if defined(OS_MACOSX)
IPC_MESSAGE_HANDLER(InputMsg_CopyToFindPboard, OnCopyToFindPboard)
#endif
- IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload)
IPC_END_MESSAGE_MAP()
return handled;
@@ -736,7 +727,8 @@
if (!render_view_->webview())
return;
- render_view_->OnNavigate(params);
+ FOR_EACH_OBSERVER(
+ RenderViewObserver, render_view_->observers_, Navigate(params.url));
bool is_reload = RenderViewImpl::IsReload(params);
WebURLRequest::CachePolicy cache_policy =
@@ -1204,11 +1196,30 @@
frame_->extendSelectionAndDelete(before, after);
}
-
void RenderFrameImpl::OnReload(bool ignore_cache) {
frame_->reload(ignore_cache);
}
+void RenderFrameImpl::OnTextSurroundingSelectionRequest(size_t max_length) {
+ blink::WebSurroundingText surroundingText;
+ surroundingText.initialize(frame_->selectionRange(), max_length);
+
+ if (surroundingText.isNull()) {
+ // |surroundingText| might not be correctly initialized, for example if
+ // |frame_->selectionRange().isNull()|, in other words, if there was no
+ // selection.
+ Send(new FrameHostMsg_TextSurroundingSelectionResponse(
+ routing_id_, base::string16(), 0, 0));
+ return;
+ }
+
+ Send(new FrameHostMsg_TextSurroundingSelectionResponse(
+ routing_id_,
+ surroundingText.textContent(),
+ surroundingText.startOffsetInTextContent(),
+ surroundingText.endOffsetInTextContent()));
+}
+
bool RenderFrameImpl::ShouldUpdateSelectionTextFromContextMenuParams(
const base::string16& selection_text,
size_t selection_text_offset,
@@ -1422,7 +1433,7 @@
return WebContentDecryptionModuleImpl::Create(
#if defined(ENABLE_PEPPER_CDMS)
frame,
-#elif defined(OS_ANDROID)
+#elif defined(ENABLE_BROWSER_CDMS)
GetCdmManager(),
#endif
security_origin,
@@ -1962,7 +1973,7 @@
// UpdateSessionHistory and update page_id_ even in this case, so that
// the current entry gets a state update and so that we don't send a
// state update to the wrong entry when we swap back in.
- if (render_view_->GetLoadingUrl(frame) != GURL(kSwappedOutURL)) {
+ if (GetLoadingUrl() != GURL(kSwappedOutURL)) {
// Advance our offset in session history, applying the length limit.
// There is now no forward history.
render_view_->history_list_offset_++;
@@ -2005,10 +2016,20 @@
}
}
- render_view_->FrameDidCommitProvisionalLoad(frame, is_new_navigation);
+ FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers_,
+ DidCommitProvisionalLoad(frame, is_new_navigation));
FOR_EACH_OBSERVER(RenderFrameObserver, observers_,
DidCommitProvisionalLoad(is_new_navigation));
+ if (!frame->parent()) { // Only for top frames.
+ RenderThreadImpl* render_thread_impl = RenderThreadImpl::current();
+ if (render_thread_impl) { // Can be NULL in tests.
+ render_thread_impl->histogram_customizer()->
+ RenderViewNavigatedToHost(GURL(GetLoadingUrl()).host(),
+ RenderViewImpl::GetRenderViewCount());
+ }
+ }
+
// Remember that we've already processed this request, so we don't update
// the session history again. We do this regardless of whether this is
// a session history navigation, because if we attempted a session history
@@ -2042,7 +2063,7 @@
// Notify the browser about non-blank documents loading in the top frame.
GURL url = frame->document().url();
- if (url.is_valid() && url.spec() != kAboutBlankURL) {
+ if (url.is_valid() && url.spec() != url::kAboutBlankURL) {
// TODO(nasko): Check if webview()->mainFrame() is the same as the
// frame->tree()->top().
blink::WebFrame* main_frame = render_view_->webview()->mainFrame();
@@ -2197,17 +2218,14 @@
if (is_empty_selection)
selection_text_.clear();
- // UpdateTextInputType should be called before SyncSelectionIfRequired.
- // UpdateTextInputType may send TextInputTypeChanged to notify the focus
+ // UpdateTextInputState should be called before SyncSelectionIfRequired.
+ // UpdateTextInputState may send TextInputStateChanged to notify the focus
// was changed, and SyncSelectionIfRequired may send SelectionChanged
// to notify the selection was changed. Focus change should be notified
// before selection change.
- GetRenderWidget()->UpdateTextInputType();
+ GetRenderWidget()->UpdateTextInputState(
+ RenderWidget::NO_SHOW_IME, RenderWidget::FROM_NON_IME);
SyncSelectionIfRequired();
-#if defined(OS_ANDROID)
- GetRenderWidget()->UpdateTextInputState(RenderWidget::NO_SHOW_IME,
- RenderWidget::FROM_NON_IME);
-#endif
}
blink::WebColorChooser* RenderFrameImpl::createColorChooser(
@@ -2684,23 +2702,6 @@
#endif
}
-void RenderFrameImpl::didChangeContentsSize(blink::WebLocalFrame* frame,
- const blink::WebSize& size) {
- DCHECK(!frame_ || frame_ == frame);
-#if defined(OS_MACOSX)
- if (frame->parent())
- return;
-
- WebView* frameView = frame->view();
- if (!frameView)
- return;
-
- GetRenderWidget()->DidChangeScrollbarsForMainFrame(
- frame->hasHorizontalScrollbar(),
- frame->hasVerticalScrollbar());
-#endif // defined(OS_MACOSX)
-}
-
void RenderFrameImpl::didChangeScrollOffset(blink::WebLocalFrame* frame) {
DCHECK(!frame_ || frame_ == frame);
// TODO(nasko): Move implementation here. Needed methods:
@@ -2791,7 +2792,9 @@
}
blink::WebMIDIClient* RenderFrameImpl::webMIDIClient() {
- return render_view_->webMIDIClient();
+ if (!midi_dispatcher_)
+ midi_dispatcher_ = new MidiDispatcher(this);
+ return midi_dispatcher_;
}
bool RenderFrameImpl::willCheckAndDispatchMessageEvent(
@@ -2905,6 +2908,13 @@
routing_id_, frame_rect, scale_factor));
}
+blink::WebScreenOrientationClient*
+ RenderFrameImpl::webScreenOrientationClient() {
+ if (!screen_orientation_dispatcher_)
+ screen_orientation_dispatcher_ = new ScreenOrientationDispatcher(this);
+ return screen_orientation_dispatcher_;
+}
+
void RenderFrameImpl::DidPlay(blink::WebMediaPlayer* player) {
Send(new FrameHostMsg_MediaPlayingNotification(
routing_id_, reinterpret_cast<int64>(player), player->hasVideo(),
@@ -2974,7 +2984,7 @@
params.security_info = response.securityInfo();
// Set the URL to be displayed in the browser UI to the user.
- params.url = render_view_->GetLoadingUrl(frame);
+ params.url = GetLoadingUrl();
DCHECK(!is_swapped_out_ || params.url == GURL(kSwappedOutURL));
if (frame->document().baseURL() != params.url)
@@ -3265,7 +3275,8 @@
// browser process, and issue a special POST navigation in WebKit (via
// FrameLoader::loadFrameRequest). See ResourceDispatcher and WebURLLoaderImpl
// for examples of how to send the httpBody data.
- if (!frame->parent() && is_content_initiated && !url.SchemeIs(kAboutScheme)) {
+ if (!frame->parent() && is_content_initiated &&
+ !url.SchemeIs(url::kAboutScheme)) {
bool send_referrer = false;
// All navigations to or from WebUI URLs or within WebUI-enabled
@@ -3325,7 +3336,7 @@
// (see below).
bool is_fork =
// Must start from a tab showing about:blank, which is later redirected.
- old_url == GURL(kAboutBlankURL) &&
+ old_url == GURL(url::kAboutBlankURL) &&
// Must be the first real navigation of the tab.
render_view_->historyBackListCount() < 1 &&
render_view_->historyForwardListCount() < 1 &&
@@ -3517,6 +3528,15 @@
#endif
}
+GURL RenderFrameImpl::GetLoadingUrl() const {
+ WebDataSource* ds = frame_->dataSource();
+ if (ds->hasUnreachableURL())
+ return ds->unreachableURL();
+
+ const WebURLRequest& request = ds->request();
+ return request.url();
+}
+
#if defined(OS_ANDROID)
WebMediaPlayer* RenderFrameImpl::CreateAndroidWebMediaPlayer(
@@ -3534,8 +3554,7 @@
if (GetRenderWidget()->UsingSynchronousRendererCompositor()) {
SynchronousCompositorFactory* factory =
SynchronousCompositorFactory::GetInstance();
- stream_texture_factory = factory->CreateStreamTextureFactory(
- render_view_->routing_id_);
+ stream_texture_factory = factory->CreateStreamTextureFactory(routing_id_);
} else {
scoped_refptr<webkit::gpu::ContextProviderWebContext> context_provider =
RenderThreadImpl::current()->SharedMainThreadContextProvider();
@@ -3570,12 +3589,14 @@
return media_player_manager_;
}
+#endif // defined(OS_ANDROID)
+
+#if defined(ENABLE_BROWSER_CDMS)
RendererCdmManager* RenderFrameImpl::GetCdmManager() {
if (!cdm_manager_)
cdm_manager_ = new RendererCdmManager(this);
return cdm_manager_;
}
-
-#endif // defined(OS_ANDROID)
+#endif // defined(ENABLE_BROWSER_CDMS)
} // namespace content
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 2b4fbe0..fd255f0 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -40,7 +40,6 @@
class WebInputEvent;
class WebMouseEvent;
class WebContentDecryptionModule;
-class WebMIDIClient;
class WebMediaPlayer;
class WebNotificationPresenter;
class WebSecurityOrigin;
@@ -60,20 +59,19 @@
class ChildFrameCompositingHelper;
class GeolocationDispatcher;
class MediaStreamRendererFactory;
+class MidiDispatcher;
class NotificationProvider;
class PepperPluginInstanceImpl;
+class RendererCdmManager;
+class RendererMediaPlayerManager;
class RendererPpapiHost;
class RenderFrameObserver;
class RenderViewImpl;
class RenderWidget;
class RenderWidgetFullscreenPepper;
+class ScreenOrientationDispatcher;
struct CustomContextMenuContext;
-#if defined(OS_ANDROID)
-class RendererCdmManager;
-class RendererMediaPlayerManager;
-#endif
-
class CONTENT_EXPORT RenderFrameImpl
: public RenderFrame,
NON_EXPORTED_BASE(public blink::WebFrameClient),
@@ -354,8 +352,6 @@
v8::Handle<v8::Context> context,
int world_id);
virtual void didFirstVisuallyNonEmptyLayout(blink::WebLocalFrame* frame);
- virtual void didChangeContentsSize(blink::WebLocalFrame* frame,
- const blink::WebSize& size);
virtual void didChangeScrollOffset(blink::WebLocalFrame* frame);
virtual void willInsertBody(blink::WebLocalFrame* frame);
virtual void reportFindInPageMatchCount(int request_id,
@@ -391,6 +387,7 @@
virtual void forwardInputEvent(const blink::WebInputEvent* event);
virtual void initializeChildFrame(const blink::WebRect& frame_rect,
float scale_factor);
+ virtual blink::WebScreenOrientationClient* webScreenOrientationClient();
// WebMediaPlayerDelegate implementation:
virtual void DidPlay(blink::WebMediaPlayer* player) OVERRIDE;
@@ -464,6 +461,7 @@
const std::vector<blink::WebCompositionUnderline>& underlines);
void OnExtendSelectionAndDelete(int before, int after);
void OnReload(bool ignore_cache);
+ void OnTextSurroundingSelectionRequest(size_t max_length);
#if defined(OS_MACOSX)
void OnCopyToFindPboard();
#endif
@@ -536,12 +534,18 @@
// The method is virtual so that layouttests can override it.
virtual scoped_ptr<MediaStreamRendererFactory> CreateRendererFactory();
+ // Returns the URL being loaded by the |frame_|'s request.
+ GURL GetLoadingUrl() const;
+
#if defined(OS_ANDROID)
blink::WebMediaPlayer* CreateAndroidWebMediaPlayer(
const blink::WebURL& url,
blink::WebMediaPlayerClient* client);
RendererMediaPlayerManager* GetMediaPlayerManager();
+#endif
+
+#if defined(ENABLE_BROWSER_CDMS)
RendererCdmManager* GetCdmManager();
#endif
@@ -610,17 +614,29 @@
blink::WebUserMediaClient* web_user_media_client_;
+ // MidiClient attached to this frame; lazily initialized.
+ MidiDispatcher* midi_dispatcher_;
+
#if defined(OS_ANDROID)
- // These manage all media players and CDMs in this render frame for
- // communicating with the real media player and CDM objects in the browser
- // process. It's okay to use raw pointers since they are RenderFrameObservers.
+ // Manages all media players in this render frame for communicating with the
+ // real media player in the browser process. It's okay to use a raw pointer
+ // since it's a RenderFrameObserver.
RendererMediaPlayerManager* media_player_manager_;
+#endif
+
+#if defined(ENABLE_BROWSER_CDMS)
+ // Manage all CDMs in this render frame for communicating with the real CDM in
+ // the browser process. It's okay to use a raw pointer since it's a
+ // RenderFrameObserver.
RendererCdmManager* cdm_manager_;
#endif
// The geolocation dispatcher attached to this view, lazily initialized.
GeolocationDispatcher* geolocation_dispatcher_;
+ // The screen orientation dispatcher attached to the view, lazily initialized.
+ ScreenOrientationDispatcher* screen_orientation_dispatcher_;
+
base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 3f13b20..8934a31 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -63,6 +63,8 @@
#include "content/public/renderer/content_renderer_client.h"
#include "content/public/renderer/render_process_observer.h"
#include "content/public/renderer/render_view_visitor.h"
+#include "content/renderer/compositor_bindings/web_external_bitmap_impl.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
#include "content/renderer/devtools/devtools_agent_filter.h"
#include "content/renderer/dom_storage/dom_storage_dispatcher.h"
#include "content/renderer/dom_storage/webstoragearea_impl.h"
@@ -72,6 +74,7 @@
#include "content/renderer/gpu/gpu_benchmarking_extension.h"
#include "content/renderer/input/input_event_filter.h"
#include "content/renderer/input/input_handler_manager.h"
+#include "content/renderer/media/aec_dump_message_filter.h"
#include "content/renderer/media/audio_input_message_filter.h"
#include "content/renderer/media/audio_message_filter.h"
#include "content/renderer/media/audio_renderer_mixer_manager.h"
@@ -121,8 +124,6 @@
#include "ui/base/layout.h"
#include "ui/base/ui_base_switches.h"
#include "v8/include/v8.h"
-#include "webkit/renderer/compositor_bindings/web_external_bitmap_impl.h"
-#include "webkit/renderer/compositor_bindings/web_layer_impl.h"
#if defined(OS_ANDROID)
#include <cpu-features.h>
@@ -143,7 +144,6 @@
#include <objbase.h>
#else
// TODO(port)
-#include "base/memory/scoped_handle.h"
#include "content/child/npapi/np_channel_base.h"
#endif
@@ -197,7 +197,9 @@
GURL url(document.url());
// Empty scheme works as wildcard that matches any scheme,
if ((net::GetHostOrSpecFromURL(url) == host_) &&
- (scheme_.empty() || scheme_ == url.scheme())) {
+ (scheme_.empty() || scheme_ == url.scheme()) &&
+ !static_cast<RenderViewImpl*>(render_view)
+ ->uses_temporary_zoom_level()) {
webview->hidePopups();
webview->setZoomLevel(zoom_level_);
}
@@ -380,9 +382,13 @@
webrtc_identity_service_.reset(new WebRTCIdentityService());
+ aec_dump_message_filter_ =
+ new AecDumpMessageFilter(GetIOMessageLoopProxy(),
+ message_loop()->message_loop_proxy());
+ AddFilter(aec_dump_message_filter_.get());
+
peer_connection_factory_.reset(new PeerConnectionDependencyFactory(
p2p_socket_dispatcher_.get()));
- AddObserver(peer_connection_factory_.get());
#endif // defined(ENABLE_WEBRTC)
audio_input_message_filter_ =
@@ -412,8 +418,7 @@
is_impl_side_painting_enabled_ =
command_line.HasSwitch(switches::kEnableImplSidePainting);
- webkit::WebLayerImpl::SetImplSidePaintingEnabled(
- is_impl_side_painting_enabled_);
+ WebLayerImpl::SetImplSidePaintingEnabled(is_impl_side_painting_enabled_);
is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy) &&
!command_line.HasSwitch(switches::kDisableZeroCopy);
@@ -807,7 +812,7 @@
if (GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden())
ScheduleIdleHandler(kLongIdleHandlerDelayMs);
- webkit::SetSharedMemoryAllocationFunction(AllocateSharedMemoryFunction);
+ SetSharedMemoryAllocationFunction(AllocateSharedMemoryFunction);
// Limit use of the scaled image cache to when deferred image decoding is
// enabled.
@@ -1224,7 +1229,7 @@
// is there a new non-windows message I should add here?
IPC_MESSAGE_HANDLER(ViewMsg_New, OnCreateNewView)
IPC_MESSAGE_HANDLER(ViewMsg_PurgePluginListCache, OnPurgePluginListCache)
- IPC_MESSAGE_HANDLER(ViewMsg_NetworkStateChanged, OnNetworkStateChanged)
+ IPC_MESSAGE_HANDLER(ViewMsg_NetworkTypeChanged, OnNetworkTypeChanged)
IPC_MESSAGE_HANDLER(ViewMsg_TempCrashWithData, OnTempCrashWithData)
IPC_MESSAGE_HANDLER(WorkerProcessMsg_CreateWorker, OnCreateNewSharedWorker)
IPC_MESSAGE_HANDLER(ViewMsg_TimezoneChange, OnUpdateTimezone)
@@ -1355,10 +1360,10 @@
FOR_EACH_OBSERVER(RenderProcessObserver, observers_, PluginListChanged());
}
-void RenderThreadImpl::OnNetworkStateChanged(
- bool online,
+void RenderThreadImpl::OnNetworkTypeChanged(
net::NetworkChangeNotifier::ConnectionType type) {
EnsureWebKitInitialized();
+ bool online = type != net::NetworkChangeNotifier::CONNECTION_NONE;
WebNetworkStateNotifier::setOnLine(online);
FOR_EACH_OBSERVER(
RenderProcessObserver, observers_, NetworkStateChanged(online));
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index 5244443..4afe3ed 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -74,6 +74,7 @@
namespace content {
class AppCacheDispatcher;
+class AecDumpMessageFilter;
class AudioInputMessageFilter;
class AudioMessageFilter;
class AudioRendererMixerManager;
@@ -434,8 +435,7 @@
void OnCreateNewView(const ViewMsg_New_Params& params);
void OnTransferBitmap(const SkBitmap& bitmap, int resource_id);
void OnPurgePluginListCache(bool reload_pages);
- void OnNetworkStateChanged(bool online,
- net::NetworkChangeNotifier::ConnectionType type);
+ void OnNetworkTypeChanged(net::NetworkChangeNotifier::ConnectionType type);
void OnGetAccessibilityTree();
void OnTempCrashWithData(const GURL& data);
void OnUpdateTimezone();
@@ -490,6 +490,12 @@
// Used on the render thread.
scoped_ptr<VideoCaptureImplManager> vc_manager_;
+ // Used for communicating registering AEC dump consumers with the browser and
+ // receving AEC dump file handles when AEC dump is enabled. An AEC dump is
+ // diagnostic audio data for WebRTC stored locally when enabled by the user in
+ // chrome://webrtc-internals.
+ scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_;
+
// The count of RenderWidgets running through this thread.
int widget_count_;
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc
index 9acd60a..a25b69c 100644
--- a/content/renderer/render_view_browsertest.cc
+++ b/content/renderer/render_view_browsertest.cc
@@ -897,17 +897,16 @@
// Update the IME status and verify if our IME backend sends an IPC message
// to activate IMEs.
- view()->UpdateTextInputType();
+ view()->UpdateTextInputState(
+ RenderWidget::NO_SHOW_IME, RenderWidget::FROM_NON_IME);
const IPC::Message* msg = render_thread_->sink().GetMessageAt(0);
EXPECT_TRUE(msg != NULL);
- EXPECT_EQ(ViewHostMsg_TextInputTypeChanged::ID, msg->type());
- ViewHostMsg_TextInputTypeChanged::Param params;
- ViewHostMsg_TextInputTypeChanged::Read(msg, ¶ms);
- ui::TextInputType type = params.a;
- ui::TextInputMode input_mode = params.b;
- bool can_compose_inline = params.c;
- EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, type);
- EXPECT_EQ(true, can_compose_inline);
+ EXPECT_EQ(ViewHostMsg_TextInputStateChanged::ID, msg->type());
+ ViewHostMsg_TextInputStateChanged::Param params;
+ ViewHostMsg_TextInputStateChanged::Read(msg, ¶ms);
+ ViewHostMsg_TextInputState_Params p = params.a;
+ EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, p.type);
+ EXPECT_EQ(true, p.can_compose_inline);
// Move the input focus to the second <input> element, where we should
// de-activate IMEs.
@@ -917,36 +916,34 @@
// Update the IME status and verify if our IME backend sends an IPC message
// to de-activate IMEs.
- view()->UpdateTextInputType();
+ view()->UpdateTextInputState(
+ RenderWidget::NO_SHOW_IME, RenderWidget::FROM_NON_IME);
msg = render_thread_->sink().GetMessageAt(0);
EXPECT_TRUE(msg != NULL);
- EXPECT_EQ(ViewHostMsg_TextInputTypeChanged::ID, msg->type());
- ViewHostMsg_TextInputTypeChanged::Read(msg, & params);
- type = params.a;
- input_mode = params.b;
- EXPECT_EQ(ui::TEXT_INPUT_TYPE_PASSWORD, type);
+ EXPECT_EQ(ViewHostMsg_TextInputStateChanged::ID, msg->type());
+ ViewHostMsg_TextInputStateChanged::Read(msg, ¶ms);
+ EXPECT_EQ(ui::TEXT_INPUT_TYPE_PASSWORD, params.a.type);
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kInputModeTestCases); i++) {
- const InputModeTestCase* test_case = &kInputModeTestCases[i];
+ for (size_t j = 0; j < ARRAYSIZE_UNSAFE(kInputModeTestCases); j++) {
+ const InputModeTestCase* test_case = &kInputModeTestCases[j];
std::string javascript =
base::StringPrintf("document.getElementById('%s').focus();",
test_case->input_id);
// Move the input focus to the target <input> element, where we should
// activate IMEs.
- ExecuteJavaScriptAndReturnIntValue(base::ASCIIToUTF16(javascript), NULL);
+ ExecuteJavaScript(javascript.c_str());
ProcessPendingMessages();
render_thread_->sink().ClearMessages();
// Update the IME status and verify if our IME backend sends an IPC
// message to activate IMEs.
- view()->UpdateTextInputType();
- const IPC::Message* msg = render_thread_->sink().GetMessageAt(0);
+ view()->UpdateTextInputState(
+ RenderWidget::NO_SHOW_IME, RenderWidget::FROM_NON_IME);
+ msg = render_thread_->sink().GetMessageAt(0);
EXPECT_TRUE(msg != NULL);
- EXPECT_EQ(ViewHostMsg_TextInputTypeChanged::ID, msg->type());
- ViewHostMsg_TextInputTypeChanged::Read(msg, & params);
- type = params.a;
- input_mode = params.b;
- EXPECT_EQ(test_case->expected_mode, input_mode);
+ EXPECT_EQ(ViewHostMsg_TextInputStateChanged::ID, msg->type());
+ ViewHostMsg_TextInputStateChanged::Read(msg, ¶ms);
+ EXPECT_EQ(test_case->expected_mode, params.a.mode);
}
}
}
@@ -1075,7 +1072,8 @@
// Update the status of our IME back-end.
// TODO(hbono): we should verify messages to be sent from the back-end.
- view()->UpdateTextInputType();
+ view()->UpdateTextInputState(
+ RenderWidget::NO_SHOW_IME, RenderWidget::FROM_NON_IME);
ProcessPendingMessages();
render_thread_->sink().ClearMessages();
@@ -2068,7 +2066,7 @@
for (size_t i = 0; i < render_thread_->sink().message_count(); ++i) {
const uint32 type = render_thread_->sink().GetMessageAt(i)->type();
- if (type == ViewHostMsg_TextInputTypeChanged::ID) {
+ if (type == ViewHostMsg_TextInputStateChanged::ID) {
is_input_type_called = true;
last_input_type = i;
} else if (type == ViewHostMsg_SelectionChanged::ID) {
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 25d8f76..0eed3aa 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -20,6 +20,7 @@
#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop_proxy.h"
+#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "base/path_service.h"
#include "base/process/kill.h"
@@ -87,7 +88,6 @@
#include "content/renderer/internal_document_state_data.h"
#include "content/renderer/media/audio_device_factory.h"
#include "content/renderer/media/media_stream_dispatcher.h"
-#include "content/renderer/media/midi_dispatcher.h"
#include "content/renderer/media/video_capture_impl_manager.h"
#include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
#include "content/renderer/memory_benchmarking_extension.h"
@@ -430,20 +430,6 @@
return DeviceScaleEnsuresTextQuality(device_scale_factor);
}
-static bool ShouldUseUniversalAcceleratedCompositingForOverflowScroll() {
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
-
- if (command_line.HasSwitch(
- switches::kDisableUniversalAcceleratedOverflowScroll))
- return false;
-
- if (command_line.HasSwitch(
- switches::kEnableUniversalAcceleratedOverflowScroll))
- return true;
-
- return false;
-}
-
static bool ShouldUseTransitionCompositing(float device_scale_factor) {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
@@ -471,6 +457,11 @@
return DeviceScaleEnsuresTextQuality(device_scale_factor);
}
+static bool ShouldUseExpandedHeuristicsForGpuRasterization() {
+ return base::FieldTrialList::FindFullName(
+ "GpuRasterizationExpandedContentWhitelist") == "Enabled";
+}
+
static FaviconURL::IconType ToFaviconType(blink::WebIconURL::Type type) {
switch (type) {
case blink::WebIconURL::TypeFavicon:
@@ -641,17 +632,15 @@
history_list_length_(0),
frames_in_progress_(0),
target_url_status_(TARGET_NONE),
+ uses_temporary_zoom_level_(false),
#if defined(OS_ANDROID)
top_controls_constraints_(cc::BOTH),
#endif
- cached_is_main_frame_pinned_to_left_(false),
- cached_is_main_frame_pinned_to_right_(false),
has_scrolled_focused_editable_node_into_rect_(false),
push_messaging_dispatcher_(NULL),
speech_recognition_dispatcher_(NULL),
media_stream_dispatcher_(NULL),
browser_plugin_manager_(NULL),
- midi_dispatcher_(NULL),
devtools_agent_(NULL),
accessibility_mode_(AccessibilityModeOff),
renderer_accessibility_(NULL),
@@ -741,14 +730,14 @@
ShouldUseFixedPositionCompositing(device_scale_factor_));
webview()->settings()->setAcceleratedCompositingForOverflowScrollEnabled(
ShouldUseAcceleratedCompositingForOverflowScroll(device_scale_factor_));
- webview()->settings()->setCompositorDrivenAcceleratedScrollingEnabled(
- ShouldUseUniversalAcceleratedCompositingForOverflowScroll());
webview()->settings()->setAcceleratedCompositingForTransitionEnabled(
ShouldUseTransitionCompositing(device_scale_factor_));
webview()->settings()->setAcceleratedCompositingForFixedRootBackgroundEnabled(
ShouldUseAcceleratedFixedRootBackground(device_scale_factor_));
webview()->settings()->setCompositedScrollingForFramesEnabled(
ShouldUseCompositedScrollingForFrames(device_scale_factor_));
+ webview()->settings()->setUseExpandedHeuristicsForGpuRasterization(
+ ShouldUseExpandedHeuristicsForGpuRasterization());
ApplyWebPreferences(webkit_preferences_, webview());
@@ -884,6 +873,11 @@
return RenderViewImpl::FromRoutingID(routing_id);
}
+/* static */
+size_t RenderViewImpl::GetRenderViewCount() {
+ return g_view_map.Get().size();
+}
+
/*static*/
void RenderView::ForEach(RenderViewVisitor* visitor) {
ViewMap* views = g_view_map.Pointer();
@@ -983,7 +977,7 @@
else if (focused_pepper_plugin_ == instance)
focused_pepper_plugin_ = NULL;
- UpdateTextInputType();
+ UpdateTextInputState(NO_SHOW_IME, FROM_NON_IME);
UpdateSelectionBounds();
}
@@ -1062,7 +1056,6 @@
OnScrollFocusedEditableNodeIntoRect)
IPC_MESSAGE_HANDLER(InputMsg_SetEditCommandsForNextKeyEvent,
OnSetEditCommandsForNextKeyEvent)
- IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate)
IPC_MESSAGE_HANDLER(ViewMsg_Stop, OnStop)
IPC_MESSAGE_HANDLER(ViewMsg_CopyImageAt, OnCopyImageAt)
IPC_MESSAGE_HANDLER(ViewMsg_SaveImageAt, OnSaveImageAt)
@@ -1071,6 +1064,8 @@
IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom)
IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForLoadingURL,
OnSetZoomLevelForLoadingURL)
+ IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForView,
+ OnSetZoomLevelForView)
IPC_MESSAGE_HANDLER(ViewMsg_SetPageEncoding, OnSetPageEncoding)
IPC_MESSAGE_HANDLER(ViewMsg_ResetPageEncodingToDefault,
OnResetPageEncodingToDefault)
@@ -1158,10 +1153,6 @@
handling_input_event_ = false;
}
-void RenderViewImpl::OnNavigate(const FrameMsg_Navigate_Params& params) {
- FOR_EACH_OBSERVER(RenderViewObserver, observers_, Navigate(params.url));
-}
-
bool RenderViewImpl::IsBackForwardToStaleEntry(
const FrameMsg_Navigate_Params& params,
bool is_reload) {
@@ -2129,23 +2120,6 @@
webview()->setPageScaleFactorLimits(1, maxPageScaleFactor);
}
-void RenderViewImpl::FrameDidCommitProvisionalLoad(WebLocalFrame* frame,
- bool is_new_navigation) {
- FOR_EACH_OBSERVER(RenderViewObserver, observers_,
- DidCommitProvisionalLoad(frame, is_new_navigation));
-
- // TODO(nasko): Transition this code to RenderFrameImpl, since g_view_map is
- // not accessible from there.
- if (!frame->parent()) { // Only for top frames.
- RenderThreadImpl* render_thread_impl = RenderThreadImpl::current();
- if (render_thread_impl) { // Can be NULL in tests.
- render_thread_impl->histogram_customizer()->
- RenderViewNavigatedToHost(GURL(GetLoadingUrl(frame)).host(),
- g_view_map.Get().size());
- }
- }
-}
-
void RenderViewImpl::didClearWindowObject(WebLocalFrame* frame) {
FOR_EACH_OBSERVER(
RenderViewObserver, observers_, DidClearWindowObject(frame));
@@ -2218,22 +2192,6 @@
}
void RenderViewImpl::UpdateScrollState(WebFrame* frame) {
- WebSize offset = frame->scrollOffset();
- WebSize minimum_offset = frame->minimumScrollOffset();
- WebSize maximum_offset = frame->maximumScrollOffset();
-
- bool is_pinned_to_left = offset.width <= minimum_offset.width;
- bool is_pinned_to_right = offset.width >= maximum_offset.width;
-
- if (is_pinned_to_left != cached_is_main_frame_pinned_to_left_ ||
- is_pinned_to_right != cached_is_main_frame_pinned_to_right_) {
- Send(new ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame(
- routing_id_, is_pinned_to_left, is_pinned_to_right));
-
- cached_is_main_frame_pinned_to_left_ = is_pinned_to_left;
- cached_is_main_frame_pinned_to_right_ = is_pinned_to_right;
- }
-
Send(new ViewHostMsg_DidChangeScrollOffset(routing_id_));
}
@@ -2363,10 +2321,6 @@
return send_content_state_immediately_;
}
-float RenderViewImpl::GetFilteredTimePerFrame() const {
- return 0.0f;
-}
-
blink::WebPageVisibilityState RenderViewImpl::GetVisibilityState() const {
return visibilityState();
}
@@ -2385,15 +2339,6 @@
SendUpdateState(history_controller_->GetCurrentEntry());
}
-GURL RenderViewImpl::GetLoadingUrl(blink::WebFrame* frame) const {
- WebDataSource* ds = frame->dataSource();
- if (ds->hasUnreachableURL())
- return ds->unreachableURL();
-
- const WebURLRequest& request = ds->request();
- return request.url();
-}
-
blink::WebPlugin* RenderViewImpl::GetWebPluginForFind() {
if (!webview())
return NULL;
@@ -2654,6 +2599,14 @@
#endif
}
+void RenderViewImpl::OnSetZoomLevelForView(bool uses_temporary_zoom_level,
+ double level) {
+ uses_temporary_zoom_level_ = uses_temporary_zoom_level;
+
+ webview()->hidePopups();
+ webview()->setZoomLevel(level);
+}
+
void RenderViewImpl::OnSetPageEncoding(const std::string& encoding_name) {
webview()->setPageEncoding(WebString::fromUTF8(encoding_name));
}
@@ -3348,10 +3301,6 @@
return GURL("chrome://gpu/RenderViewImpl::CreateGraphicsContext3D");
}
-bool RenderViewImpl::ForceCompositingModeEnabled() {
- return webkit_preferences_.force_compositing_mode;
-}
-
void RenderViewImpl::OnSetFocus(bool enable) {
RenderWidget::OnSetFocus(enable);
@@ -3487,6 +3436,16 @@
browser_plugin_manager_->UpdateDeviceScaleFactor(device_scale_factor_);
}
+bool RenderViewImpl::SetDeviceColorProfile(
+ const std::vector<char>& profile) {
+ bool changed = RenderWidget::SetDeviceColorProfile(profile);
+ if (changed && webview()) {
+ // TODO(noel): notify the webview() of the color profile change so it
+ // can update and repaint all color profiled page elements.
+ }
+ return changed;
+}
+
ui::TextInputType RenderViewImpl::GetTextInputType() {
#if defined(ENABLE_PLUGINS)
if (focused_pepper_plugin_)
@@ -3707,12 +3666,6 @@
return current_state;
}
-blink::WebMIDIClient* RenderViewImpl::webMIDIClient() {
- if (!midi_dispatcher_)
- midi_dispatcher_ = new MidiDispatcher(this);
- return midi_dispatcher_;
-}
-
blink::WebPushClient* RenderViewImpl::webPushClient() {
if (!push_messaging_dispatcher_)
push_messaging_dispatcher_ = new PushMessagingDispatcher(this);
@@ -3990,7 +3943,7 @@
void RenderViewImpl::SetDeviceColorProfileForTesting(
const std::vector<char>& color_profile) {
- // TODO(noel): Add RenderViewImpl::SetDeviceColorProfile(color_profile).
+ SetDeviceColorProfile(color_profile);
}
void RenderViewImpl::ForceResizeForTesting(const gfx::Size& new_size) {
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index bf4fe29..324c4c7 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -133,7 +133,6 @@
class HistoryController;
class HistoryEntry;
class ImageResourceFetcher;
-class MidiDispatcher;
class MediaStreamDispatcher;
class MouseLockDispatcher;
class NavigationState;
@@ -201,6 +200,8 @@
// Returns the RenderViewImpl for the given routing ID.
static RenderViewImpl* FromRoutingID(int routing_id);
+ static size_t GetRenderViewCount();
+
// May return NULL when the view is closing.
blink::WebView* webview() const;
@@ -275,9 +276,6 @@
void FrameDidStartLoading(blink::WebFrame* frame);
void FrameDidStopLoading(blink::WebFrame* frame);
- void FrameDidCommitProvisionalLoad(blink::WebLocalFrame* frame,
- bool is_new_navigation);
-
// Plugin-related functions --------------------------------------------------
#if defined(ENABLE_PLUGINS)
@@ -458,7 +456,6 @@
const blink::WebURL& url,
const blink::WebString& title);
virtual blink::WebPageVisibilityState visibilityState() const;
- virtual blink::WebMIDIClient* webMIDIClient();
virtual blink::WebPushClient* webPushClient();
virtual void draggableRegionsChanged();
@@ -497,7 +494,6 @@
virtual bool ShouldDisplayScrollbars(int width, int height) const OVERRIDE;
virtual int GetEnabledBindings() const OVERRIDE;
virtual bool GetContentStateImmediately() const OVERRIDE;
- virtual float GetFilteredTimePerFrame() const OVERRIDE;
virtual blink::WebPageVisibilityState GetVisibilityState() const OVERRIDE;
virtual void DidStartLoading() OVERRIDE;
virtual void DidStopLoading() OVERRIDE;
@@ -512,6 +508,7 @@
TopControlsState current,
bool animate) OVERRIDE;
#endif
+ bool uses_temporary_zoom_level() const { return uses_temporary_zoom_level_; }
// Please do not add your stuff randomly to the end here. If there is an
// appropriate section, add it there. If not, there are some random functions
@@ -542,7 +539,6 @@
virtual void OnWasHidden() OVERRIDE;
virtual void OnWasShown(bool needs_repainting) OVERRIDE;
virtual GURL GetURLForGraphicsContext3D() OVERRIDE;
- virtual bool ForceCompositingModeEnabled() OVERRIDE;
virtual void OnImeSetComposition(
const base::string16& text,
const std::vector<blink::WebCompositionUnderline>& underlines,
@@ -552,6 +548,8 @@
const gfx::Range& replacement_range,
bool keep_selection) OVERRIDE;
virtual void SetDeviceScaleFactor(float device_scale_factor) OVERRIDE;
+ virtual bool SetDeviceColorProfile(
+ const std::vector<char>& color_profile) OVERRIDE;
virtual void OnOrientationChange() OVERRIDE;
virtual ui::TextInputType GetTextInputType() OVERRIDE;
virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end) OVERRIDE;
@@ -743,6 +741,7 @@
void OnSetRendererPrefs(const RendererPreferences& renderer_prefs);
void OnSetWebUIProperty(const std::string& name, const std::string& value);
void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level);
+ void OnSetZoomLevelForView(bool uses_temporary_zoom_level, double level);
void OnStop();
void OnStopFinding(StopFindAction action);
void OnSuppressDialogsUntilSwapOut();
@@ -796,9 +795,6 @@
// doesn't have a frame at the specified size, the first is returned.
bool DownloadFavicon(int id, const GURL& image_url, int image_size);
- // Returns the URL being loaded by the given frame's request.
- GURL GetLoadingUrl(blink::WebFrame* frame) const;
-
// Called to get the WebPlugin to handle find requests in the document.
// Returns NULL if there is no such WebPlugin.
blink::WebPlugin* GetWebPluginForFind();
@@ -808,10 +804,6 @@
bool IsBackForwardToStaleEntry(const FrameMsg_Navigate_Params& params,
bool is_reload);
- // TODO(nasko): Remove this method when code is migrated to use
- // RenderFrameObserver.
- void OnNavigate(const FrameMsg_Navigate_Params& params);
-
// Make the given |frame| show an empty, unscriptable page.
// TODO(creis): Move this to RenderFrame.
void NavigateToSwappedOutURL(blink::WebFrame* frame);
@@ -1018,6 +1010,9 @@
// The next target URL we want to send to the browser.
GURL pending_target_url_;
+ // Indicates whether this view overrides url-based zoom settings.
+ bool uses_temporary_zoom_level_;
+
#if defined(OS_ANDROID)
// Cache the old top controls state constraints. Used when updating
// current value only without altering the constraints.
@@ -1034,11 +1029,6 @@
// states for the sizes).
base::OneShotTimer<RenderViewImpl> check_preferred_size_timer_;
- // These store the "is main frame is scrolled all the way to the left
- // or right" state that was last sent to the browser.
- bool cached_is_main_frame_pinned_to_left_;
- bool cached_is_main_frame_pinned_to_right_;
-
// Bookkeeping to suppress redundant scroll and focus requests for an already
// scrolled and focused editable node.
bool has_scrolled_focused_editable_node_into_rect_;
@@ -1065,9 +1055,6 @@
// BrowserPluginManager attached to this view; lazily initialized.
scoped_refptr<BrowserPluginManager> browser_plugin_manager_;
- // MidiClient attached to this view; lazily initialized.
- MidiDispatcher* midi_dispatcher_;
-
DevToolsAgent* devtools_agent_;
// The current accessibility mode.
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index dc47979..dd278d6 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -396,10 +396,6 @@
outstanding_ime_acks_(0),
body_background_color_(SK_ColorWHITE),
#endif
-#if defined(OS_MACOSX)
- cached_has_main_frame_horizontal_scrollbar_(false),
- cached_has_main_frame_vertical_scrollbar_(false),
-#endif
popup_origin_scale_for_emulation_(0.f),
resizing_mode_selector_(new ResizingModeSelector()),
context_menu_source_type_(ui::MENU_SOURCE_MOUSE) {
@@ -489,8 +485,6 @@
init_complete_ = true;
- if (webwidget_)
- webwidget_->enterForceCompositingMode(true);
if (compositor_)
StartCompositor();
@@ -810,10 +804,6 @@
return GURL();
}
-bool RenderWidget::ForceCompositingModeEnabled() {
- return false;
-}
-
scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(bool fallback) {
// For widgets that are never visible, we don't start the compositor, so we
// never get a request for a cc::OutputSurface.
@@ -1201,10 +1191,7 @@
// The following two can result in further layout and possibly
// enable GPU acceleration so they need to be called before any painting
// is done.
- UpdateTextInputType();
-#if defined(OS_ANDROID)
UpdateTextInputState(NO_SHOW_IME, FROM_NON_IME);
-#endif
UpdateSelectionBounds();
}
@@ -1232,12 +1219,9 @@
}
void RenderWidget::didCommitAndDrawCompositorFrame() {
+ // NOTE: Tests may break if this event is renamed or moved. See
+ // tab_capture_performancetest.cc.
TRACE_EVENT0("gpu", "RenderWidget::didCommitAndDrawCompositorFrame");
- // Accelerated FPS tick for performance tests. See
- // tab_capture_performancetest.cc. NOTE: Tests may break if this event is
- // renamed or moved.
- UNSHIPPED_TRACE_EVENT_INSTANT0("test_fps", "TestFrameTickGPU",
- TRACE_EVENT_SCOPE_THREAD);
// Notify subclasses that we initiated the paint operation.
DidInitiatePaint();
}
@@ -1567,6 +1551,15 @@
scheduleComposite();
}
+bool RenderWidget::SetDeviceColorProfile(
+ const std::vector<char>& color_profile) {
+ if (device_color_profile_ == color_profile)
+ return false;
+
+ device_color_profile_ = color_profile;
+ return true;
+}
+
void RenderWidget::OnOrientationChange() {
}
@@ -1648,43 +1641,6 @@
#endif
}
-void RenderWidget::UpdateTextInputType() {
- // On Windows, not only an IME but also an on-screen keyboard relies on the
- // latest TextInputType to optimize its layout and functionality. Thus
- // |input_method_is_active_| is no longer an appropriate condition to suppress
- // TextInputTypeChanged IPC on Windows.
- // TODO(yukawa, yoichio): Consider to stop checking |input_method_is_active_|
- // on other platforms as well as Windows if the overhead is acceptable.
-#if !defined(OS_WIN)
- if (!input_method_is_active_)
- return;
-#endif
-
- ui::TextInputType new_type = GetTextInputType();
- if (IsDateTimeInput(new_type))
- return; // Not considered as a text input field in WebKit/Chromium.
-
- bool new_can_compose_inline = CanComposeInline();
-
- blink::WebTextInputInfo new_info;
- if (webwidget_)
- new_info = webwidget_->textInputInfo();
- const ui::TextInputMode new_mode = ConvertInputMode(new_info.inputMode);
-
- if (text_input_type_ != new_type
- || can_compose_inline_ != new_can_compose_inline
- || text_input_mode_ != new_mode) {
- Send(new ViewHostMsg_TextInputTypeChanged(routing_id(),
- new_type,
- new_mode,
- new_can_compose_inline));
- text_input_type_ = new_type;
- can_compose_inline_ = new_can_compose_inline;
- text_input_mode_ = new_mode;
- }
-}
-
-#if defined(OS_ANDROID) || defined(USE_AURA)
void RenderWidget::UpdateTextInputState(ShowIme show_ime,
ChangeSource change_source) {
if (handling_ime_event_)
@@ -1698,6 +1654,7 @@
blink::WebTextInputInfo new_info;
if (webwidget_)
new_info = webwidget_->textInputInfo();
+ const ui::TextInputMode new_mode = ConvertInputMode(new_info.inputMode);
bool new_can_compose_inline = CanComposeInline();
@@ -1705,6 +1662,7 @@
// shown.
if (show_ime == SHOW_IME_IF_NEEDED ||
(text_input_type_ != new_type ||
+ text_input_mode_ != new_mode ||
text_input_info_ != new_info ||
can_compose_inline_ != new_can_compose_inline)
#if defined(OS_ANDROID)
@@ -1713,6 +1671,7 @@
) {
ViewHostMsg_TextInputState_Params p;
p.type = new_type;
+ p.mode = new_mode;
p.value = new_info.value.utf8();
p.selection_start = new_info.selectionStart;
p.selection_end = new_info.selectionEnd;
@@ -1730,20 +1689,14 @@
IncrementOutstandingImeEventAcks();
text_field_is_dirty_ = false;
#endif
-#if defined(USE_AURA)
- Send(new ViewHostMsg_TextInputTypeChanged(routing_id(),
- new_type,
- text_input_mode_,
- new_can_compose_inline));
-#endif
Send(new ViewHostMsg_TextInputStateChanged(routing_id(), p));
text_input_info_ = new_info;
text_input_type_ = new_type;
+ text_input_mode_ = new_mode;
can_compose_inline_ = new_can_compose_inline;
}
}
-#endif
void RenderWidget::GetSelectionBounds(gfx::Rect* focus, gfx::Rect* anchor) {
WebRect focus_webrect;
@@ -1895,21 +1848,6 @@
return true;
}
-#if defined(OS_MACOSX)
-void RenderWidget::DidChangeScrollbarsForMainFrame(
- bool has_horizontal_scrollbar,
- bool has_vertical_scrollbar) {
- if (has_horizontal_scrollbar != cached_has_main_frame_horizontal_scrollbar_ ||
- has_vertical_scrollbar != cached_has_main_frame_vertical_scrollbar_) {
- Send(new ViewHostMsg_DidChangeScrollbarsForMainFrame(
- routing_id_, has_horizontal_scrollbar, has_vertical_scrollbar));
-
- cached_has_main_frame_horizontal_scrollbar_ = has_horizontal_scrollbar;
- cached_has_main_frame_vertical_scrollbar_ = has_vertical_scrollbar;
- }
-}
-#endif // defined(OS_MACOSX)
-
WebScreenInfo RenderWidget::screenInfo() {
return screen_info_;
}
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index 91d18f2..fb6c362 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -235,10 +235,6 @@
void OnSwapBuffersComplete();
void OnSwapBuffersAborted();
- // Checks if the text input state and compose inline mode have been changed.
- // If they are changed, the new value will be sent to the browser process.
- void UpdateTextInputType();
-
// Checks if the selection bounds have been changed. If they are changed,
// the new value will be sent to the browser process.
void UpdateSelectionBounds();
@@ -247,7 +243,6 @@
void OnShowHostContextMenu(ContextMenuParams* params);
-#if defined(OS_ANDROID) || defined(USE_AURA)
enum ShowIme {
SHOW_IME_IF_NEEDED,
NO_SHOW_IME,
@@ -265,7 +260,6 @@
// IME events. This is when the text change did not originate from the IME in
// the browser side, such as changes by JavaScript or autofill.
void UpdateTextInputState(ShowIme show_ime, ChangeSource change_source);
-#endif
#if defined(OS_MACOSX) || defined(USE_AURA)
// Checks if the composition range or composition character bounds have been
@@ -274,11 +268,6 @@
void UpdateCompositionInfo(bool should_update_range);
#endif
-#if defined(OS_MACOSX)
- void DidChangeScrollbarsForMainFrame(bool has_horizontal_scrollbar,
- bool has_vertical_scrollbar);
-#endif // defined(OS_MACOSX)
-
#if defined(OS_ANDROID)
void DidChangeBodyBackgroundColor(SkColor bg_color);
#endif
@@ -398,6 +387,7 @@
void AutoResizeCompositor();
virtual void SetDeviceScaleFactor(float device_scale_factor);
+ virtual bool SetDeviceColorProfile(const std::vector<char>& color_profile);
virtual void OnOrientationChange();
@@ -412,8 +402,6 @@
virtual GURL GetURLForGraphicsContext3D();
- virtual bool ForceCompositingModeEnabled();
-
// Gets the scroll offset of this widget, if this widget has a notion of
// scroll offset.
virtual gfx::Vector2d GetScrollOffset();
@@ -662,6 +650,9 @@
// |screen_info_| on some platforms, and defaults to 1 on other platforms.
float device_scale_factor_;
+ // The device color profile on supported platforms.
+ std::vector<char> device_color_profile_;
+
// State associated with synthetic gestures. Synthetic gestures are processed
// in-order, so a queue is sufficient to identify the correct state for a
// completed gesture.
@@ -691,12 +682,6 @@
SkColor body_background_color_;
#endif
-#if defined(OS_MACOSX)
- // These store the "has scrollbars" state last sent to the browser.
- bool cached_has_main_frame_horizontal_scrollbar_;
- bool cached_has_main_frame_vertical_scrollbar_;
-#endif // defined(OS_MACOSX)
-
scoped_ptr<ScreenMetricsEmulator> screen_metrics_emulator_;
// Popups may be displaced when screen metrics emulation is enabled.
diff --git a/content/renderer/renderer_main_platform_delegate_mac.mm b/content/renderer/renderer_main_platform_delegate_mac.mm
index 9b92532..98b0aa4 100644
--- a/content/renderer/renderer_main_platform_delegate_mac.mm
+++ b/content/renderer/renderer_main_platform_delegate_mac.mm
@@ -10,6 +10,7 @@
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/sys_string_conversions.h"
@@ -116,6 +117,13 @@
// running a renderer needs to also be reflected in chrome_main.cc for
// --single-process support.
void RendererMainPlatformDelegate::PlatformInitialize() {
+ if (base::mac::IsOSYosemiteOrLater()) {
+ // This is needed by the NSAnimations run for the scrollbars. If we switch
+ // from native scrollers to drawing them in some other way, this warmup can
+ // be removed <http://crbug.com/306348>.
+ [NSScreen screens];
+ }
+
if (![NSThread isMultiThreaded]) {
NSString* string = @"";
[NSThread detachNewThreadSelector:@selector(length)
diff --git a/content/renderer/renderer_webapplicationcachehost_impl.cc b/content/renderer/renderer_webapplicationcachehost_impl.cc
index 8aeee8a..5b781d4 100644
--- a/content/renderer/renderer_webapplicationcachehost_impl.cc
+++ b/content/renderer/renderer_webapplicationcachehost_impl.cc
@@ -25,7 +25,7 @@
}
void RendererWebApplicationCacheHostImpl::OnLogMessage(
- appcache::LogLevel log_level, const std::string& message) {
+ appcache::AppCacheLogLevel log_level, const std::string& message) {
if (RenderThreadImpl::current()->layout_test_mode())
return;
diff --git a/content/renderer/renderer_webapplicationcachehost_impl.h b/content/renderer/renderer_webapplicationcachehost_impl.h
index 16fd17c..e7b2bc8 100644
--- a/content/renderer/renderer_webapplicationcachehost_impl.h
+++ b/content/renderer/renderer_webapplicationcachehost_impl.h
@@ -18,7 +18,7 @@
appcache::AppCacheBackend* backend);
// WebApplicationCacheHostImpl:
- virtual void OnLogMessage(appcache::LogLevel log_level,
+ virtual void OnLogMessage(appcache::AppCacheLogLevel log_level,
const std::string& message) OVERRIDE;
virtual void OnContentBlocked(const GURL& manifest_url) OVERRIDE;
virtual void OnCacheSelected(const appcache::AppCacheInfo& info) OVERRIDE;
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc
index cd8628f..fd13072 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/lazy_instance.h"
+#include "base/logging.h"
#include "base/memory/shared_memory.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/metrics/histogram.h"
@@ -32,7 +33,6 @@
#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
#include "content/common/gpu/gpu_process_launch_causes.h"
#include "content/common/mime_registry_messages.h"
-#include "content/common/screen_orientation_messages.h"
#include "content/common/view_messages.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/webplugininfo.h"
@@ -52,7 +52,6 @@
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/renderer_clipboard_client.h"
#include "content/renderer/screen_orientation/mock_screen_orientation_controller.h"
-#include "content/renderer/screen_orientation/screen_orientation_dispatcher.h"
#include "content/renderer/webclipboard_impl.h"
#include "content/renderer/webgraphicscontext3d_provider_impl.h"
#include "content/renderer/webpublicsuffixlist_impl.h"
@@ -72,7 +71,6 @@
#include "third_party/WebKit/public/platform/WebMediaStreamCenter.h"
#include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h"
#include "third_party/WebKit/public/platform/WebPluginListBuilder.h"
-#include "third_party/WebKit/public/platform/WebScreenOrientationListener.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/platform/WebVector.h"
#include "ui/gfx/color_profile.h"
@@ -100,7 +98,7 @@
#include "base/synchronization/lock.h"
#include "content/common/child_process_sandbox_support_impl_linux.h"
-#include "third_party/WebKit/public/platform/linux/WebFontFamily.h"
+#include "third_party/WebKit/public/platform/linux/WebFallbackFont.h"
#include "third_party/WebKit/public/platform/linux/WebSandboxSupport.h"
#include "third_party/icu/source/common/unicode/utf16.h"
#endif
@@ -207,10 +205,10 @@
CGFontRef* container,
uint32* font_id);
#elif defined(OS_POSIX)
- virtual void getFontFamilyForCharacter(
+ virtual void getFallbackFontForCharacter(
blink::WebUChar32 character,
const char* preferred_locale,
- blink::WebFontFamily* family);
+ blink::WebFallbackFont* fallbackFont);
virtual void getRenderStyleForStrike(
const char* family, int sizeAndStyle, blink::WebFontRenderStyle* out);
@@ -219,7 +217,7 @@
// unicode code points. It needs this information frequently so we cache it
// here.
base::Lock unicode_font_families_mutex_;
- std::map<int32_t, blink::WebFontFamily> unicode_font_families_;
+ std::map<int32_t, blink::WebFallbackFont> unicode_font_families_;
#endif
};
#endif // defined(OS_ANDROID)
@@ -428,8 +426,7 @@
std::string key_system_ascii =
GetUnprefixedKeySystemName(base::UTF16ToASCII(key_system));
std::vector<std::string> strict_codecs;
- bool strip_suffix = !net::IsStrictMediaMimeType(mime_type_ascii);
- net::ParseCodecString(ToASCIIOrEmpty(codecs), &strict_codecs, strip_suffix);
+ net::ParseCodecString(ToASCIIOrEmpty(codecs), &strict_codecs, true);
if (!IsSupportedKeySystemWithMediaMimeType(
mime_type_ascii, strict_codecs, key_system_ascii)) {
@@ -444,14 +441,8 @@
// Check if the codecs are a perfect match.
std::vector<std::string> strict_codecs;
net::ParseCodecString(ToASCIIOrEmpty(codecs), &strict_codecs, false);
- if (net::IsSupportedStrictMediaMimeType(mime_type_ascii, strict_codecs))
- return IsSupported;
-
- // We support the container, but no codecs were specified.
- if (codecs.isNull())
- return MayBeSupported;
-
- return IsNotSupported;
+ return static_cast<WebMimeRegistry::SupportsType> (
+ net::IsSupportedStrictMediaMimeType(mime_type_ascii, strict_codecs));
}
// If we don't recognize the codec, it's possible we support it.
@@ -608,22 +599,24 @@
#elif defined(OS_POSIX)
void
-RendererWebKitPlatformSupportImpl::SandboxSupport::getFontFamilyForCharacter(
+RendererWebKitPlatformSupportImpl::SandboxSupport::getFallbackFontForCharacter(
blink::WebUChar32 character,
const char* preferred_locale,
- blink::WebFontFamily* family) {
+ blink::WebFallbackFont* fallbackFont) {
base::AutoLock lock(unicode_font_families_mutex_);
- const std::map<int32_t, blink::WebFontFamily>::const_iterator iter =
+ const std::map<int32_t, blink::WebFallbackFont>::const_iterator iter =
unicode_font_families_.find(character);
if (iter != unicode_font_families_.end()) {
- family->name = iter->second.name;
- family->isBold = iter->second.isBold;
- family->isItalic = iter->second.isItalic;
+ fallbackFont->name = iter->second.name;
+ fallbackFont->filename = iter->second.filename;
+ fallbackFont->ttcIndex = iter->second.ttcIndex;
+ fallbackFont->isBold = iter->second.isBold;
+ fallbackFont->isItalic = iter->second.isItalic;
return;
}
- GetFontFamilyForCharacter(character, preferred_locale, family);
- unicode_font_families_.insert(std::make_pair(character, *family));
+ GetFallbackFontForCharacter(character, preferred_locale, fallbackFont);
+ unicode_font_families_.insert(std::make_pair(character, *fallbackFont));
}
void
@@ -1083,7 +1076,8 @@
// static
void RendererWebKitPlatformSupportImpl::ResetMockScreenOrientationForTesting()
{
- g_test_screen_orientation_controller.Get().ResetData();
+ if (!(g_test_screen_orientation_controller == 0))
+ g_test_screen_orientation_controller.Get().ResetData();
}
//------------------------------------------------------------------------------
@@ -1126,60 +1120,12 @@
//------------------------------------------------------------------------------
-void RendererWebKitPlatformSupportImpl::EnsureScreenOrientationDispatcher() {
- if (screen_orientation_dispatcher_)
- return;
-
- screen_orientation_dispatcher_.reset(new ScreenOrientationDispatcher());
-}
-
-void RendererWebKitPlatformSupportImpl::setScreenOrientationListener(
- blink::WebScreenOrientationListener* listener) {
- if (RenderThreadImpl::current() &&
- RenderThreadImpl::current()->layout_test_mode()) {
- // If we are in test mode, we want to fully disable the screen orientation
- // backend in order to let Blink get tested properly, That means that screen
- // orientation updates have to be done manually instead of from signals sent
- // by the browser process.
- g_test_screen_orientation_controller.Get().SetListener(listener);
- return;
- }
-
-
- EnsureScreenOrientationDispatcher();
- screen_orientation_dispatcher_->setListener(listener);
-}
-
-void RendererWebKitPlatformSupportImpl::lockOrientation(
- blink::WebScreenOrientationLockType orientation,
- blink::WebLockOrientationCallback* callback) {
- if (RenderThreadImpl::current() &&
- RenderThreadImpl::current()->layout_test_mode()) {
- g_test_screen_orientation_controller.Get().UpdateLock(orientation);
- return;
- }
-
- EnsureScreenOrientationDispatcher();
- screen_orientation_dispatcher_->LockOrientation(
- orientation, scoped_ptr<blink::WebLockOrientationCallback>(callback));
-}
-
-void RendererWebKitPlatformSupportImpl::unlockOrientation() {
- if (RenderThreadImpl::current() &&
- RenderThreadImpl::current()->layout_test_mode()) {
- g_test_screen_orientation_controller.Get().ResetLock();
- return;
- }
-
- EnsureScreenOrientationDispatcher();
- screen_orientation_dispatcher_->UnlockOrientation();
-}
-
// static
void RendererWebKitPlatformSupportImpl::SetMockScreenOrientationForTesting(
+ RenderView* render_view,
blink::WebScreenOrientationType orientation) {
g_test_screen_orientation_controller.Get()
- .UpdateDeviceOrientation(orientation);
+ .UpdateDeviceOrientation(render_view, orientation);
}
//------------------------------------------------------------------------------
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.h b/content/renderer/renderer_webkitplatformsupport_impl.h
index 0dfb4dc..ee0ccb1 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.h
+++ b/content/renderer/renderer_webkitplatformsupport_impl.h
@@ -9,11 +9,11 @@
#include "base/memory/scoped_ptr.h"
#include "content/child/blink_platform_impl.h"
#include "content/common/content_export.h"
+#include "content/renderer/compositor_bindings/web_compositor_support_impl.h"
#include "content/renderer/webpublicsuffixlist_impl.h"
#include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
#include "third_party/WebKit/public/platform/WebIDBFactory.h"
#include "third_party/WebKit/public/platform/WebScreenOrientationType.h"
-#include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h"
namespace base {
class MessageLoopProxy;
@@ -32,7 +32,6 @@
class WebDeviceMotionData;
class WebDeviceOrientationData;
class WebGraphicsContext3DProvider;
-class WebScreenOrientationListener;
}
namespace content {
@@ -41,7 +40,7 @@
class DeviceOrientationEventPump;
class QuotaMessageFilter;
class RendererClipboardClient;
-class ScreenOrientationDispatcher;
+class RenderView;
class ThreadSafeSender;
class WebClipboardImpl;
class WebDatabaseObserverImpl;
@@ -146,11 +145,6 @@
blink::WebStorageQuotaCallbacks);
virtual void vibrate(unsigned int milliseconds);
virtual void cancelVibration();
- virtual void setScreenOrientationListener(
- blink::WebScreenOrientationListener*);
- virtual void lockOrientation(blink::WebScreenOrientationLockType,
- blink::WebLockOrientationCallback*);
- virtual void unlockOrientation();
virtual void setBatteryStatusListener(
blink::WebBatteryStatusListener* listener);
@@ -183,6 +177,7 @@
const blink::WebDeviceOrientationData& data);
// Forces the screen orientation for testing purposes.
static void SetMockScreenOrientationForTesting(
+ RenderView* render_view,
blink::WebScreenOrientationType);
// Resets the mock screen orientation data used for testing.
static void ResetMockScreenOrientationForTesting();
@@ -197,7 +192,6 @@
private:
bool CheckPreparsedJsCachingEnabled() const;
- void EnsureScreenOrientationDispatcher();
scoped_ptr<RendererClipboardClient> clipboard_client_;
scoped_ptr<WebClipboardImpl> clipboard_;
@@ -236,9 +230,7 @@
scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_;
- webkit::WebCompositorSupportImpl compositor_support_;
-
- scoped_ptr<ScreenOrientationDispatcher> screen_orientation_dispatcher_;
+ WebCompositorSupportImpl compositor_support_;
scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_;
diff --git a/content/renderer/resource_fetcher_browsertest.cc b/content/renderer/resource_fetcher_browsertest.cc
index 4769183..2919f58 100644
--- a/content/renderer/resource_fetcher_browsertest.cc
+++ b/content/renderer/resource_fetcher_browsertest.cc
@@ -288,7 +288,7 @@
// If this flakes, use http://crbug.com/51622.
IN_PROC_BROWSER_TEST_F(ResourceFetcherTests, MAYBE_ResourceFetcherDownload) {
// Need to spin up the renderer.
- NavigateToURL(shell(), GURL(kAboutBlankURL));
+ NavigateToURL(shell(), GURL(url::kAboutBlankURL));
ASSERT_TRUE(test_server()->Start());
GURL url(test_server()->GetURL("files/simple_page.html"));
@@ -300,7 +300,7 @@
IN_PROC_BROWSER_TEST_F(ResourceFetcherTests, MAYBE_ResourceFetcher404) {
// Need to spin up the renderer.
- NavigateToURL(shell(), GURL(kAboutBlankURL));
+ NavigateToURL(shell(), GURL(url::kAboutBlankURL));
// Test 404 response.
ASSERT_TRUE(test_server()->Start());
@@ -314,7 +314,7 @@
// If this flakes, use http://crbug.com/51622.
IN_PROC_BROWSER_TEST_F(ResourceFetcherTests, ResourceFetcherDidFail) {
// Need to spin up the renderer.
- NavigateToURL(shell(), GURL(kAboutBlankURL));
+ NavigateToURL(shell(), GURL(url::kAboutBlankURL));
PostTaskToInProcessRendererAndWait(
base::Bind(&ResourceFetcherTests::ResourceFetcherDidFailOnRenderer,
@@ -323,7 +323,7 @@
IN_PROC_BROWSER_TEST_F(ResourceFetcherTests, MAYBE_ResourceFetcherTimeout) {
// Need to spin up the renderer.
- NavigateToURL(shell(), GURL(kAboutBlankURL));
+ NavigateToURL(shell(), GURL(url::kAboutBlankURL));
// Grab a page that takes at least 1 sec to respond, but set the fetcher to
// timeout in 0 sec.
@@ -338,7 +338,7 @@
IN_PROC_BROWSER_TEST_F(ResourceFetcherTests,
MAYBE_ResourceFetcherDeletedInCallback) {
// Need to spin up the renderer.
- NavigateToURL(shell(), GURL(kAboutBlankURL));
+ NavigateToURL(shell(), GURL(url::kAboutBlankURL));
// Grab a page that takes at least 1 sec to respond, but set the fetcher to
// timeout in 0 sec.
@@ -356,7 +356,7 @@
// Test that ResourceFetchers can handle POSTs.
IN_PROC_BROWSER_TEST_F(ResourceFetcherTests, MAYBE_ResourceFetcherPost) {
// Need to spin up the renderer.
- NavigateToURL(shell(), GURL(kAboutBlankURL));
+ NavigateToURL(shell(), GURL(url::kAboutBlankURL));
// Grab a page that echos the POST body.
ASSERT_TRUE(test_server()->Start());
@@ -371,7 +371,7 @@
// Test that ResourceFetchers can set headers.
IN_PROC_BROWSER_TEST_F(ResourceFetcherTests, MAYBE_ResourceFetcherSetHeader) {
// Need to spin up the renderer.
- NavigateToURL(shell(), GURL(kAboutBlankURL));
+ NavigateToURL(shell(), GURL(url::kAboutBlankURL));
// Grab a page that echos the POST body.
ASSERT_TRUE(test_server()->Start());
diff --git a/content/renderer/screen_orientation/mock_screen_orientation_controller.cc b/content/renderer/screen_orientation/mock_screen_orientation_controller.cc
index bbff907..7f9dd89 100644
--- a/content/renderer/screen_orientation/mock_screen_orientation_controller.cc
+++ b/content/renderer/screen_orientation/mock_screen_orientation_controller.cc
@@ -7,15 +7,15 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
-#include "third_party/WebKit/public/platform/WebScreenOrientationListener.h"
+#include "content/renderer/render_view_impl.h"
namespace content {
MockScreenOrientationController::MockScreenOrientationController()
- : current_lock_(blink::WebScreenOrientationLockDefault),
+ : RenderViewObserver(NULL),
+ current_lock_(blink::WebScreenOrientationLockDefault),
device_orientation_(blink::WebScreenOrientationPortraitPrimary),
- current_orientation_(blink::WebScreenOrientationPortraitPrimary),
- listener_(NULL) {
+ current_orientation_(blink::WebScreenOrientationPortraitPrimary) {
// Since MockScreenOrientationController is held by LazyInstance reference,
// add this ref for it.
AddRef();
@@ -24,47 +24,25 @@
MockScreenOrientationController::~MockScreenOrientationController() {
}
-void MockScreenOrientationController::SetListener(
- blink::WebScreenOrientationListener* listener) {
- listener_ = listener;
-}
-
void MockScreenOrientationController::ResetData() {
+ if (render_view_impl())
+ render_view_impl()->RemoveObserver(this);
+
current_lock_ = blink::WebScreenOrientationLockDefault;
device_orientation_ = blink::WebScreenOrientationPortraitPrimary;
current_orientation_ = blink::WebScreenOrientationPortraitPrimary;
}
-void MockScreenOrientationController::UpdateLock(
- blink::WebScreenOrientationLockType lock) {
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&MockScreenOrientationController::UpdateLockSync, this, lock));
-}
-void MockScreenOrientationController::UpdateLockSync(
- blink::WebScreenOrientationLockType lock) {
- DCHECK(lock != blink::WebScreenOrientationLockDefault);
- current_lock_ = lock;
- if (!IsOrientationAllowedByCurrentLock(current_orientation_))
- UpdateScreenOrientation(SuitableOrientationForCurrentLock());
-}
-
-void MockScreenOrientationController::ResetLock() {
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&MockScreenOrientationController::ResetLockSync, this));
-}
-
-void MockScreenOrientationController::ResetLockSync() {
- bool will_screen_orientation_need_updating =
- !IsOrientationAllowedByCurrentLock(device_orientation_);
- current_lock_ = blink::WebScreenOrientationLockDefault;
- if (will_screen_orientation_need_updating)
- UpdateScreenOrientation(device_orientation_);
-}
-
void MockScreenOrientationController::UpdateDeviceOrientation(
+ RenderView* render_view,
blink::WebScreenOrientationType orientation) {
+ if (this->render_view()) {
+ // Make sure that render_view_ did not change during test.
+ DCHECK_EQ(this->render_view(), render_view);
+ } else {
+ Observe(render_view);
+ }
+
if (device_orientation_ == orientation)
return;
device_orientation_ = orientation;
@@ -73,13 +51,17 @@
UpdateScreenOrientation(orientation);
}
+RenderViewImpl* MockScreenOrientationController::render_view_impl() const {
+ return static_cast<RenderViewImpl*>(render_view());
+}
+
void MockScreenOrientationController::UpdateScreenOrientation(
blink::WebScreenOrientationType orientation) {
if (current_orientation_ == orientation)
return;
current_orientation_ = orientation;
- if (listener_)
- listener_->didChangeScreenOrientation(current_orientation_);
+ if (render_view_impl())
+ render_view_impl()->SetScreenOrientationForTesting(orientation);
}
bool MockScreenOrientationController::IsOrientationAllowedByCurrentLock(
@@ -109,19 +91,7 @@
}
}
-blink::WebScreenOrientationType
-MockScreenOrientationController::SuitableOrientationForCurrentLock() {
- switch (current_lock_) {
- case blink::WebScreenOrientationLockPortraitSecondary:
- return blink::WebScreenOrientationPortraitSecondary;
- case blink::WebScreenOrientationLockLandscapePrimary:
- case blink::WebScreenOrientationLockLandscape:
- return blink::WebScreenOrientationLandscapePrimary;
- case blink::WebScreenOrientationLockLandscapeSecondary:
- return blink::WebScreenOrientationLandscapePrimary;
- default:
- return blink::WebScreenOrientationPortraitPrimary;
- }
+void MockScreenOrientationController::OnDestruct() {
}
} // namespace content
diff --git a/content/renderer/screen_orientation/mock_screen_orientation_controller.h b/content/renderer/screen_orientation/mock_screen_orientation_controller.h
index 3142055..2c9d5a9 100644
--- a/content/renderer/screen_orientation/mock_screen_orientation_controller.h
+++ b/content/renderer/screen_orientation/mock_screen_orientation_controller.h
@@ -8,39 +8,37 @@
#include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "content/public/renderer/render_view_observer.h"
#include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
#include "third_party/WebKit/public/platform/WebScreenOrientationType.h"
-namespace blink {
-class WebScreenOrientationListener;
-}
-
namespace content {
+class RenderView;
+class RenderViewImpl;
class MockScreenOrientationController
- : public base::RefCountedThreadSafe<MockScreenOrientationController> {
+ : public base::RefCountedThreadSafe<MockScreenOrientationController>,
+ public RenderViewObserver {
public:
MockScreenOrientationController();
- void SetListener(blink::WebScreenOrientationListener* listener);
void ResetData();
- void UpdateLock(blink::WebScreenOrientationLockType);
- void ResetLock();
- void UpdateDeviceOrientation(blink::WebScreenOrientationType);
+ void UpdateDeviceOrientation(RenderView* render_view,
+ blink::WebScreenOrientationType);
private:
virtual ~MockScreenOrientationController();
- void UpdateLockSync(blink::WebScreenOrientationLockType);
- void ResetLockSync();
void UpdateScreenOrientation(blink::WebScreenOrientationType);
bool IsOrientationAllowedByCurrentLock(blink::WebScreenOrientationType);
- blink::WebScreenOrientationType SuitableOrientationForCurrentLock();
+ RenderViewImpl* render_view_impl() const;
+
+ // RenderViewObserver
+ virtual void OnDestruct() OVERRIDE;
blink::WebScreenOrientationLockType current_lock_;
blink::WebScreenOrientationType device_orientation_;
blink::WebScreenOrientationType current_orientation_;
- blink::WebScreenOrientationListener* listener_;
DISALLOW_COPY_AND_ASSIGN(MockScreenOrientationController);
friend class base::LazyInstance<MockScreenOrientationController>;
diff --git a/content/renderer/screen_orientation/screen_orientation_dispatcher.cc b/content/renderer/screen_orientation/screen_orientation_dispatcher.cc
index 280f9c7..e67cc73 100644
--- a/content/renderer/screen_orientation/screen_orientation_dispatcher.cc
+++ b/content/renderer/screen_orientation/screen_orientation_dispatcher.cc
@@ -5,26 +5,22 @@
#include "content/renderer/screen_orientation/screen_orientation_dispatcher.h"
#include "content/common/screen_orientation_messages.h"
-#include "content/public/renderer/render_thread.h"
-#include "third_party/WebKit/public/platform/WebScreenOrientationListener.h"
namespace content {
-ScreenOrientationDispatcher::ScreenOrientationDispatcher()
- : listener_(NULL) {
- RenderThread::Get()->AddObserver(this);
+ScreenOrientationDispatcher::ScreenOrientationDispatcher(
+ RenderFrame* render_frame)
+ : RenderFrameObserver(render_frame) {
}
ScreenOrientationDispatcher::~ScreenOrientationDispatcher() {
}
-bool ScreenOrientationDispatcher::OnControlMessageReceived(
+bool ScreenOrientationDispatcher::OnMessageReceived(
const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(ScreenOrientationDispatcher, message)
- IPC_MESSAGE_HANDLER(ScreenOrientationMsg_OrientationChange,
- OnOrientationChange)
IPC_MESSAGE_HANDLER(ScreenOrientationMsg_LockSuccess,
OnLockSuccess)
IPC_MESSAGE_HANDLER(ScreenOrientationMsg_LockError,
@@ -35,14 +31,6 @@
return handled;
}
-void ScreenOrientationDispatcher::OnOrientationChange(
- blink::WebScreenOrientationType orientation) {
- if (!listener_)
- return;
-
- listener_->didChangeScreenOrientation(orientation);
-}
-
void ScreenOrientationDispatcher::OnLockSuccess(
int request_id,
unsigned angle,
@@ -66,11 +54,6 @@
pending_callbacks_.Remove(request_id);
}
-void ScreenOrientationDispatcher::setListener(
- blink::WebScreenOrientationListener* listener) {
- listener_ = listener;
-}
-
void ScreenOrientationDispatcher::CancelPendingLocks() {
for (CallbackMap::Iterator<blink::WebLockOrientationCallback>
iterator(&pending_callbacks_); !iterator.IsAtEnd(); iterator.Advance()) {
@@ -80,19 +63,19 @@
}
}
-void ScreenOrientationDispatcher::LockOrientation(
+void ScreenOrientationDispatcher::lockOrientation(
blink::WebScreenOrientationLockType orientation,
- scoped_ptr<blink::WebLockOrientationCallback> callback) {
+ blink::WebLockOrientationCallback* callback) {
CancelPendingLocks();
- int request_id = pending_callbacks_.Add(callback.release());
- RenderThread::Get()->Send(
- new ScreenOrientationHostMsg_LockRequest(orientation, request_id));
+ int request_id = pending_callbacks_.Add(callback);
+ Send(new ScreenOrientationHostMsg_LockRequest(
+ routing_id(), orientation, request_id));
}
-void ScreenOrientationDispatcher::UnlockOrientation() {
+void ScreenOrientationDispatcher::unlockOrientation() {
CancelPendingLocks();
- RenderThread::Get()->Send(new ScreenOrientationHostMsg_Unlock);
+ Send(new ScreenOrientationHostMsg_Unlock(routing_id()));
}
} // namespace content
diff --git a/content/renderer/screen_orientation/screen_orientation_dispatcher.h b/content/renderer/screen_orientation/screen_orientation_dispatcher.h
index b34e173..d64fda1 100644
--- a/content/renderer/screen_orientation/screen_orientation_dispatcher.h
+++ b/content/renderer/screen_orientation/screen_orientation_dispatcher.h
@@ -5,45 +5,42 @@
#ifndef CONTENT_RENDERER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_H_
#define CONTENT_RENDERER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_H_
+#include "base/compiler_specific.h"
#include "base/id_map.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
-#include "content/public/renderer/render_process_observer.h"
+#include "content/public/renderer/render_frame_observer.h"
#include "third_party/WebKit/public/platform/WebLockOrientationCallback.h"
+#include "third_party/WebKit/public/platform/WebScreenOrientationClient.h"
#include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
#include "third_party/WebKit/public/platform/WebScreenOrientationType.h"
-namespace blink {
-class WebScreenOrientationListener;
-}
-
namespace content {
-// ScreenOrientationDispatcher listens to message from the browser process and
-// dispatch the orientation change ones to the WebScreenOrientationListener. It
-// also does the bridge between the browser process and Blink with regards to
-// lock orientation request and the handling of WebLockOrientationCallback.
-class CONTENT_EXPORT ScreenOrientationDispatcher
- : public RenderProcessObserver {
+class RenderFrame;
+
+// ScreenOrientationDispatcher implements the WebScreenOrientationClient API
+// which handles screen lock. It sends lock (or unlock) requests to the browser
+// process and listens for responses and let Blink know about the result of the
+// request via WebLockOrientationCallback.
+class CONTENT_EXPORT ScreenOrientationDispatcher :
+ public RenderFrameObserver,
+ NON_EXPORTED_BASE(public blink::WebScreenOrientationClient) {
public:
- ScreenOrientationDispatcher();
+ explicit ScreenOrientationDispatcher(RenderFrame* render_frame);
virtual ~ScreenOrientationDispatcher();
- // RenderProcessObserver
- virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
-
- void setListener(blink::WebScreenOrientationListener* listener);
-
- // The |callback| is owned by ScreenOrientationDispatcher. It will be assigned
- // to |pending_callbacks_| that will delete it when the entry will be removed
- // from the map.
- void LockOrientation(blink::WebScreenOrientationLockType orientation,
- scoped_ptr<blink::WebLockOrientationCallback> callback);
-
- void UnlockOrientation();
-
private:
- void OnOrientationChange(blink::WebScreenOrientationType orientation);
+ friend class ScreenOrientationDispatcherTest;
+
+ // RenderFrameObserver implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ // blink::WebScreenOrientationClient implementation.
+ virtual void lockOrientation(
+ blink::WebScreenOrientationLockType orientation,
+ blink::WebLockOrientationCallback* callback) OVERRIDE;
+ virtual void unlockOrientation() OVERRIDE;
+
void OnLockSuccess(int request_id,
unsigned angle,
blink::WebScreenOrientationType orientation);
@@ -52,8 +49,6 @@
void CancelPendingLocks();
- blink::WebScreenOrientationListener* listener_;
-
// The pending_callbacks_ map is mostly meant to have a unique ID to associate
// with every callback going trough the dispatcher. The map will own the
// pointer in the sense that it will destroy it when Remove() will be called.
diff --git a/content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc b/content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc
index 85bcf01..461533e 100644
--- a/content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc
+++ b/content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc
@@ -9,38 +9,13 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "content/common/screen_orientation_messages.h"
-#include "content/public/test/mock_render_thread.h"
#include "content/public/test/test_utils.h"
+#include "ipc/ipc_test_sink.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/platform/WebLockOrientationCallback.h"
-#include "third_party/WebKit/public/platform/WebScreenOrientationListener.h"
namespace content {
-class MockScreenOrientationListener :
- public blink::WebScreenOrientationListener {
- public:
- MockScreenOrientationListener();
- virtual ~MockScreenOrientationListener() {}
-
- virtual void didChangeScreenOrientation(
- blink::WebScreenOrientationType) OVERRIDE;
-
- bool did_change_screen_orientation() const {
- return did_change_screen_orientation_;
- }
-
- blink::WebScreenOrientationType screen_orientation() const {
- return screen_orientation_;
- }
-
- private:
- bool did_change_screen_orientation_;
- blink::WebScreenOrientationType screen_orientation_;
-
- DISALLOW_COPY_AND_ASSIGN(MockScreenOrientationListener);
-};
-
// MockLockOrientationCallback is an implementation of
// WebLockOrientationCallback and takes a LockOrientationResultHolder* as a
// parameter when being constructed. The |results_| pointer is owned by the
@@ -62,11 +37,8 @@
blink::WebLockOrientationCallback::ErrorType error_;
};
- static scoped_ptr<blink::WebLockOrientationCallback> CreateScoped(
- LockOrientationResultHolder* results) {
- return scoped_ptr<blink::WebLockOrientationCallback>(
- new MockLockOrientationCallback(results));
- }
+ explicit MockLockOrientationCallback(LockOrientationResultHolder* results)
+ : results_(results) {}
virtual void onSuccess(unsigned angle,
blink::WebScreenOrientationType orientation) {
@@ -82,36 +54,32 @@
}
private:
- explicit MockLockOrientationCallback(LockOrientationResultHolder* results)
- : results_(results) {}
-
virtual ~MockLockOrientationCallback() {}
LockOrientationResultHolder* results_;
};
-MockScreenOrientationListener::MockScreenOrientationListener()
- : did_change_screen_orientation_(false),
- screen_orientation_(blink::WebScreenOrientationPortraitPrimary) {
-}
+class ScreenOrientationDispatcherWithSink : public ScreenOrientationDispatcher {
+ public:
+ explicit ScreenOrientationDispatcherWithSink(IPC::TestSink* sink)
+ :ScreenOrientationDispatcher(NULL) , sink_(sink) {
+ }
-void MockScreenOrientationListener::didChangeScreenOrientation(
- blink::WebScreenOrientationType orientation) {
- did_change_screen_orientation_ = true;
- screen_orientation_ = orientation;
-}
+ virtual bool Send(IPC::Message* message) OVERRIDE {
+ return sink_->Send(message);
+ }
+
+ IPC::TestSink* sink_;
+};
class ScreenOrientationDispatcherTest : public testing::Test {
protected:
virtual void SetUp() OVERRIDE {
- render_thread_.reset(new MockRenderThread);
- listener_.reset(new MockScreenOrientationListener);
- dispatcher_.reset(new ScreenOrientationDispatcher);
- dispatcher_->setListener(listener_.get());
+ dispatcher_.reset(new ScreenOrientationDispatcherWithSink(&sink_));
}
int GetFirstLockRequestIdFromSink() {
- const IPC::Message* msg = render_thread_->sink().GetFirstMessageMatching(
+ const IPC::Message* msg = sink().GetFirstMessageMatching(
ScreenOrientationHostMsg_LockRequest::ID);
EXPECT_TRUE(msg != NULL);
@@ -120,65 +88,39 @@
return params.b;
}
- scoped_ptr<MockRenderThread> render_thread_;
- scoped_ptr<MockScreenOrientationListener> listener_;
+ IPC::TestSink& sink() {
+ return sink_;
+ }
+
+ void LockOrientation(blink::WebScreenOrientationLockType orientation,
+ blink::WebLockOrientationCallback* callback) {
+ dispatcher_->lockOrientation(orientation, callback);
+ }
+
+ void UnlockOrientation() {
+ dispatcher_->unlockOrientation();
+ }
+
+ void OnMessageReceived(const IPC::Message& message) {
+ dispatcher_->OnMessageReceived(message);
+ }
+
+ int routing_id() const {
+ // We return a fake routing_id() in the context of this test.
+ return 0;
+ }
+
+ IPC::TestSink sink_;
scoped_ptr<ScreenOrientationDispatcher> dispatcher_;
};
-TEST_F(ScreenOrientationDispatcherTest, ListensToMessages) {
- EXPECT_TRUE(render_thread_->observers().HasObserver(dispatcher_.get()));
-
- render_thread_->OnControlMessageReceived(
- ScreenOrientationMsg_OrientationChange(
- blink::WebScreenOrientationPortraitPrimary));
-
- EXPECT_TRUE(listener_->did_change_screen_orientation());
-}
-
-TEST_F(ScreenOrientationDispatcherTest, NullListener) {
- dispatcher_->setListener(NULL);
-
- render_thread_->OnControlMessageReceived(
- ScreenOrientationMsg_OrientationChange(
- blink::WebScreenOrientationPortraitPrimary));
-
- EXPECT_FALSE(listener_->did_change_screen_orientation());
-}
-
-TEST_F(ScreenOrientationDispatcherTest, ValidValues) {
- render_thread_->OnControlMessageReceived(
- ScreenOrientationMsg_OrientationChange(
- blink::WebScreenOrientationPortraitPrimary));
- EXPECT_EQ(blink::WebScreenOrientationPortraitPrimary,
- listener_->screen_orientation());
-
- render_thread_->OnControlMessageReceived(
- ScreenOrientationMsg_OrientationChange(
- blink::WebScreenOrientationLandscapePrimary));
- EXPECT_EQ(blink::WebScreenOrientationLandscapePrimary,
- listener_->screen_orientation());
-
- render_thread_->OnControlMessageReceived(
- ScreenOrientationMsg_OrientationChange(
- blink::WebScreenOrientationPortraitSecondary));
- EXPECT_EQ(blink::WebScreenOrientationPortraitSecondary,
- listener_->screen_orientation());
-
- render_thread_->OnControlMessageReceived(
- ScreenOrientationMsg_OrientationChange(
- blink::WebScreenOrientationLandscapeSecondary));
- EXPECT_EQ(blink::WebScreenOrientationLandscapeSecondary,
- listener_->screen_orientation());
-}
-
-// Test that calling LockOrientation() followed by UnlockOrientation() cancel
-// the LockOrientation().
+// Test that calling lockOrientation() followed by unlockOrientation() cancel
+// the lockOrientation().
TEST_F(ScreenOrientationDispatcherTest, CancelPending_Unlocking) {
MockLockOrientationCallback::LockOrientationResultHolder callback_results;
- dispatcher_->LockOrientation(
- blink::WebScreenOrientationLockPortraitPrimary,
- MockLockOrientationCallback::CreateScoped(&callback_results));
- dispatcher_->UnlockOrientation();
+ LockOrientation(blink::WebScreenOrientationLockPortraitPrimary,
+ new MockLockOrientationCallback(&callback_results));
+ UnlockOrientation();
EXPECT_FALSE(callback_results.succeeded_);
EXPECT_TRUE(callback_results.failed_);
@@ -186,18 +128,16 @@
callback_results.error_);
}
-// Test that calling LockOrientation() twice cancel the first LockOrientation().
+// Test that calling lockOrientation() twice cancel the first lockOrientation().
TEST_F(ScreenOrientationDispatcherTest, CancelPending_DoubleLock) {
MockLockOrientationCallback::LockOrientationResultHolder callback_results;
// We create the object to prevent leaks but never actually use it.
MockLockOrientationCallback::LockOrientationResultHolder callback_results2;
- dispatcher_->LockOrientation(
- blink::WebScreenOrientationLockPortraitPrimary,
- MockLockOrientationCallback::CreateScoped(&callback_results));
- dispatcher_->LockOrientation(
- blink::WebScreenOrientationLockPortraitPrimary,
- MockLockOrientationCallback::CreateScoped(&callback_results2));
+ LockOrientation(blink::WebScreenOrientationLockPortraitPrimary,
+ new MockLockOrientationCallback(&callback_results));
+ LockOrientation(blink::WebScreenOrientationLockPortraitPrimary,
+ new MockLockOrientationCallback(&callback_results2));
EXPECT_FALSE(callback_results.succeeded_);
EXPECT_TRUE(callback_results.failed_);
@@ -216,20 +156,19 @@
for (std::list<blink::WebLockOrientationCallback::ErrorType>::const_iterator
it = errors.begin(); it != errors.end(); ++it) {
- render_thread_->sink().ClearMessages();
-
MockLockOrientationCallback::LockOrientationResultHolder callback_results;
- dispatcher_->LockOrientation(
- blink::WebScreenOrientationLockPortraitPrimary,
- MockLockOrientationCallback::CreateScoped(&callback_results));
+ LockOrientation(blink::WebScreenOrientationLockPortraitPrimary,
+ new MockLockOrientationCallback(&callback_results));
int request_id = GetFirstLockRequestIdFromSink();
- render_thread_->OnControlMessageReceived(
- ScreenOrientationMsg_LockError(request_id, *it));
+ OnMessageReceived(
+ ScreenOrientationMsg_LockError(routing_id(), request_id, *it));
EXPECT_FALSE(callback_results.succeeded_);
EXPECT_TRUE(callback_results.failed_);
EXPECT_EQ(*it, callback_results.error_);
+
+ sink().ClearMessages();
}
}
@@ -249,23 +188,22 @@
int orientationsCount = 4;
for (int i = 0; i < orientationsCount; ++i) {
- render_thread_->sink().ClearMessages();
-
MockLockOrientationCallback::LockOrientationResultHolder callback_results;
- dispatcher_->LockOrientation(
- blink::WebScreenOrientationLockPortraitPrimary,
- MockLockOrientationCallback::CreateScoped(&callback_results));
+ LockOrientation(blink::WebScreenOrientationLockPortraitPrimary,
+ new MockLockOrientationCallback(&callback_results));
int request_id = GetFirstLockRequestIdFromSink();
- render_thread_->OnControlMessageReceived(
- ScreenOrientationMsg_LockSuccess(request_id,
- orientations[i].angle,
- orientations[i].type));
+ OnMessageReceived(ScreenOrientationMsg_LockSuccess(routing_id(),
+ request_id,
+ orientations[i].angle,
+ orientations[i].type));
EXPECT_TRUE(callback_results.succeeded_);
EXPECT_FALSE(callback_results.failed_);
EXPECT_EQ(orientations[i].angle, callback_results.angle_);
EXPECT_EQ(orientations[i].type, callback_results.orientation_);
+
+ sink().ClearMessages();
}
}
@@ -273,12 +211,12 @@
// callback.
TEST_F(ScreenOrientationDispatcherTest, SuccessForUnknownRequest) {
MockLockOrientationCallback::LockOrientationResultHolder callback_results;
- dispatcher_->LockOrientation(
- blink::WebScreenOrientationLockPortraitPrimary,
- MockLockOrientationCallback::CreateScoped(&callback_results));
+ LockOrientation(blink::WebScreenOrientationLockPortraitPrimary,
+ new MockLockOrientationCallback(&callback_results));
int request_id = GetFirstLockRequestIdFromSink();
- render_thread_->OnControlMessageReceived(ScreenOrientationMsg_LockSuccess(
+ OnMessageReceived(ScreenOrientationMsg_LockSuccess(
+ routing_id(),
request_id + 1,
90,
blink::WebScreenOrientationLandscapePrimary));
@@ -291,12 +229,12 @@
// callback.
TEST_F(ScreenOrientationDispatcherTest, ErrorForUnknownRequest) {
MockLockOrientationCallback::LockOrientationResultHolder callback_results;
- dispatcher_->LockOrientation(
- blink::WebScreenOrientationLockPortraitPrimary,
- MockLockOrientationCallback::CreateScoped(&callback_results));
+ LockOrientation(blink::WebScreenOrientationLockPortraitPrimary,
+ new MockLockOrientationCallback(&callback_results));
int request_id = GetFirstLockRequestIdFromSink();
- render_thread_->OnControlMessageReceived(ScreenOrientationMsg_LockError(
+ OnMessageReceived(ScreenOrientationMsg_LockError(
+ routing_id(),
request_id + 1,
blink::WebLockOrientationCallback::ErrorTypeCanceled));
@@ -314,18 +252,17 @@
MockLockOrientationCallback::LockOrientationResultHolder callback_results1;
MockLockOrientationCallback::LockOrientationResultHolder callback_results2;
- dispatcher_->LockOrientation(
- blink::WebScreenOrientationLockPortraitPrimary,
- MockLockOrientationCallback::CreateScoped(&callback_results1));
+ LockOrientation(blink::WebScreenOrientationLockPortraitPrimary,
+ new MockLockOrientationCallback(&callback_results1));
int request_id1 = GetFirstLockRequestIdFromSink();
- dispatcher_->LockOrientation(
- blink::WebScreenOrientationLockLandscapePrimary,
- MockLockOrientationCallback::CreateScoped(&callback_results2));
+ LockOrientation(blink::WebScreenOrientationLockLandscapePrimary,
+ new MockLockOrientationCallback(&callback_results2));
// callback_results1 must be rejected, tested in CancelPending_DoubleLock.
- render_thread_->OnControlMessageReceived(ScreenOrientationMsg_LockSuccess(
+ OnMessageReceived(ScreenOrientationMsg_LockSuccess(
+ routing_id(),
request_id1,
0,
blink::WebScreenOrientationPortraitPrimary));
diff --git a/content/renderer/service_worker/embedded_worker_devtools_agent.cc b/content/renderer/service_worker/embedded_worker_devtools_agent.cc
index 21db9d5..bb76baf 100644
--- a/content/renderer/service_worker/embedded_worker_devtools_agent.cc
+++ b/content/renderer/service_worker/embedded_worker_devtools_agent.cc
@@ -43,11 +43,12 @@
return handled;
}
-void EmbeddedWorkerDevToolsAgent::OnAttach() {
+void EmbeddedWorkerDevToolsAgent::OnAttach(const std::string& host_id) {
webworker_->attachDevTools();
}
-void EmbeddedWorkerDevToolsAgent::OnReattach(const std::string& state) {
+void EmbeddedWorkerDevToolsAgent::OnReattach(const std::string& host_id,
+ const std::string& state) {
webworker_->reattachDevTools(WebString::fromUTF8(state));
}
diff --git a/content/renderer/service_worker/embedded_worker_devtools_agent.h b/content/renderer/service_worker/embedded_worker_devtools_agent.h
index 5fc28f4..79ce73e 100644
--- a/content/renderer/service_worker/embedded_worker_devtools_agent.h
+++ b/content/renderer/service_worker/embedded_worker_devtools_agent.h
@@ -30,8 +30,8 @@
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
private:
- void OnAttach();
- void OnReattach(const std::string&);
+ void OnAttach(const std::string& host_id);
+ void OnReattach(const std::string& host_id, const std::string& state);
void OnDetach();
void OnDispatchOnInspectorBackend(const std::string& message);
void OnResumeWorkerContext();
diff --git a/content/renderer/service_worker/service_worker_script_context.cc b/content/renderer/service_worker/service_worker_script_context.cc
index e76bc65..ad05341 100644
--- a/content/renderer/service_worker/service_worker_script_context.cc
+++ b/content/renderer/service_worker/service_worker_script_context.cc
@@ -11,6 +11,7 @@
#include "content/renderer/service_worker/embedded_worker_context_client.h"
#include "ipc/ipc_message.h"
#include "third_party/WebKit/public/platform/WebServiceWorkerRequest.h"
+#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/web/WebServiceWorkerContextClient.h"
#include "third_party/WebKit/public/web/WebServiceWorkerContextProxy.h"
@@ -49,6 +50,7 @@
IPC_MESSAGE_HANDLER(ServiceWorkerMsg_FetchEvent, OnFetchEvent)
IPC_MESSAGE_HANDLER(ServiceWorkerMsg_InstallEvent, OnInstallEvent)
IPC_MESSAGE_HANDLER(ServiceWorkerMsg_SyncEvent, OnSyncEvent)
+ IPC_MESSAGE_HANDLER(ServiceWorkerMsg_PushEvent, OnPushEvent)
IPC_MESSAGE_HANDLER(ServiceWorkerMsg_MessageToWorker, OnPostMessage)
IPC_MESSAGE_HANDLER(ServiceWorkerMsg_DidGetClientDocuments,
OnDidGetClientDocuments)
@@ -140,6 +142,13 @@
proxy_->dispatchSyncEvent(request_id);
}
+void ServiceWorkerScriptContext::OnPushEvent(int request_id,
+ const std::string& data) {
+ proxy_->dispatchPushEvent(request_id, blink::WebString::fromUTF8(data));
+ Send(new ServiceWorkerHostMsg_PushEventFinished(
+ GetRoutingID(), request_id));
+}
+
void ServiceWorkerScriptContext::OnPostMessage(
const base::string16& message,
const std::vector<int>& sent_message_port_ids,
diff --git a/content/renderer/service_worker/service_worker_script_context.h b/content/renderer/service_worker/service_worker_script_context.h
index e455fbf..d7f59b3 100644
--- a/content/renderer/service_worker/service_worker_script_context.h
+++ b/content/renderer/service_worker/service_worker_script_context.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_
#define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_
+#include <string>
#include <vector>
#include "base/basictypes.h"
@@ -67,6 +68,7 @@
void OnInstallEvent(int request_id, int active_version_id);
void OnFetchEvent(int request_id, const ServiceWorkerFetchRequest& request);
void OnSyncEvent(int request_id);
+ void OnPushEvent(int request_id, const std::string& data);
void OnPostMessage(const base::string16& message,
const std::vector<int>& sent_message_port_ids,
const std::vector<int>& new_routing_ids);
diff --git a/content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc b/content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc
new file mode 100644
index 0000000..97cdffa2
--- /dev/null
+++ b/content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc
@@ -0,0 +1,62 @@
+// Copyright 2014 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 "content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.h"
+
+#include "content/child/thread_safe_sender.h"
+#include "content/common/worker_messages.h"
+#include "third_party/WebKit/public/platform/WebString.h"
+#include "url/gurl.h"
+
+namespace content {
+
+EmbeddedSharedWorkerPermissionClientProxy::
+ EmbeddedSharedWorkerPermissionClientProxy(
+ const GURL& origin_url,
+ bool is_unique_origin,
+ int routing_id,
+ ThreadSafeSender* thread_safe_sender)
+ : origin_url_(origin_url),
+ is_unique_origin_(is_unique_origin),
+ routing_id_(routing_id),
+ thread_safe_sender_(thread_safe_sender) {
+}
+
+EmbeddedSharedWorkerPermissionClientProxy::
+ ~EmbeddedSharedWorkerPermissionClientProxy() {
+}
+
+bool EmbeddedSharedWorkerPermissionClientProxy::allowDatabase(
+ const blink::WebString& name,
+ const blink::WebString& display_name,
+ unsigned long estimated_size) {
+ if (is_unique_origin_)
+ return false;
+ bool result = false;
+ thread_safe_sender_->Send(new WorkerProcessHostMsg_AllowDatabase(
+ routing_id_, origin_url_, name, display_name, estimated_size, &result));
+ return result;
+}
+
+bool EmbeddedSharedWorkerPermissionClientProxy::requestFileSystemAccessSync() {
+ if (is_unique_origin_)
+ return false;
+ bool result = false;
+ thread_safe_sender_->Send(
+ new WorkerProcessHostMsg_RequestFileSystemAccessSync(
+ routing_id_, origin_url_, &result));
+ return result;
+}
+
+bool EmbeddedSharedWorkerPermissionClientProxy::allowIndexedDB(
+ const blink::WebString& name) {
+ if (is_unique_origin_)
+ return false;
+ bool result = false;
+ thread_safe_sender_->Send(new WorkerProcessHostMsg_AllowIndexedDB(
+ routing_id_, origin_url_, name, &result));
+ return result;
+}
+
+} // namespace content
diff --git a/content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.h b/content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.h
new file mode 100644
index 0000000..2be7b77
--- /dev/null
+++ b/content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.h
@@ -0,0 +1,47 @@
+// Copyright 2014 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 CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_PERMISSION_CLIENT_PROXY_H_
+#define CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_PERMISSION_CLIENT_PROXY_H_
+
+#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
+#include "third_party/WebKit/public/web/WebWorkerPermissionClientProxy.h"
+#include "url/gurl.h"
+
+namespace content {
+
+class ThreadSafeSender;
+
+// This proxy is created on the main renderer thread then passed onto
+// the blink's worker thread.
+class EmbeddedSharedWorkerPermissionClientProxy
+ : public blink::WebWorkerPermissionClientProxy {
+ public:
+ EmbeddedSharedWorkerPermissionClientProxy(
+ const GURL& origin_url,
+ bool is_unique_origin,
+ int routing_id,
+ ThreadSafeSender* thread_safe_sender);
+ virtual ~EmbeddedSharedWorkerPermissionClientProxy();
+
+ // WebWorkerPermissionClientProxy overrides.
+ virtual bool allowDatabase(const blink::WebString& name,
+ const blink::WebString& display_name,
+ unsigned long estimated_size);
+ virtual bool requestFileSystemAccessSync();
+ virtual bool allowIndexedDB(const blink::WebString& name);
+
+ private:
+ const GURL origin_url_;
+ const bool is_unique_origin_;
+ const int routing_id_;
+ scoped_refptr<ThreadSafeSender> thread_safe_sender_;
+
+ DISALLOW_COPY_AND_ASSIGN(EmbeddedSharedWorkerPermissionClientProxy);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_PERMISSION_CLIENT_PROXY_H_
diff --git a/content/renderer/shared_worker/embedded_shared_worker_stub.cc b/content/renderer/shared_worker/embedded_shared_worker_stub.cc
index d2efa0f..5a6236b 100644
--- a/content/renderer/shared_worker/embedded_shared_worker_stub.cc
+++ b/content/renderer/shared_worker/embedded_shared_worker_stub.cc
@@ -12,7 +12,9 @@
#include "content/child/webmessageportchannel_impl.h"
#include "content/common/worker_messages.h"
#include "content/renderer/render_thread_impl.h"
+#include "content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.h"
#include "ipc/ipc_message_macros.h"
+#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
#include "third_party/WebKit/public/web/WebSharedWorker.h"
#include "third_party/WebKit/public/web/WebSharedWorkerClient.h"
@@ -153,8 +155,11 @@
blink::WebWorkerPermissionClientProxy*
EmbeddedSharedWorkerStub::createWorkerPermissionClientProxy(
const blink::WebSecurityOrigin& origin) {
- // TODO(horo): implement this.
- return NULL;
+ return new EmbeddedSharedWorkerPermissionClientProxy(
+ GURL(origin.toString()),
+ origin.isUnique(),
+ route_id_,
+ ChildThread::current()->thread_safe_sender());
}
void EmbeddedSharedWorkerStub::dispatchDevToolsMessage(
diff --git a/content/renderer/skia_benchmarking_extension.cc b/content/renderer/skia_benchmarking_extension.cc
index 4f25ce2..568eb05 100644
--- a/content/renderer/skia_benchmarking_extension.cc
+++ b/content/renderer/skia_benchmarking_extension.cc
@@ -131,13 +131,14 @@
int stop_index = -1;
bool overdraw = false;
+ v8::Handle<v8::Context> context = isolate->GetCurrentContext();
if (!args->PeekNext().IsEmpty()) {
v8::Handle<v8::Value> params;
args->GetNext(¶ms);
scoped_ptr<content::V8ValueConverter> converter(
content::V8ValueConverter::create());
scoped_ptr<base::Value> params_value(
- converter->FromV8Value(params, isolate->GetCurrentContext()));
+ converter->FromV8Value(params, context));
const base::DictionaryValue* params_dict = NULL;
if (params_value.get() && params_value->GetAsDictionary(¶ms_dict)) {
@@ -203,7 +204,8 @@
result->Set(v8::String::NewFromUtf8(isolate, "height"),
v8::Number::New(isolate, snapped_clip.height()));
result->Set(v8::String::NewFromUtf8(isolate, "data"),
- blink::WebArrayBufferConverter::toV8Value(&buffer));
+ blink::WebArrayBufferConverter::toV8Value(
+ &buffer, context->Global(), isolate));
args->Return(result);
}
diff --git a/content/renderer/v8_value_converter_impl.cc b/content/renderer/v8_value_converter_impl.cc
index d12b26b..2c222bd 100644
--- a/content/renderer/v8_value_converter_impl.cc
+++ b/content/renderer/v8_value_converter_impl.cc
@@ -153,7 +153,8 @@
const base::Value* value, v8::Handle<v8::Context> context) const {
v8::Context::Scope context_scope(context);
v8::EscapableHandleScope handle_scope(context->GetIsolate());
- return handle_scope.Escape(ToV8ValueImpl(context->GetIsolate(), value));
+ return handle_scope.Escape(
+ ToV8ValueImpl(context->GetIsolate(), context->Global(), value));
}
base::Value* V8ValueConverterImpl::FromV8Value(
@@ -167,6 +168,7 @@
v8::Local<v8::Value> V8ValueConverterImpl::ToV8ValueImpl(
v8::Isolate* isolate,
+ v8::Handle<v8::Object> creation_context,
const base::Value* value) const {
CHECK(value);
switch (value->GetType()) {
@@ -199,14 +201,19 @@
}
case base::Value::TYPE_LIST:
- return ToV8Array(isolate, static_cast<const base::ListValue*>(value));
+ return ToV8Array(isolate,
+ creation_context,
+ static_cast<const base::ListValue*>(value));
case base::Value::TYPE_DICTIONARY:
return ToV8Object(isolate,
+ creation_context,
static_cast<const base::DictionaryValue*>(value));
case base::Value::TYPE_BINARY:
- return ToArrayBuffer(static_cast<const base::BinaryValue*>(value));
+ return ToArrayBuffer(isolate,
+ creation_context,
+ static_cast<const base::BinaryValue*>(value));
default:
LOG(ERROR) << "Unexpected value type: " << value->GetType();
@@ -216,6 +223,7 @@
v8::Handle<v8::Value> V8ValueConverterImpl::ToV8Array(
v8::Isolate* isolate,
+ v8::Handle<v8::Object> creation_context,
const base::ListValue* val) const {
v8::Handle<v8::Array> result(v8::Array::New(isolate, val->GetSize()));
@@ -223,7 +231,8 @@
const base::Value* child = NULL;
CHECK(val->Get(i, &child));
- v8::Handle<v8::Value> child_v8 = ToV8ValueImpl(isolate, child);
+ v8::Handle<v8::Value> child_v8 =
+ ToV8ValueImpl(isolate, creation_context, child);
CHECK(!child_v8.IsEmpty());
v8::TryCatch try_catch;
@@ -237,13 +246,15 @@
v8::Handle<v8::Value> V8ValueConverterImpl::ToV8Object(
v8::Isolate* isolate,
+ v8::Handle<v8::Object> creation_context,
const base::DictionaryValue* val) const {
v8::Handle<v8::Object> result(v8::Object::New(isolate));
for (base::DictionaryValue::Iterator iter(*val);
!iter.IsAtEnd(); iter.Advance()) {
const std::string& key = iter.key();
- v8::Handle<v8::Value> child_v8 = ToV8ValueImpl(isolate, &iter.value());
+ v8::Handle<v8::Value> child_v8 =
+ ToV8ValueImpl(isolate, creation_context, &iter.value());
CHECK(!child_v8.IsEmpty());
v8::TryCatch try_catch;
@@ -261,11 +272,14 @@
}
v8::Handle<v8::Value> V8ValueConverterImpl::ToArrayBuffer(
+ v8::Isolate* isolate,
+ v8::Handle<v8::Object> creation_context,
const base::BinaryValue* value) const {
blink::WebArrayBuffer buffer =
blink::WebArrayBuffer::create(value->GetSize(), 1);
memcpy(buffer.data(), value->GetBuffer(), value->GetSize());
- return blink::WebArrayBufferConverter::toV8Value(&buffer);
+ return blink::WebArrayBufferConverter::toV8Value(
+ &buffer, creation_context, isolate);
}
base::Value* V8ValueConverterImpl::FromV8ValueImpl(
@@ -418,7 +432,7 @@
size_t length = 0;
scoped_ptr<blink::WebArrayBuffer> array_buffer(
- blink::WebArrayBufferConverter::createFromV8Value(val));
+ blink::WebArrayBufferConverter::createFromV8Value(val, isolate));
scoped_ptr<blink::WebArrayBufferView> view;
if (array_buffer) {
data = reinterpret_cast<char*>(array_buffer->data());
diff --git a/content/renderer/v8_value_converter_impl.h b/content/renderer/v8_value_converter_impl.h
index a5288ae..affbed7 100644
--- a/content/renderer/v8_value_converter_impl.h
+++ b/content/renderer/v8_value_converter_impl.h
@@ -44,13 +44,18 @@
class FromV8ValueState;
v8::Local<v8::Value> ToV8ValueImpl(v8::Isolate* isolate,
- const base::Value* value) const;
+ v8::Handle<v8::Object> creation_context,
+ const base::Value* value) const;
v8::Handle<v8::Value> ToV8Array(v8::Isolate* isolate,
+ v8::Handle<v8::Object> creation_context,
const base::ListValue* list) const;
v8::Handle<v8::Value> ToV8Object(
v8::Isolate* isolate,
+ v8::Handle<v8::Object> creation_context,
const base::DictionaryValue* dictionary) const;
- v8::Handle<v8::Value> ToArrayBuffer(const base::BinaryValue* value) const;
+ v8::Handle<v8::Value> ToArrayBuffer(v8::Isolate* isolate,
+ v8::Handle<v8::Object> creation_context,
+ const base::BinaryValue* value) const;
base::Value* FromV8ValueImpl(FromV8ValueState* state,
v8::Handle<v8::Value> value,
diff --git a/content/renderer/web_preferences.cc b/content/renderer/web_preferences.cc
index 33a0004..bd975fd 100644
--- a/content/renderer/web_preferences.cc
+++ b/content/renderer/web_preferences.cc
@@ -258,7 +258,6 @@
settings->setRegionBasedColumnsEnabled(prefs.region_based_columns_enabled);
- WebRuntimeFeatures::enableLazyLayout(prefs.lazy_layout_enabled);
WebRuntimeFeatures::enableTouch(prefs.touch_enabled);
settings->setMaxTouchPoints(prefs.pointer_events_max_touch_points);
settings->setDeviceSupportsTouch(prefs.device_supports_touch);
diff --git a/content/result_codes_java.target.darwin-arm.mk b/content/result_codes_java.target.darwin-arm.mk
index 322b11c..f7085df 100644
--- a/content/result_codes_java.target.darwin-arm.mk
+++ b/content/result_codes_java.target.darwin-arm.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/result_codes_java.target.darwin-arm64.mk b/content/result_codes_java.target.darwin-arm64.mk
index a759252..33b434d 100644
--- a/content/result_codes_java.target.darwin-arm64.mk
+++ b/content/result_codes_java.target.darwin-arm64.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,6 +111,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/result_codes_java.target.darwin-mips.mk b/content/result_codes_java.target.darwin-mips.mk
index 7b07719..5fe7be7 100644
--- a/content/result_codes_java.target.darwin-mips.mk
+++ b/content/result_codes_java.target.darwin-mips.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -176,6 +178,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -205,6 +208,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/result_codes_java.target.darwin-x86.mk b/content/result_codes_java.target.darwin-x86.mk
index 78a680c..c15e571 100644
--- a/content/result_codes_java.target.darwin-x86.mk
+++ b/content/result_codes_java.target.darwin-x86.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -115,6 +116,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/result_codes_java.target.darwin-x86_64.mk b/content/result_codes_java.target.darwin-x86_64.mk
index 2755abd..5f9f487 100644
--- a/content/result_codes_java.target.darwin-x86_64.mk
+++ b/content/result_codes_java.target.darwin-x86_64.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -175,6 +177,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/result_codes_java.target.linux-arm.mk b/content/result_codes_java.target.linux-arm.mk
index 322b11c..f7085df 100644
--- a/content/result_codes_java.target.linux-arm.mk
+++ b/content/result_codes_java.target.linux-arm.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/result_codes_java.target.linux-arm64.mk b/content/result_codes_java.target.linux-arm64.mk
index a759252..33b434d 100644
--- a/content/result_codes_java.target.linux-arm64.mk
+++ b/content/result_codes_java.target.linux-arm64.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,6 +111,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/result_codes_java.target.linux-mips.mk b/content/result_codes_java.target.linux-mips.mk
index 7b07719..5fe7be7 100644
--- a/content/result_codes_java.target.linux-mips.mk
+++ b/content/result_codes_java.target.linux-mips.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -176,6 +178,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -205,6 +208,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/result_codes_java.target.linux-x86.mk b/content/result_codes_java.target.linux-x86.mk
index 78a680c..c15e571 100644
--- a/content/result_codes_java.target.linux-x86.mk
+++ b/content/result_codes_java.target.linux-x86.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -115,6 +116,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/result_codes_java.target.linux-x86_64.mk b/content/result_codes_java.target.linux-x86_64.mk
index 2755abd..5f9f487 100644
--- a/content/result_codes_java.target.linux-x86_64.mk
+++ b/content/result_codes_java.target.linux-x86_64.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -175,6 +177,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/screen_orientation_values_java.target.darwin-arm.mk b/content/screen_orientation_values_java.target.darwin-arm.mk
index 64fd95f..8ce068c 100644
--- a/content/screen_orientation_values_java.target.darwin-arm.mk
+++ b/content/screen_orientation_values_java.target.darwin-arm.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/screen_orientation_values_java.target.darwin-arm64.mk b/content/screen_orientation_values_java.target.darwin-arm64.mk
index dcfd007..faea101 100644
--- a/content/screen_orientation_values_java.target.darwin-arm64.mk
+++ b/content/screen_orientation_values_java.target.darwin-arm64.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,6 +111,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/screen_orientation_values_java.target.darwin-mips.mk b/content/screen_orientation_values_java.target.darwin-mips.mk
index 38c1d40..cdf1133 100644
--- a/content/screen_orientation_values_java.target.darwin-mips.mk
+++ b/content/screen_orientation_values_java.target.darwin-mips.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -176,6 +178,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -205,6 +208,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/screen_orientation_values_java.target.darwin-x86.mk b/content/screen_orientation_values_java.target.darwin-x86.mk
index d19f185..5ed57d4 100644
--- a/content/screen_orientation_values_java.target.darwin-x86.mk
+++ b/content/screen_orientation_values_java.target.darwin-x86.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -115,6 +116,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/screen_orientation_values_java.target.darwin-x86_64.mk b/content/screen_orientation_values_java.target.darwin-x86_64.mk
index d916060..907fd9d 100644
--- a/content/screen_orientation_values_java.target.darwin-x86_64.mk
+++ b/content/screen_orientation_values_java.target.darwin-x86_64.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -175,6 +177,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/screen_orientation_values_java.target.linux-arm.mk b/content/screen_orientation_values_java.target.linux-arm.mk
index 64fd95f..8ce068c 100644
--- a/content/screen_orientation_values_java.target.linux-arm.mk
+++ b/content/screen_orientation_values_java.target.linux-arm.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/screen_orientation_values_java.target.linux-arm64.mk b/content/screen_orientation_values_java.target.linux-arm64.mk
index dcfd007..faea101 100644
--- a/content/screen_orientation_values_java.target.linux-arm64.mk
+++ b/content/screen_orientation_values_java.target.linux-arm64.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,6 +111,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/screen_orientation_values_java.target.linux-mips.mk b/content/screen_orientation_values_java.target.linux-mips.mk
index 38c1d40..cdf1133 100644
--- a/content/screen_orientation_values_java.target.linux-mips.mk
+++ b/content/screen_orientation_values_java.target.linux-mips.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -176,6 +178,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -205,6 +208,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/screen_orientation_values_java.target.linux-x86.mk b/content/screen_orientation_values_java.target.linux-x86.mk
index d19f185..5ed57d4 100644
--- a/content/screen_orientation_values_java.target.linux-x86.mk
+++ b/content/screen_orientation_values_java.target.linux-x86.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -115,6 +116,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/screen_orientation_values_java.target.linux-x86_64.mk b/content/screen_orientation_values_java.target.linux-x86_64.mk
index d916060..907fd9d 100644
--- a/content/screen_orientation_values_java.target.linux-x86_64.mk
+++ b/content/screen_orientation_values_java.target.linux-x86_64.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -175,6 +177,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/shell/browser/shell_application_mac.mm b/content/shell/browser/shell_application_mac.mm
index e18df5b..e665d8b 100644
--- a/content/shell/browser/shell_application_mac.mm
+++ b/content/shell/browser/shell_application_mac.mm
@@ -30,7 +30,7 @@
content::ShellBrowserContext* browserContext =
content::ShellContentBrowserClient::Get()->browser_context();
content::Shell::CreateNewWindow(browserContext,
- GURL(content::kAboutBlankURL),
+ GURL(url::kAboutBlankURL),
NULL,
MSG_ROUTING_NONE,
gfx::Size());
diff --git a/content/shell/browser/shell_browser_context.cc b/content/shell/browser/shell_browser_context.cc
index 39d70a5..d953dbe 100644
--- a/content/shell/browser/shell_browser_context.cc
+++ b/content/shell/browser/shell_browser_context.cc
@@ -179,44 +179,6 @@
return GetRequestContext();
}
-void ShellBrowserContext::RequestMidiSysExPermission(
- int render_process_id,
- int render_view_id,
- int bridge_id,
- const GURL& requesting_frame,
- bool user_gesture,
- const MidiSysExPermissionCallback& callback) {
- // Always reject requests for LayoutTests for now.
- // TODO(toyoshim): Make it programmable to improve test coverage.
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDumpRenderTree)) {
- callback.Run(false);
- return;
- }
- callback.Run(true);
-}
-
-void ShellBrowserContext::CancelMidiSysExPermissionRequest(
- int render_process_id,
- int render_view_id,
- int bridge_id,
- const GURL& requesting_frame) {
-}
-
-void ShellBrowserContext::RequestProtectedMediaIdentifierPermission(
- int render_process_id,
- int render_view_id,
- const GURL& origin,
- const ProtectedMediaIdentifierPermissionCallback& callback) {
- callback.Run(true);
-}
-
-void ShellBrowserContext::CancelProtectedMediaIdentifierPermissionRequests(
- int render_process_id,
- int render_view_id,
- const GURL& origin) {
-}
-
net::URLRequestContextGetter*
ShellBrowserContext::CreateRequestContextForStoragePartition(
const base::FilePath& partition_path,
@@ -230,11 +192,6 @@
return resource_context_.get();
}
-GeolocationPermissionContext*
- ShellBrowserContext::GetGeolocationPermissionContext() {
- return NULL;
-}
-
BrowserPluginGuestManager* ShellBrowserContext::GetGuestManager() {
return guest_manager_;
}
@@ -243,4 +200,8 @@
return NULL;
}
+PushMessagingService* ShellBrowserContext::GetPushMessagingService() {
+ return NULL;
+}
+
} // namespace content
diff --git a/content/shell/browser/shell_browser_context.h b/content/shell/browser/shell_browser_context.h
index 60baa52..a5b57a2 100644
--- a/content/shell/browser/shell_browser_context.h
+++ b/content/shell/browser/shell_browser_context.h
@@ -48,32 +48,10 @@
GetMediaRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory) OVERRIDE;
- virtual void RequestMidiSysExPermission(
- int render_process_id,
- int render_view_id,
- int bridge_id,
- const GURL& requesting_frame,
- bool user_gesture,
- const MidiSysExPermissionCallback& callback) OVERRIDE;
- virtual void CancelMidiSysExPermissionRequest(
- int render_process_id,
- int render_view_id,
- int bridge_id,
- const GURL& requesting_frame) OVERRIDE;
- virtual void RequestProtectedMediaIdentifierPermission(
- int render_process_id,
- int render_view_id,
- const GURL& origin,
- const ProtectedMediaIdentifierPermissionCallback& callback) OVERRIDE;
- virtual void CancelProtectedMediaIdentifierPermissionRequests(
- int render_process_id,
- int render_view_id,
- const GURL& origin) OVERRIDE;
virtual ResourceContext* GetResourceContext() OVERRIDE;
- virtual GeolocationPermissionContext*
- GetGeolocationPermissionContext() OVERRIDE;
virtual BrowserPluginGuestManager* GetGuestManager() OVERRIDE;
virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
+ virtual PushMessagingService* GetPushMessagingService() OVERRIDE;
net::URLRequestContextGetter* CreateRequestContext(
ProtocolHandlerMap* protocol_handlers,
diff --git a/content/shell/browser/shell_devtools_frontend.cc b/content/shell/browser/shell_devtools_frontend.cc
index 21973f4..e6f4b85 100644
--- a/content/shell/browser/shell_devtools_frontend.cc
+++ b/content/shell/browser/shell_devtools_frontend.cc
@@ -19,6 +19,7 @@
#include "content/shell/browser/shell_browser_main_parts.h"
#include "content/shell/browser/shell_content_browser_client.h"
#include "content/shell/browser/shell_devtools_delegate.h"
+#include "content/shell/browser/webkit_test_controller.h"
#include "content/shell/common/shell_switches.h"
#include "net/base/filename_util.h"
@@ -131,6 +132,11 @@
delete this;
}
+void ShellDevToolsFrontend::RenderProcessGone(base::TerminationStatus status) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
+ WebKitTestController::Get()->DevToolsProcessCrashed();
+}
+
void ShellDevToolsFrontend::InspectedContentsClosing() {
frontend_shell_->Close();
}
diff --git a/content/shell/browser/shell_devtools_frontend.h b/content/shell/browser/shell_devtools_frontend.h
index d9591c7..f08aa24 100644
--- a/content/shell/browser/shell_devtools_frontend.h
+++ b/content/shell/browser/shell_devtools_frontend.h
@@ -45,6 +45,7 @@
virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE;
virtual void DocumentOnLoadCompletedInMainFrame() OVERRIDE;
virtual void WebContentsDestroyed() OVERRIDE;
+ virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
// DevToolsFrontendHostDelegate implementation
virtual void DispatchOnEmbedder(const std::string& message) OVERRIDE {}
diff --git a/content/shell/browser/shell_url_request_context_getter.cc b/content/shell/browser/shell_url_request_context_getter.cc
index 95a8ba4..9d01a43 100644
--- a/content/shell/browser/shell_url_request_context_getter.cc
+++ b/content/shell/browser/shell_url_request_context_getter.cc
@@ -15,6 +15,7 @@
#include "content/public/browser/cookie_store_factory.h"
#include "content/public/common/content_switches.h"
#include "content/shell/browser/shell_network_delegate.h"
+#include "content/shell/common/shell_content_client.h"
#include "content/shell/common/shell_switches.h"
#include "net/base/cache_type.h"
#include "net/cert/cert_verifier.h"
@@ -109,7 +110,8 @@
new net::DefaultServerBoundCertStore(NULL),
base::WorkerPool::GetTaskRunner(true)));
storage_->set_http_user_agent_settings(
- new net::StaticHttpUserAgentSettings("en-us,en", std::string()));
+ new net::StaticHttpUserAgentSettings(
+ "en-us,en", GetShellUserAgent()));
scoped_ptr<net::HostResolver> host_resolver(
net::HostResolver::CreateDefaultResolver(
diff --git a/content/shell/browser/webkit_test_controller.cc b/content/shell/browser/webkit_test_controller.cc
index fa56d01..e1266d5 100644
--- a/content/shell/browser/webkit_test_controller.cc
+++ b/content/shell/browser/webkit_test_controller.cc
@@ -421,6 +421,12 @@
DiscardMainWindow();
}
+void WebKitTestController::DevToolsProcessCrashed() {
+ DCHECK(CalledOnValidThread());
+ printer_->AddErrorMessage("#CRASHED - devtools");
+ DiscardMainWindow();
+}
+
void WebKitTestController::WebContentsDestroyed() {
DCHECK(CalledOnValidThread());
printer_->AddErrorMessage("FAIL: main window was destroyed");
diff --git a/content/shell/browser/webkit_test_controller.h b/content/shell/browser/webkit_test_controller.h
index 2e5cf58..dfae5bd 100644
--- a/content/shell/browser/webkit_test_controller.h
+++ b/content/shell/browser/webkit_test_controller.h
@@ -129,6 +129,8 @@
printer_.reset(printer);
}
+ void DevToolsProcessCrashed();
+
// WebContentsObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void PluginCrashed(const base::FilePath& plugin_path,
diff --git a/content/shell/common/shell_content_client.cc b/content/shell/common/shell_content_client.cc
index f3bfc52..3d1891d 100644
--- a/content/shell/common/shell_content_client.cc
+++ b/content/shell/common/shell_content_client.cc
@@ -18,10 +18,7 @@
namespace content {
-ShellContentClient::~ShellContentClient() {
-}
-
-std::string ShellContentClient::GetUserAgent() const {
+std::string GetShellUserAgent() {
std::string product = "Chrome/" CONTENT_SHELL_VERSION;
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kUseMobileUserAgent))
@@ -29,6 +26,13 @@
return BuildUserAgentFromProduct(product);
}
+ShellContentClient::~ShellContentClient() {
+}
+
+std::string ShellContentClient::GetUserAgent() const {
+ return GetShellUserAgent();
+}
+
base::string16 ShellContentClient::GetLocalizedString(int message_id) const {
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) {
switch (message_id) {
diff --git a/content/shell/common/shell_content_client.h b/content/shell/common/shell_content_client.h
index 478c065..5f9ab2f 100644
--- a/content/shell/common/shell_content_client.h
+++ b/content/shell/common/shell_content_client.h
@@ -13,6 +13,8 @@
namespace content {
+std::string GetShellUserAgent();
+
class ShellContentClient : public ContentClient {
public:
virtual ~ShellContentClient();
diff --git a/content/shell/common/webkit_test_helpers.cc b/content/shell/common/webkit_test_helpers.cc
index 91c1285..06090ad 100644
--- a/content/shell/common/webkit_test_helpers.cc
+++ b/content/shell/common/webkit_test_helpers.cc
@@ -99,8 +99,6 @@
prefs->asynchronous_spell_checking_enabled = false;
prefs->accelerated_2d_canvas_enabled =
command_line.HasSwitch(switches::kEnableAccelerated2DCanvas);
- prefs->force_compositing_mode =
- command_line.HasSwitch(switches::kForceCompositingMode);
prefs->accelerated_compositing_for_video_enabled = false;
prefs->mock_scrollbars_enabled = false;
prefs->smart_insert_delete_enabled = true;
diff --git a/content/shell/renderer/shell_content_renderer_client.cc b/content/shell/renderer/shell_content_renderer_client.cc
index c6bb80d..3af3674 100644
--- a/content/shell/renderer/shell_content_renderer_client.cc
+++ b/content/shell/renderer/shell_content_renderer_client.cc
@@ -191,9 +191,4 @@
ShellRenderProcessObserver::GetInstance()->test_delegate());
}
-bool ShellContentRendererClient::AllowBrowserPlugin(
- blink::WebPluginContainer* container) {
- return true;
-}
-
} // namespace content
diff --git a/content/shell/renderer/shell_content_renderer_client.h b/content/shell/renderer/shell_content_renderer_client.h
index cff6b76..84c7bd9 100644
--- a/content/shell/renderer/shell_content_renderer_client.h
+++ b/content/shell/renderer/shell_content_renderer_client.h
@@ -46,8 +46,6 @@
double sample_rate) OVERRIDE;
virtual blink::WebClipboard* OverrideWebClipboard() OVERRIDE;
virtual blink::WebThemeEngine* OverrideThemeEngine() OVERRIDE;
- virtual bool AllowBrowserPlugin(
- blink::WebPluginContainer* container) OVERRIDE;
private:
void WebTestProxyCreated(RenderView* render_view, WebTestProxyBase* proxy);
diff --git a/content/shell/renderer/test_runner/TestPlugin.cpp b/content/shell/renderer/test_runner/TestPlugin.cpp
index db9edc5..22f56f5 100644
--- a/content/shell/renderer/test_runner/TestPlugin.cpp
+++ b/content/shell/renderer/test_runner/TestPlugin.cpp
@@ -208,7 +208,7 @@
return false;
m_layer = cc::TextureLayer::CreateForMailbox(this);
- m_webLayer = make_scoped_ptr(new webkit::WebLayerImpl(m_layer));
+ m_webLayer = make_scoped_ptr(InstantiateWebLayer(m_layer));
m_container = container;
m_container->setWebLayer(m_webLayer.get());
if (m_reRequestTouchEvents) {
diff --git a/content/shell/renderer/test_runner/TestPlugin.h b/content/shell/renderer/test_runner/TestPlugin.h
index 8c1f06b..6d05ed8 100644
--- a/content/shell/renderer/test_runner/TestPlugin.h
+++ b/content/shell/renderer/test_runner/TestPlugin.h
@@ -11,15 +11,17 @@
#include "base/memory/scoped_ptr.h"
#include "cc/layers/texture_layer.h"
#include "cc/layers/texture_layer_client.h"
+#include "content/public/test/layouttest_support.h"
#include "third_party/WebKit/public/platform/WebExternalTextureLayer.h"
#include "third_party/WebKit/public/platform/WebExternalTextureLayerClient.h"
#include "third_party/WebKit/public/platform/WebExternalTextureMailbox.h"
+#include "third_party/WebKit/public/platform/WebLayer.h"
#include "third_party/WebKit/public/web/WebPlugin.h"
#include "third_party/WebKit/public/web/WebPluginContainer.h"
-#include "webkit/renderer/compositor_bindings/web_layer_impl.h"
namespace blink {
class WebFrame;
+class WebLayer;
}
namespace content {
@@ -138,7 +140,7 @@
unsigned m_framebuffer;
Scene m_scene;
scoped_refptr<cc::TextureLayer> m_layer;
- scoped_ptr<webkit::WebLayerImpl> m_webLayer;
+ scoped_ptr<blink::WebLayer> m_webLayer;
blink::WebPluginContainer::TouchEventRequestType m_touchEventRequest;
// Requests touch events from the WebPluginContainerImpl multiple times to tickle webkit.org/b/108381
diff --git a/content/shell/renderer/test_runner/WebPermissions.cpp b/content/shell/renderer/test_runner/WebPermissions.cpp
deleted file mode 100644
index b2cfd74..0000000
--- a/content/shell/renderer/test_runner/WebPermissions.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// 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 "content/shell/renderer/test_runner/WebPermissions.h"
-
-#include "content/shell/renderer/test_runner/TestCommon.h"
-#include "content/shell/renderer/test_runner/WebTestDelegate.h"
-#include "third_party/WebKit/public/platform/WebCString.h"
-#include "third_party/WebKit/public/platform/WebURL.h"
-
-using namespace std;
-
-namespace content {
-
-WebPermissions::WebPermissions()
- : m_delegate(0)
-{
- reset();
-}
-
-WebPermissions::~WebPermissions()
-{
-}
-
-bool WebPermissions::allowImage(bool enabledPerSettings, const blink::WebURL& imageURL)
-{
- bool allowed = enabledPerSettings && m_imagesAllowed;
- if (m_dumpCallbacks && m_delegate)
- m_delegate->printMessage(std::string("PERMISSION CLIENT: allowImage(") + normalizeLayoutTestURL(imageURL.spec()) + "): " + (allowed ? "true" : "false") + "\n");
- return allowed;
-}
-
-bool WebPermissions::allowScriptFromSource(bool enabledPerSettings, const blink::WebURL& scriptURL)
-{
- bool allowed = enabledPerSettings && m_scriptsAllowed;
- if (m_dumpCallbacks && m_delegate)
- m_delegate->printMessage(std::string("PERMISSION CLIENT: allowScriptFromSource(") + normalizeLayoutTestURL(scriptURL.spec()) + "): " + (allowed ? "true" : "false") + "\n");
- return allowed;
-}
-
-bool WebPermissions::allowStorage(bool)
-{
- return m_storageAllowed;
-}
-
-bool WebPermissions::allowPlugins(bool enabledPerSettings)
-{
- return enabledPerSettings && m_pluginsAllowed;
-}
-
-bool WebPermissions::allowDisplayingInsecureContent(bool enabledPerSettings, const blink::WebSecurityOrigin&, const blink::WebURL&)
-{
- return enabledPerSettings || m_displayingInsecureContentAllowed;
-}
-
-bool WebPermissions::allowRunningInsecureContent(bool enabledPerSettings, const blink::WebSecurityOrigin&, const blink::WebURL&)
-{
- return enabledPerSettings || m_runningInsecureContentAllowed;
-}
-
-void WebPermissions::setImagesAllowed(bool imagesAllowed)
-{
- m_imagesAllowed = imagesAllowed;
-}
-
-void WebPermissions::setScriptsAllowed(bool scriptsAllowed)
-{
- m_scriptsAllowed = scriptsAllowed;
-}
-
-void WebPermissions::setStorageAllowed(bool storageAllowed)
-{
- m_storageAllowed = storageAllowed;
-}
-
-void WebPermissions::setPluginsAllowed(bool pluginsAllowed)
-{
- m_pluginsAllowed = pluginsAllowed;
-}
-
-void WebPermissions::setDisplayingInsecureContentAllowed(bool allowed)
-{
- m_displayingInsecureContentAllowed = allowed;
-}
-
-void WebPermissions::setRunningInsecureContentAllowed(bool allowed)
-{
- m_runningInsecureContentAllowed = allowed;
-}
-
-void WebPermissions::setDelegate(WebTestDelegate* delegate)
-{
- m_delegate = delegate;
-}
-
-void WebPermissions::setDumpCallbacks(bool dumpCallbacks)
-{
- m_dumpCallbacks = dumpCallbacks;
-}
-
-void WebPermissions::reset()
-{
- m_dumpCallbacks = false;
- m_imagesAllowed = true;
- m_scriptsAllowed = true;
- m_storageAllowed = true;
- m_pluginsAllowed = true;
- m_displayingInsecureContentAllowed = false;
- m_runningInsecureContentAllowed = false;
-}
-
-} // namespace content
diff --git a/content/shell/renderer/test_runner/WebPermissions.h b/content/shell/renderer/test_runner/WebPermissions.h
deleted file mode 100644
index 85330b6..0000000
--- a/content/shell/renderer/test_runner/WebPermissions.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// 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 CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBPERMISSIONS_H_
-#define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBPERMISSIONS_H_
-
-#include "base/macros.h"
-#include "third_party/WebKit/public/web/WebFrame.h"
-#include "third_party/WebKit/public/web/WebPermissionClient.h"
-
-namespace content {
-
-class WebTestDelegate;
-
-class WebPermissions : public blink::WebPermissionClient {
-public:
- WebPermissions();
- virtual ~WebPermissions();
-
- // Override WebPermissionClient methods.
- virtual bool allowImage(bool enabledPerSettings, const blink::WebURL& imageURL);
- virtual bool allowScriptFromSource(bool enabledPerSettings, const blink::WebURL& scriptURL);
- virtual bool allowStorage(bool local);
- virtual bool allowPlugins(bool enabledPerSettings);
- virtual bool allowDisplayingInsecureContent(bool enabledPerSettings, const blink::WebSecurityOrigin&, const blink::WebURL&);
- virtual bool allowRunningInsecureContent(bool enabledPerSettings, const blink::WebSecurityOrigin&, const blink::WebURL&);
-
- // Hooks to set the different policies.
- void setImagesAllowed(bool);
- void setScriptsAllowed(bool);
- void setStorageAllowed(bool);
- void setPluginsAllowed(bool);
- void setDisplayingInsecureContentAllowed(bool);
- void setRunningInsecureContentAllowed(bool);
-
- // Resets the policy to allow everything, except for running insecure content.
- void reset();
-
- void setDelegate(WebTestDelegate*);
- void setDumpCallbacks(bool);
-
-private:
- WebTestDelegate* m_delegate;
- bool m_dumpCallbacks;
-
- bool m_imagesAllowed;
- bool m_scriptsAllowed;
- bool m_storageAllowed;
- bool m_pluginsAllowed;
- bool m_displayingInsecureContentAllowed;
- bool m_runningInsecureContentAllowed;
-
- DISALLOW_COPY_AND_ASSIGN(WebPermissions);
-};
-
-} // namespace content
-
-#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBPERMISSIONS_H_
diff --git a/content/shell/renderer/test_runner/mock_web_push_client.cc b/content/shell/renderer/test_runner/mock_web_push_client.cc
new file mode 100644
index 0000000..193e63f
--- /dev/null
+++ b/content/shell/renderer/test_runner/mock_web_push_client.cc
@@ -0,0 +1,60 @@
+// Copyright 2014 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 "content/shell/renderer/test_runner/mock_web_push_client.h"
+
+#include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
+#include "third_party/WebKit/public/platform/WebPushError.h"
+#include "third_party/WebKit/public/platform/WebPushRegistration.h"
+#include "third_party/WebKit/public/platform/WebString.h"
+
+using blink::WebString;
+
+namespace content {
+
+MockWebPushClient::MockWebPushClient()
+ // The default state should be be an error with "Registration failed." message
+ // because LayoutTests are currently depending on that.
+ : error_message_("Registration failed.") {
+}
+
+MockWebPushClient::~MockWebPushClient() {}
+
+void MockWebPushClient::SetMockSuccessValues(
+ const std::string& end_point, const std::string& registration_id) {
+ end_point_ = end_point;
+ registration_id_ = registration_id;
+ error_message_ = "";
+}
+
+void MockWebPushClient::SetMockErrorValues(const std::string& message) {
+ end_point_ = "";
+ registration_id_ = "";
+ error_message_ = message;
+}
+
+void MockWebPushClient::registerPushMessaging(
+ const WebString& sender_id,
+ blink::WebPushRegistrationCallbacks* callbacks) {
+ DCHECK(callbacks);
+
+ if (!error_message_.empty()) {
+ scoped_ptr<blink::WebPushError> error(
+ new blink::WebPushError(blink::WebPushError::ErrorTypeAbort,
+ WebString::fromUTF8(error_message_)));
+ callbacks->onError(error.release());
+ } else {
+ DCHECK(!end_point_.empty() && !registration_id_.empty());
+
+ scoped_ptr<blink::WebPushRegistration> registration(
+ new blink::WebPushRegistration(WebString::fromUTF8(end_point_),
+ WebString::fromUTF8(registration_id_)));
+ callbacks->onSuccess(registration.release());
+ }
+
+ delete callbacks;
+}
+
+} // namespace content
diff --git a/content/shell/renderer/test_runner/mock_web_push_client.h b/content/shell/renderer/test_runner/mock_web_push_client.h
new file mode 100644
index 0000000..e26e91a
--- /dev/null
+++ b/content/shell/renderer/test_runner/mock_web_push_client.h
@@ -0,0 +1,50 @@
+// Copyright 2014 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 CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_PUSH_CLIENT_H_
+#define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_PUSH_CLIENT_H_
+
+#include <string>
+
+#include "third_party/WebKit/public/platform/WebPushClient.h"
+
+namespace blink {
+class WebString;
+} // namespace blink
+
+namespace content {
+
+// MockWebPushClient is a mock implementation of WebPushClient to be able to
+// test the Push Message API in Blink without depending on the content layer.
+// The mock, for legacy reasons, automatically fails if it wasn't set to another
+// state. Consumers can set its success values and error values by calling
+// respectively SetMockSuccessValues and SetMockErrorValues. When
+// SetMockSuccessValues is called, the mock will always succeed until
+// SetMockErrorValues is called at which point it will always fail.
+class MockWebPushClient : public blink::WebPushClient {
+ public:
+ MockWebPushClient();
+ virtual ~MockWebPushClient();
+
+ void SetMockSuccessValues(const std::string& end_point,
+ const std::string& registration_id);
+
+ void SetMockErrorValues(const std::string& message);
+
+ private:
+ // WebPushClient implementation.
+ virtual void registerPushMessaging(
+ const blink::WebString& sender_id,
+ blink::WebPushRegistrationCallbacks* callbacks);
+
+ std::string end_point_;
+ std::string registration_id_;
+ std::string error_message_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockWebPushClient);
+};
+
+} // namespace content
+
+#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_PUSH_CLIENT_H_
diff --git a/content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler.cc b/content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler.cc
index ea10bb8..dca2f30 100644
--- a/content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler.cc
+++ b/content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler.cc
@@ -305,6 +305,7 @@
void MockWebRTCPeerConnectionHandler::stop() {
stopped_ = true;
+ task_list_.revokeAll();
}
} // namespace content
diff --git a/content/shell/renderer/test_runner/test_runner.cc b/content/shell/renderer/test_runner/test_runner.cc
index c4c81a9..31d12a4 100644
--- a/content/shell/renderer/test_runner/test_runner.cc
+++ b/content/shell/renderer/test_runner/test_runner.cc
@@ -10,15 +10,17 @@
#include "content/shell/common/test_runner/test_preferences.h"
#include "content/shell/renderer/test_runner/MockWebSpeechRecognizer.h"
#include "content/shell/renderer/test_runner/TestInterfaces.h"
-#include "content/shell/renderer/test_runner/WebPermissions.h"
#include "content/shell/renderer/test_runner/WebTestDelegate.h"
+#include "content/shell/renderer/test_runner/mock_web_push_client.h"
#include "content/shell/renderer/test_runner/notification_presenter.h"
+#include "content/shell/renderer/test_runner/web_permissions.h"
#include "content/shell/renderer/test_runner/web_test_proxy.h"
#include "gin/arguments.h"
#include "gin/array_buffer.h"
#include "gin/handle.h"
#include "gin/object_template_builder.h"
#include "gin/wrappable.h"
+#include "third_party/WebKit/public/platform/WebArrayBuffer.h"
#include "third_party/WebKit/public/platform/WebBatteryStatus.h"
#include "third_party/WebKit/public/platform/WebCanvas.h"
#include "third_party/WebKit/public/platform/WebData.h"
@@ -26,6 +28,7 @@
#include "third_party/WebKit/public/platform/WebDeviceOrientationData.h"
#include "third_party/WebKit/public/platform/WebPoint.h"
#include "third_party/WebKit/public/platform/WebURLResponse.h"
+#include "third_party/WebKit/public/web/WebArrayBufferConverter.h"
#include "third_party/WebKit/public/web/WebBindings.h"
#include "third_party/WebKit/public/web/WebDataSource.h"
#include "third_party/WebKit/public/web/WebDocument.h"
@@ -41,6 +44,7 @@
#include "third_party/WebKit/public/web/WebSettings.h"
#include "third_party/WebKit/public/web/WebSurroundingText.h"
#include "third_party/WebKit/public/web/WebView.h"
+#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
#if defined(__linux__) || defined(ANDROID)
@@ -80,7 +84,8 @@
public:
InvokeCallbackTask(TestRunner* object, v8::Handle<v8::Function> callback)
: WebMethodTask<TestRunner>(object),
- callback_(blink::mainThreadIsolate(), callback) {}
+ callback_(blink::mainThreadIsolate(), callback),
+ argc_(0) {}
virtual void runIfValid() OVERRIDE {
v8::Isolate* isolate = blink::mainThreadIsolate();
@@ -93,15 +98,32 @@
v8::Context::Scope context_scope(context);
+ scoped_ptr<v8::Handle<v8::Value>[]> local_argv;
+ if (argc_) {
+ local_argv.reset(new v8::Handle<v8::Value>[argc_]);
+ for (int i = 0; i < argc_; ++i)
+ local_argv[i] = v8::Local<v8::Value>::New(isolate, argv_[i]);
+ }
+
frame->callFunctionEvenIfScriptDisabled(
v8::Local<v8::Function>::New(isolate, callback_),
context->Global(),
- 0,
- NULL);
+ argc_,
+ local_argv.get());
+ }
+
+ void SetArguments(int argc, v8::Handle<v8::Value> argv[]) {
+ v8::Isolate* isolate = blink::mainThreadIsolate();
+ argc_ = argc;
+ argv_.reset(new v8::UniquePersistent<v8::Value>[argc]);
+ for (int i = 0; i < argc; ++i)
+ argv_[i] = v8::UniquePersistent<v8::Value>(isolate, argv[i]);
}
private:
v8::UniquePersistent<v8::Function> callback_;
+ int argc_;
+ scoped_ptr<v8::UniquePersistent<v8::Value>[]> argv_;
};
class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
@@ -211,6 +233,7 @@
void DumpResourceRequestCallbacks();
void DumpResourceResponseMIMETypes();
void SetImagesAllowed(bool allowed);
+ void SetMediaAllowed(bool allowed);
void SetScriptsAllowed(bool allowed);
void SetStorageAllowed(bool allowed);
void SetPluginsAllowed(bool allowed);
@@ -254,8 +277,12 @@
void RemoveWebPageOverlay();
void DisplayAsync();
void DisplayAsyncThen(v8::Handle<v8::Function> callback);
+ void CapturePixelsAsyncThen(v8::Handle<v8::Function> callback);
void SetCustomTextOutput(std::string output);
void SetViewSourceForFrame(const std::string& name, bool enabled);
+ void setMockPushClientSuccess(const std::string& end_point,
+ const std::string& registration_id);
+ void setMockPushClientError(const std::string& message);
bool GlobalFlag();
void SetGlobalFlag(bool value);
@@ -429,6 +456,7 @@
.SetMethod("dumpResourceResponseMIMETypes",
&TestRunnerBindings::DumpResourceResponseMIMETypes)
.SetMethod("setImagesAllowed", &TestRunnerBindings::SetImagesAllowed)
+ .SetMethod("setMediaAllowed", &TestRunnerBindings::SetMediaAllowed)
.SetMethod("setScriptsAllowed", &TestRunnerBindings::SetScriptsAllowed)
.SetMethod("setStorageAllowed", &TestRunnerBindings::SetStorageAllowed)
.SetMethod("setPluginsAllowed", &TestRunnerBindings::SetPluginsAllowed)
@@ -494,10 +522,15 @@
&TestRunnerBindings::RemoveWebPageOverlay)
.SetMethod("displayAsync", &TestRunnerBindings::DisplayAsync)
.SetMethod("displayAsyncThen", &TestRunnerBindings::DisplayAsyncThen)
+ .SetMethod("capturePixelsAsyncThen", &TestRunnerBindings::CapturePixelsAsyncThen)
.SetMethod("setCustomTextOutput",
&TestRunnerBindings::SetCustomTextOutput)
.SetMethod("setViewSourceForFrame",
&TestRunnerBindings::SetViewSourceForFrame)
+ .SetMethod("setMockPushClientSuccess",
+ &TestRunnerBindings::setMockPushClientSuccess)
+ .SetMethod("setMockPushClientError",
+ &TestRunnerBindings::setMockPushClientError)
// Properties.
.SetProperty("globalFlag",
@@ -1063,6 +1096,11 @@
runner_->SetImagesAllowed(allowed);
}
+void TestRunnerBindings::SetMediaAllowed(bool allowed) {
+ if (runner_)
+ runner_->SetMediaAllowed(allowed);
+}
+
void TestRunnerBindings::SetScriptsAllowed(bool allowed) {
if (runner_)
runner_->SetScriptsAllowed(allowed);
@@ -1285,6 +1323,12 @@
runner_->DisplayAsyncThen(callback);
}
+void TestRunnerBindings::CapturePixelsAsyncThen(
+ v8::Handle<v8::Function> callback) {
+ if (runner_)
+ runner_->CapturePixelsAsyncThen(callback);
+}
+
void TestRunnerBindings::SetCustomTextOutput(std::string output) {
runner_->setCustomTextOutput(output);
}
@@ -1299,6 +1343,19 @@
}
}
+void TestRunnerBindings::setMockPushClientSuccess(
+ const std::string& end_point, const std::string& registration_id) {
+ if (!runner_)
+ return;
+ runner_->SetMockPushClientSuccess(end_point, registration_id);
+}
+
+void TestRunnerBindings::setMockPushClientError(const std::string& message) {
+ if (!runner_)
+ return;
+ runner_->SetMockPushClientError(message);
+}
+
bool TestRunnerBindings::GlobalFlag() {
if (runner_)
return runner_->global_flag_;
@@ -1446,7 +1503,7 @@
void TestRunner::SetDelegate(WebTestDelegate* delegate) {
delegate_ = delegate;
- web_permissions_->setDelegate(delegate);
+ web_permissions_->SetDelegate(delegate);
notification_presenter_->set_delegate(delegate);
}
@@ -1544,7 +1601,7 @@
web_history_item_count_ = 0;
intercept_post_message_ = false;
- web_permissions_->reset();
+ web_permissions_->Reset();
notification_presenter_->Reset();
use_mock_theme_ = true;
@@ -2496,31 +2553,35 @@
}
void TestRunner::SetImagesAllowed(bool allowed) {
- web_permissions_->setImagesAllowed(allowed);
+ web_permissions_->SetImagesAllowed(allowed);
+}
+
+void TestRunner::SetMediaAllowed(bool allowed) {
+ web_permissions_->SetMediaAllowed(allowed);
}
void TestRunner::SetScriptsAllowed(bool allowed) {
- web_permissions_->setScriptsAllowed(allowed);
+ web_permissions_->SetScriptsAllowed(allowed);
}
void TestRunner::SetStorageAllowed(bool allowed) {
- web_permissions_->setStorageAllowed(allowed);
+ web_permissions_->SetStorageAllowed(allowed);
}
void TestRunner::SetPluginsAllowed(bool allowed) {
- web_permissions_->setPluginsAllowed(allowed);
+ web_permissions_->SetPluginsAllowed(allowed);
}
void TestRunner::SetAllowDisplayOfInsecureContent(bool allowed) {
- web_permissions_->setDisplayingInsecureContentAllowed(allowed);
+ web_permissions_->SetDisplayingInsecureContentAllowed(allowed);
}
void TestRunner::SetAllowRunningOfInsecureContent(bool allowed) {
- web_permissions_->setRunningInsecureContentAllowed(allowed);
+ web_permissions_->SetRunningInsecureContentAllowed(allowed);
}
void TestRunner::DumpPermissionClientCallbacks() {
- web_permissions_->setDumpCallbacks(true);
+ web_permissions_->SetDumpCallbacks(true);
}
void TestRunner::DumpWindowStatusChanges() {
@@ -2685,6 +2746,55 @@
base::Passed(&task)));
}
+void TestRunner::CapturePixelsAsyncThen(v8::Handle<v8::Function> callback) {
+ scoped_ptr<InvokeCallbackTask> task(
+ new InvokeCallbackTask(this, callback));
+ proxy_->CapturePixelsAsync(base::Bind(&TestRunner::CapturePixelsCallback,
+ base::Unretained(this),
+ base::Passed(&task)));
+}
+
+void TestRunner::CapturePixelsCallback(scoped_ptr<InvokeCallbackTask> task,
+ const SkBitmap& snapshot) {
+ v8::Isolate* isolate = blink::mainThreadIsolate();
+ v8::HandleScope handle_scope(isolate);
+
+ v8::Handle<v8::Context> context =
+ web_view_->mainFrame()->mainWorldScriptContext();
+ if (context.IsEmpty())
+ return;
+
+ v8::Context::Scope context_scope(context);
+ v8::Handle<v8::Value> argv[3];
+ SkAutoLockPixels snapshot_lock(snapshot);
+
+ int width = snapshot.info().fWidth;
+ DCHECK_NE(0, width);
+ argv[0] = v8::Number::New(isolate, width);
+
+ int height = snapshot.info().fHeight;
+ DCHECK_NE(0, height);
+ argv[1] = v8::Number::New(isolate, height);
+
+ blink::WebArrayBuffer buffer =
+ blink::WebArrayBuffer::create(snapshot.getSize(), 1);
+ memcpy(buffer.data(), snapshot.getPixels(), buffer.byteLength());
+ argv[2] = blink::WebArrayBufferConverter::toV8Value(
+ &buffer, context->Global(), isolate);
+
+ task->SetArguments(3, argv);
+ InvokeCallback(task.Pass());
+}
+
+void TestRunner::SetMockPushClientSuccess(
+ const std::string& end_point, const std::string& registration_id) {
+ proxy_->GetPushClientMock()->SetMockSuccessValues(end_point, registration_id);
+}
+
+void TestRunner::SetMockPushClientError(const std::string& message) {
+ proxy_->GetPushClientMock()->SetMockErrorValues(message);
+}
+
void TestRunner::LocationChangeDone() {
web_history_item_count_ = delegate_->navigationEntryCount();
diff --git a/content/shell/renderer/test_runner/test_runner.h b/content/shell/renderer/test_runner/test_runner.h
index ffeb9d9..2a1d751 100644
--- a/content/shell/renderer/test_runner/test_runner.h
+++ b/content/shell/renderer/test_runner/test_runner.h
@@ -15,6 +15,8 @@
#include "content/shell/renderer/test_runner/web_test_runner.h"
#include "v8/include/v8.h"
+class SkBitmap;
+
namespace blink {
class WebFrame;
class WebNotificationPresenter;
@@ -416,6 +418,7 @@
// WebPermissionClient related.
void SetImagesAllowed(bool allowed);
+ void SetMediaAllowed(bool allowed);
void SetScriptsAllowed(bool allowed);
void SetStorageAllowed(bool allowed);
void SetPluginsAllowed(bool allowed);
@@ -530,8 +533,20 @@
void DisplayAsync();
void DisplayAsyncThen(v8::Handle<v8::Function> callback);
+ // Similar to DisplayAsyncThen(), but pass parameters of the captured
+ // snapshot (width, height, snapshot) to the callback.
+ void CapturePixelsAsyncThen(v8::Handle<v8::Function> callback);
+
+ void SetMockPushClientSuccess(const std::string& end_point,
+ const std::string& registration_id);
+ void SetMockPushClientError(const std::string& message);
+
///////////////////////////////////////////////////////////////////////////
// Internal helpers
+
+ void CapturePixelsCallback(scoped_ptr<InvokeCallbackTask> task,
+ const SkBitmap& snapshot);
+
void CheckResponseMimeType();
void CompleteNotifyDone();
diff --git a/content/shell/renderer/test_runner/web_frame_test_proxy.h b/content/shell/renderer/test_runner/web_frame_test_proxy.h
index 41418f0..3eae474 100644
--- a/content/shell/renderer/test_runner/web_frame_test_proxy.h
+++ b/content/shell/renderer/test_runner/web_frame_test_proxy.h
@@ -203,8 +203,8 @@
virtual void willSendRequest(blink::WebLocalFrame* frame, unsigned identifier,
blink::WebURLRequest& request,
const blink::WebURLResponse& redirectResponse) {
- base_proxy_->WillSendRequest(frame, identifier, request, redirectResponse);
Base::willSendRequest(frame, identifier, request, redirectResponse);
+ base_proxy_->WillSendRequest(frame, identifier, request, redirectResponse);
}
virtual void didReceiveResponse(blink::WebLocalFrame* frame,
@@ -255,6 +255,11 @@
return base_proxy_->GetUserMediaClient();
}
+
+ virtual blink::WebMIDIClient* webMIDIClient() {
+ return base_proxy_->GetWebMIDIClient();
+ }
+
virtual bool willCheckAndDispatchMessageEvent(
blink::WebLocalFrame* sourceFrame, blink::WebFrame* targetFrame,
blink::WebSecurityOrigin target, blink::WebDOMMessageEvent event) {
diff --git a/content/shell/renderer/test_runner/web_permissions.cc b/content/shell/renderer/test_runner/web_permissions.cc
new file mode 100644
index 0000000..4d11f7a
--- /dev/null
+++ b/content/shell/renderer/test_runner/web_permissions.cc
@@ -0,0 +1,121 @@
+// Copyright 2014 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 "content/shell/renderer/test_runner/web_permissions.h"
+
+#include "content/shell/renderer/test_runner/TestCommon.h"
+#include "content/shell/renderer/test_runner/WebTestDelegate.h"
+#include "third_party/WebKit/public/platform/WebCString.h"
+#include "third_party/WebKit/public/platform/WebURL.h"
+
+namespace content {
+
+WebPermissions::WebPermissions() : delegate_(0) {
+ Reset();
+}
+
+WebPermissions::~WebPermissions() {}
+
+bool WebPermissions::allowImage(bool enabled_per_settings,
+ const blink::WebURL& image_url) {
+ bool allowed = enabled_per_settings && images_allowed_;
+ if (dump_callbacks_ && delegate_) {
+ delegate_->printMessage(std::string("PERMISSION CLIENT: allowImage(") +
+ normalizeLayoutTestURL(image_url.spec()) + "): " +
+ (allowed ? "true" : "false") + "\n");
+ }
+ return allowed;
+}
+
+bool WebPermissions::allowMedia(const blink::WebURL& image_url) {
+ bool allowed = media_allowed_;
+ if (dump_callbacks_ && delegate_)
+ delegate_->printMessage(std::string("PERMISSION CLIENT: allowMedia(") +
+ normalizeLayoutTestURL(image_url.spec()) + "): " +
+ (allowed ? "true" : "false") + "\n");
+ return allowed;
+}
+
+bool WebPermissions::allowScriptFromSource(bool enabled_per_settings,
+ const blink::WebURL& scriptURL) {
+ bool allowed = enabled_per_settings && scripts_allowed_;
+ if (dump_callbacks_ && delegate_) {
+ delegate_->printMessage(
+ std::string("PERMISSION CLIENT: allowScriptFromSource(") +
+ normalizeLayoutTestURL(scriptURL.spec()) + "): " +
+ (allowed ? "true" : "false") + "\n");
+ }
+ return allowed;
+}
+
+bool WebPermissions::allowStorage(bool) {
+ return storage_allowed_;
+}
+
+bool WebPermissions::allowPlugins(bool enabled_per_settings) {
+ return enabled_per_settings && plugins_allowed_;
+}
+
+bool WebPermissions::allowDisplayingInsecureContent(
+ bool enabled_per_settings,
+ const blink::WebSecurityOrigin&,
+ const blink::WebURL&) {
+ return enabled_per_settings || displaying_insecure_content_allowed_;
+}
+
+bool WebPermissions::allowRunningInsecureContent(
+ bool enabled_per_settings,
+ const blink::WebSecurityOrigin&,
+ const blink::WebURL&) {
+ return enabled_per_settings || running_insecure_content_allowed_;
+}
+
+void WebPermissions::SetImagesAllowed(bool images_allowed) {
+ images_allowed_ = images_allowed;
+}
+
+void WebPermissions::SetMediaAllowed(bool media_allowed) {
+ media_allowed_ = media_allowed;
+}
+
+void WebPermissions::SetScriptsAllowed(bool scripts_allowed) {
+ scripts_allowed_ = scripts_allowed;
+}
+
+void WebPermissions::SetStorageAllowed(bool storage_allowed) {
+ storage_allowed_ = storage_allowed;
+}
+
+void WebPermissions::SetPluginsAllowed(bool plugins_allowed) {
+ plugins_allowed_ = plugins_allowed;
+}
+
+void WebPermissions::SetDisplayingInsecureContentAllowed(bool allowed) {
+ displaying_insecure_content_allowed_ = allowed;
+}
+
+void WebPermissions::SetRunningInsecureContentAllowed(bool allowed) {
+ running_insecure_content_allowed_ = allowed;
+}
+
+void WebPermissions::SetDelegate(WebTestDelegate* delegate) {
+ delegate_ = delegate;
+}
+
+void WebPermissions::SetDumpCallbacks(bool dump_callbacks) {
+ dump_callbacks_ = dump_callbacks;
+}
+
+void WebPermissions::Reset() {
+ dump_callbacks_ = false;
+ images_allowed_ = true;
+ media_allowed_ = true;
+ scripts_allowed_ = true;
+ storage_allowed_ = true;
+ plugins_allowed_ = true;
+ displaying_insecure_content_allowed_ = false;
+ running_insecure_content_allowed_ = false;
+}
+
+} // namespace content
diff --git a/content/shell/renderer/test_runner/web_permissions.h b/content/shell/renderer/test_runner/web_permissions.h
new file mode 100644
index 0000000..412a9ef
--- /dev/null
+++ b/content/shell/renderer/test_runner/web_permissions.h
@@ -0,0 +1,67 @@
+// Copyright 2014 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 CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_PERMISSIONS_H_
+#define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_PERMISSIONS_H_
+
+#include "base/macros.h"
+#include "third_party/WebKit/public/web/WebPermissionClient.h"
+
+namespace content {
+
+class WebTestDelegate;
+
+class WebPermissions : public blink::WebPermissionClient {
+ public:
+ WebPermissions();
+ virtual ~WebPermissions();
+
+ // blink::WebPermissionClient:
+ virtual bool allowImage(bool enabledPerSettings,
+ const blink::WebURL& imageURL);
+ virtual bool allowMedia(const blink::WebURL& mediaURL);
+ virtual bool allowScriptFromSource(bool enabledPerSettings,
+ const blink::WebURL& scriptURL);
+ virtual bool allowStorage(bool local);
+ virtual bool allowPlugins(bool enabledPerSettings);
+ virtual bool allowDisplayingInsecureContent(bool enabledPerSettings,
+ const blink::WebSecurityOrigin&,
+ const blink::WebURL&);
+ virtual bool allowRunningInsecureContent(bool enabledPerSettings,
+ const blink::WebSecurityOrigin&,
+ const blink::WebURL&);
+
+ // Hooks to set the different policies.
+ void SetImagesAllowed(bool);
+ void SetMediaAllowed(bool);
+ void SetScriptsAllowed(bool);
+ void SetStorageAllowed(bool);
+ void SetPluginsAllowed(bool);
+ void SetDisplayingInsecureContentAllowed(bool);
+ void SetRunningInsecureContentAllowed(bool);
+
+ void SetDelegate(WebTestDelegate*);
+ void SetDumpCallbacks(bool);
+
+ // Resets the policy to allow everything, except for running insecure content.
+ void Reset();
+
+ private:
+ WebTestDelegate* delegate_;
+ bool dump_callbacks_;
+
+ bool images_allowed_;
+ bool media_allowed_;
+ bool scripts_allowed_;
+ bool storage_allowed_;
+ bool plugins_allowed_;
+ bool displaying_insecure_content_allowed_;
+ bool running_insecure_content_allowed_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebPermissions);
+};
+
+} // namespace content
+
+#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEB_PERMISSIONS_H_
diff --git a/content/shell/renderer/test_runner/web_test_proxy.cc b/content/shell/renderer/test_runner/web_test_proxy.cc
index dacd222..4bef535 100644
--- a/content/shell/renderer/test_runner/web_test_proxy.cc
+++ b/content/shell/renderer/test_runner/web_test_proxy.cc
@@ -19,6 +19,7 @@
#include "content/shell/renderer/test_runner/WebTestInterfaces.h"
#include "content/shell/renderer/test_runner/accessibility_controller.h"
#include "content/shell/renderer/test_runner/event_sender.h"
+#include "content/shell/renderer/test_runner/mock_web_push_client.h"
#include "content/shell/renderer/test_runner/mock_web_user_media_client.h"
#include "content/shell/renderer/test_runner/test_runner.h"
#include "content/shell/renderer/test_runner/web_test_runner.h"
@@ -1214,4 +1215,14 @@
return blink::WebString::fromUTF8(accept_languages_);
}
+MockWebPushClient* WebTestProxyBase::GetPushClientMock() {
+ if (!push_client_.get())
+ push_client_.reset(new MockWebPushClient);
+ return push_client_.get();
+}
+
+blink::WebPushClient* WebTestProxyBase::GetWebPushClient() {
+ return GetPushClientMock();
+}
+
} // namespace content
diff --git a/content/shell/renderer/test_runner/web_test_proxy.h b/content/shell/renderer/test_runner/web_test_proxy.h
index 1f9f181..9facecf 100644
--- a/content/shell/renderer/test_runner/web_test_proxy.h
+++ b/content/shell/renderer/test_runner/web_test_proxy.h
@@ -51,6 +51,7 @@
class WebNode;
class WebNotificationPresenter;
class WebPlugin;
+class WebPushClient;
class WebRange;
class WebSerializedScriptValue;
class WebSpeechRecognizer;
@@ -74,6 +75,7 @@
namespace content {
+class MockWebPushClient;
class MockWebSpeechRecognizer;
class MockWebUserMediaClient;
class RenderFrame;
@@ -137,6 +139,8 @@
void SetAcceptLanguages(const std::string& accept_languages);
+ MockWebPushClient* GetPushClientMock();
+
protected:
WebTestProxyBase();
~WebTestProxyBase();
@@ -233,6 +237,7 @@
void ResetInputMethod();
blink::WebString acceptLanguages();
+ blink::WebPushClient* GetWebPushClient();
private:
template <class, typename, typename>
@@ -263,6 +268,7 @@
scoped_ptr<blink::WebMIDIClientMock> midi_client_;
scoped_ptr<MockWebSpeechRecognizer> speech_recognizer_;
+ scoped_ptr<MockWebPushClient> push_client_;
std::string accept_languages_;
@@ -335,9 +341,6 @@
virtual void printPage(blink::WebLocalFrame* frame) {
WebTestProxyBase::PrintPage(frame);
}
- virtual blink::WebMIDIClient* webMIDIClient() {
- return WebTestProxyBase::GetWebMIDIClient();
- }
virtual blink::WebSpeechRecognizer* speechRecognizer() {
return WebTestProxyBase::GetSpeechRecognizer();
}
@@ -379,6 +382,9 @@
virtual blink::WebString acceptLanguages() {
return WebTestProxyBase::acceptLanguages();
}
+ virtual blink::WebPushClient* webPushClient() {
+ return WebTestProxyBase::GetWebPushClient();
+ }
private:
DISALLOW_COPY_AND_ASSIGN(WebTestProxy);
diff --git a/content/shell/renderer/webkit_test_runner.cc b/content/shell/renderer/webkit_test_runner.cc
index 9c069d0..b251935 100644
--- a/content/shell/renderer/webkit_test_runner.cc
+++ b/content/shell/renderer/webkit_test_runner.cc
@@ -151,7 +151,7 @@
if (render_view == main_render_view_)
return true;
render_view->GetWebView()->mainFrame()->loadRequest(
- WebURLRequest(GURL(kAboutBlankURL)));
+ WebURLRequest(GURL(url::kAboutBlankURL)));
return true;
}
@@ -706,7 +706,7 @@
// Navigating to about:blank will make sure that no new loads are initiated
// by the renderer.
render_view()->GetWebView()->mainFrame()->loadRequest(
- WebURLRequest(GURL(kAboutBlankURL)));
+ WebURLRequest(GURL(url::kAboutBlankURL)));
Send(new ShellViewHostMsg_ResetDone(routing_id()));
}
@@ -718,7 +718,7 @@
void WebKitTestRunner::OnTryLeakDetection() {
WebLocalFrame* main_frame =
render_view()->GetWebView()->mainFrame()->toWebLocalFrame();
- DCHECK_EQ(GURL(kAboutBlankURL), GURL(main_frame->document().url()));
+ DCHECK_EQ(GURL(url::kAboutBlankURL), GURL(main_frame->document().url()));
DCHECK(!main_frame->isLoading());
leak_detector_->TryLeakDetection(main_frame);
diff --git a/content/speech_recognition_error_java.target.darwin-arm.mk b/content/speech_recognition_error_java.target.darwin-arm.mk
index 3c37ab2..58dae17 100644
--- a/content/speech_recognition_error_java.target.darwin-arm.mk
+++ b/content/speech_recognition_error_java.target.darwin-arm.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/speech_recognition_error_java.target.darwin-arm64.mk b/content/speech_recognition_error_java.target.darwin-arm64.mk
index 43b03d9..ef1a9d9 100644
--- a/content/speech_recognition_error_java.target.darwin-arm64.mk
+++ b/content/speech_recognition_error_java.target.darwin-arm64.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,6 +111,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/speech_recognition_error_java.target.darwin-mips.mk b/content/speech_recognition_error_java.target.darwin-mips.mk
index a2f92f0..4e6c3e7 100644
--- a/content/speech_recognition_error_java.target.darwin-mips.mk
+++ b/content/speech_recognition_error_java.target.darwin-mips.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -176,6 +178,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -205,6 +208,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/speech_recognition_error_java.target.darwin-x86.mk b/content/speech_recognition_error_java.target.darwin-x86.mk
index 79ec862..4e0fd09 100644
--- a/content/speech_recognition_error_java.target.darwin-x86.mk
+++ b/content/speech_recognition_error_java.target.darwin-x86.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -115,6 +116,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/speech_recognition_error_java.target.darwin-x86_64.mk b/content/speech_recognition_error_java.target.darwin-x86_64.mk
index b22147d..f28382b 100644
--- a/content/speech_recognition_error_java.target.darwin-x86_64.mk
+++ b/content/speech_recognition_error_java.target.darwin-x86_64.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -175,6 +177,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/speech_recognition_error_java.target.linux-arm.mk b/content/speech_recognition_error_java.target.linux-arm.mk
index 3c37ab2..58dae17 100644
--- a/content/speech_recognition_error_java.target.linux-arm.mk
+++ b/content/speech_recognition_error_java.target.linux-arm.mk
@@ -92,6 +92,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -120,6 +121,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -188,6 +190,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/speech_recognition_error_java.target.linux-arm64.mk b/content/speech_recognition_error_java.target.linux-arm64.mk
index 43b03d9..ef1a9d9 100644
--- a/content/speech_recognition_error_java.target.linux-arm64.mk
+++ b/content/speech_recognition_error_java.target.linux-arm64.mk
@@ -82,6 +82,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -110,6 +111,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -167,6 +169,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/speech_recognition_error_java.target.linux-mips.mk b/content/speech_recognition_error_java.target.linux-mips.mk
index a2f92f0..4e6c3e7 100644
--- a/content/speech_recognition_error_java.target.linux-mips.mk
+++ b/content/speech_recognition_error_java.target.linux-mips.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -176,6 +178,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -205,6 +208,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/speech_recognition_error_java.target.linux-x86.mk b/content/speech_recognition_error_java.target.linux-x86.mk
index 79ec862..4e0fd09 100644
--- a/content/speech_recognition_error_java.target.linux-x86.mk
+++ b/content/speech_recognition_error_java.target.linux-x86.mk
@@ -87,6 +87,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -115,6 +116,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/speech_recognition_error_java.target.linux-x86_64.mk b/content/speech_recognition_error_java.target.linux-x86_64.mk
index b22147d..f28382b 100644
--- a/content/speech_recognition_error_java.target.linux-x86_64.mk
+++ b/content/speech_recognition_error_java.target.linux-x86_64.mk
@@ -86,6 +86,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -114,6 +115,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -175,6 +177,7 @@
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/content/test/accessibility_browser_test_utils.cc b/content/test/accessibility_browser_test_utils.cc
index dc7a7f8..ba0331c 100644
--- a/content/test/accessibility_browser_test_utils.cc
+++ b/content/test/accessibility_browser_test_utils.cc
@@ -80,7 +80,7 @@
if (root.string_attributes[i].first != ui::AX_ATTR_DOC_URL)
continue;
const std::string& doc_url = root.string_attributes[i].second;
- return doc_url == kAboutBlankURL;
+ return doc_url == url::kAboutBlankURL;
}
return false;
}
diff --git a/content/test/content_test_launcher.cc b/content/test/content_test_launcher.cc
index 64e91f8..9223442 100644
--- a/content/test/content_test_launcher.cc
+++ b/content/test/content_test_launcher.cc
@@ -7,6 +7,7 @@
#include "base/base_paths.h"
#include "base/command_line.h"
#include "base/debug/stack_trace.h"
+#include "base/i18n/icu_util.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "base/process/memory.h"
@@ -51,6 +52,9 @@
virtual void Initialize() OVERRIDE {
#if defined(OS_ANDROID)
+ base::i18n::AllowMultipleInitializeCallsForTesting();
+ base::i18n::InitializeICU();
+
// This needs to be done before base::TestSuite::Initialize() is called,
// as it also tries to set MessagePumpForUIFactory.
if (!base::MessageLoop::InitMessagePumpForUIFactory(
@@ -76,14 +80,6 @@
ContentTestSuiteBase::Initialize();
}
- virtual void Shutdown() OVERRIDE {
- ContentTestSuiteBase::Shutdown();
-
-#if defined(OS_ANDROID)
- ShutdownMojo();
-#endif
- }
-
#if defined(OS_ANDROID)
scoped_ptr<ShellContentClient> content_client_;
scoped_ptr<ShellContentBrowserClient> browser_content_client_;
diff --git a/content/test/content_test_suite.cc b/content/test/content_test_suite.cc
index 9aef770..6553b67 100644
--- a/content/test/content_test_suite.cc
+++ b/content/test/content_test_suite.cc
@@ -6,13 +6,15 @@
#include "base/base_paths.h"
#include "base/logging.h"
-#include "base/path_service.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_paths.h"
#include "content/public/test/test_content_client_initializer.h"
#include "gpu/config/gpu_util.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/base/resource/resource_bundle.h"
+
+#if defined(OS_WIN)
+#include "ui/gfx/win/dpi.h"
+#endif
#if defined(OS_MACOSX)
#include "base/mac/scoped_nsautorelease_pool.h"
@@ -53,18 +55,9 @@
ContentTestSuite::ContentTestSuite(int argc, char** argv)
: ContentTestSuiteBase(argc, argv) {
-#if defined(USE_AURA)
- base::FilePath pak_file;
- PathService::Get(base::DIR_MODULE, &pak_file);
- pak_file = pak_file.AppendASCII("ui_test.pak");
- ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
-#endif
}
ContentTestSuite::~ContentTestSuite() {
-#if defined(USE_AURA)
- ui::ResourceBundle::CleanupSharedInstance();
-#endif
}
void ContentTestSuite::Initialize() {
@@ -72,6 +65,10 @@
base::mac::ScopedNSAutoreleasePool autorelease_pool;
#endif
+#if defined(OS_WIN)
+ gfx::InitDeviceScaleFactor(1.0f);
+#endif
+
ContentTestSuiteBase::Initialize();
{
ContentClient client;
diff --git a/content/test/data/battery_status/battery_status_default_test.html b/content/test/data/battery_status/battery_status_default_test.html
new file mode 100644
index 0000000..fee475e
--- /dev/null
+++ b/content/test/data/battery_status/battery_status_default_test.html
@@ -0,0 +1,36 @@
+<html>
+ <head>
+ <title>Battery Status API test : default values</title>
+ <script type="text/javascript">
+
+ function checkBatteryInfo(battery) {
+ return battery.charging &&
+ battery.chargingTime == 0 &&
+ battery.dischargingTime == Infinity &&
+ battery.level == 1.0;
+ }
+
+ function testBattery() {
+ navigator.getBattery().then(
+ function(battery) {
+ if (checkBatteryInfo(battery))
+ pass();
+ else
+ fail();
+ }, fail());
+ }
+
+ function pass() {
+ document.getElementById('status').innerHTML = 'PASS';
+ document.location = '#pass';
+ }
+
+ function fail() {
+ document.location = '#fail';
+ }
+ </script>
+ </head>
+ <body onLoad="testBattery()">
+ <div id="status">FAIL</div>
+ </body>
+</html>
diff --git a/content/test/data/battery_status/battery_status_event_listener_test.html b/content/test/data/battery_status/battery_status_event_listener_test.html
new file mode 100644
index 0000000..952a4e7
--- /dev/null
+++ b/content/test/data/battery_status/battery_status_event_listener_test.html
@@ -0,0 +1,34 @@
+<html>
+ <head>
+ <title>Battery Status API test : event listener</title>
+ <script type="text/javascript">
+
+ function testBattery() {
+ navigator.getBattery().then(
+ function(battery) {
+ battery.addEventListener('levelchange', onLevelChange);
+ document.location = '#resolved';
+ }, fail());
+ }
+
+ function onLevelChange() {
+ if (this.level == 0.6)
+ pass();
+ else
+ fail();
+ }
+
+ function pass() {
+ document.getElementById('status').innerHTML = 'PASS';
+ document.location = '#pass';
+ }
+
+ function fail() {
+ document.location = '#fail';
+ }
+ </script>
+ </head>
+ <body onLoad="testBattery()">
+ <div id="status">FAIL</div>
+ </body>
+</html>
diff --git a/content/test/data/battery_status/battery_status_promise_resolution_test.html b/content/test/data/battery_status/battery_status_promise_resolution_test.html
new file mode 100644
index 0000000..43966b8
--- /dev/null
+++ b/content/test/data/battery_status/battery_status_promise_resolution_test.html
@@ -0,0 +1,36 @@
+<html>
+ <head>
+ <title>Battery Status API test : promise resolution</title>
+ <script type="text/javascript">
+
+ function checkBatteryInfo(battery) {
+ return battery.charging &&
+ battery.chargingTime == 100 &&
+ battery.dischargingTime == Infinity &&
+ battery.level == 0.5;
+ }
+
+ function testBattery() {
+ navigator.getBattery().then(
+ function(battery) {
+ if (checkBatteryInfo(battery))
+ pass();
+ else
+ fail();
+ }, fail());
+ }
+
+ function pass() {
+ document.getElementById('status').innerHTML = 'PASS';
+ document.location = '#pass';
+ }
+
+ function fail() {
+ document.location = '#fail';
+ }
+ </script>
+ </head>
+ <body onLoad="testBattery()">
+ <div id="status">FAIL</div>
+ </body>
+</html>
diff --git a/content/test/data/media/OWNERS b/content/test/data/media/OWNERS
index 99ecf73..2c40f7a 100644
--- a/content/test/data/media/OWNERS
+++ b/content/test/data/media/OWNERS
@@ -1,7 +1,6 @@
acolwell@chromium.org
dalecurtis@chromium.org
ddorwin@chromium.org
-fischman@chromium.org
scherkus@chromium.org
shadi@chromium.org
tommi@chromium.org
diff --git a/content/test/data/media/getusermedia.html b/content/test/data/media/getusermedia.html
index 0855cf2..cdc13ab 100644
--- a/content/test/data/media/getusermedia.html
+++ b/content/test/data/media/getusermedia.html
@@ -13,9 +13,9 @@
reportTestSuccess();
});
- function getSources() {
- MediaStreamTrack.getSources(function(devices) {
- document.title = 'Sources Available';
+ function getMediaDevices() {
+ navigator.getMediaDevices(function(devices) {
+ document.title = 'Media devices available';
sendValueToTest(JSON.stringify(devices));
});
}
@@ -173,7 +173,7 @@
function(stream) {
displayIntoVideoElement(stream,
function() {
- stopBothVideoTracksAndVerify(stream);
+ stopBothVideoTracksAndVerify(stream);
},
'local-view-2');
},
@@ -183,7 +183,7 @@
var stopBothVideoTracksAndVerify = function(streamPlayingInLocalView2) {
streamPlayingInLocalView2.getVideoTracks()[0].stop();
waitForVideoToStop('local-view-2');
- // Make sure the video track in gLocalStream is still playing in
+ // Make sure the video track in gLocalStream is still playing in
// 'local-view1' and then stop it.
displayAndDetectVideo(gLocalStream, stopVideoTrack);
};
@@ -385,7 +385,7 @@
if (++iterations > maxIterations) {
clearInterval(detectorInterval);
- // Allow maxLightGreenPixelsY = maxLightGreenPixelsX +-1 due to
+ // Allow maxLightGreenPixelsY = maxLightGreenPixelsX +-1 due to
// possible subpixel rendering on Mac and Android.
if (maxLightGreenPixelsY > maxLightGreenPixelsX + 1 ||
maxLightGreenPixelsY < maxLightGreenPixelsX -1 ||
diff --git a/content/test/data/media/peerconnection-call.html b/content/test/data/media/peerconnection-call.html
index 7bf8d60..e76ef26 100644
--- a/content/test/data/media/peerconnection-call.html
+++ b/content/test/data/media/peerconnection-call.html
@@ -301,9 +301,9 @@
remoteAudioTrack.enabled = enabled;
}
- function callAndEnsureAudioIsPlaying(beLenient) {
+ function callAndEnsureAudioIsPlaying(beLenient, constraints) {
createConnections(null);
- navigator.webkitGetUserMedia({audio: true, video: true},
+ navigator.webkitGetUserMedia(constraints,
addStreamToBothConnectionsAndNegotiate, printGetUserMediaError);
// Wait until we have gathered samples and can conclude if audio is playing.
@@ -314,16 +314,13 @@
verifyAudioIsPlaying(samples, beLenient);
eventOccured();
});
-
- // (Also, ensure video muting doesn't affect audio).
- enableRemoteVideo(gSecondConnection, false);
};
- detectVideoPlaying('remote-view-2', onCallEstablished);
+ waitForConnectionToStabilize(gFirstConnection, onCallEstablished);
}
function callAndEnsureAudioTrackMutingWorks(beLenient) {
- callAndEnsureAudioIsPlaying(beLenient);
+ callAndEnsureAudioIsPlaying(beLenient, {audio: true, video: true});
setAllEventsOccuredHandler(function() {
// Call is up, now mute the track and check everything goes silent (give
// it a small delay though, we don't expect it to happen instantly).
@@ -339,10 +336,12 @@
}
function callAndEnsureAudioTrackUnmutingWorks(beLenient) {
- callAndEnsureAudioIsPlaying(beLenient);
+ callAndEnsureAudioIsPlaying(beLenient, {audio: true, video: true});
setAllEventsOccuredHandler(function() {
// Mute, wait a while, unmute, verify audio gets back up.
+ // (Also, ensure video muting doesn't affect audio).
enableRemoteAudio(gSecondConnection, false);
+ enableRemoteVideo(gSecondConnection, false);
setTimeout(function() {
enableRemoteAudio(gSecondConnection, true);
diff --git a/content/test/data/media/webrtc_test_audio.js b/content/test/data/media/webrtc_test_audio.js
index 0cf4ac7..b9785bf 100644
--- a/content/test/data/media/webrtc_test_audio.js
+++ b/content/test/data/media/webrtc_test_audio.js
@@ -15,7 +15,16 @@
var audioLevelSamples = []
var gatherSamples = setInterval(function() {
peerConnection.getStats(function(response) {
- audioLevelSamples.push(getAudioLevelFromStats_(response));
+ audioOutputLevels = getAudioLevelFromStats_(response);
+ if (audioOutputLevels.length == 0) {
+ // The call probably isn't up yet.
+ return;
+ }
+
+ // If more than one audio level is reported we get confused.
+ assertEquals(1, audioOutputLevels.length);
+ audioLevelSamples.push(audioOutputLevels[0]);
+
if (audioLevelSamples.length == numSamples) {
console.log('Gathered all samples.');
clearInterval(gatherSamples);
@@ -83,8 +92,5 @@
audioOutputLevels.push(report.stat('audioOutputLevel'));
}
}
- // Should only be one audio level reported, otherwise we get confused.
- assertEquals(1, audioOutputLevels.length);
-
- return audioOutputLevels[0];
+ return audioOutputLevels;
}
diff --git a/content/test/data/overscroll_navigation.html b/content/test/data/overscroll_navigation.html
index 4bde51b..12fc696 100644
--- a/content/test/data/overscroll_navigation.html
+++ b/content/test/data/overscroll_navigation.html
@@ -57,6 +57,14 @@
document.removeEventListener('touchstart', touch_start_handler);
}
+function use_replace_state() {
+ window.history.replaceState({}, 'foo');
+}
+
+function use_push_state() {
+ window.history.pushState({}, 'foo2');
+}
+
onload = function() {
window.onhashchange = function() {
document.title = "Title: " + location.hash;
diff --git a/content/test/data/webcrypto/aes_gcm.json b/content/test/data/webcrypto/aes_gcm.json
index 1fa2aff..2624f11 100644
--- a/content/test/data/webcrypto/aes_gcm.json
+++ b/content/test/data/webcrypto/aes_gcm.json
@@ -45,17 +45,17 @@
"authentication_tag": "ba82e49c55a22ed02ca67da4ec6f"
},
- // [Keylen = 192]
- // [IVlen = 96]
- // [PTlen = 128]
- // [AADlen = 384]
- // [Taglen = 112]
+ // [Keylen = 256]
+ // [IVlen = 1024]
+ // [PTlen = 408]
+ // [AADlen = 720]
+ // [Taglen = 32]
{
- "key": "ae7972c025d7f2ca3dd37dcc3d41c506671765087c6b61b8",
- "iv": "984c1379e6ba961c828d792d",
- "plain_text": "d30b02c343487105219d6fa080acc743",
- "cipher_text": "c4489fa64a6edf80e7e6a3b8855bc37c",
- "additional_data": "edd8f630f9bbc31b0acf122998f15589d6e6e3e1a3ec89e0c6a6ece751610ebbf57fdfb9d82028ff1d9faebe37a268c1",
- "authentication_tag": "772ee7de0f91a981c36c93a35c88"
+ "key": "e03548984a7ec8eaf0870637df0ac6bc17f7159315d0ae26a764fd224e483810",
+ "iv": "f4feb26b846be4cd224dbc5133a5ae13814ebe19d3032acdd3a006463fdb71e83a9d5d96679f26cc1719dd6b4feb3bab5b4b7993d0c0681f36d105ad3002fb66b201538e2b7479838ab83402b0d816cd6e0fe5857e6f4adf92de8ee72b122ba1ac81795024943b7d0151bbf84ce87c8911f512c397d14112296da7ecdd0da52a",
+ "cipher_text": "fda718aa1ec163487e21afc34f5a3a34795a9ee71dd3e7ee9a18fdb24181dc982b29c6ec723294a130ca2234952bb0ef68c0f3",
+ "additional_data": "aab26eb3e7acd09a034a9e2651636ab3868e51281590ecc948355e457da42b7ad1391c7be0d9e82895e506173a81857c3226829fbd6dfb3f9657a71a2934445d7c05fa9401cddd5109016ba32c3856afaadc48de80b8a01b57cb",
+ "authentication_tag": "4795fbe0",
+ "plain_text": "69fd0c9da10b56ec6786333f8d76d4b74f8a434195f2f241f088b2520fb5fa29455df9893164fb1638abe6617915d9497a8fe2"
}
]
diff --git a/content/test/data/webcrypto/aes_kw.json b/content/test/data/webcrypto/aes_kw.json
index a5622e7..dcc8f3f 100644
--- a/content/test/data/webcrypto/aes_kw.json
+++ b/content/test/data/webcrypto/aes_kw.json
@@ -6,24 +6,12 @@
"key": "00112233445566778899AABBCCDDEEFF",
"ciphertext": "1FA68B0A8112B447AEF34BD8FB5A7B829D3E862371D2CFE5"
},
- // 4.2 Wrap 128 bits of Key Data with a 192-bit KEK
- {
- "kek": "000102030405060708090A0B0C0D0E0F1011121314151617",
- "key": "00112233445566778899AABBCCDDEEFF",
- "ciphertext": "96778B25AE6CA435F92B5B97C050AED2468AB8A17AD84E5D"
- },
// 4.3 Wrap 128 bits of Key Data with a 256-bit KEK
{
"kek": "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F",
"key": "00112233445566778899AABBCCDDEEFF",
"ciphertext": "64E8C3F9CE0F5BA263E9777905818A2A93C8191E7D6E8AE7"
},
- // 4.4 Wrap 192 bits of Key Data with a 192-bit KEK
- {
- "kek": "000102030405060708090A0B0C0D0E0F1011121314151617",
- "key": "00112233445566778899AABBCCDDEEFF0001020304050607",
- "ciphertext": "031D33264E15D33268F24EC260743EDCE1C6C7DDEE725A936BA814915C6762D2"
- },
// 4.5 Wrap 192 bits of Key Data with a 256-bit KEK
{
"kek": "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F",
@@ -36,4 +24,4 @@
"key": "00112233445566778899AABBCCDDEEFF000102030405060708090A0B0C0D0E0F",
"ciphertext": "28C9F404C4B810F4CBCCB35CFB87F8263F5786E2D80ED326CBC7F0E71A99F43BFB988B9B7A02DD21"
}
-]
\ No newline at end of file
+]
diff --git a/content/test/data/webcrypto/rsa_private_keys.json b/content/test/data/webcrypto/rsa_private_keys.json
new file mode 100644
index 0000000..175f6d2
--- /dev/null
+++ b/content/test/data/webcrypto/rsa_private_keys.json
@@ -0,0 +1,191 @@
+// This contains a list of RSA private keys of varying sizes (512, 1024, 2048,
+// 4096 bits), along with the corresponding JWK and PKCS8 representations.
+//
+// The key data itself generated using WebCrypto, and then some manual spot
+// checks done over it.
+//
+// * The "modulusLength" field is the modulus length in bits.
+// * The "pkcs8" field is hex-encoded PKCS8 format.
+// * The "jwk" field is the JWK without any extra fluff (i.e. no "ext",
+// "key_ops", "use" fields).
+[ {
+ "jwk": {
+ "alg": "RS256",
+ "d": "ZmJJJ3PBfirgPEOb844fI_1_zXn3A09X9fkk-65xeTNo3JeigTPpuB54FC_GXUmqiXLVx5gynO6cwl9wjxVKYQ",
+ "dp": "DOUuUiDhtjpnCuIjcGRWhQYok8NeUO5XV1Uwx1-DxtU",
+ "dq": "mKOBL1e74J8OuGtW1kc2-s4VEP5Eeiwe__TAeBm-roE",
+ "e": "AQAB",
+ "kty": "RSA",
+ "n": "tFJAFt_UiJsHlRavDgOxOnYKTHkV-cF1aTDtkzNg6WYt9geaPbAvFnR3FVO0BFsl8tzPzMOTkI_kbOfCfAw3FQ",
+ "p": "7kMQn01JVhyHM7B85hLUuNBDsXiboMc4Di81qmxX7r0",
+ "q": "wb7rEiGxG4CrybVYns9voNQM2NPCuCEgWPLA_vCkuzk",
+ "qi": "6rrPQ4YaOLNGtG7TrLXUR_FSWpOFSUveHTHbFQU6iNU"
+ },
+ "modulusLength": 512,
+ "pkcs8": "30820155020100300D06092A864886F70D01010105000482013F3082013B020100024100B4524016DFD4889B079516AF0E03B13A760A4C7915F9C1756930ED933360E9662DF6079A3DB02F1674771553B4045B25F2DCCFCCC393908FE46CE7C27C0C3715020301000102406662492773C17E2AE03C439BF38E1F23FD7FCD79F7034F57F5F924FBAE71793368DC97A28133E9B81E78142FC65D49AA8972D5C798329CEE9CC25F708F154A61022100EE43109F4D49561C8733B07CE612D4B8D043B1789BA0C7380E2F35AA6C57EEBD022100C1BEEB1221B11B80ABC9B5589ECF6FA0D40CD8D3C2B8212058F2C0FEF0A4BB3902200CE52E5220E1B63A670AE22370645685062893C35E50EE57575530C75F83C6D502210098A3812F57BBE09F0EB86B56D64736FACE1510FE447A2C1EFFF4C07819BEAE81022100EABACF43861A38B346B46ED3ACB5D447F1525A9385494BDE1D31DB15053A88D5"
+}, {
+ "jwk": {
+ "alg": "RS256",
+ "d": "OUtBVkkjypeJak-aSRhlgXCpcukkzy5ZUY6nxJYjRavZ9DG7T9lW4vYuhdHeTTsvR92j9BQQowCojE4K2EgzTO-w323LRkAWO9PuovFFjg5UFVo3n27TWGF1GeAlct6BefAVdv7O7dZzYYuFwbxOde72r0dl7VnnUmTqlP2GmSE",
+ "dp": "jj-YFfCnRKyofw9b858VnIpQ_HLKgtydb1wgM64-q3UcZtOglu-ODSjIYt8A7ofr2bL5z6Zk-aqa7C0cnOnoAw",
+ "dq": "k8tgu267woHMO_RVh8ECrWLHTa_kiIoY_KYLFiFznLYD8dnscOrMlpkqIJYIX-DM5BsXcFGrKXhtUSzMJljksQ",
+ "e": "AQAB",
+ "kty": "RSA",
+ "n": "0fIJ9KufPFnj1BmonFf6_OV1-0GfycSMVHNFzALq_8XS6Z-MI58qCya9XrDGi92njnomeJt06j9YizkkbtTWnSpyAxydtqQ9ms2ZKIIucEWUyyrmg3iZP7HLw-BxWOgFwYqFlteJ32Vdvo9HTuJCRcFs9FgVVQs6wWhgVbO8b7c",
+ "p": "_1zotW3F2U4pMEdvV4528N-0bRxUYlz4zFKolvN4rGsQSgz4ALr0zmhQBcYeX88K3AaBCB1fQ2SN5LjhFSyHJw",
+ "q": "0ngfluJ5cK5CtM0jN8H6gZt8eoe7BnNeB7RYmnH3epgCZv9wlnSAgXEwFoTDo44JQA3cEqyse5QCs4T1_8Ws8Q",
+ "qi": "aYt1HO6GYnSB35wbAqEkVb4pb6sfWEV2njJijCzZILN9YFfj5HGAKFLC3K2kVkum0iAIzl16bkfRQcSSe7lcCQ"
+ },
+ "modulusLength": 1024,
+ "pkcs8": "30820277020100300D06092A864886F70D0101010500048202613082025D02010002818100D1F209F4AB9F3C59E3D419A89C57FAFCE575FB419FC9C48C547345CC02EAFFC5D2E99F8C239F2A0B26BD5EB0C68BDDA78E7A26789B74EA3F588B39246ED4D69D2A72031C9DB6A43D9ACD9928822E704594CB2AE68378993FB1CBC3E07158E805C18A8596D789DF655DBE8F474EE24245C16CF45815550B3AC1686055B3BC6FB70203010001028180394B41564923CA97896A4F9A4918658170A972E924CF2E59518EA7C4962345ABD9F431BB4FD956E2F62E85D1DE4D3B2F47DDA3F41410A300A88C4E0AD848334CEFB0DF6DCB4640163BD3EEA2F1458E0E54155A379F6ED358617519E02572DE8179F01576FECEEDD673618B85C1BC4E75EEF6AF4765ED59E75264EA94FD869921024100FF5CE8B56DC5D94E2930476F578E76F0DFB46D1C54625CF8CC52A896F378AC6B104A0CF800BAF4CE685005C61E5FCF0ADC0681081D5F43648DE4B8E1152C8727024100D2781F96E27970AE42B4CD2337C1FA819B7C7A87BB06735E07B4589A71F77A980266FF709674808171301684C3A38E09400DDC12ACAC7B9402B384F5FFC5ACF10241008E3F9815F0A744ACA87F0F5BF39F159C8A50FC72CA82DC9D6F5C2033AE3EAB751C66D3A096EF8E0D28C862DF00EE87EBD9B2F9CFA664F9AA9AEC2D1C9CE9E80302410093CB60BB6EBBC281CC3BF45587C102AD62C74DAFE4888A18FCA60B1621739CB603F1D9EC70EACC96992A2096085FE0CCE41B177051AB29786D512CCC2658E4B10240698B751CEE86627481DF9C1B02A12455BE296FAB1F5845769E32628C2CD920B37D6057E3E471802852C2DCADA4564BA6D22008CE5D7A6E47D141C4927BB95C09"
+}, {
+ "jwk": {
+ "alg": "RS256",
+ "d": "EzQzfMlgWee_0LpiwB33L56RIuIWtELvzJHbBOp96VMH3thn-Rs0cU0fmmKxxP_TylIXmyzGbJ6uR2IxZr3LUQ6pnyOL8CnW9pHslvzS1bTkuRom1ZWTFuuZOhJ2S2auH4OPEZNcSi-2k1Ts2bbTGyHi_lAFumBqGvTK20QwA2-dkqAVvJEzLc4ZTwhdPxNzQXxuTYEzl9CrJ_IIh95daRcmthtP2ZPxS3UypUdvqfRlmEZHADYd56jghld4yoU-P3L37i13_p8Ph_AowZSacD-vhAUAhc9cmRQxpqvDvhbG3jh5tFks3PoVqE3qTMiFmol_pbPmUbaTGtiiFLl7EQ",
+ "dp": "xb9-sNA1Pb_bCnT9VBTiMNycGmZ8qrtLBtLhB5-Rv1T1tILcNh3ipPccmQ4_h5C27wQOY66raWxrDhYlisKcNKatAY5RgXY1HqugaeLYip7wLlo8qQ1hKTIuw5miT-a-GHOXszDCkMf1ncLtrtbqEWvig9sOV5pKc93hvFlq5l0",
+ "dq": "QVlqWgOfHwqfUwbZpk1a1PQgkfBtEQuDTVGnFLamkXByJhtkMfnfygCI4YG75QT9rx5kSMAEY1dALV5ccKD1HRD4YNxxusIqSTUDekA-8xtaegkykbPvpoBrgCuJ2qhw68LarFXWtqdYUBOgSCveaPoRa3KQ7L0LDaPNJr67sS0",
+ "e": "AQAB",
+ "kty": "RSA",
+ "n": "ydKf-p3Ztcg9bu4-gHCeMnvX_ilyDoSEqN-iWeI68WyXJfGATvNBYCA4y7ZG7Nptx2zy6lcYhjQCOC2ul13Y3xNSgZuhkY-lX8UD0HAQhk-TimGJbl1MNnaQaEJa4id48nCWoAnDzJpi-mV86AMnU3VU51QTeZoL9hou90H7YwJPUjLWx309MXv1C5pQQcrZPkQcQabk6f2cVyKr3xr5Z6EtMpmo788H16CWW2Z6kYRcHMw5qusWP_iBWbOaLHPBip66psVb0ZEWk6IYMq4A-5Bzd7mrcigqK8V5iL0Jt_lMAK5_CD6rtR5FrjmoiD3W1JcfWX64IXjXj8PP5isTTQ",
+ "p": "5Ad6rDkkcvAVz7tH3f4-mao0n9NruPBzLTkkN5q2YpE5i45iuL3e4P2xGkXtmCq7AE-NlqOcndTeWIZanQ7nnDJZGNV712xuZX7LEA8lQe6pcPiLnQ7GdH9YwK4AozTKecl_gzazHiU8FjMqt9ohrQ6H3jA-EFg47Tfn-ZBhAS8",
+ "q": "4pQ3aZXHpAkv_lmc_DiueNk0cQVSm8IxJbDpQHavlGWSK1w1YUw4SQf5vlJ42H3v90drqNZ9rORWaopwgYyh9DffhTLE6YsbNsmlP5HTdcda8zzRlb6FkoPVNdz6CyMElJi_-3TQTmr632nVhlOuC8MkBO39_HN_GhHAtHPbfEM",
+ "qi": "adR2A26MJMpFvq7G2L2806JDMkBkf1AR3Sch3GcDlkXE-P_3i2OP-HZTPHz5Aitqm7lb4OeUWRB_BXrbAaSAMbWMUj5gWUhYGepu7xNTzWdS4wMa4qevie7zLMG4eCeOd7HamkTe4_n4e4ADhBOLZZ_uB4hqbNGD27uFC0CvYcQ"
+ },
+ "modulusLength": 2048,
+ "pkcs8": "308204BD020100300D06092A864886F70D0101010500048204A7308204A30201000282010100C9D29FFA9DD9B5C83D6EEE3E80709E327BD7FE29720E8484A8DFA259E23AF16C9725F1804EF341602038CBB646ECDA6DC76CF2EA5718863402382DAE975DD8DF1352819BA1918FA55FC503D07010864F938A61896E5D4C36769068425AE22778F27096A009C3CC9A62FA657CE80327537554E75413799A0BF61A2EF741FB63024F5232D6C77D3D317BF50B9A5041CAD93E441C41A6E4E9FD9C5722ABDF1AF967A12D3299A8EFCF07D7A0965B667A91845C1CCC39AAEB163FF88159B39A2C73C18A9EBAA6C55BD1911693A21832AE00FB907377B9AB72282A2BC57988BD09B7F94C00AE7F083EABB51E45AE39A8883DD6D4971F597EB82178D78FC3CFE62B134D0203010001028201001334337CC96059E7BFD0BA62C01DF72F9E9122E216B442EFCC91DB04EA7DE95307DED867F91B34714D1F9A62B1C4FFD3CA52179B2CC66C9EAE47623166BDCB510EA99F238BF029D6F691EC96FCD2D5B4E4B91A26D5959316EB993A12764B66AE1F838F11935C4A2FB69354ECD9B6D31B21E2FE5005BA606A1AF4CADB4430036F9D92A015BC91332DCE194F085D3F1373417C6E4D813397D0AB27F20887DE5D691726B61B4FD993F14B7532A5476FA9F46598464700361DE7A8E0865778CA853E3F72F7EE2D77FE9F0F87F028C1949A703FAF84050085CF5C991431A6ABC3BE16C6DE3879B4592CDCFA15A84DEA4CC8859A897FA5B3E651B6931AD8A214B97B1102818100E4077AAC392472F015CFBB47DDFE3E99AA349FD36BB8F0732D3924379AB66291398B8E62B8BDDEE0FDB11A45ED982ABB004F8D96A39C9DD4DE58865A9D0EE79C325918D57BD76C6E657ECB100F2541EEA970F88B9D0EC6747F58C0AE00A334CA79C97F8336B31E253C16332AB7DA21AD0E87DE303E105838ED37E7F99061012F02818100E294376995C7A4092FFE599CFC38AE78D9347105529BC23125B0E94076AF9465922B5C35614C384907F9BE5278D87DEFF7476BA8D67DACE4566A8A70818CA1F437DF8532C4E98B1B36C9A53F91D375C75AF33CD195BE859283D535DCFA0B23049498BFFB74D04E6AFADF69D58653AE0BC32404EDFDFC737F1A11C0B473DB7C4302818100C5BF7EB0D0353DBFDB0A74FD5414E230DC9C1A667CAABB4B06D2E1079F91BF54F5B482DC361DE2A4F71C990E3F8790B6EF040E63AEAB696C6B0E16258AC29C34A6AD018E518176351EABA069E2D88A9EF02E5A3CA90D6129322EC399A24FE6BE187397B330C290C7F59DC2EDAED6EA116BE283DB0E579A4A73DDE1BC596AE65D02818041596A5A039F1F0A9F5306D9A64D5AD4F42091F06D110B834D51A714B6A6917072261B6431F9DFCA0088E181BBE504FDAF1E6448C0046357402D5E5C70A0F51D10F860DC71BAC22A4935037A403EF31B5A7A093291B3EFA6806B802B89DAA870EBC2DAAC55D6B6A7585013A0482BDE68FA116B7290ECBD0B0DA3CD26BEBBB12D02818069D476036E8C24CA45BEAEC6D8BDBCD3A2433240647F5011DD2721DC67039645C4F8FFF78B638FF876533C7CF9022B6A9BB95BE0E79459107F057ADB01A48031B58C523E6059485819EA6EEF1353CD6752E3031AE2A7AF89EEF32CC1B878278E77B1DA9A44DEE3F9F87B800384138B659FEE07886A6CD183DBBB850B40AF61C4"
+}, {
+ "jwk": {
+ "alg": "RS256",
+ "d": "gAG_X6SlTdTzsfsyyew9UDxKjgdlgKUnKcoeku3r0Bh3lrj0UgC_bh84dyzS3N7Xl6FrcTH_L69ySilcic2jk6OProt4E4XFc6x5SGhUQEekKHzjI1nTlr8wVRtJ3eesDBRshK0rSjOrwTqWaBnk5sBG4ZLii8DzuxiLBLza42jWXRrtTZejeBNPk19dRODmvh-avl91CYft3zSjZDweBnrfW2FkeQeyVf5hY_irzR_GDXWGOjq3eTvwQJqQLxI1M7Wc62SxBkZejMROLfOmdIdcp3QFRZKxemlXk8kYFtQfeotngPzPLtvO2rE3DtO3TrBsiaM7pEbgx4oZuCXJfLhKPVxLD3QbDlt3OKPYLheSs2jRzjsk4jDYWnzeG3UWMlS3O8jH0MWy6ZeJu6rFzuDHBWdFNTUyr7FUZnEoxH8YztIvehgQs1_Cqb4e_FBAj7II8x9VSc7BOcIASMBA0hQqre0f6j-k_SIv1seOheaAQMxmwnR-gvKT2uCPTsCG4ENyEECfSpgvrrcKDtovDdeMecGumw3REdTJaW7yk2SjaGXOWwI_GGz6WWdBgZIdcuNkcOn_VcivcjebZLY4_WTKbGWEnlQsEL8VM5vzlJs2R_t17ReazM0UkrNvglsZ61Hc4_4w48p4wUyro4m3Wtbgxdtx4BlPhsLDNrwGWcE",
+ "dp": "VFEtUYQZ7IR3PeOlx1i2Wictdw8HtvlraYQNetxtPc8hGAUk5sHeA2-Gj0chVLCl8t3eCKYcKkU0eyMUAOjG1Fhza10qwQz0izHBNVvuy_c8YyHB3HB8Ks4NjSY8E9i4O1OMipafyLgbfmq9-xHfKpSx7XnBtQn5_6ofdltGkK0tCm3eYIw8WKeD5B4hhELRbwcRWYebQBmq-eeSdls4kI-Q-ALpeoNrTM-eKSs8N4rKCL8ZnUmHH7TuYz5_Oarl2q8tYZ9hAqI7fnHDywDq0L-8ka305_xU36MwkwKaEDddt9ch4GFI7qNJS8TMG3m7_CoEXz7RA6-t4SrrUaJ6rw",
+ "dq": "TFw0GnI2BywizrGq4z4bng7bRE0jVaL9B0SPQERnLBn-4b9pM6c9dXSoNilt2cRPWJlD9jRyWLzNoWcsY_czvAC4PiRM5ad1BR_FYj5VaH08gJNVGnxe2LgGsWZYt2t7wO7Q5GZvXB-fZVMdSyhb4nJVVjGSG4ozTQPT442FAlxPUkgIg7K5trscN0yuF4j0DCRERtqNqOiM0KR-qhE3J261JkztA7TvK49LbOFj_uGqenOiiEPYZz4LWC7F2r2VpRy7hvW07DPVL7pLVUc0LJjZbGhgN1Dm27s9VPS0enCg-XkPLNKbg85fKiW2fTJWjNM_oeKjqnBUau4B__L04Q",
+ "e": "AQAB",
+ "kty": "RSA",
+ "n": "ttSkDrqmkwBTl55p3YbIZSXnV4Uk6AqISwkoTd2Xg3PIXCu8PaUDBe8tMBgRmFCtZFX1ZywgtAsOycYuco1qzyCViIua94Njop2Sdq2G4TU-kjDtXICa4X3sFYLahS7qOR9DbiuHSSGoqzRE6BKYak0DQ1KOOkbz9HEF-4CjAJtKCnCzkBCcCVgIHazc5ERU3WT1t6w-BgUNKAtlX2rv87sYrZVKxMzodbO6uEqUvUmczFQ4qR71Boeo_YhxYLSzFF_DqU8K2IBv3lzGkF2TdsM-cOSBHFvT6I-Ys9TWwLd6Z7AplAARYgDp01scqRBub66mxdMjtaHzy4yyY73XGmCqpqtAHbJId5a22eMcuHO4jB8Rf1lwvvo2UJpPvgTF_joiws4ya3z7I-VcP0RFR83T2MAIfqo0-NFdqCWUWQ8GoUBev5YchIaW0FtGq2hwqH7suLyxblqnFnPULUMY8adPBdBjjyN8CaQTKkqhXo70-d5HxMR8_C4gyMDZrX_ukk4uPNsAu-TzA8St1CEnUU1WLg8_v8qZ84iy8XR0YXC3NrLVJ9FyMz3_7pCI-0BXbON6n6UHNFU37bb2SY61pybNKjUVA4PhopKHao8FsJtPnbYA-7BKebQEcxGnwaiStuyj00tezVcW4Q2VW2OQOcMahTqJx3Uu_EHnLfhXdi8",
+ "p": "87idSnrcp6zZwvLR16yZ_vS3TNcxIIT9RFDJayOOcCsqDJp4hMSP0QB2fxZrYAG--y07AEithhh8vxVRpRJG8UedrRu-RDd6rZFrvVnd1Rg-5RKbgFkpCN2rD3R1IiQ-sB0son14KYytL8wceUNl_xKUUex1GKUEkZwQq75ut_jWnTnDK0M5poGalJbdn5n-dnKnFyVe3-kATM6shm03coxdKxLch1IvT824lQ508B_-af1ic0VjOkX1uioB92uWED-ASSD88Lb7l8aqy7g1w4gmZ79PNJiSvKw2T9FbnOGpEr3GenPK113FTIUYskhS5aiAR5NWtX-vQbBEynHWzw",
+ "q": "wAqxYtJBQ4BZOnxxzv0cQ88XFm6N3ToJPKiGC32SqlZrm6l2C01Bhaymrf8nv8_97R_iSZWxDCTNxcqsjreQ00vLIu3dk6VzROIDQvxzPfIeaa74OkAVlXqG-WYUtNbwHnCeeIg8JayhRx60pNJCsTl_NuALwp-gWOCzQn3tgqQOK_wjIKMhF1wCf9E2ebVQnZPsB35yrbAcEZPzSx8z5-QREGqaEGK9CRx9Mm8TwipQnaKBk2QfHO-H-WtOcFINfDTv71nRgzmISDhNF-0nBzsIIv2Zaoz-Z6mPerrYIt2t8716q12EQ0DHO6Y3VkB2MUZGSoG_yD1eRbbcVEJCoQ",
+ "qi": "U2phYaBgtocwlnmipiS7UZ7WMi-Vr40B5qQjmnF8JaZ36kuPEqqWGWUAN6U9YF2PzffWNVXPKa2AOI7UrkBI5h5gtD9dkyOKgoidYblcv5b2lyI6kFe_D9ahKiJ89ghQwC04o8mY_ZfvTBI_K7juqIJy01Lln9vF24MBu3NUNWMbEpj3gO1mjsRjJZThFI5ocUSXG9F8d2NIxoTnWrxrihgF6Zwq4O3vJnPYPftABm-ROZ-l-oQbD3LyWLbBqQ33PGkvcksDzk1JjDMdv-UlxO_rb8hxHFq1L-qo1aiNiXyo6NarUkJKJbDbKNgNJJEbPDn5zCqyy-plNN0052LLoA"
+ },
+ "modulusLength": 4096,
+ "pkcs8": "30820942020100300D06092A864886F70D01010105000482092C308209280201000282020100B6D4A40EBAA6930053979E69DD86C86525E7578524E80A884B09284DDD978373C85C2BBC3DA50305EF2D3018119850AD6455F5672C20B40B0EC9C62E728D6ACF2095888B9AF78363A29D9276AD86E1353E9230ED5C809AE17DEC1582DA852EEA391F436E2B874921A8AB3444E812986A4D0343528E3A46F3F47105FB80A3009B4A0A70B390109C0958081DACDCE44454DD64F5B7AC3E06050D280B655F6AEFF3BB18AD954AC4CCE875B3BAB84A94BD499CCC5438A91EF50687A8FD887160B4B3145FC3A94F0AD8806FDE5CC6905D9376C33E70E4811C5BD3E88F98B3D4D6C0B77A67B0299400116200E9D35B1CA9106E6FAEA6C5D323B5A1F3CB8CB263BDD71A60AAA6AB401DB2487796B6D9E31CB873B88C1F117F5970BEFA36509A4FBE04C5FE3A22C2CE326B7CFB23E55C3F444547CDD3D8C0087EAA34F8D15DA82594590F06A1405EBF961C848696D05B46AB6870A87EECB8BCB16E5AA71673D42D4318F1A74F05D0638F237C09A4132A4AA15E8EF4F9DE47C4C47CFC2E20C8C0D9AD7FEE924E2E3CDB00BBE4F303C4ADD42127514D562E0F3FBFCA99F388B2F174746170B736B2D527D172333DFFEE9088FB40576CE37A9FA507345537EDB6F6498EB5A726CD2A35150383E1A292876A8F05B09B4F9DB600FBB04A79B4047311A7C1A892B6ECA3D34B5ECD5716E10D955B639039C31A853A89C7752EFC41E72DF857762F020301000102820201008001BF5FA4A54DD4F3B1FB32C9EC3D503C4A8E076580A52729CA1E92EDEBD0187796B8F45200BF6E1F38772CD2DCDED797A16B7131FF2FAF724A295C89CDA393A38FAE8B781385C573AC794868544047A4287CE32359D396BF30551B49DDE7AC0C146C84AD2B4A33ABC13A966819E4E6C046E192E28BC0F3BB188B04BCDAE368D65D1AED4D97A378134F935F5D44E0E6BE1F9ABE5F750987EDDF34A3643C1E067ADF5B61647907B255FE6163F8ABCD1FC60D75863A3AB7793BF0409A902F123533B59CEB64B106465E8CC44E2DF3A674875CA774054592B17A695793C91816D41F7A8B6780FCCF2EDBCEDAB1370ED3B74EB06C89A33BA446E0C78A19B825C97CB84A3D5C4B0F741B0E5B7738A3D82E1792B368D1CE3B24E230D85A7CDE1B75163254B73BC8C7D0C5B2E99789BBAAC5CEE0C7056745353532AFB154667128C47F18CED22F7A1810B35FC2A9BE1EFC50408FB208F31F5549CEC139C20048C040D2142AADED1FEA3FA4FD222FD6C78E85E68040CC66C2747E82F293DAE08F4EC086E0437210409F4A982FAEB70A0EDA2F0DD78C79C1AE9B0DD111D4C9696EF29364A36865CE5B023F186CFA59674181921D72E36470E9FF55C8AF72379B64B638FD64CA6C65849E542C10BF15339BF3949B3647FB75ED179ACCCD1492B36F825B19EB51DCE3FE30E3CA78C14CABA389B75AD6E0C5DB71E0194F86C2C336BC0659C10282010100F3B89D4A7ADCA7ACD9C2F2D1D7AC99FEF4B74CD7312084FD4450C96B238E702B2A0C9A7884C48FD100767F166B6001BEFB2D3B0048AD86187CBF1551A51246F1479DAD1BBE44377AAD916BBD59DDD5183EE5129B80592908DDAB0F747522243EB01D2CA27D78298CAD2FCC1C794365FF129451EC7518A504919C10ABBE6EB7F8D69D39C32B4339A6819A9496DD9F99FE7672A717255EDFE9004CCEAC866D37728C5D2B12DC87522F4FCDB8950E74F01FFE69FD627345633A45F5BA2A01F76B96103F804920FCF0B6FB97C6AACBB835C3882667BF4F349892BCAC364FD15B9CE1A912BDC67A73CAD75DC54C8518B24852E5A880479356B57FAF41B044CA71D6CF0282010100C00AB162D2414380593A7C71CEFD1C43CF17166E8DDD3A093CA8860B7D92AA566B9BA9760B4D4185ACA6ADFF27BFCFFDED1FE24995B10C24CDC5CAAC8EB790D34BCB22EDDD93A57344E20342FC733DF21E69AEF83A4015957A86F96614B4D6F01E709E78883C25ACA1471EB4A4D242B1397F36E00BC29FA058E0B3427DED82A40E2BFC2320A321175C027FD13679B5509D93EC077E72ADB01C1193F34B1F33E7E411106A9A1062BD091C7D326F13C22A509DA28193641F1CEF87F96B4E70520D7C34EFEF59D183398848384D17ED27073B0822FD996A8CFE67A98F7ABAD822DDADF3BD7AAB5D844340C73BA6375640763146464A81BFC83D5E45B6DC544242A10282010054512D518419EC84773DE3A5C758B65A272D770F07B6F96B69840D7ADC6D3DCF21180524E6C1DE036F868F472154B0A5F2DDDE08A61C2A45347B231400E8C6D458736B5D2AC10CF48B31C1355BEECBF73C6321C1DC707C2ACE0D8D263C13D8B83B538C8A969FC8B81B7E6ABDFB11DF2A94B1ED79C1B509F9FFAA1F765B4690AD2D0A6DDE608C3C58A783E41E218442D16F071159879B4019AAF9E792765B38908F90F802E97A836B4CCF9E292B3C378ACA08BF199D49871FB4EE633E7F39AAE5DAAF2D619F6102A23B7E71C3CB00EAD0BFBC91ADF4E7FC54DFA33093029A10375DB7D721E06148EEA3494BC4CC1B79BBFC2A045F3ED103AFADE12AEB51A27AAF028201004C5C341A7236072C22CEB1AAE33E1B9E0EDB444D2355A2FD07448F4044672C19FEE1BF6933A73D7574A836296DD9C44F589943F6347258BCCDA1672C63F733BC00B83E244CE5A775051FC5623E55687D3C8093551A7C5ED8B806B16658B76B7BC0EED0E4666F5C1F9F65531D4B285BE272555631921B8A334D03D3E38D85025C4F52480883B2B9B6BB1C374CAE1788F40C244446DA8DA8E88CD0A47EAA1137276EB5264CED03B4EF2B8F4B6CE163FEE1AA7A73A28843D8673E0B582EC5DABD95A51CBB86F5B4EC33D52FBA4B5547342C98D96C68603750E6DBBB3D54F4B47A70A0F9790F2CD29B83CE5F2A25B67D32568CD33FA1E2A3AA70546AEE01FFF2F4E102820100536A6161A060B687309679A2A624BB519ED6322F95AF8D01E6A4239A717C25A677EA4B8F12AA9619650037A53D605D8FCDF7D63555CF29AD80388ED4AE4048E61E60B43F5D93238A82889D61B95CBF96F697223A9057BF0FD6A12A227CF60850C02D38A3C998FD97EF4C123F2BB8EEA88272D352E59FDBC5DB8301BB735435631B1298F780ED668EC4632594E1148E687144971BD17C776348C684E75ABC6B8A1805E99C2AE0EDEF2673D83DFB40066F91399FA5FA841B0F72F258B6C1A90DF73C692F724B03CE4D498C331DBFE525C4EFEB6FC8711C5AB52FEAA8D5A88D897CA8E8D6AB52424A25B0DB28D80D24911B3C39F9CC2AB2CBEA6534DD34E762CBA0"
+}, {
+ "jwk": {
+ "alg": "RS256",
+ "d": "DXYeCQ4W_Yv9zN4vCIQQtgvunsoeWfPeRvYEgVAIYdhuNFRmcinD9UuNP70VOoe2qiZ0DNAjsQn-uYCW9TEZ4Q",
+ "dp": "5f8auF7xPSfhZlklUtBnKFYKEDaYR2dFWg_zQB7oCzE",
+ "dq": "hkRVAMcErDAaCKp0V3QzWYhY_J22nJkiNXIxHz4Ja2c",
+ "e": "AQAB",
+ "kty": "RSA",
+ "n": "yLuHfrJbqUSFFqhUu70z585pWrw1IFcnBCccj43uwGOiesMkx0SWw4jyk3UNTux5AO-7VVCU8jb7237YYaOmOw",
+ "p": "8rLWJeMlHCtwZstui6p8jyai6m7GQ6fC1hK17vxA_JE",
+ "q": "07vkNpoE6SUze7Af2KEP6M_sz8dABZ3EQJuQ6JfiDAs",
+ "qi": "kxd6mc-3AhJtuixmzrSywxvwVwChdEG4I6WVTBe_bvE"
+ },
+ "modulusLength": 512,
+ "pkcs8": "30820156020100300D06092A864886F70D0101010500048201403082013C020100024100C8BB877EB25BA9448516A854BBBD33E7CE695ABC3520572704271C8F8DEEC063A27AC324C74496C388F293750D4EEC7900EFBB555094F236FBDB7ED861A3A63B020301000102400D761E090E16FD8BFDCCDE2F088410B60BEE9ECA1E59F3DE46F60481500861D86E3454667229C3F54B8D3FBD153A87B6AA26740CD023B109FEB98096F53119E1022100F2B2D625E3251C2B7066CB6E8BAA7C8F26A2EA6EC643A7C2D612B5EEFC40FC91022100D3BBE4369A04E925337BB01FD8A10FE8CFECCFC740059DC4409B90E897E20C0B022100E5FF1AB85EF13D27E166592552D06728560A1036984767455A0FF3401EE80B3102210086445500C704AC301A08AA74577433598858FC9DB69C99223572311F3E096B6702210093177A99CFB702126DBA2C66CEB4B2C31BF05700A17441B823A5954C17BF6EF1"
+}, {
+ "jwk": {
+ "alg": "RS256",
+ "d": "Rrf1DCgK7Yqp-w_xEUMZLBQfzH6RqCBgEJ2yA8b31jhJcwDZBgsvNgmaSOdKsksFsJNeTcMTJHjs-98NNcxhLtA93aJItT56PAKEiHC5JWLzYblqRMwEwNk5YnRJUuWNX5M2_9qrVGjVU4WJZTxYs_YyELFsh7VhAEMdrWOkBRE",
+ "dp": "JmuDJiknHZRdZLWd5Zy6nmjKM-oXK8QvV8PxCxLH857FKRwHcsQg1gKBWRj3Wef4XAu6vwBgrjXc3sR4Qv4eJw",
+ "dq": "yOBva1UuqYmp8MRpky7_x1hsTKBwfde48A2eDz_9kbCNMuHavTzpoPmmT5yz5Sbgk0dh7e4aj4Q29zPA-9IShQ",
+ "e": "AQAB",
+ "kty": "RSA",
+ "n": "yddqYjYVgz1hWUd3MdZUlpz5eUJQqJfk5aQ1FcBQPYsFxGbK8P73S5N1VhB-76zI5dtJFQrHpg1C1cpz9SLt3rREGHbuUUJoEpDVAaRBTFpDMPjks6zrkY4qQhez9vUMAYHlJ5_nrZ-o_WjFonhRmXpua7zXJVvYohXhf4pTkrs",
+ "p": "-12aRsyjbWTynDo7u0TUZ3AUxRmB85AkSf5VfK-Zh0oOqphHu2U4JroWHy_g_yOofqkaNtJsrnaB_ypSiK-nZw",
+ "q": "zZARgd8DntWnhGV-QOkinTcV582fUGgmLnN1ePiOaDPVLbKQAO0NXNGZront6mK3cgPl8ViSCU8Qlyxd72hJjQ",
+ "qi": "WDBfI1nIT_wAhExafzaZkx5fm4DI0dA-h5TdmDLVIhvw9aBLKFJOFnyH40zTDdmhNF6HsVM5uRRvVZ0LD2yJEQ"
+ },
+ "modulusLength": 1024,
+ "pkcs8": "30820276020100300D06092A864886F70D0101010500048202603082025C02010002818100C9D76A623615833D6159477731D654969CF9794250A897E4E5A43515C0503D8B05C466CAF0FEF74B937556107EEFACC8E5DB49150AC7A60D42D5CA73F522EDDEB4441876EE5142681290D501A4414C5A4330F8E4B3ACEB918E2A4217B3F6F50C0181E5279FE7AD9FA8FD68C5A27851997A6E6BBCD7255BD8A215E17F8A5392BB020301000102818046B7F50C280AED8AA9FB0FF11143192C141FCC7E91A82060109DB203C6F7D638497300D9060B2F36099A48E74AB24B05B0935E4DC3132478ECFBDF0D35CC612ED03DDDA248B53E7A3C02848870B92562F361B96A44CC04C0D93962744952E58D5F9336FFDAAB5468D5538589653C58B3F63210B16C87B56100431DAD63A40511024100FB5D9A46CCA36D64F29C3A3BBB44D4677014C51981F3902449FE557CAF99874A0EAA9847BB653826BA161F2FE0FF23A87EA91A36D26CAE7681FF2A5288AFA767024100CD901181DF039ED5A784657E40E9229D3715E7CD9F5068262E737578F88E6833D52DB29000ED0D5CD199AE89EDEA62B77203E5F15892094F10972C5DEF68498D0240266B832629271D945D64B59DE59CBA9E68CA33EA172BC42F57C3F10B12C7F39EC5291C0772C420D602815918F759E7F85C0BBABF0060AE35DCDEC47842FE1E27024100C8E06F6B552EA989A9F0C469932EFFC7586C4CA0707DD7B8F00D9E0F3FFD91B08D32E1DABD3CE9A0F9A64F9CB3E526E0934761EDEE1A8F8436F733C0FBD21285024058305F2359C84FFC00844C5A7F3699931E5F9B80C8D1D03E8794DD9832D5221BF0F5A04B28524E167C87E34CD30DD9A1345E87B15339B9146F559D0B0F6C8911"
+}, {
+ "jwk": {
+ "alg": "RS256",
+ "d": "J0IMvDYP-fEjSMLrKqDBae8TwK2xMQ0Uq0XyDgLdo-3BuSuH3-8nhn3vsz4QVPqABrdQBvIyYOqZ9uk8l3jAbO2uZ59gNiX8HjYVyHg87fEQ4lFeFY6MJGihNS8U3ACs5o_zZ475rDilKoC0TcDNDyzZR-0gPHoJjrR4S7DH07zJY9lFNhpU2ShzfOm3cIHkNDS8c1ciqzu7uj2H-23xegbZDnkOteLPt2ArhHzdaa8zRTIJ0Gbei9ebI2u8l2563zXwPTvbOM8gl_1A3YxJTRXjy58iRzqQ02_NMLXlmU9Fua4SQQCyiSUwneAVvzZPhyasCtqmcU7UgC9qCjSkgQ",
+ "dp": "HDiGZNfDQK3rTcGuRjrFYFtWDPpK52TdoiJ-rBBz7Fl2dmnp_x9Cezx4Da48OrNc1nkEtRmSvP53Ejg7kBebS_QNzHlD7oe__pbu_95lYWhK_M8dSh8cigGmZ2wIlS1T-6X8TMa88pfakAYAr74FA16t5mKoFrYOIirAiZXR8z0",
+ "dq": "M5HLkAh2Cwx2zvOmk6GltMaDY9ii2I_LQysqos03QSMgCL2fjgNhkTFwToW5fWdYoTiKMhK_3nnbBnF1m9Vp15Rq6lZLuuuJBJtfIaLNBzSx95quohinlzJXykM8UBZLeQucnKT0LRdgM-sOTzMMZS68J8a-er-H64uLjtpSlg0",
+ "e": "AQAB",
+ "kty": "RSA",
+ "n": "7CDMdVohdO_FNqdgLWPmsFEk1Y4kDv8Bsy-txFg9Du22e5zIQfNk4O1ZfwH2rGzCAIxgMaxjsPx_GIKGmF9K8Os3AjQPitv3E5l34kGJWuzM9GZCUv-p-_oeBaVDjLkpJSRSgJ6qjcaEZaK-jddHbH9CRhI8X1k7-fBgPRynA3_JVFoVUUNTjQs5yZJM0hE_6n-bcychekYkzasy-DuZn-LwJb5BPQYxTCDzQ2CAn-ou6is3p7s0sPZ-dIKwGB6NuDflJYv7W3L_LMRewTwrQ-xD1bJoJTNilsMnQTsaoJfkiEu6P1A1xMtSguwE3a5Kz-kzPbPfm6UEQShzGUiIjw",
+ "p": "_HU5ST-IFme2my-YSHDJG32sSPmi1AhIXn4-_RqgfbUJ2ZMg9BfRZuiQC2bfQVTCEst8Q98B1j-9fZCFW5gf_kzMXwPbpqwDS-5N0D7NmpS8USTDutMnqmTK_g70ylKl8spBF6iPdPNkAWriOAFIzVIF6GW0JjvajDn2OjqwkwM",
+ "q": "73Dr9K7gMonDmBW4IRXhB7ZLmbWUU2eAznCpbstsMShNjNye3wa4myjs8AWorIgiiumN5RDiXmDp5ZDADiEAwvl_deSBhLFy3M29BWvxmXx1GJ-SQCekJyNLOVlMLh1WVkcpjk-imL1MZbKGJNeaJfZpa4NCm2VOR47Pfc_2uIU",
+ "qi": "425b46wpjyK-WMu8aVgK5jPOEC2gMAxeOgnWXUQ3-N7OC0EYpliWKHLmsBQB4U7oAdKgQCXqMzQtSVflynKk7wTZUrQ3rs53ysma9n_qVIjgM3GIUljsJZAFMajJdwqbx6K-aCC07aJ9CrZw6rul-URUbbtNgQxn4TDL2JxWlZ4"
+ },
+ "modulusLength": 2048,
+ "pkcs8": "308204BD020100300D06092A864886F70D0101010500048204A7308204A30201000282010100EC20CC755A2174EFC536A7602D63E6B05124D58E240EFF01B32FADC4583D0EEDB67B9CC841F364E0ED597F01F6AC6CC2008C6031AC63B0FC7F188286985F4AF0EB3702340F8ADBF7139977E241895AECCCF4664252FFA9FBFA1E05A5438CB929252452809EAA8DC68465A2BE8DD7476C7F4246123C5F593BF9F0603D1CA7037FC9545A155143538D0B39C9924CD2113FEA7F9B7327217A4624CDAB32F83B999FE2F025BE413D06314C20F34360809FEA2EEA2B37A7BB34B0F67E7482B0181E8DB837E5258BFB5B72FF2CC45EC13C2B43EC43D5B26825336296C327413B1AA097E4884BBA3F5035C4CB5282EC04DDAE4ACFE9333DB3DF9BA5044128731948888F02030100010282010027420CBC360FF9F12348C2EB2AA0C169EF13C0ADB1310D14AB45F20E02DDA3EDC1B92B87DFEF27867DEFB33E1054FA8006B75006F23260EA99F6E93C9778C06CEDAE679F603625FC1E3615C8783CEDF110E2515E158E8C2468A1352F14DC00ACE68FF3678EF9AC38A52A80B44DC0CD0F2CD947ED203C7A098EB4784BB0C7D3BCC963D945361A54D928737CE9B77081E43434BC735722AB3BBBBA3D87FB6DF17A06D90E790EB5E2CFB7602B847CDD69AF33453209D066DE8BD79B236BBC976E7ADF35F03D3BDB38CF2097FD40DD8C494D15E3CB9F22473A90D36FCD30B5E5994F45B9AE124100B28925309DE015BF364F8726AC0ADAA6714ED4802F6A0A34A48102818100FC7539493F881667B69B2F984870C91B7DAC48F9A2D408485E7E3EFD1AA07DB509D99320F417D166E8900B66DF4154C212CB7C43DF01D63FBD7D90855B981FFE4CCC5F03DBA6AC034BEE4DD03ECD9A94BC5124C3BAD327AA64CAFE0EF4CA52A5F2CA4117A88F74F364016AE2380148CD5205E865B4263BDA8C39F63A3AB0930302818100EF70EBF4AEE03289C39815B82115E107B64B99B594536780CE70A96ECB6C31284D8CDC9EDF06B89B28ECF005A8AC88228AE98DE510E25E60E9E590C00E2100C2F97F75E48184B172DCCDBD056BF1997C75189F924027A427234B39594C2E1D565647298E4FA298BD4C65B28624D79A25F6696B83429B654E478ECF7DCFF6B8850281801C388664D7C340ADEB4DC1AE463AC5605B560CFA4AE764DDA2227EAC1073EC59767669E9FF1F427B3C780DAE3C3AB35CD67904B51992BCFE7712383B90179B4BF40DCC7943EE87BFFE96EEFFDE6561684AFCCF1D4A1F1C8A01A6676C08952D53FBA5FC4CC6BCF297DA900600AFBE05035EADE662A816B60E222AC08995D1F33D0281803391CB9008760B0C76CEF3A693A1A5B4C68363D8A2D88FCB432B2AA2CD3741232008BD9F8E03619131704E85B97D6758A1388A3212BFDE79DB0671759BD569D7946AEA564BBAEB89049B5F21A2CD0734B1F79AAEA218A7973257CA433C50164B790B9C9CA4F42D176033EB0E4F330C652EBC27C6BE7ABF87EB8B8B8EDA52960D02818100E36E5BE3AC298F22BE58CBBC69580AE633CE102DA0300C5E3A09D65D4437F8DECE0B4118A658962872E6B01401E14EE801D2A04025EA33342D4957E5CA72A4EF04D952B437AECE77CAC99AF67FEA5488E03371885258EC25900531A8C9770A9BC7A2BE6820B4EDA27D0AB670EABBA5F944546DBB4D810C67E130CBD89C56959E"
+}, {
+ "jwk": {
+ "alg": "RS256",
+ "d": "Q-MyEFZbTY5sYhZCIZm6S-g4cpIbEOjjXLOJ8MN8_FLtqXttpzpNIywvgRGAeyOqyP957ThUeBpSaY6TishLaZNdj-VVrnmaBBlGsnyovBjhPCMZx7u6T7FhDhHcDiGwYIRNBcMcLjklCMhJhpwmlWfwWnvU9FxKQXG4ZipKHz10hVZTkgDaaiyDtdyePTn9r61fTsUximFjkXcN4vmq5bc7b7aF-YvYE-tSbDlR9ArQXRDNcepgmkONvunc4qSX7EXQQjk3Cy-VryCvNQONOZ_2p3KZj7_BD1aklGTaYhGMjow-p4QBephsnRJ2fn3op9N_Xf7hqH0BD7swqocVtqCqq-PSIbwetk85JUHshvZuLZ0U0185_hqiKOP3i9tADbSyb6DNyay0pGBl5ZcHmey9cV05IK1UdNApz6irTOthUkJ0Gkec9-y4e1CDx57s0vOGKL6kLy-SNhA1WUft_o74_u1X7Nshn2dXWjQGVuC_P0H2VKO5SJqeZ_db9P1QX0ogR-ZuRBc0gh8sJsHv0DSYB2luI2nDWX4unwsVuDr7JKXSGyFC4DpMUoAHmIpzh22sqhU1uVj0Thm8t_3feYujCEm3qwOfNR19xJdOF1zUG-1dTBAqUXtVC87_i8tfsbh3eQL46jBoZVgFQNYtQaM-wz1NpFXhj7nVa85IMPk",
+ "dp": "pRIoZFx4XgSW9wdp-qVKWXXJd75Kg3THCK-IqRKu5G4Y9rM-kh5-84iFDg6TUdIimlggjLdF4XK3BFHXauENs0ZFSVbnAfk6mI6KPfBuG4QLDwmirCM5dlCtHrLdg51HQ-JG_oGxizFWhmV7sBgtYs3mKcshn3iu3ogDgVSnSy9xbk-Xjb2HDEA4IdknckVmN8d4HEh9_5EBnsM8k1j_iXYctBXJpD9sdJU3w5B9BWn70EH6s7VubjnFRFGxdfC2wKkKhDLbITwW2tV-Z5L5lHvLdgV_1KBOJzvMVndfR1OnogfwtFGgGi8WaTGKPlxXpnGcNqN1DVbg7f12Gs2u2Q",
+ "dq": "twQKXFBwPkWHbkHtaUeMYKCuaDo_DJpdmvp898Sz_LcJ9Cz4zhvOtClxGzaQQnTivlTQH5pXFCCDByLZoSULVsHbR3Byy83H48bqUp9WI24FhuTbV7cZ90KCMulnt08EQwAWnWPkAJlD0e3L2gv2dZvegnhnh9BvCAgFNrSXlq8RrvKp-kOo6eF8TZOrVGZANhJBX-LWHjJ8JdQvuGpjY2CuaxR4FRwygcOT1w906WF2lkKnGi_a5B1rBogYBvL0afz82-dWzm4VzJ3PBAIyIxDEmEXFgWdv2SjXKRBZ_h65w-WvsI8yob3LwKmlIj4ZRf9MTJ2CrdAGxpxBmtTDvQ",
+ "e": "AQAB",
+ "kty": "RSA",
+ "n": "qnO_7oHZoarFS9bZYEBMUdwliCzbVElnQE7XJOkWOOxETgBYN3jGe4zsYJiLUIXBoTOY8p_1zeP5hpc0uEPZ9uz7-LtDfpwuqXg_-6OaoqCLjblnTXnP0apd36nKr3TzpPPBaHP8KyCm_BwIip5Yy1uF2_zvOxL0WIshU0smNMLbSa7_Wx4TDnw5EJQEucyExejiFoX51itohNxkSyljHD9UZP_C9Suo--T-NeaFeeq9rebMnWRRaPaatfzH9sGM3cnJ0p_gqJmi0H7G_qxw4NfFilwBg4irCXinOyeDUHEgvS2oHvCcmGQH0lOOofLFWPUG8FlxT81AK0Yg-Hwg2_mBFDMre2UqqKH69d6GH_Bq80IiBuZVkaXd-0dReYLTYcXegaAgu9lKejMwLFo50Ka26OmhZ2D3am2qGuCX8XIU3gLQbPcWx70ehEtr0h3gujP8gnecKFHZSXGIOyw0KA1fqvMiYINjpZCMncvTFZzqzypfsnspKeMp3nl-_p0cvgVZ77a9n9LbQEAMdZnLMrL8X9ioVo35j230HlXPjfrfwxeYWwF4fB2YWfxxMVUO_UBQ8xdLrMkA9-KNYbuCEQC5kmzn0pplqzlDRo7pytZ6i0bo47WW5U8CKutVX127hPNPAq3dHF0v0IHnG-ijzeyQtfjeBtF1FqmK8ZGkTlE",
+ "p": "1aXA0QwOc55PDIJ7fZmTo92i12lkajTVntez7M4mlJ9C5qRGpR_Q2cvovJNPQUlUc-PnrSBPEx0P_cejSEIhodKKxENNmWQQrC6wNBEhANcKrEgAbwMpr9kHIq6Vj1U2i_MIEqYcLL9Q6PIyyY9D-9nIq0DAFshRfmgoVLv0G7Lkyf17SONos8bVCX2w5-YTrsYPq-BXugYxtNYYV09Egccf0k8j8jalPYGCIzBbCEQd0dcqO9HSb7YqA2RlElAGZbgvTqxqeSu-ByPxLp7V34ymKNB8YXlzptPU0Mxw1iIr1M1QuwgsEH9oDCyB6RnGIvOJNnVPikht3-smm0of8w",
+ "q": "zD3oMz3phKi1o61vThhrPN4_JJyUjrW4PEwYLWm6RqZt9CfY_VfyVE7fZ5CpvD7Cu2R9q2yeE4uEi45HoXx1QynZRzzAUBKjg0BKUqQIRvOUkz9m0blwrcu2i2ORR1rjVXN7pJJfGmD8ZVDETdZqSOnzmFmrWEG7bDNbbMVGFaIjgqXG2Innqi-cvrmM1FqEhZzDndk6otiPKI0Nzc7ugn-GIeR7HIlmtAcak54pT8r93N66Q8XRVrTVno8HWHG8-gQ7bcrYv547dEa9bNIAh1K145IaV_S00sfGrP1NSE4m1-s7GEI0VQ8iDmiy9FuGNB8VJFH8Ow2csNu9qn_tqw",
+ "qi": "pn9RgZesrMU1uxWEfApYghJT-BGrK4NfNstC4XQdc8oHcFLYyhkUuyC5V6l83QjI_0vg8tko-jP9cxE5-2DbdBy28D2JOstdniS2UIU6RrSqlY6k7dMTOYIm4lMAIwJUK8N1o1EG-SkQsuzStYjphJk8h9gHAfYlVvTD3lEP8LT3BFtSX0ezDpMhFWcv4vJKR-co4XQoha3ZUJqe_aAtipvHvyitzst9Q0OKNShEjVlq-trjRjvmsXvrh2xd7MdI6AOmiXr32w64fP1OFtNQAlV9sPAt2PdWWJDAhq1_1ZBo266MoI1DCYQ5WR_mt919uo1s5aogo56gXXwW4OTRZA"
+ },
+ "modulusLength": 4096,
+ "pkcs8": "30820944020100300D06092A864886F70D01010105000482092E3082092A0201000282020100AA73BFEE81D9A1AAC54BD6D960404C51DC25882CDB544967404ED724E91638EC444E00583778C67B8CEC60988B5085C1A13398F29FF5CDE3F9869734B843D9F6ECFBF8BB437E9C2EA9783FFBA39AA2A08B8DB9674D79CFD1AA5DDFA9CAAF74F3A4F3C16873FC2B20A6FC1C088A9E58CB5B85DBFCEF3B12F4588B21534B2634C2DB49AEFF5B1E130E7C39109404B9CC84C5E8E21685F9D62B6884DC644B29631C3F5464FFC2F52BA8FBE4FE35E68579EABDADE6CC9D645168F69AB5FCC7F6C18CDDC9C9D29FE0A899A2D07EC6FEAC70E0D7C58A5C018388AB0978A73B2783507120BD2DA81EF09C986407D2538EA1F2C558F506F059714FCD402B4620F87C20DBF98114332B7B652AA8A1FAF5DE861FF06AF3422206E65591A5DDFB47517982D361C5DE81A020BBD94A7A33302C5A39D0A6B6E8E9A16760F76A6DAA1AE097F17214DE02D06CF716C7BD1E844B6BD21DE0BA33FC82779C2851D94971883B2C34280D5FAAF322608363A5908C9DCBD3159CEACF2A5FB27B2929E329DE797EFE9D1CBE0559EFB6BD9FD2DB40400C7599CB32B2FC5FD8A8568DF98F6DF41E55CF8DFADFC317985B01787C1D9859FC7131550EFD4050F3174BACC900F7E28D61BB821100B9926CE7D29A65AB3943468EE9CAD67A8B46E8E3B596E54F022AEB555F5DBB84F34F02ADDD1C5D2FD081E71BE8A3CDEC90B5F8DE06D17516A98AF191A44E5102030100010282020043E33210565B4D8E6C6216422199BA4BE83872921B10E8E35CB389F0C37CFC52EDA97B6DA73A4D232C2F8111807B23AAC8FF79ED3854781A52698E938AC84B69935D8FE555AE799A041946B27CA8BC18E13C2319C7BBBA4FB1610E11DC0E21B060844D05C31C2E392508C849869C269567F05A7BD4F45C4A4171B8662A4A1F3D748556539200DA6A2C83B5DC9E3D39FDAFAD5F4EC5318A616391770DE2F9AAE5B73B6FB685F98BD813EB526C3951F40AD05D10CD71EA609A438DBEE9DCE2A497EC45D04239370B2F95AF20AF35038D399FF6A772998FBFC10F56A49464DA62118C8E8C3EA784017A986C9D12767E7DE8A7D37F5DFEE1A87D010FBB30AA8715B6A0AAABE3D221BC1EB64F392541EC86F66E2D9D14D35F39FE1AA228E3F78BDB400DB4B26FA0CDC9ACB4A46065E5970799ECBD715D3920AD5474D029CFA8AB4CEB615242741A479CF7ECB87B5083C79EECD2F38628BEA42F2F923610355947EDFE8EF8FEED57ECDB219F67575A340656E0BF3F41F654A3B9489A9E67F75BF4FD505F4A2047E66E441734821F2C26C1EFD0349807696E2369C3597E2E9F0B15B83AFB24A5D21B2142E03A4C528007988A73876DACAA1535B958F44E19BCB7FDDF798BA30849B7AB039F351D7DC4974E175CD41BED5D4C102A517B550BCEFF8BCB5FB1B8777902F8EA306865580540D62D41A33EC33D4DA455E18FB9D56BCE4830F90282010100D5A5C0D10C0E739E4F0C827B7D9993A3DDA2D769646A34D59ED7B3ECCE26949F42E6A446A51FD0D9CBE8BC934F41495473E3E7AD204F131D0FFDC7A3484221A1D28AC4434D996410AC2EB034112100D70AAC48006F0329AFD90722AE958F55368BF30812A61C2CBF50E8F232C98F43FBD9C8AB40C016C8517E682854BBF41BB2E4C9FD7B48E368B3C6D5097DB0E7E613AEC60FABE057BA0631B4D618574F4481C71FD24F23F236A53D818223305B08441DD1D72A3BD1D26FB62A03646512500665B82F4EAC6A792BBE0723F12E9ED5DF8CA628D07C617973A6D3D4D0CC70D6222BD4CD50BB082C107F680C2C81E919C622F38936754F8A486DDFEB269B4A1FF30282010100CC3DE8333DE984A8B5A3AD6F4E186B3CDE3F249C948EB5B83C4C182D69BA46A66DF427D8FD57F2544EDF6790A9BC3EC2BB647DAB6C9E138B848B8E47A17C754329D9473CC05012A383404A52A40846F394933F66D1B970ADCBB68B6391475AE355737BA4925F1A60FC6550C44DD66A48E9F39859AB5841BB6C335B6CC54615A22382A5C6D889E7AA2F9CBEB98CD45A84859CC39DD93AA2D88F288D0DCDCEEE827F8621E47B1C8966B4071A939E294FCAFDDCDEBA43C5D156B4D59E8F075871BCFA043B6DCAD8BF9E3B7446BD6CD2008752B5E3921A57F4B4D2C7C6ACFD4D484E26D7EB3B184234550F220E68B2F45B86341F152451FC3B0D9CB0DBBDAA7FEDAB0282010100A51228645C785E0496F70769FAA54A5975C977BE4A8374C708AF88A912AEE46E18F6B33E921E7EF388850E0E9351D2229A58208CB745E172B70451D76AE10DB346454956E701F93A988E8A3DF06E1B840B0F09A2AC23397650AD1EB2DD839D4743E246FE81B18B315686657BB0182D62CDE629CB219F78AEDE88038154A74B2F716E4F978DBD870C403821D92772456637C7781C487DFF91019EC33C9358FF89761CB415C9A43F6C749537C3907D0569FBD041FAB3B56E6E39C54451B175F0B6C0A90A8432DB213C16DAD57E6792F9947BCB76057FD4A04E273BCC56775F4753A7A207F0B451A01A2F1669318A3E5C57A6719C36A3750D56E0EDFD761ACDAED90282010100B7040A5C50703E45876E41ED69478C60A0AE683A3F0C9A5D9AFA7CF7C4B3FCB709F42CF8CE1BCEB429711B36904274E2BE54D01F9A571420830722D9A1250B56C1DB477072CBCDC7E3C6EA529F56236E0586E4DB57B719F7428232E967B74F044300169D63E4009943D1EDCBDA0BF6759BDE82786787D06F08080536B49796AF11AEF2A9FA43A8E9E17C4D93AB5466403612415FE2D61E327C25D42FB86A636360AE6B1478151C3281C393D70F74E961769642A71A2FDAE41D6B06881806F2F469FCFCDBE756CE6E15CC9DCF0402322310C49845C581676FD928D7291059FE1EB9C3E5AFB08F32A1BDCBC0A9A5223E1945FF4C4C9D82ADD006C69C419AD4C3BD0282010100A67F518197ACACC535BB15847C0A58821253F811AB2B835F36CB42E1741D73CA077052D8CA1914BB20B957A97CDD08C8FF4BE0F2D928FA33FD731139FB60DB741CB6F03D893ACB5D9E24B650853A46B4AA958EA4EDD313398226E253002302542BC375A35106F92910B2ECD2B588E984993C87D80701F62556F4C3DE510FF0B4F7045B525F47B30E932115672FE2F24A47E728E1742885ADD9509A9EFDA02D8A9BC7BF28ADCECB7D43438A3528448D596AFADAE3463BE6B17BEB876C5DECC748E803A6897AF7DB0EB87CFD4E16D35002557DB0F02DD8F7565890C086AD7FD59068DBAE8CA08D43098439591FE6B7DD7DBA8D6CE5AA20A39EA05D7C16E0E4D164"
+}, {
+ "jwk": {
+ "alg": "RS256",
+ "d": "phZ8gCMB14I-A35dwg7j16uSd91COBNN4GuwZchy7FPGH0hNzaH2jOYBU3sWy2ORxwWN8PbKqKOkZb8mh4v_gQ",
+ "dp": "PPEZjFS3paYuOvD2ROr6Es1mP2gGeM_9QNouoZjbpZE",
+ "dq": "pXDNDS8Z77HJXB2EsG40JLsNv-sUkakmAbEzwDfSoFE",
+ "e": "AQAB",
+ "kty": "RSA",
+ "n": "zg5KF3GIFp9XJdOMD9Iz-SeC_CVdUeI-gTxw2Igpd8FB0cJllMxg6n3FALqZ7YKPAp7rCL3VYhu-GR8OnqhNaQ",
+ "p": "8TlLFr-SEpz_ItKjdarp9q8S8_2OHy2RFysdY6yGndE",
+ "q": "2q2EDZHQQ_dp9-Cx2Z8kWn7sYo8K9caFneAJge8ZpBk",
+ "qi": "GT51ibfjUV05KRQhyjiqeCkGT12aAWvLzKRsaV9VE54"
+ },
+ "modulusLength": 512,
+ "pkcs8": "30820155020100300D06092A864886F70D01010105000482013F3082013B020100024100CE0E4A177188169F5725D38C0FD233F92782FC255D51E23E813C70D8882977C141D1C26594CC60EA7DC500BA99ED828F029EEB08BDD5621BBE191F0E9EA84D690203010001024100A6167C802301D7823E037E5DC20EE3D7AB9277DD4238134DE06BB065C872EC53C61F484DCDA1F68CE601537B16CB6391C7058DF0F6CAA8A3A465BF26878BFF81022100F1394B16BF92129CFF22D2A375AAE9F6AF12F3FD8E1F2D91172B1D63AC869DD1022100DAAD840D91D043F769F7E0B1D99F245A7EEC628F0AF5C6859DE00981EF19A41902203CF1198C54B7A5A62E3AF0F644EAFA12CD663F680678CFFD40DA2EA198DBA591022100A570CD0D2F19EFB1C95C1D84B06E3424BB0DBFEB1491A92601B133C037D2A0510220193E7589B7E3515D39291421CA38AA7829064F5D9A016BCBCCA46C695F55139E"
+}, {
+ "jwk": {
+ "alg": "RS256",
+ "d": "WsfC0Cl9cyUvq2F0ZyKGFu5-4FB8_aMf-k5h1o9ajfLfWsUCb157NqPNC0fcgxf39NY77eNpjwYgFmTxerQdsNn3yeCgBNylsJasQ_L0oEbOUCj_Y0Qu9YEXwLT-sPJ--XPNQHKiSQbNpqvu8PTDz_hbo4QfUvbZz2YMaoHHvfE",
+ "dp": "vpM5iTCihcge9JIKnzVvOkLJzMT5lj__MU-KdTDBL09xVoomyImfjc-Mlw0zeHiIZSnB8gDZ3Z4KNiMlk_rvaw",
+ "dq": "JWtegbjyWN1A3l9dFrU3hLx_DbLmEisCLMmxaDKvU0xqDeY3JEHDbGoYrx6dO9atIpQwRlbDw6SWh4lTFmnVpw",
+ "e": "AQAB",
+ "kty": "RSA",
+ "n": "vhQy1ulfuzAVEtIZIWTW9ClmbEibUY-iiwcy2QufiD1aPkLIUjBwtvAY_LxgAwvmliZqGQ4HzmaGClBZPtO9LTOcJqD6Vsl4zeDWHCe5-hIaQAF2HhTvKjl92jy7z7saGKEkBjzljUNVyHURiYWnG-ffJdgzQzvSd0xj1lg3a80",
+ "p": "50LZvCQjKgsRI4qcl1yqszIgiyoPkoeQoddDI0vFz34V7-21miyuTR4bP8SW-LILEk1m69WkQJkWGDWjTrPnZw",
+ "q": "0mmPsiUIwoL-CXMxk4AgMwvsGqoL7ak_GbfIsK_iQl85qh-buBAouggQMVyLqYtjX9yRSXOD6F-jfKWsIe8Wqw",
+ "qi": "e7NlImLpnlFpSVapioUAOVHSIQX8XMSgu1spedlS2fSAJ3FyzgRiMtsSjDCWGjsZvdYS8Agkpt08Fw4SBcnFUA"
+ },
+ "modulusLength": 1024,
+ "pkcs8": "30820276020100300D06092A864886F70D0101010500048202603082025C02010002818100BE1432D6E95FBB301512D2192164D6F429666C489B518FA28B0732D90B9F883D5A3E42C8523070B6F018FCBC60030BE696266A190E07CE66860A50593ED3BD2D339C26A0FA56C978CDE0D61C27B9FA121A4001761E14EF2A397DDA3CBBCFBB1A18A124063CE58D4355C875118985A71BE7DF25D833433BD2774C63D658376BCD02030100010281805AC7C2D0297D73252FAB617467228616EE7EE0507CFDA31FFA4E61D68F5A8DF2DF5AC5026F5E7B36A3CD0B47DC8317F7F4D63BEDE3698F06201664F17AB41DB0D9F7C9E0A004DCA5B096AC43F2F4A046CE5028FF63442EF58117C0B4FEB0F27EF973CD4072A24906CDA6ABEEF0F4C3CFF85BA3841F52F6D9CF660C6A81C7BDF1024100E742D9BC24232A0B11238A9C975CAAB332208B2A0F928790A1D743234BC5CF7E15EFEDB59A2CAE4D1E1B3FC496F8B20B124D66EBD5A44099161835A34EB3E767024100D2698FB22508C282FE097331938020330BEC1AAA0BEDA93F19B7C8B0AFE2425F39AA1F9BB81028BA0810315C8BA98B635FDC91497383E85FA37CA5AC21EF16AB024100BE93398930A285C81EF4920A9F356F3A42C9CCC4F9963FFF314F8A7530C12F4F71568A26C8899F8DCF8C970D337878886529C1F200D9DD9E0A36232593FAEF6B0240256B5E81B8F258DD40DE5F5D16B53784BC7F0DB2E6122B022CC9B16832AF534C6A0DE6372441C36C6A18AF1E9D3BD6AD2294304656C3C3A4968789531669D5A702407BB3652262E99E51694956A98A85003951D22105FC5CC4A0BB5B2979D952D9F480277172CE046232DB128C30961A3B19BDD612F00824A6DD3C170E1205C9C550"
+}, {
+ "jwk": {
+ "alg": "RS256",
+ "d": "Yf-c2ZbfparKC9XJ7xQOZuZsyTkVa1bWxd3xodGAy1fRBTZSyVomtfyu_JJWm1T5TO9xiPAghSYGmoE28B5QohPGO_MLExDQlyyiw5Tn3O7NoMisAY2t6z15xtuDuPfpQnGRBCSqzRi--eYlBtdAVsa4QVQy82QzCmWunBzpCgSMWduZ6Yn65aKg4ZbdrulDVTWDnBrH30eXmyU5GPPMjbo68JV05ly48iA4gQiimLT9EffcDK59tPxyXA6CKzEqkMqPrHG1jCmdNj0IHIvS4otRKm0RQjAOpisQ-K8Rx66rsgVHxLW-hAXCAlvijzYOcI2LiwgzY9RJ4gS3nFeQ4Q",
+ "dp": "vKqLsZba-ODLBJ7uj8KgXG_luJheYoCCe1ENm-zubEP2WR61VtHKc0pZk0t2SX2Fykqe1JaDB41T6_qPrLUhSft8oSlPshvfPY7l0XzsNcU_X_1UrTX4U_LY6mtU80lV0OMHyZB55jez0hzO85hCjxdmepw1igCsgqq6uDFb7Pk",
+ "dq": "Dxf08_-mBQgJ9EhAUNLk73hxTWpSrZjWhgRav_hKTX2Ixxz2xSV3ezmB6C8IK8Ry6owYjaPjugWK_SVAarQDn0RMMtGPA6arwtznGi5zPVYdtOkNGiS3SFw4GqrR_Ww9CChsBH8ycPUQi95lRGYqm_wB5-PMOCobcTSGM6cAbpU",
+ "e": "AQAB",
+ "kty": "RSA",
+ "n": "p_8-B39-Hzib082g-MSWO0EnK8sCev_kw54R3ToZ7wyNI2tJzfiwJAWogEGy3qLbySYXfkNtoI3u8PxToels0VRV3ySfTlUsvqOJczAP-fAGv0MWxNsnQos8jN9MkaEB9SvABYCTVKbYhdp3eANelDJL1FD5QsGscone0zmpt7JhLW-_9xAn0dyyi1n_mCkIaYtGaXvuVYo0B7WxFVS80APTfG0YDDx-Y_-420fBXBvIce_Tr_QiYuVf7yIxaYdkrj8vC4c2QKADvATWOG-dYGbwrHmAEdWZGCX_OZXiSwpiZazHFFCGsR5_Y6qA0n7Fn5KbTKztmxpFXNj8MxgPBw",
+ "p": "1zZ0xQwr3KM5mQRXPTJvmKBP4tUnHNHbAc1yzK9NYW2aOZ5QD1waWPx4a9pq8-bQAW19JaBeGSQspzF69Hn0pssm_KBuV1vaj0gmdt3c1nlNI-B9ztQYRBlZOXV3Qz52S0Mzf57Fjl_6e521ncyZMCUY4sJxjY7J9h0Vt6EFNdk",
+ "q": "x9YCEP6NiIlO79_3XfsgSlZN4PNIS-VR9tb56gWz9uOsQG0eAG0NYPgYFZAaNdFi70vFVs3nsDbfWbCkqkZ0owIk-9meAb36fm5c1jB7E2mOlepiA5xc8JABLwHK2OnjeP1sV-DqLu8C10urVBAVoCX0aPh0dxHfsWNepsxj_98",
+ "qi": "QfE3JPUSjq_yPahU9JyuvU5sg2bpM4HPzCvTl685kl-N8pW9YQquEq6On3_LHeu_rcJ3WjGebOSlDtDWzYfsL-14r9_OL81yK5ahm3_OdYt_cpNr0JDkfEmZFzDZ9CEQbcs3gwsjlkycvtieARu_1wmCaPKL__RzJiWGuermQoA"
+ },
+ "modulusLength": 2048,
+ "pkcs8": "308204BD020100300D06092A864886F70D0101010500048204A7308204A30201000282010100A7FF3E077F7E1F389BD3CDA0F8C4963B41272BCB027AFFE4C39E11DD3A19EF0C8D236B49CDF8B02405A88041B2DEA2DBC926177E436DA08DEEF0FC53A1E96CD15455DF249F4E552CBEA38973300FF9F006BF4316C4DB27428B3C8CDF4C91A101F52BC005809354A6D885DA7778035E94324BD450F942C1AC7289DED339A9B7B2612D6FBFF71027D1DCB28B59FF982908698B46697BEE558A3407B5B11554BCD003D37C6D180C3C7E63FFB8DB47C15C1BC871EFD3AFF42262E55FEF2231698764AE3F2F0B873640A003BC04D6386F9D6066F0AC798011D5991825FF3995E24B0A6265ACC7145086B11E7F63AA80D27EC59F929B4CACED9B1A455CD8FC33180F0702030100010282010061FF9CD996DFA5AACA0BD5C9EF140E66E66CC939156B56D6C5DDF1A1D180CB57D1053652C95A26B5FCAEFC92569B54F94CEF7188F0208526069A8136F01E50A213C63BF30B1310D0972CA2C394E7DCEECDA0C8AC018DADEB3D79C6DB83B8F7E94271910424AACD18BEF9E62506D74056C6B8415432F364330A65AE9C1CE90A048C59DB99E989FAE5A2A0E196DDAEE9435535839C1AC7DF47979B253918F3CC8DBA3AF09574E65CB8F220388108A298B4FD11F7DC0CAE7DB4FC725C0E822B312A90CA8FAC71B58C299D363D081C8BD2E28B512A6D1142300EA62B10F8AF11C7AEABB20547C4B5BE8405C2025BE28F360E708D8B8B083363D449E204B79C5790E102818100D73674C50C2BDCA3399904573D326F98A04FE2D5271CD1DB01CD72CCAF4D616D9A399E500F5C1A58FC786BDA6AF3E6D0016D7D25A05E19242CA7317AF479F4A6CB26FCA06E575BDA8F482676DDDCD6794D23E07DCED418441959397577433E764B43337F9EC58E5FFA7B9DB59DCC99302518E2C2718D8EC9F61D15B7A10535D902818100C7D60210FE8D88894EEFDFF75DFB204A564DE0F3484BE551F6D6F9EA05B3F6E3AC406D1E006D0D60F81815901A35D162EF4BC556CDE7B036DF59B0A4AA4674A30224FBD99E01BDFA7E6E5CD6307B13698E95EA62039C5CF090012F01CAD8E9E378FD6C57E0EA2EEF02D74BAB541015A025F468F8747711DFB1635EA6CC63FFDF02818100BCAA8BB196DAF8E0CB049EEE8FC2A05C6FE5B8985E6280827B510D9BECEE6C43F6591EB556D1CA734A59934B76497D85CA4A9ED49683078D53EBFA8FACB52149FB7CA1294FB21BDF3D8EE5D17CEC35C53F5FFD54AD35F853F2D8EA6B54F34955D0E307C99079E637B3D21CCEF398428F17667A9C358A00AC82AABAB8315BECF90281800F17F4F3FFA6050809F4484050D2E4EF78714D6A52AD98D686045ABFF84A4D7D88C71CF6C525777B3981E82F082BC472EA8C188DA3E3BA058AFD25406AB4039F444C32D18F03A6ABC2DCE71A2E733D561DB4E90D1A24B7485C381AAAD1FD6C3D08286C047F3270F5108BDE6544662A9BFC01E7E3CC382A1B71348633A7006E9502818041F13724F5128EAFF23DA854F49CAEBD4E6C8366E93381CFCC2BD397AF39925F8DF295BD610AAE12AE8E9F7FCB1DEBBFADC2775A319E6CE4A50ED0D6CD87EC2FED78AFDFCE2FCD722B96A19B7FCE758B7F72936BD090E47C49991730D9F421106DCB37830B23964C9CBED89E011BBFD7098268F28BFFF473262586B9EAE64280"
+}, {
+ "jwk": {
+ "alg": "RS256",
+ "d": "pDibepre0xvg0UxN-kftu8bCDqSj15O0dE_4H16otk_jSFVquoOyh89MSGmDJISPiMoxgoIxKBBAJo01EdonnPRbI4o0C68AA2kopiixzrH0VJSLX_bErR6wmdU4_7wUNQ2RRqcrpmJ_0ZgacIsJz3xDAAyJFANP5N9Uk11wzeMVa5ApIsI_u-Us0aHTFYgxGby7X1nj0jlTgzkbX82o-jnJtGKTaQW5q0nRj1NAqmNV902Gs2ecn8nSqEbwMUeNgeHAU187d1NHTUeVQ5aVfmnQ_drU3qo1nlV7JRu851fq4csAkVzOtMg55V1VBBYJ1azQhjri4eAQoZp34m7Xq78ZvcuM0WDGpf3R5LnBpMxHLbSrVAYCIQ_l3ps762xN_yP-coGomQJkznuIEz2c0XGhEC4855dHhMpwoQtTd4_iKR1Bw_-Jv7B0vMzvk3R1osdzR3-12kKJKgHtUFJx55Dc-wYDRd3sRcgpGQK5D9NY5ZntLV4IlFym9TObrqsnvYTXKMv8bZ2MaiZEMUf31x7MaZGPMFcFGBWmiIE5i4Prlzbur-t6KNeqEJTo8sjxzIMy7VwuZzsx06UZIwu5gY7Gxdbe6mdgIXwO0KW1jML-MJdUQE5GoQ2amVeCfltPu4LE-70sZp5Ey6ESUH3kT8x_pD1yltDxFzTJwjVJa_E",
+ "dp": "L6tXGDIG9atdNGOmxrAf0ky9wD4Ahrm6JjEtgxosrV7_jUMWONPNvfGctzKg3HSudhahX4FCP1wA2ABbfAPKDBTHGGfXGDThqD1h0NUkgl1DEVU37i9xkmvU8sO7HMxMLMvPNjyMr9x0a0-tw0rNkRzkhV-OJzIX28AsMyVdbi5_rJnQfHdmvV41LrwvJVHlLNEoCEaOx7dVA5gpsjsH4I1B7ZKtPh5Yk8GtKJ8w-WBqRG3Eiu8ykkN9HE77L_8dHungn2Z7hDx3tsvwS4q7qqBIWBvupf-J9_9hl1U6vsVhxxXm77j4G5evfNQsLf4v44wNv13Z3Gv90BHhw4dfRQ",
+ "dq": "wJ0OrDb9SP_snr8vw6Gq_IlX8nBWGGv06aGZNOy7__CEw0n7OFmIZ-g60CQ30Aog6Jf5UaSE07KnRJspZrUQwAznbcCFXP8o6Z3-RnzC7FCAJPPPCQRsJ_tHYUoYEYRwRKOVqZQlONelDruwuF_CDw4xBotTj5ouNzoUFd1HH2hn7DeGDhHKXe4-CjcxW4bz7MyIWpLU5QulPkA69oDwxq8EeMVMioOAMZRVX6SyIamT0U-bs_-T2YeIR5mNwRyivXPTfVamzx55aFGLivpPXi6tme3M8E1fx6rV5DIRZ-v03lllo11nIAWVb8cjwcEEJxbo0Y_a_xYiUZT3k7CfTQ",
+ "e": "AQAB",
+ "kty": "RSA",
+ "n": "u0d4GAw63Rr6IAZpVluENnlDie2WLR1dfoy3LCGbNFX_7gGeCHBi-u4KDGRVqcGwRIm_hH90fYVEL736-JDxcC-Te_PGSz5mQQHst5vlF1dgzU9YmK3uKb8F75jg5JmK78-PwvSWqc2Z2Kf56K6Y5Rpmgwk3nUTQqCIKPWlziGs2JQ1LuWrwyt5zY1UtGJYiL0frvZh87UKK3OZsjhcYraMKPNDwrJicTzOSIrJLAX8sSn9SqikEwUD1sT-0IRsYwaY9Wr-LfthY8_esFqWTSwf2V0HH16eRRw5-PRPFEduf0p_X7XT6wCayNgXIqWW3mgkvtsfbxzUXwnfj53C2TXhNoWsixlFAuCC4hMbiQLNh567QPSpcbLDXrPcwrutPJzG0TekH5YJBzQxxWpF7erd_jDvwPTrBOA-ug--p-1JCDQdSyrIMw7Rd4sIdtnM7kPi26GWwedalnMp42-skPwzS1fSLOd5V5_xh0CcLICxn6SAOBsH8EqKW2mMMPGWnyNBlNI2SYEZZCFE1n-HoCkfeTP_GCyh7YLxMYDSgOA34Sr16LDMIHhyecj6scaUOb5NkOjgvGFbAxe0zQsR5f3NaOW3-GMarWfnyTX9CKjvZAtJ28pTOpK8tApnwxGoh17DhIpB3PAkCBQNkfYMfpyfB3L6MoffA9YzoCFTQyiE",
+ "p": "3IkIDS0gjyr0GsLeCCX-0KB5rLjrvKufR7tAOx_D_p7mmKSV2MkSt6qbNk-Wcj1HXCXeNXd733CWt0QeumluDX8G_zjFfEuAAI-YvmHBLL2hpEZI2m-tVrts8gZlIygHGpCSV-Upm52fyI8AKYCTY546Fh7uA7Dm_H6kzJjSj2nlYfAd5S4RXMu_Uj_vQcNAtWg3G40xcsqz09rL0RmE0Umq-IeDrtDPWoGf-Uijz030KQ8W0Z--Gg9is9k-6AGuyZY80L6-FqAKLdKpESZ6VQHTHhyszD8tWdbl6vGLVK9gCkJAExTsdPRhqtdbhEogfNYiQMLCj-HTLxax2TP85w",
+ "q": "2WVayEWGMbx__V8bvl5S9xrDbmfkCLiFoNEYJQ9WegmGq2zhokFOXjEgMcwZhOXcMfJOUxrOs7eRbLRl-XNbjrys-hDI418om7aRI5ebPN1yL1UZH_YTnK01jS8wT0Wj3H_4cI4iN2nPaHuDjKIc1AKlR4nRnW1szlT_iEyF6Agk-8qlbJ9sW5BsLP4aMzs5nyHkFGZ1JkMBf594hYPT-yrFLVtCNc4NOyjGzOlR_Lf1U2ua5W32iOqODASAv34U3xzvPjMbcHAyZVOiRY-fL3lR2yPWnqNRrnwEVX6r092G3-fAbcY4glgchZ-szTAXLElTjGMhH3UKpDuKjZfXtw",
+ "qi": "M8pKgmLMjsk8BLTA0FcHdxkoO0boKc6A6c1r0VvU3fTAH3n1araCf-o4GVRl96x8N88kAk0Tgx-vlBp4bHnudqbPCxjDJWmFHK5IEJy-qPwDf04PMu40sBkxzqDqmaFe2T6kBz5ydAxQQERPMDtMh0f_S8eN-j1kGQr0wrClbWwtcsQ-EUpjNMIHP5j0r-rXBE4EfkvEx9vvuNYzi7KJJQyeBOvOJSAPl-IODmmxETFOCUSrKKwuFn6WG5uebDA8P9balyGHUR0vO6YjpwYttdiPB24w9lBM1qkZY0SCStJrYtdORby0UgcX7T5f7iwzqxtIOtdhMfczTZHSwgsZ4A"
+ },
+ "modulusLength": 4096,
+ "pkcs8": "30820943020100300D06092A864886F70D01010105000482092D308209290201000282020100BB4778180C3ADD1AFA200669565B8436794389ED962D1D5D7E8CB72C219B3455FFEE019E087062FAEE0A0C6455A9C1B04489BF847F747D85442FBDFAF890F1702F937BF3C64B3E664101ECB79BE5175760CD4F5898ADEE29BF05EF98E0E4998AEFCF8FC2F496A9CD99D8A7F9E8AE98E51A668309379D44D0A8220A3D6973886B36250D4BB96AF0CADE7363552D1896222F47EBBD987CED428ADCE66C8E1718ADA30A3CD0F0AC989C4F339222B24B017F2C4A7F52AA2904C140F5B13FB4211B18C1A63D5ABF8B7ED858F3F7AC16A5934B07F65741C7D7A791470E7E3D13C511DB9FD29FD7ED74FAC026B23605C8A965B79A092FB6C7DBC73517C277E3E770B64D784DA16B22C65140B820B884C6E240B361E7AED03D2A5C6CB0D7ACF730AEEB4F2731B44DE907E58241CD0C715A917B7AB77F8C3BF03D3AC1380FAE83EFA9FB52420D0752CAB20CC3B45DE2C21DB6733B90F8B6E865B079D6A59CCA78DBEB243F0CD2D5F48B39DE55E7FC61D0270B202C67E9200E06C1FC12A296DA630C3C65A7C8D065348D926046590851359FE1E80A47DE4CFFC60B287B60BC4C6034A0380DF84ABD7A2C33081E1C9E723EAC71A50E6F93643A382F1856C0C5ED3342C4797F735A396DFE18C6AB59F9F24D7F422A3BD902D276F294CEA4AF2D0299F0C46A21D7B0E12290773C09020503647D831FA727C1DCBE8CA1F7C0F58CE80854D0CA2102030100010282020100A4389B7A9ADED31BE0D14C4DFA47EDBBC6C20EA4A3D793B4744FF81F5EA8B64FE348556ABA83B287CF4C48698324848F88CA31828231281040268D3511DA279CF45B238A340BAF00036928A628B1CEB1F454948B5FF6C4AD1EB099D538FFBC14350D9146A72BA6627FD1981A708B09CF7C43000C8914034FE4DF54935D70CDE3156B902922C23FBBE52CD1A1D315883119BCBB5F59E3D2395383391B5FCDA8FA39C9B462936905B9AB49D18F5340AA6355F74D86B3679C9FC9D2A846F031478D81E1C0535F3B7753474D47954396957E69D0FDDAD4DEAA359E557B251BBCE757EAE1CB00915CCEB4C839E55D55041609D5ACD0863AE2E1E010A19A77E26ED7ABBF19BDCB8CD160C6A5FDD1E4B9C1A4CC472DB4AB540602210FE5DE9B3BEB6C4DFF23FE7281A8990264CE7B88133D9CD171A1102E3CE7974784CA70A10B53778FE2291D41C3FF89BFB074BCCCEF937475A2C773477FB5DA42892A01ED505271E790DCFB060345DDEC45C8291902B90FD358E599ED2D5E08945CA6F5339BAEAB27BD84D728CBFC6D9D8C6A26443147F7D71ECC69918F3057051815A68881398B83EB9736EEAFEB7A28D7AA1094E8F2C8F1CC8332ED5C2E673B31D3A519230BB9818EC6C5D6DEEA6760217C0ED0A5B58CC2FE309754404E46A10D9A9957827E5B4FBB82C4FBBD2C669E44CBA112507DE44FCC7FA43D7296D0F11734C9C235496BF10282010100DC89080D2D208F2AF41AC2DE0825FED0A079ACB8EBBCAB9F47BB403B1FC3FE9EE698A495D8C912B7AA9B364F96723D475C25DE35777BDF7096B7441EBA696E0D7F06FF38C57C4B80008F98BE61C12CBDA1A44648DA6FAD56BB6CF206652328071A909257E5299B9D9FC88F00298093639E3A161EEE03B0E6FC7EA4CC98D28F69E561F01DE52E115CCBBF523FEF41C340B568371B8D3172CAB3D3DACBD11984D149AAF88783AED0CF5A819FF948A3CF4DF4290F16D19FBE1A0F62B3D93EE801AEC9963CD0BEBE16A00A2DD2A911267A5501D31E1CACCC3F2D59D6E5EAF18B54AF600A42401314EC74F461AAD75B844A207CD62240C2C28FE1D32F16B1D933FCE70282010100D9655AC8458631BC7FFD5F1BBE5E52F71AC36E67E408B885A0D118250F567A0986AB6CE1A2414E5E312031CC1984E5DC31F24E531ACEB3B7916CB465F9735B8EBCACFA10C8E35F289BB69123979B3CDD722F55191FF6139CAD358D2F304F45A3DC7FF8708E223769CF687B838CA21CD402A54789D19D6D6CCE54FF884C85E80824FBCAA56C9F6C5B906C2CFE1A333B399F21E41466752643017F9F788583D3FB2AC52D5B4235CE0D3B28C6CCE951FCB7F5536B9AE56DF688EA8E0C0480BF7E14DF1CEF3E331B7070326553A2458F9F2F7951DB23D69EA351AE7C04557EABD3DD86DFE7C06DC63882581C859FACCD30172C49538C63211F750AA43B8A8D97D7B7028201002FAB57183206F5AB5D3463A6C6B01FD24CBDC03E0086B9BA26312D831A2CAD5EFF8D431638D3CDBDF19CB732A0DC74AE7616A15F81423F5C00D8005B7C03CA0C14C71867D71834E1A83D61D0D524825D43115537EE2F71926BD4F2C3BB1CCC4C2CCBCF363C8CAFDC746B4FADC34ACD911CE4855F8E273217DBC02C33255D6E2E7FAC99D07C7766BD5E352EBC2F2551E52CD12808468EC7B755039829B23B07E08D41ED92AD3E1E5893C1AD289F30F9606A446DC48AEF3292437D1C4EFB2FFF1D1EE9E09F667B843C77B6CBF04B8ABBAAA048581BEEA5FF89F7FF6197553ABEC561C715E6EFB8F81B97AF7CD42C2DFE2FE38C0DBF5DD9DC6BFDD011E1C3875F450282010100C09D0EAC36FD48FFEC9EBF2FC3A1AAFC8957F27056186BF4E9A19934ECBBFFF084C349FB38598867E83AD02437D00A20E897F951A484D3B2A7449B2966B510C00CE76DC0855CFF28E99DFE467CC2EC508024F3CF09046C27FB47614A1811847044A395A9942538D7A50EBBB0B85FC20F0E31068B538F9A2E373A1415DD471F6867EC37860E11CA5DEE3E0A37315B86F3ECCC885A92D4E50BA53E403AF680F0C6AF0478C54C8A83803194555FA4B221A993D14F9BB3FF93D9878847998DC11CA2BD73D37D56A6CF1E7968518B8AFA4F5E2EAD99EDCCF04D5FC7AAD5E4321167EBF4DE5965A35D672005956FC723C1C1042716E8D18FDAFF16225194F793B09F4D0282010033CA4A8262CC8EC93C04B4C0D057077719283B46E829CE80E9CD6BD15BD4DDF4C01F79F56AB6827FEA38195465F7AC7C37CF24024D13831FAF941A786C79EE76A6CF0B18C32569851CAE48109CBEA8FC037F4E0F32EE34B01931CEA0EA99A15ED93EA4073E72740C5040444F303B4C8747FF4BC78DFA3D64190AF4C2B0A56D6C2D72C43E114A6334C2073F98F4AFEAD7044E047E4BC4C7DBEFB8D6338BB289250C9E04EBCE25200F97E20E0E69B111314E0944AB28AC2E167E961B9B9E6C303C3FD6DA972187511D2F3BA623A7062DB5D88F076E30F6504CD6A9196344824AD26B62D74E45BCB4520717ED3E5FEE2C33AB1B483AD76131F7334D91D2C20B19E0"
+} ]
diff --git a/content/test/gpu/gpu_tests/context_lost.py b/content/test/gpu/gpu_tests/context_lost.py
index 5a05d83..092747a 100644
--- a/content/test/gpu/gpu_tests/context_lost.py
+++ b/content/test/gpu/gpu_tests/context_lost.py
@@ -138,8 +138,8 @@
def RunNavigateSteps(self, action_runner):
action_runner.NavigateToPage(self)
- action_runner.RunAction(WaitAction(
- {'javascript': 'window.domAutomationController._loaded'}))
+ action_runner.WaitForJavaScriptCondition(
+ 'window.domAutomationController._loaded')
class WebGLContextLostFromLoseContextExtensionPage(page.Page):
@@ -155,8 +155,8 @@
def RunNavigateSteps(self, action_runner):
action_runner.NavigateToPage(self)
- action_runner.RunAction(WaitAction(
- {'javascript': 'window.domAutomationController._finished'}))
+ action_runner.WaitForJavaScriptCondition(
+ 'window.domAutomationController._finished')
class WebGLContextLostFromQuantityPage(page.Page):
def __init__(self, page_set, base_dir):
@@ -171,8 +171,8 @@
def RunNavigateSteps(self, action_runner):
action_runner.NavigateToPage(self)
- action_runner.RunAction(WaitAction(
- {'javascript': 'window.domAutomationController._loaded'}))
+ action_runner.WaitForJavaScriptCondition(
+ 'window.domAutomationController._loaded')
class ContextLost(test_module.Test):
enabled = True
@@ -183,12 +183,9 @@
def CreatePageSet(self, options):
ps = page_set.PageSet(
file_path=data_path,
- description='Test cases for real and synthetic context lost events',
user_agent_type='desktop',
serving_dirs=set(['']))
ps.AddPage(WebGLContextLostFromGPUProcessExitPage(ps, ps.base_dir))
ps.AddPage(WebGLContextLostFromLoseContextExtensionPage(ps, ps.base_dir))
ps.AddPage(WebGLContextLostFromQuantityPage(ps, ps.base_dir))
return ps
-
-
diff --git a/content/test/gpu/gpu_tests/gpu_process.py b/content/test/gpu/gpu_tests/gpu_process.py
index 33114dc..cb07c55 100644
--- a/content/test/gpu/gpu_tests/gpu_process.py
+++ b/content/test/gpu/gpu_tests/gpu_process.py
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import gpu_process_expectations as expectations
+import page_sets
from telemetry import test
from telemetry.page import page_set
@@ -35,7 +36,7 @@
class GpuProcess(test.Test):
"""Tests that accelerated content triggers the creation of a GPU process"""
test = _GpuProcessValidator
- page_set = 'page_sets/gpu_process_tests.py'
+ page_set = page_sets.GpuProcessTestsPageSet
def CreateExpectations(self, page_set):
return expectations.GpuProcessExpectations()
diff --git a/content/test/gpu/gpu_tests/gpu_rasterization.py b/content/test/gpu/gpu_tests/gpu_rasterization.py
index 90e9c2c..a4b427e 100644
--- a/content/test/gpu/gpu_tests/gpu_rasterization.py
+++ b/content/test/gpu/gpu_tests/gpu_rasterization.py
@@ -2,8 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import optparse
import cloud_storage_test_base
+import optparse
+import page_sets
+
test_harness_script = r"""
var domAutomationController = {};
@@ -64,7 +66,7 @@
class GpuRasterization(cloud_storage_test_base.TestBase):
"""Tests that GPU rasterization produces valid content"""
test = _GpuRasterizationValidator
- page_set = 'page_sets/gpu_rasterization_tests.py'
+ page_set = page_sets.GpuRasterizationTestsPageSet
def CreatePageSet(self, options):
page_set = super(GpuRasterization, self).CreatePageSet(options)
diff --git a/content/test/gpu/gpu_tests/hardware_accelerated_feature.py b/content/test/gpu/gpu_tests/hardware_accelerated_feature.py
index b2386c1..a1f943b 100644
--- a/content/test/gpu/gpu_tests/hardware_accelerated_feature.py
+++ b/content/test/gpu/gpu_tests/hardware_accelerated_feature.py
@@ -53,10 +53,7 @@
def CreatePageSet(self, options):
features = ['WebGL', 'Canvas']
- ps = page_set.PageSet(
- description='Tests GPU acceleration is reported as active',
- user_agent_type='desktop',
- file_path='')
+ ps = page_set.PageSet(user_agent_type='desktop', file_path='')
for feature in features:
ps.AddPage(ChromeGpuPage(page_set=ps, feature=feature))
diff --git a/content/test/gpu/gpu_tests/maps.py b/content/test/gpu/gpu_tests/maps.py
index 1d5bb6f..e88b2a5 100644
--- a/content/test/gpu/gpu_tests/maps.py
+++ b/content/test/gpu/gpu_tests/maps.py
@@ -84,8 +84,7 @@
def RunNavigateSteps(self, action_runner):
action_runner.NavigateToPage(self)
- action_runner.RunAction(WaitAction({'javascript': 'window.testDone',
- 'timeout': 180}))
+ action_runner.WaitForJavaScriptCondition('window.testDone', timeout=180)
class Maps(cloud_storage_test_base.TestBase):
diff --git a/content/test/gpu/gpu_tests/memory.py b/content/test/gpu/gpu_tests/memory.py
index 84eb511..dddb472 100644
--- a/content/test/gpu/gpu_tests/memory.py
+++ b/content/test/gpu/gpu_tests/memory.py
@@ -2,15 +2,16 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import memory_expectations
+import page_sets
from telemetry import test
from telemetry.page import page_test
-from telemetry.core.timeline import counter
-from telemetry.core.timeline import model
+from telemetry.timeline import counter
+from telemetry.timeline import model
-MEMORY_LIMIT_MB = 256
-SINGLE_TAB_LIMIT_MB = 128
-WIGGLE_ROOM_MB = 4
+MEMORY_LIMIT_MB = 192
+SINGLE_TAB_LIMIT_MB = 192
+WIGGLE_ROOM_MB = 8
test_harness_script = r"""
var domAutomationController = {};
@@ -92,7 +93,7 @@
class Memory(test.Test):
"""Tests GPU memory limits"""
test = _MemoryValidator
- page_set = 'page_sets/memory_tests.py'
+ page_set = page_sets.MemoryTestsPageSet
def CreateExpectations(self, page_set):
return memory_expectations.MemoryExpectations()
diff --git a/content/test/gpu/gpu_tests/pixel.py b/content/test/gpu/gpu_tests/pixel.py
index b9de793..b772203 100644
--- a/content/test/gpu/gpu_tests/pixel.py
+++ b/content/test/gpu/gpu_tests/pixel.py
@@ -8,6 +8,7 @@
import re
import cloud_storage_test_base
+import page_sets
import pixel_expectations
from telemetry import test
@@ -146,7 +147,7 @@
class Pixel(cloud_storage_test_base.TestBase):
test = _PixelValidator
- page_set = 'page_sets/pixel_tests.py'
+ page_set = page_sets.PixelTestsPageSet
@classmethod
def AddTestCommandLineArgs(cls, group):
diff --git a/content/test/gpu/gpu_tests/screenshot_sync.py b/content/test/gpu/gpu_tests/screenshot_sync.py
index a2d8abb..d37904b 100644
--- a/content/test/gpu/gpu_tests/screenshot_sync.py
+++ b/content/test/gpu/gpu_tests/screenshot_sync.py
@@ -38,9 +38,8 @@
def RunNavigateSteps(self, action_runner):
action_runner.NavigateToPage(self)
- action_runner.RunAction(WaitAction({
- 'javascript': 'window.__testComplete',
- 'timeout': 120}))
+ action_runner.WaitForJavaScriptCondition(
+ 'window.__testComplete', timeout=120)
class ScreenshotSyncProcess(test.Test):
@@ -52,9 +51,6 @@
return expectations.ScreenshotSyncExpectations()
def CreatePageSet(self, options):
- ps = page_set.PageSet(
- file_path=data_path,
- description='Test cases for screenshot synchronization',
- serving_dirs=[''])
+ ps = page_set.PageSet(file_path=data_path, serving_dirs=[''])
ps.AddPage(ScreenshotSyncPage(ps, ps.base_dir))
return ps
diff --git a/content/test/gpu/gpu_tests/webgl_conformance.py b/content/test/gpu/gpu_tests/webgl_conformance.py
index 965ea9f..bb9c093 100644
--- a/content/test/gpu/gpu_tests/webgl_conformance.py
+++ b/content/test/gpu/gpu_tests/webgl_conformance.py
@@ -54,6 +54,13 @@
window.webglTestHarness = testHarness;
window.parent.webglTestHarness = testHarness;
window.console.log = testHarness.log;
+ window.onerror = function(message, url, line) {
+ testHarness._failures++;
+ if (message) {
+ testHarness.log(message);
+ }
+ testHarness.notifyFinished(null);
+ };
"""
def _DidWebGLTestSucceed(tab):
@@ -89,8 +96,8 @@
def RunNavigateSteps(self, action_runner):
action_runner.NavigateToPage(self)
- action_runner.RunAction(WaitAction(
- {'javascript': 'webglTestHarness._finished', 'timeout': 120}))
+ action_runner.WaitForJavaScriptCondition(
+ 'webglTestHarness._finished', timeout=120)
class WebglConformance(test_module.Test):
@@ -108,7 +115,6 @@
options.webgl_conformance_version)
ps = page_set.PageSet(
- description='Executes WebGL conformance tests',
user_agent_type='desktop',
serving_dirs=[''],
file_path=conformance_path)
diff --git a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
index de6918e..cf23562 100644
--- a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
+++ b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
@@ -27,10 +27,6 @@
# Fails on all platforms
self.Fail('conformance/glsl/misc/shaders-with-mis-matching-uniforms.html',
bug=351396)
- self.Fail('conformance/glsl/misc/boolean_precision.html',
- bug=368874)
- self.Fail('conformance/glsl/misc/shader-struct-scope.html',
- bug=368910)
# Flaky on Win
self.Fail('conformance/extensions/webgl-draw-buffers.html',
@@ -50,6 +46,10 @@
self.Fail('conformance/glsl/misc/shader-with-array-of-structs-uniform.html',
['win7', 'intel', 'nvidia'], bug=373972)
+ # Mac failures
+ self.Fail('conformance/glsl/misc/shader-struct-scope.html',
+ ['mac'], bug=368910)
+
# Mac / Intel failures
# Radar 13499466
self.Fail('conformance/limits/gl-max-texture-dimensions.html',
@@ -138,11 +138,13 @@
self.Fail('conformance/textures/texture-npot-video.html',
['android'], bug=334204)
+ # ChromeOS: affecting all devices.
+ self.Fail('conformance/extensions/webgl-depth-texture.html',
+ ['chromeos'], bug=382651)
+
# ChromeOS: all Intel except for pinetrail (stumpy, parrot, peppy,...)
# We will just include pinetrail here for now as we don't want to list
# every single Intel device ID.
- self.Fail('conformance/extensions/webgl-depth-texture.html',
- ['chromeos', 'intel'], bug=375556)
self.Fail('conformance/glsl/misc/empty_main.vert.html',
['chromeos', 'intel'], bug=375556)
self.Fail('conformance/glsl/misc/gl_position_unset.vert.html',
@@ -151,6 +153,8 @@
['chromeos', 'intel'], bug=375556)
self.Fail('conformance/renderbuffers/framebuffer-object-attachment.html',
['chromeos', 'intel'], bug=375556)
+ self.Fail('conformance/textures/texture-size-limit.html',
+ ['chromeos', 'intel'], bug=385361)
# ChromeOS: pinetrail (alex, mario, zgb).
self.Fail('conformance/attribs/gl-vertex-attrib-render.html',
@@ -228,32 +232,3 @@
['chromeos', ('intel', 0xa011)], bug=375554)
self.Skip('conformance/uniforms/uniform-default-values.html',
['chromeos', ('intel', 0xa011)], bug=375554)
-
- # ChromeOS ARM Mali (peach_pit).
- # The bug refers to the partner tracker crbug.com/p/29017.
- # TODO(ihf): Restrict fail to ('arm', 'mali') once this GPU is detected.
- self.Fail('conformance/canvas/to-data-url-test.html',
- ['chromeos'], bug=29017)
- self.Fail('conformance/state/state-uneffected-after-compositing.html',
- ['chromeos'], bug=29017)
-
- # ChromeOS ARM Tegra.
- # The bug refers to the partner tracker crbug.com/p/28982.
- # TODO(ihf): Restrict fail to ('nvidia', '...') once this GPU is detected.
- self.Fail('conformance/extensions/oes-texture-float-with-video.html',
- ['chromeos'], bug=28982)
- self.Fail('conformance/extensions/oes-texture-half-float-with-video.html',
- ['chromeos'], bug=28982)
- self.Fail('conformance/textures/tex-image-and-sub-image-2d-with-video.html',
- ['chromeos'], bug=28982)
- self.Fail(
- 'conformance/textures/tex-image-and-sub-image-2d-with-video-rgb565.html',
- ['chromeos'], bug=28982)
- self.Fail(
- 'conformance/textures/tex-image-and-sub-image-2d-with-video-rgba4444.html',
- ['chromeos'], bug=28982)
- self.Fail(
- 'conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html',
- ['chromeos'], bug=28982)
- self.Fail('conformance/textures/texture-npot-video.html',
- ['chromeos'], bug=28982)
diff --git a/content/test/gpu/gpu_tests/webgl_robustness.py b/content/test/gpu/gpu_tests/webgl_robustness.py
index 497cacb..153bd31 100644
--- a/content/test/gpu/gpu_tests/webgl_robustness.py
+++ b/content/test/gpu/gpu_tests/webgl_robustness.py
@@ -58,8 +58,7 @@
def RunNavigateSteps(self, action_runner):
action_runner.NavigateToPage(self)
- action_runner.RunAction(
- WaitAction({'javascript': 'webglTestHarness._finished'}))
+ action_runner.WaitForJavaScriptCondition('webglTestHarness._finished')
class WebglRobustness(test.Test):
test = WebglConformanceValidator
@@ -67,7 +66,6 @@
def CreatePageSet(self, options):
ps = page_set.PageSet(
file_path=conformance_path,
- description='Test cases for WebGL robustness',
user_agent_type='desktop',
serving_dirs=[''])
ps.AddPage(WebglRobustnessPage(ps, ps.base_dir))
diff --git a/content/test/gpu/page_sets/__init__.py b/content/test/gpu/page_sets/__init__.py
index ed3e1cc..5843513 100644
--- a/content/test/gpu/page_sets/__init__.py
+++ b/content/test/gpu/page_sets/__init__.py
@@ -2,14 +2,16 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
+import sys
-def GetAllPageSetFilenames():
- results = []
- start_dir = os.path.dirname(__file__)
- for dirpath, _, filenames in os.walk(start_dir):
- for f in filenames:
- if os.path.splitext(f)[1] != '.json':
- continue
- filename = os.path.join(dirpath, f)
- results.append(filename)
- return results
+from telemetry.core import discover
+from telemetry.page import page_set
+
+
+# Import all submodules' PageSet classes.
+start_dir = os.path.dirname(os.path.abspath(__file__))
+top_level_dir = os.path.dirname(start_dir)
+base_class = page_set.PageSet
+for cls in discover.DiscoverClasses(
+ start_dir, top_level_dir, base_class).values():
+ setattr(sys.modules[__name__], cls.__name__, cls)
diff --git a/content/test/gpu/page_sets/gpu_process_tests.py b/content/test/gpu/page_sets/gpu_process_tests.py
index c9abeb0..ee3ee47 100644
--- a/content/test/gpu/page_sets/gpu_process_tests.py
+++ b/content/test/gpu/page_sets/gpu_process_tests.py
@@ -27,11 +27,8 @@
def RunNavigateSteps(self, action_runner):
action_runner.NavigateToPage(self)
- action_runner.RunAction(WaitAction(
- {
- 'javascript': 'domAutomationController._finished',
- 'timeout': 30
- }))
+ action_runner.WaitForJavaScriptCondition(
+ 'domAutomationController._finished', timeout=30)
class GpuProcessTestsPageSet(page_set_module.PageSet):
diff --git a/content/test/gpu/page_sets/gpu_rasterization_tests.py b/content/test/gpu/page_sets/gpu_rasterization_tests.py
index e6a338f..4933302 100644
--- a/content/test/gpu/page_sets/gpu_rasterization_tests.py
+++ b/content/test/gpu/page_sets/gpu_rasterization_tests.py
@@ -69,11 +69,8 @@
def RunNavigateSteps(self, action_runner):
action_runner.NavigateToPage(self)
- action_runner.RunAction(WaitAction(
- {
- 'javascript': 'domAutomationController._finished',
- 'timeout': 30
- }))
+ action_runner.WaitForJavaScriptCondition(
+ 'domAutomationController._finished', timeout=30)
class GpuRasterizationTestsPageSet(page_set_module.PageSet):
diff --git a/content/test/gpu/page_sets/memory_tests.py b/content/test/gpu/page_sets/memory_tests.py
index dee9c15..ef539c7 100644
--- a/content/test/gpu/page_sets/memory_tests.py
+++ b/content/test/gpu/page_sets/memory_tests.py
@@ -17,11 +17,8 @@
def RunNavigateSteps(self, action_runner):
action_runner.NavigateToPage(self)
- action_runner.RunAction(WaitAction(
- {
- 'javascript': 'domAutomationController._finished',
- 'timeout': 60
- }))
+ action_runner.WaitForJavaScriptCondition(
+ 'domAutomationController._finished', timeout=60)
class MemoryTestsPageSet(page_set_module.PageSet):
diff --git a/content/test/gpu/page_sets/page_set_unittest.py b/content/test/gpu/page_sets/page_set_unittest.py
index f55e95d..b3203f7 100644
--- a/content/test/gpu/page_sets/page_set_unittest.py
+++ b/content/test/gpu/page_sets/page_set_unittest.py
@@ -4,13 +4,12 @@
import os
-from telemetry.core import discover
-from telemetry.page import page_set as page_set_module
-from telemetry.page import page_set_archive_info
from telemetry.unittest import page_set_smoke_test
class PageSetUnitTest(page_set_smoke_test.PageSetSmokeTest):
def testSmoke(self):
- self.RunSmokeTest(os.path.dirname(__file__))
+ page_sets_dir = os.path.dirname(os.path.realpath(__file__))
+ top_level_dir = os.path.dirname(page_sets_dir)
+ self.RunSmokeTest(page_sets_dir, top_level_dir)
diff --git a/content/test/gpu/page_sets/pixel_tests.py b/content/test/gpu/page_sets/pixel_tests.py
index 7d6e33f..720af30 100644
--- a/content/test/gpu/page_sets/pixel_tests.py
+++ b/content/test/gpu/page_sets/pixel_tests.py
@@ -17,11 +17,8 @@
def RunNavigateSteps(self, action_runner):
action_runner.NavigateToPage(self)
- action_runner.RunAction(WaitAction(
- {
- 'javascript': 'domAutomationController._finished',
- 'timeout': 30
- }))
+ action_runner.WaitForJavaScriptCondition(
+ 'domAutomationController._finished', timeout=30)
class PixelTestsPageSet(page_set_module.PageSet):
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
index 9e6433b..3c43e8b 100644
--- a/content/test/layouttest_support.cc
+++ b/content/test/layouttest_support.cc
@@ -9,6 +9,7 @@
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/common/gpu/image_transport_surface.h"
#include "content/public/common/page_state.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
#include "content/renderer/history_entry.h"
#include "content/renderer/history_serialization.h"
#include "content/renderer/render_frame_impl.h"
@@ -104,11 +105,8 @@
void SetMockScreenOrientation(
RenderView* render_view,
const blink::WebScreenOrientationType& orientation) {
- static_cast<RenderViewImpl*>(render_view)
- ->SetScreenOrientationForTesting(orientation);
- // FIXME(ostap): Remove this when blink side gets updated.
RendererWebKitPlatformSupportImpl::
- SetMockScreenOrientationForTesting(orientation);
+ SetMockScreenOrientationForTesting(render_view, orientation);
}
void ResetMockScreenOrientation()
@@ -305,4 +303,8 @@
return result;
}
+blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer) {
+ return new WebLayerImpl(layer);
+}
+
} // namespace content
diff --git a/content/test/ppapi/ppapi_browsertest.cc b/content/test/ppapi/ppapi_browsertest.cc
index 0dd7047..704e704 100644
--- a/content/test/ppapi/ppapi_browsertest.cc
+++ b/content/test/ppapi/ppapi_browsertest.cc
@@ -108,6 +108,8 @@
TEST_PPAPI_IN_PROCESS(Memory)
TEST_PPAPI_OUT_OF_PROCESS(Memory)
+TEST_PPAPI_OUT_OF_PROCESS(MessageHandler)
+
TEST_PPAPI_OUT_OF_PROCESS(MessageLoop_Basics)
TEST_PPAPI_OUT_OF_PROCESS(MessageLoop_Post)
@@ -141,6 +143,8 @@
TEST_PPAPI_IN_PROCESS(VarResource)
TEST_PPAPI_OUT_OF_PROCESS(VarResource)
+TEST_PPAPI_OUT_OF_PROCESS(VideoDecoder)
+
TEST_PPAPI_IN_PROCESS(VideoDecoderDev)
TEST_PPAPI_OUT_OF_PROCESS(VideoDecoderDev)
diff --git a/content/test/test_render_view_host.h b/content/test/test_render_view_host.h
index 91ab49b..8899886 100644
--- a/content/test/test_render_view_host.h
+++ b/content/test/test_render_view_host.h
@@ -28,6 +28,7 @@
// To use, derive your test base class from RenderViewHostImplTestHarness.
struct FrameHostMsg_DidCommitProvisionalLoad_Params;
+struct ViewHostMsg_TextInputState_Params;
namespace gfx {
class Rect;
@@ -98,9 +99,8 @@
virtual void Blur() OVERRIDE {}
virtual void SetIsLoading(bool is_loading) OVERRIDE {}
virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE {}
- virtual void TextInputTypeChanged(ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline) OVERRIDE {}
+ virtual void TextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params) OVERRIDE {}
virtual void ImeCancelComposition() OVERRIDE {}
#if defined(OS_MACOSX) || defined(USE_AURA)
virtual void ImeCompositionRangeChanged(
@@ -109,7 +109,6 @@
#endif
virtual void RenderProcessGone(base::TerminationStatus status,
int error_code) OVERRIDE;
- virtual void WillDestroyRenderWidget(RenderWidgetHost* rwh) { }
virtual void Destroy() OVERRIDE;
virtual void SetTooltipText(const base::string16& tooltip_text) OVERRIDE {}
virtual void SelectionBoundsChanged(
@@ -148,8 +147,6 @@
#endif
virtual void GetScreenInfo(blink::WebScreenInfo* results) OVERRIDE {}
virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE;
- virtual void SetScrollOffsetPinning(
- bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE { }
virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
virtual bool LockMouse() OVERRIDE;
virtual void UnlockMouse() OVERRIDE;
diff --git a/content/test/test_webkit_platform_support.cc b/content/test/test_webkit_platform_support.cc
index baa4183..0e9aaf0 100644
--- a/content/test/test_webkit_platform_support.cc
+++ b/content/test/test_webkit_platform_support.cc
@@ -32,7 +32,6 @@
#include "third_party/WebKit/public/web/WebStorageEventDispatcher.h"
#include "v8/include/v8.h"
#include "webkit/browser/database/vfs_backend.h"
-#include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h"
#if defined(OS_MACOSX)
#include "base/mac/mac_util.h"
diff --git a/content/test/test_webkit_platform_support.h b/content/test/test_webkit_platform_support.h
index 65e7c36..469d6bf 100644
--- a/content/test/test_webkit_platform_support.h
+++ b/content/test/test_webkit_platform_support.h
@@ -10,10 +10,10 @@
#include "content/child/blink_platform_impl.h"
#include "content/child/simple_webmimeregistry_impl.h"
#include "content/child/webfileutilities_impl.h"
+#include "content/renderer/compositor_bindings/web_compositor_support_impl.h"
#include "content/test/mock_webclipboard_impl.h"
#include "content/test/weburl_loader_mock_factory.h"
#include "third_party/WebKit/public/platform/WebUnitTestSupport.h"
-#include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h"
namespace blink {
class WebLayerTreeView;
@@ -90,7 +90,7 @@
WebFileUtilitiesImpl file_utilities_;
base::ScopedTempDir file_system_root_;
scoped_ptr<WebURLLoaderMockFactory> url_loader_factory_;
- webkit::WebCompositorSupportImpl compositor_support_;
+ WebCompositorSupportImpl compositor_support_;
#if defined(OS_WIN) || defined(OS_MACOSX)
blink::WebThemeEngine* active_theme_engine_;
diff --git a/content/test/web_layer_tree_view_impl_for_testing.cc b/content/test/web_layer_tree_view_impl_for_testing.cc
index 11d00ee..9da4896 100644
--- a/content/test/web_layer_tree_view_impl_for_testing.cc
+++ b/content/test/web_layer_tree_view_impl_for_testing.cc
@@ -13,6 +13,7 @@
#include "cc/output/output_surface.h"
#include "cc/test/test_context_provider.h"
#include "cc/trees/layer_tree_host.h"
+#include "content/renderer/compositor_bindings/web_layer_impl.h"
#include "content/test/test_webkit_platform_support.h"
#include "third_party/WebKit/public/platform/Platform.h"
#include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
@@ -20,13 +21,11 @@
#include "third_party/WebKit/public/platform/WebLayerTreeView.h"
#include "third_party/WebKit/public/platform/WebSize.h"
#include "ui/gfx/frame_time.h"
-#include "webkit/renderer/compositor_bindings/web_layer_impl.h"
using blink::WebColor;
using blink::WebGraphicsContext3D;
using blink::WebRect;
using blink::WebSize;
-using webkit::WebLayerImpl;
namespace content {
@@ -168,4 +167,8 @@
scoped_refptr<cc::Layer>());
}
+bool WebLayerTreeViewImplForTesting::usesGpuRasterization() {
+ return false;
+}
+
} // namespace content
diff --git a/content/test/web_layer_tree_view_impl_for_testing.h b/content/test/web_layer_tree_view_impl_for_testing.h
index c2b60c5..329f37b 100644
--- a/content/test/web_layer_tree_view_impl_for_testing.h
+++ b/content/test/web_layer_tree_view_impl_for_testing.h
@@ -59,6 +59,7 @@
const blink::WebLayer* innerViewportScrollLayer,
const blink::WebLayer* outerViewportScrollLayer) OVERRIDE;
virtual void clearViewportLayers() OVERRIDE;
+ virtual bool usesGpuRasterization() OVERRIDE;
// cc::LayerTreeHostClient implementation.
virtual void WillBeginMainFrame(int frame_id) OVERRIDE {}
diff --git a/content/test/webkit_support.cc b/content/test/webkit_support.cc
index 0ef980a..a3e48ed 100644
--- a/content/test/webkit_support.cc
+++ b/content/test/webkit_support.cc
@@ -8,7 +8,6 @@
#include "base/command_line.h"
#include "base/message_loop/message_loop.h"
-#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/strings/string_tokenizer.h"
#include "content/public/common/content_switches.h"
@@ -17,9 +16,12 @@
#include "third_party/WebKit/public/web/WebCache.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
-#include "ui/base/resource/resource_bundle.h"
#include "url/url_util.h"
+#if defined(OS_WIN)
+#include "ui/gfx/win/dpi.h"
+#endif
+
#if defined(OS_ANDROID)
#include "base/android/jni_android.h"
#include "net/android/network_library.h"
@@ -61,19 +63,9 @@
// TestWebKitPlatformSupport must be instantiated after MessageLoopType.
webkit_platform_support_.reset(new TestWebKitPlatformSupport);
-
-#if defined(OS_WIN)
- base::FilePath pak_file;
- PathService::Get(base::DIR_MODULE, &pak_file);
- pak_file = pak_file.AppendASCII("ui_test.pak");
- ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
-#endif
}
~TestEnvironment() {
-#if defined(OS_WIN)
- ui::ResourceBundle::CleanupSharedInstance();
-#endif
}
TestWebKitPlatformSupport* webkit_platform_support() const {
@@ -104,6 +96,10 @@
mock_cr_app::RegisterMockCrApp();
#endif
+#if defined(OS_WIN)
+ gfx::InitDeviceScaleFactor(1.0f);
+#endif
+
// Explicitly initialize the GURL library before spawning any threads.
// Otherwise crash may happend when different threads try to create a GURL
// at same time.
diff --git a/content/utility/BUILD.gn b/content/utility/BUILD.gn
new file mode 100644
index 0000000..1cc0ead
--- /dev/null
+++ b/content/utility/BUILD.gn
@@ -0,0 +1,24 @@
+# Copyright 2014 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.
+
+source_set("utility") {
+ sources = [
+ "in_process_utility_thread.cc",
+ "in_process_utility_thread.h",
+ "utility_main.cc",
+ "utility_thread_impl.cc",
+ "utility_thread_impl.h",
+ ]
+
+ configs += [ "//content:content_implementation" ]
+
+ deps = [
+ "//base",
+ "//content:export",
+ "//courgette:courgette_lib",
+ "//mojo/public/interfaces/service_provider",
+ "//third_party/WebKit/public:blink_headers",
+ ]
+}
+
diff --git a/content/worker/BUILD.gn b/content/worker/BUILD.gn
new file mode 100644
index 0000000..23cfcff
--- /dev/null
+++ b/content/worker/BUILD.gn
@@ -0,0 +1,34 @@
+# Copyright 2014 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.
+
+source_set("worker") {
+ visibility = "//content/*"
+ sources = [
+ "websharedworker_stub.cc",
+ "websharedworker_stub.h",
+ "websharedworkerclient_proxy.cc",
+ "websharedworkerclient_proxy.h",
+ "worker_main.cc",
+ "shared_worker_permission_client_proxy.cc",
+ "shared_worker_permission_client_proxy.h",
+ "worker_thread.cc",
+ "worker_thread.h",
+ "worker_webapplicationcachehost_impl.cc",
+ "worker_webapplicationcachehost_impl.h",
+ "worker_webkitplatformsupport_impl.cc",
+ "worker_webkitplatformsupport_impl.h",
+ ]
+
+ configs += [ "//content:content_implementation" ]
+
+ deps = [
+ "//base",
+ "//mojo/public/interfaces/service_provider",
+ "//skia",
+ #"//third_party/WebKit/public:blink", TODO(GYP)
+ # TODO(GYP) remove this when blink is enabled:
+ "//third_party/WebKit/public:blink_headers",
+ ]
+}
+