mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision cb947c01 (#352221)
- Implement CefRequestHandler::OnBeforeBrowse using NavigationThrottle instead of ResourceThrottle (see http://crbug.com/537634). The CefRequest object passed to OnBeforeBrowse will no longer have an associated request identifier. - Mac: Remove additional helper apps which are no longer required (see http://crbug.com/520680) - Remove the UR_FLAG_REPORT_RAW_HEADERS flag which is no longer supported (see http://crbug.com/517114) - Remove the CefBrowserSettings.java parameter. Java is an NPAPI plugin and NPAPI plugins are no longer supported (see http://crbug.com/470301#c11) - Add CefFormatUrlForSecurityDisplay function in cef_parser.h - Fix crash when passing `--disable-extensions` command-line flag (issue #1721) - Linux: Fix NSS handler loading (issue #1727)
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
diff --git render_widget_host_view_guest.cc render_widget_host_view_guest.cc
|
||||
index dc6789f..70edd0e 100644
|
||||
index ecda893d..446c6e6 100644
|
||||
--- render_widget_host_view_guest.cc
|
||||
+++ render_widget_host_view_guest.cc
|
||||
@@ -191,6 +191,9 @@ void RenderWidgetHostViewGuest::Destroy() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git browser/browser_plugin/browser_plugin_guest.cc browser/browser_plugin/browser_plugin_guest.cc
|
||||
index b0de6b9..d0cab8f 100644
|
||||
index 00529ff..57ccf08 100644
|
||||
--- browser/browser_plugin/browser_plugin_guest.cc
|
||||
+++ browser/browser_plugin/browser_plugin_guest.cc
|
||||
@@ -23,7 +23,7 @@
|
||||
@ -11,7 +11,7 @@ index b0de6b9..d0cab8f 100644
|
||||
#include "content/common/browser_plugin/browser_plugin_constants.h"
|
||||
#include "content/common/browser_plugin/browser_plugin_messages.h"
|
||||
#include "content/common/content_constants_internal.h"
|
||||
@@ -286,20 +286,19 @@ void BrowserPluginGuest::InitInternal(
|
||||
@@ -289,20 +289,19 @@ void BrowserPluginGuest::InitInternal(
|
||||
guest_window_rect_ = params.view_rect;
|
||||
|
||||
if (owner_web_contents_ != owner_web_contents) {
|
||||
@ -36,7 +36,7 @@ index b0de6b9..d0cab8f 100644
|
||||
}
|
||||
|
||||
RendererPreferences* renderer_prefs =
|
||||
@@ -731,12 +730,9 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||
@@ -748,12 +747,9 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||
// This will trigger a callback to RenderViewReady after a round-trip IPC.
|
||||
static_cast<RenderViewHostImpl*>(
|
||||
GetWebContents()->GetRenderViewHost())->Init();
|
||||
@ -90,7 +90,7 @@ index fd7dec4..49d4f99 100644
|
||||
+
|
||||
} // namespace content
|
||||
diff --git public/browser/browser_plugin_guest_delegate.h public/browser/browser_plugin_guest_delegate.h
|
||||
index 000e3b6..ced8765 100644
|
||||
index aabe27b..8ff46f4 100644
|
||||
--- public/browser/browser_plugin_guest_delegate.h
|
||||
+++ public/browser/browser_plugin_guest_delegate.h
|
||||
@@ -21,6 +21,8 @@ class Size;
|
||||
@ -102,11 +102,10 @@ index 000e3b6..ced8765 100644
|
||||
|
||||
// Objects implement this interface to get notified about changes in the guest
|
||||
// WebContents and to provide necessary functionality.
|
||||
@@ -86,6 +88,17 @@ class CONTENT_EXPORT BrowserPluginGuestDelegate {
|
||||
// Provides the delegate with an interface with which to communicate with the
|
||||
@@ -87,6 +89,17 @@ class CONTENT_EXPORT BrowserPluginGuestDelegate {
|
||||
// content module.
|
||||
virtual void SetGuestHost(GuestHost* guest_host) {}
|
||||
+
|
||||
|
||||
+ // Called when a guest is attached or detached.
|
||||
+ virtual void OnGuestAttached(content::WebContentsView* guest_view,
|
||||
+ content::WebContentsView* parent_view);
|
||||
@ -117,6 +116,7 @@ index 000e3b6..ced8765 100644
|
||||
+ virtual void CreateViewForWidget(
|
||||
+ content::WebContentsView* guest_view,
|
||||
+ content::RenderWidgetHost* render_widget_host);
|
||||
};
|
||||
|
||||
} // namespace content
|
||||
+
|
||||
// Sets the position of the context menu for the guest contents. The value
|
||||
// reported from the guest renderer should be ignored. The reported value
|
||||
// fromt he guest renderer is incorrect in situations where BrowserPlugin is
|
||||
|
@ -1,9 +1,9 @@
|
||||
diff --git web_contents_impl.cc web_contents_impl.cc
|
||||
index f7505af..ef9ff79 100644
|
||||
index 7c84d90..2aaace4 100644
|
||||
--- web_contents_impl.cc
|
||||
+++ web_contents_impl.cc
|
||||
@@ -1351,23 +1351,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
params.main_frame_routing_id);
|
||||
@@ -1353,23 +1353,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
||||
MSG_ROUTING_NONE);
|
||||
frame_tree_.root()->SetFrameName(params.main_frame_name);
|
||||
|
||||
- WebContentsViewDelegate* delegate =
|
||||
@ -50,7 +50,7 @@ index f7505af..ef9ff79 100644
|
||||
}
|
||||
CHECK(render_view_host_delegate_view_);
|
||||
CHECK(view_.get());
|
||||
@@ -1705,6 +1712,9 @@ void WebContentsImpl::CreateNewWindow(
|
||||
@@ -1715,6 +1722,9 @@ void WebContentsImpl::CreateNewWindow(
|
||||
static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace);
|
||||
CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context));
|
||||
|
||||
@ -60,7 +60,7 @@ index f7505af..ef9ff79 100644
|
||||
if (delegate_ &&
|
||||
!delegate_->ShouldCreateWebContents(this,
|
||||
route_id,
|
||||
@@ -1713,7 +1723,9 @@ void WebContentsImpl::CreateNewWindow(
|
||||
@@ -1723,7 +1733,9 @@ void WebContentsImpl::CreateNewWindow(
|
||||
params.frame_name,
|
||||
params.target_url,
|
||||
partition_id,
|
||||
@ -71,7 +71,7 @@ index f7505af..ef9ff79 100644
|
||||
if (route_id != MSG_ROUTING_NONE &&
|
||||
!RenderViewHost::FromID(render_process_id, route_id)) {
|
||||
// If the embedder didn't create a WebContents for this route, we need to
|
||||
@@ -1735,6 +1747,8 @@ void WebContentsImpl::CreateNewWindow(
|
||||
@@ -1745,6 +1757,8 @@ void WebContentsImpl::CreateNewWindow(
|
||||
create_params.opener_render_process_id = render_process_id;
|
||||
create_params.opener_render_frame_id = params.opener_render_frame_id;
|
||||
create_params.opener_suppressed = params.opener_suppressed;
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git common.gypi common.gypi
|
||||
index cff7376..d16e12d 100644
|
||||
index cce7b3c..84a702a 100644
|
||||
--- common.gypi
|
||||
+++ common.gypi
|
||||
@@ -9,6 +9,9 @@
|
||||
@ -25,18 +25,3 @@ index c9cf226..0dedbe3 100755
|
||||
stdout=subprocess.PIPE)
|
||||
|
||||
archs = []
|
||||
diff --git vs_toolchain.py vs_toolchain.py
|
||||
index cea0d6d..158d0a8 100755
|
||||
--- vs_toolchain.py
|
||||
+++ vs_toolchain.py
|
||||
@@ -32,8 +32,8 @@ def SetEnvironmentAndGetRuntimeDllDirs():
|
||||
bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '1')))
|
||||
# When running on a non-Windows host, only do this if the SDK has explicitly
|
||||
# been downloaded before (in which case json_data_file will exist).
|
||||
- if ((sys.platform in ('win32', 'cygwin') and depot_tools_win_toolchain) or
|
||||
- os.path.exists(json_data_file)):
|
||||
+ if ((sys.platform in ('win32', 'cygwin') or os.path.exists(json_data_file)) and
|
||||
+ depot_tools_win_toolchain):
|
||||
if not os.path.exists(json_data_file):
|
||||
Update()
|
||||
with open(json_data_file, 'r') as tempf:
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git ui/browser.cc ui/browser.cc
|
||||
index befe5b8..e02cde4 100644
|
||||
index 36d24b6..bbc5075 100644
|
||||
--- ui/browser.cc
|
||||
+++ ui/browser.cc
|
||||
@@ -1646,7 +1646,9 @@ bool Browser::ShouldCreateWebContents(
|
||||
@@ -1669,7 +1669,9 @@ bool Browser::ShouldCreateWebContents(
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
@ -14,10 +14,10 @@ index befe5b8..e02cde4 100644
|
||||
// If a BackgroundContents is created, suppress the normal WebContents.
|
||||
return !MaybeCreateBackgroundContents(route_id,
|
||||
diff --git ui/browser.h ui/browser.h
|
||||
index 362d85a..60a12ef 100644
|
||||
index e296569..bf03785 100644
|
||||
--- ui/browser.h
|
||||
+++ ui/browser.h
|
||||
@@ -586,7 +586,9 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -591,7 +591,9 @@ class Browser : public TabStripModelObserver,
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
|
||||
index 4c0b363..092ad56 100644
|
||||
index b7ed844..c6ec2a9 100644
|
||||
--- content/browser/compositor/gpu_process_transport_factory.cc
|
||||
+++ content/browser/compositor/gpu_process_transport_factory.cc
|
||||
@@ -140,6 +140,13 @@ GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() {
|
||||
@@ -142,6 +142,13 @@ GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() {
|
||||
scoped_ptr<cc::SoftwareOutputDevice>
|
||||
GpuProcessTransportFactory::CreateSoftwareOutputDevice(
|
||||
ui::Compositor* compositor) {
|
||||
@ -17,7 +17,7 @@ index 4c0b363..092ad56 100644
|
||||
return scoped_ptr<cc::SoftwareOutputDevice>(
|
||||
new SoftwareOutputDeviceWin(software_backing_.get(), compositor));
|
||||
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
|
||||
index 7c4166f..afeea2f 100644
|
||||
index fe2a033..b6cd7c9 100644
|
||||
--- ui/compositor/compositor.h
|
||||
+++ ui/compositor/compositor.h
|
||||
@@ -15,6 +15,7 @@
|
||||
@ -46,7 +46,7 @@ index 7c4166f..afeea2f 100644
|
||||
// Compositor object to take care of GPU painting.
|
||||
// A Browser compositor object is responsible for generating the final
|
||||
// displayable form of pixels comprising a single widget's contents. It draws an
|
||||
@@ -170,6 +182,9 @@ class COMPOSITOR_EXPORT Compositor
|
||||
@@ -169,6 +181,9 @@ class COMPOSITOR_EXPORT Compositor
|
||||
// Schedules a redraw of the layer tree associated with this compositor.
|
||||
void ScheduleDraw();
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git public/renderer/content_renderer_client.cc public/renderer/content_renderer_client.cc
|
||||
index 9513339..75ddff8 100644
|
||||
index e09e803..ff26996 100644
|
||||
--- public/renderer/content_renderer_client.cc
|
||||
+++ public/renderer/content_renderer_client.cc
|
||||
@@ -103,6 +103,18 @@ bool ContentRendererClient::AllowPopup() {
|
||||
@@ -98,6 +98,18 @@ bool ContentRendererClient::AllowPopup() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ index 9513339..75ddff8 100644
|
||||
const GURL& url,
|
||||
const std::string& http_method,
|
||||
diff --git public/renderer/content_renderer_client.h public/renderer/content_renderer_client.h
|
||||
index ccf4b5f..91a5be3 100644
|
||||
index df8d501..f3a2068 100644
|
||||
--- public/renderer/content_renderer_client.h
|
||||
+++ public/renderer/content_renderer_client.h
|
||||
@@ -16,6 +16,8 @@
|
||||
@ -34,7 +34,7 @@ index ccf4b5f..91a5be3 100644
|
||||
#include "ui/base/page_transition_types.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
@@ -198,6 +200,17 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -191,6 +193,17 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// Returns true if a popup window should be allowed.
|
||||
virtual bool AllowPopup();
|
||||
|
||||
@ -53,10 +53,10 @@ index ccf4b5f..91a5be3 100644
|
||||
// If |send_referrer| is set to false (which is the default), no referrer
|
||||
// header will be send for the navigation. Otherwise, the referrer header is
|
||||
diff --git renderer/render_frame_impl.cc renderer/render_frame_impl.cc
|
||||
index 8568626..9a746d2 100644
|
||||
index ff5d269..6ca4948 100644
|
||||
--- renderer/render_frame_impl.cc
|
||||
+++ renderer/render_frame_impl.cc
|
||||
@@ -4240,6 +4240,19 @@ void RenderFrameImpl::OnFailedNavigation(
|
||||
@@ -4274,6 +4274,19 @@ void RenderFrameImpl::OnFailedNavigation(
|
||||
WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
|
||||
RenderFrame* render_frame,
|
||||
const NavigationPolicyInfo& info) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git resource_ids resource_ids
|
||||
index 2741068..03f9753 100644
|
||||
index 92456c8..9fa9ce3 100644
|
||||
--- resource_ids
|
||||
+++ resource_ids
|
||||
@@ -14,6 +14,12 @@
|
||||
|
@ -21,10 +21,10 @@ index 51c288b..d996bbd 100644
|
||||
dst = self.GypPathToNinja(os.path.join(copy['destination'], basename),
|
||||
env)
|
||||
diff --git gyp/msvs_emulation.py gyp/msvs_emulation.py
|
||||
index ce5c46e..2f03c01 100644
|
||||
index ca67b12..a3fd903 100644
|
||||
--- gyp/msvs_emulation.py
|
||||
+++ gyp/msvs_emulation.py
|
||||
@@ -1017,8 +1017,10 @@ def GenerateEnvironmentFiles(toplevel_build_dir, generator_flags,
|
||||
@@ -1027,8 +1027,10 @@ def GenerateEnvironmentFiles(toplevel_build_dir, generator_flags,
|
||||
args = vs.SetupScript(arch)
|
||||
args.extend(('&&', 'set'))
|
||||
popen = subprocess.Popen(
|
||||
|
@ -1,10 +1,10 @@
|
||||
diff --git hwnd_message_handler.cc hwnd_message_handler.cc
|
||||
index b394556..729cacf 100644
|
||||
index 5348080..4f9bec5 100644
|
||||
--- hwnd_message_handler.cc
|
||||
+++ hwnd_message_handler.cc
|
||||
@@ -2687,8 +2687,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
"440919 HWNDMessageHandler::HandleMouseEventInternal6"));
|
||||
|
||||
@@ -2364,8 +2364,12 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
active_mouse_tracking_flags_ = 0;
|
||||
} else if (event.type() == ui::ET_MOUSEWHEEL) {
|
||||
// Reroute the mouse wheel to the window under the pointer if applicable.
|
||||
- return (ui::RerouteMouseWheel(hwnd(), w_param, l_param) ||
|
||||
- delegate_->HandleMouseEvent(ui::MouseWheelEvent(msg))) ? 0 : 1;
|
||||
@ -16,4 +16,4 @@ index b394556..729cacf 100644
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
// TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed.
|
||||
// There are cases where the code handling the message destroys the window,
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git input_method_win.cc input_method_win.cc
|
||||
index 7db88b6..16793d8 100644
|
||||
index df75bb2..a688138 100644
|
||||
--- input_method_win.cc
|
||||
+++ input_method_win.cc
|
||||
@@ -581,8 +581,9 @@ bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const {
|
||||
@@ -548,8 +548,9 @@ bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const {
|
||||
// receiving keyboard input as long as it is an active window. This works well
|
||||
// even when the |attached_window_handle| becomes active but has not received
|
||||
// WM_FOCUS yet.
|
||||
|
@ -92,7 +92,7 @@ index 63b81b8..0f63f48 100644
|
||||
content::WebContents* web_contents,
|
||||
const content::ContextMenuParams& params) {
|
||||
diff --git mime_handler_view_guest_delegate.h mime_handler_view_guest_delegate.h
|
||||
index e065104..f68b66c 100644
|
||||
index e065104d..f68b66c 100644
|
||||
--- mime_handler_view_guest_delegate.h
|
||||
+++ mime_handler_view_guest_delegate.h
|
||||
@@ -6,10 +6,11 @@
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git url_request.h url_request.h
|
||||
index c6ef160..11727b4 100644
|
||||
index 9209697..a2f73f8 100644
|
||||
--- url_request.h
|
||||
+++ url_request.h
|
||||
@@ -619,10 +619,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
|
||||
@@ -640,10 +640,10 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
|
||||
// or after the response headers are received.
|
||||
void GetConnectionAttempts(ConnectionAttempts* out) const;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git public/common/common_param_traits_macros.h public/common/common_param_traits_macros.h
|
||||
index 119fc1d..c7e8699 100644
|
||||
index a308f84..bbbe950 100644
|
||||
--- public/common/common_param_traits_macros.h
|
||||
+++ public/common/common_param_traits_macros.h
|
||||
@@ -196,6 +196,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
|
||||
@ -11,19 +11,19 @@ index 119fc1d..c7e8699 100644
|
||||
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
|
||||
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
|
||||
diff --git public/common/web_preferences.cc public/common/web_preferences.cc
|
||||
index 11803fa..efe32ff 100644
|
||||
index deb82db..2da2957 100644
|
||||
--- public/common/web_preferences.cc
|
||||
+++ public/common/web_preferences.cc
|
||||
@@ -171,6 +171,7 @@ WebPreferences::WebPreferences()
|
||||
@@ -176,6 +176,7 @@ WebPreferences::WebPreferences()
|
||||
pinch_overlay_scrollbar_thickness(0),
|
||||
use_solid_color_scrollbars(false),
|
||||
navigate_on_drag_drop(true),
|
||||
+ base_background_color(0xFFFFFFFF), // Color::white
|
||||
v8_cache_options(V8_CACHE_OPTIONS_DEFAULT),
|
||||
slimming_paint_enabled(false),
|
||||
slimming_paint_v2_enabled(false),
|
||||
inert_visual_viewport(false),
|
||||
diff --git public/common/web_preferences.h public/common/web_preferences.h
|
||||
index bfb67a1..b7170ef 100644
|
||||
index 75012d1..8da71be 100644
|
||||
--- public/common/web_preferences.h
|
||||
+++ public/common/web_preferences.h
|
||||
@@ -173,6 +173,7 @@ struct CONTENT_EXPORT WebPreferences {
|
||||
@ -32,15 +32,15 @@ index bfb67a1..b7170ef 100644
|
||||
bool navigate_on_drag_drop;
|
||||
+ uint32_t base_background_color;
|
||||
V8CacheOptions v8_cache_options;
|
||||
bool slimming_paint_enabled;
|
||||
bool slimming_paint_v2_enabled;
|
||||
bool inert_visual_viewport;
|
||||
diff --git renderer/render_view_impl.cc renderer/render_view_impl.cc
|
||||
index 5f1e6d8..09e81e2 100644
|
||||
index d6d5d6e..82b499e 100644
|
||||
--- renderer/render_view_impl.cc
|
||||
+++ renderer/render_view_impl.cc
|
||||
@@ -970,6 +970,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
|
||||
|
||||
settings->setJavaEnabled(prefs.java_enabled);
|
||||
@@ -949,6 +949,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
|
||||
settings->setCookieEnabled(prefs.cookie_enabled);
|
||||
settings->setNavigateOnDragDrop(prefs.navigate_on_drag_drop);
|
||||
|
||||
+ web_view->setBaseBackgroundColor(prefs.base_background_color);
|
||||
+
|
||||
|
@ -1,20 +1,24 @@
|
||||
diff --git printing/renderer/print_web_view_helper.cc printing/renderer/print_web_view_helper.cc
|
||||
index d315efa..a312f77 100644
|
||||
index 27419d6..0a6757b 100644
|
||||
--- printing/renderer/print_web_view_helper.cc
|
||||
+++ printing/renderer/print_web_view_helper.cc
|
||||
@@ -75,6 +75,7 @@ const double kMinDpi = 1.0;
|
||||
bool g_is_preview_enabled_ = false;
|
||||
#else
|
||||
bool g_is_preview_enabled_ = true;
|
||||
+#endif // !defined(ENABLE_PRINT_PREVIEW)
|
||||
@@ -73,6 +73,9 @@ const double kMinDpi = 1.0;
|
||||
|
||||
#if defined(ENABLE_PRINT_PREVIEW)
|
||||
bool g_is_preview_enabled = true;
|
||||
+#else
|
||||
+bool g_is_preview_enabled = false;
|
||||
+#endif // defined(ENABLE_PRINT_PREVIEW)
|
||||
|
||||
const char kPageLoadScriptFormat[] =
|
||||
"document.open(); document.write(%s); document.close();";
|
||||
@@ -89,7 +90,6 @@ void ExecuteScript(blink::WebFrame* frame,
|
||||
@@ -87,9 +90,6 @@ void ExecuteScript(blink::WebFrame* frame,
|
||||
std::string script = base::StringPrintf(script_format, json.c_str());
|
||||
frame->executeScript(blink::WebString(base::UTF8ToUTF16(script)));
|
||||
}
|
||||
-#endif // !defined(ENABLE_PRINT_PREVIEW)
|
||||
-#else
|
||||
-bool g_is_preview_enabled = false;
|
||||
-#endif // defined(ENABLE_PRINT_PREVIEW)
|
||||
|
||||
int GetDPI(const PrintMsg_Print_Params* print_params) {
|
||||
#if defined(OS_MACOSX)
|
||||
@ -26,7 +30,7 @@ index d315efa..a312f77 100644
|
||||
// static - Not anonymous so that platform implementations can use it.
|
||||
void PrintWebViewHelper::PrintHeaderAndFooter(
|
||||
blink::WebCanvas* canvas,
|
||||
@@ -538,7 +537,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
|
||||
@@ -536,7 +535,6 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
|
||||
web_view->close();
|
||||
frame->close();
|
||||
}
|
||||
@ -34,7 +38,7 @@ index d315efa..a312f77 100644
|
||||
|
||||
// static - Not anonymous so that platform implementations can use it.
|
||||
float PrintWebViewHelper::RenderPageContent(blink::WebFrame* frame,
|
||||
@@ -813,6 +811,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view,
|
||||
@@ -807,6 +805,7 @@ PrintWebViewHelper::PrintWebViewHelper(content::RenderView* render_view,
|
||||
print_for_preview_(false),
|
||||
delegate_(delegate.Pass()),
|
||||
print_node_in_progress_(false),
|
||||
@ -42,7 +46,7 @@ index d315efa..a312f77 100644
|
||||
is_loading_(false),
|
||||
is_scripted_preview_delayed_(false),
|
||||
ipc_nesting_level_(0),
|
||||
@@ -1254,7 +1253,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
|
||||
@@ -1246,7 +1245,9 @@ void PrintWebViewHelper::OnInitiatePrintPreview(bool selection_only) {
|
||||
// that instead.
|
||||
auto plugin = delegate_->GetPdfElement(frame);
|
||||
if (!plugin.isNull()) {
|
||||
@ -52,17 +56,17 @@ index d315efa..a312f77 100644
|
||||
return;
|
||||
}
|
||||
print_preview_context_.InitWithFrame(frame);
|
||||
@@ -1287,7 +1288,7 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -1279,7 +1280,7 @@ void PrintWebViewHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
// Make a copy of the node, in case RenderView::OnContextMenuClosed resets
|
||||
// its |context_menu_node_|.
|
||||
- if (!g_is_preview_enabled_) {
|
||||
+ if (!g_is_preview_enabled_ && !force_print_preview_) {
|
||||
- if (!g_is_preview_enabled) {
|
||||
+ if (!g_is_preview_enabled && !force_print_preview_) {
|
||||
blink::WebNode duplicate_node(node);
|
||||
Print(duplicate_node.document().frame(), duplicate_node, false);
|
||||
} else {
|
||||
diff --git printing/renderer/print_web_view_helper.h printing/renderer/print_web_view_helper.h
|
||||
index 54179ff..0c48602 100644
|
||||
index d9ea441..dce6b9e 100644
|
||||
--- printing/renderer/print_web_view_helper.h
|
||||
+++ printing/renderer/print_web_view_helper.h
|
||||
@@ -309,7 +309,6 @@ class PrintWebViewHelper
|
||||
@ -90,10 +94,10 @@ index 54179ff..0c48602 100644
|
||||
bool is_loading_;
|
||||
bool is_scripted_preview_delayed_;
|
||||
diff --git printing/renderer/print_web_view_helper_linux.cc printing/renderer/print_web_view_helper_linux.cc
|
||||
index 61a1a1d..f931979 100644
|
||||
index 52f92ec..85f7adb 100644
|
||||
--- printing/renderer/print_web_view_helper_linux.cc
|
||||
+++ printing/renderer/print_web_view_helper_linux.cc
|
||||
@@ -172,7 +172,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
@@ -154,7 +154,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
|
||||
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
|
||||
|
||||
@ -101,7 +105,7 @@ index 61a1a1d..f931979 100644
|
||||
if (params.params.display_header_footer) {
|
||||
// |page_number| is 0-based, so 1 is added.
|
||||
// TODO(vitalybuka) : why does it work only with 1.25?
|
||||
@@ -181,7 +180,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
@@ -163,7 +162,6 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
scale_factor / 1.25, page_layout_in_points,
|
||||
params.params);
|
||||
}
|
||||
@ -110,10 +114,10 @@ index 61a1a1d..f931979 100644
|
||||
RenderPageContent(frame, params.page_number, canvas_area, content_area,
|
||||
scale_factor, canvas);
|
||||
diff --git printing/renderer/print_web_view_helper_mac.mm printing/renderer/print_web_view_helper_mac.mm
|
||||
index 7aa503c..a6413be 100644
|
||||
index f2b94e7..8c5df5e 100644
|
||||
--- printing/renderer/print_web_view_helper_mac.mm
|
||||
+++ printing/renderer/print_web_view_helper_mac.mm
|
||||
@@ -125,14 +125,12 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
|
||||
@@ -126,14 +126,12 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
|
||||
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
|
||||
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
|
||||
skia::SetIsPreviewMetafile(*canvas, is_preview);
|
||||
@ -129,10 +133,10 @@ index 7aa503c..a6413be 100644
|
||||
scale_factor, static_cast<blink::WebCanvas*>(canvas));
|
||||
}
|
||||
diff --git printing/renderer/print_web_view_helper_pdf_win.cc printing/renderer/print_web_view_helper_pdf_win.cc
|
||||
index a121448..f2a1a0a 100644
|
||||
index 56acc74..ac85bf6 100644
|
||||
--- printing/renderer/print_web_view_helper_pdf_win.cc
|
||||
+++ printing/renderer/print_web_view_helper_pdf_win.cc
|
||||
@@ -185,14 +185,12 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
@@ -162,14 +162,12 @@ void PrintWebViewHelper::PrintPageInternal(
|
||||
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
|
||||
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
|
||||
|
||||
|
@ -25,7 +25,7 @@ index 887f242..a7cc318 100644
|
||||
WebContents::CreateParams::~CreateParams() {
|
||||
}
|
||||
diff --git web_contents.h web_contents.h
|
||||
index 803b816..1457ef3 100644
|
||||
index 08c5ba9..459fe19 100644
|
||||
--- web_contents.h
|
||||
+++ web_contents.h
|
||||
@@ -52,9 +52,11 @@ class PageState;
|
||||
@ -40,7 +40,7 @@ index 803b816..1457ef3 100644
|
||||
struct CustomContextMenuContext;
|
||||
struct DropData;
|
||||
struct Manifest;
|
||||
@@ -141,6 +143,10 @@ class WebContents : public PageNavigator,
|
||||
@@ -142,6 +144,10 @@ class WebContents : public PageNavigator,
|
||||
// RenderFrame, have already been created on the renderer side, and
|
||||
// WebContents construction should take this into account.
|
||||
bool renderer_initiated_creation;
|
||||
@ -52,7 +52,7 @@ index 803b816..1457ef3 100644
|
||||
|
||||
// Creates a new WebContents.
|
||||
diff --git web_contents_delegate.cc web_contents_delegate.cc
|
||||
index 016097b..4fb00ed 100644
|
||||
index b3d2d70..727401c 100644
|
||||
--- web_contents_delegate.cc
|
||||
+++ web_contents_delegate.cc
|
||||
@@ -138,7 +138,9 @@ bool WebContentsDelegate::ShouldCreateWebContents(
|
||||
@ -67,10 +67,10 @@ index 016097b..4fb00ed 100644
|
||||
}
|
||||
|
||||
diff --git web_contents_delegate.h web_contents_delegate.h
|
||||
index 685c1e6..782ab86 100644
|
||||
index 76dfd36..f3bec13 100644
|
||||
--- web_contents_delegate.h
|
||||
+++ web_contents_delegate.h
|
||||
@@ -38,9 +38,11 @@ class DownloadItem;
|
||||
@@ -39,9 +39,11 @@ class DownloadItem;
|
||||
class JavaScriptDialogManager;
|
||||
class PageState;
|
||||
class RenderViewHost;
|
||||
@ -82,7 +82,7 @@ index 685c1e6..782ab86 100644
|
||||
struct ColorSuggestion;
|
||||
struct ContextMenuParams;
|
||||
struct DropData;
|
||||
@@ -298,7 +300,9 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
@@ -299,7 +301,9 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git render_widget_host_view_mac.mm render_widget_host_view_mac.mm
|
||||
index 66f1c31..0eac488 100644
|
||||
index 8db1f59..41157952 100644
|
||||
--- render_widget_host_view_mac.mm
|
||||
+++ render_widget_host_view_mac.mm
|
||||
@@ -582,9 +582,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
|
||||
@@ -590,9 +590,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
|
||||
// Paint this view host with |background_color_| when there is no content
|
||||
// ready to draw.
|
||||
background_layer_.reset([[CALayer alloc] init]);
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git spellcheck_factory.cc spellcheck_factory.cc
|
||||
index 4c61d34..9e4f3d1 100644
|
||||
index fcf2ce8..9e4f3d1 100644
|
||||
--- spellcheck_factory.cc
|
||||
+++ spellcheck_factory.cc
|
||||
@@ -16,6 +16,13 @@
|
||||
@ -20,13 +20,13 @@ index 4c61d34..9e4f3d1 100644
|
||||
|
||||
// static
|
||||
SpellcheckServiceFactory* SpellcheckServiceFactory::GetInstance() {
|
||||
- return Singleton<SpellcheckServiceFactory>::get();
|
||||
- return base::Singleton<SpellcheckServiceFactory>::get();
|
||||
+ return g_spellcheck_service_factory.Pointer();
|
||||
}
|
||||
|
||||
SpellcheckServiceFactory::SpellcheckServiceFactory()
|
||||
diff --git spellcheck_factory.h spellcheck_factory.h
|
||||
index 3e4ad0e..d52b881 100644
|
||||
index 7cdf471..d52b881 100644
|
||||
--- spellcheck_factory.h
|
||||
+++ spellcheck_factory.h
|
||||
@@ -7,7 +7,7 @@
|
||||
@ -42,7 +42,7 @@ index 3e4ad0e..d52b881 100644
|
||||
static SpellcheckServiceFactory* GetInstance();
|
||||
|
||||
private:
|
||||
- friend struct DefaultSingletonTraits<SpellcheckServiceFactory>;
|
||||
- friend struct base::DefaultSingletonTraits<SpellcheckServiceFactory>;
|
||||
+ friend struct base::DefaultLazyInstanceTraits<SpellcheckServiceFactory>;
|
||||
|
||||
SpellcheckServiceFactory();
|
||||
|
@ -12,7 +12,7 @@ index a8e088c..838b6a0 100644
|
||||
return host ? host->GetAcceleratedWidget() : NULL;
|
||||
}
|
||||
diff --git desktop_aura/desktop_window_tree_host_win.cc desktop_aura/desktop_window_tree_host_win.cc
|
||||
index 5bee7fd..3d89853 100644
|
||||
index 270bd54..72748cf 100644
|
||||
--- desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -131,7 +131,9 @@ void DesktopWindowTreeHostWin::Init(aura::Window* content_window,
|
||||
@ -26,7 +26,7 @@ index 5bee7fd..3d89853 100644
|
||||
parent_hwnd = params.parent->GetHost()->GetAcceleratedWidget();
|
||||
|
||||
message_handler_->set_remove_standard_frame(params.remove_standard_frame);
|
||||
@@ -792,11 +794,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
|
||||
@@ -793,11 +795,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
|
||||
}
|
||||
|
||||
void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
|
||||
@ -45,7 +45,7 @@ index 5bee7fd..3d89853 100644
|
||||
|
||||
bool DesktopWindowTreeHostWin::HandleMouseEvent(const ui::MouseEvent& event) {
|
||||
diff --git desktop_aura/desktop_window_tree_host_x11.cc desktop_aura/desktop_window_tree_host_x11.cc
|
||||
index 4a69310..3b00233 100644
|
||||
index ed0cb1d..62e3872 100644
|
||||
--- desktop_aura/desktop_window_tree_host_x11.cc
|
||||
+++ desktop_aura/desktop_window_tree_host_x11.cc
|
||||
@@ -172,7 +172,8 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
|
||||
@ -86,7 +86,7 @@ index 4a69310..3b00233 100644
|
||||
return bounds_in_pixels_;
|
||||
}
|
||||
|
||||
@@ -1019,6 +1025,8 @@ void DesktopWindowTreeHostX11::SetBounds(
|
||||
@@ -1020,6 +1026,8 @@ void DesktopWindowTreeHostX11::SetBounds(
|
||||
}
|
||||
|
||||
gfx::Point DesktopWindowTreeHostX11::GetLocationOnNativeScreen() const {
|
||||
@ -95,7 +95,7 @@ index 4a69310..3b00233 100644
|
||||
return bounds_in_pixels_.origin();
|
||||
}
|
||||
|
||||
@@ -1132,9 +1140,13 @@ void DesktopWindowTreeHostX11::InitX11Window(
|
||||
@@ -1133,9 +1141,13 @@ void DesktopWindowTreeHostX11::InitX11Window(
|
||||
}
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ index 4a69310..3b00233 100644
|
||||
bounds_in_pixels_.y(), bounds_in_pixels_.width(),
|
||||
bounds_in_pixels_.height(),
|
||||
0, // border width
|
||||
@@ -1787,6 +1799,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
|
||||
@@ -1789,6 +1801,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -122,7 +122,7 @@ index 4a69310..3b00233 100644
|
||||
if (xev->xfocus.mode != NotifyGrab) {
|
||||
ReleaseCapture();
|
||||
diff --git desktop_aura/desktop_window_tree_host_x11.h desktop_aura/desktop_window_tree_host_x11.h
|
||||
index 73e9e3e..deb2cef 100644
|
||||
index 73e9e3e6..deb2cef 100644
|
||||
--- desktop_aura/desktop_window_tree_host_x11.h
|
||||
+++ desktop_aura/desktop_window_tree_host_x11.h
|
||||
@@ -85,6 +85,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
|
||||
@ -155,10 +155,10 @@ index 73e9e3e..deb2cef 100644
|
||||
};
|
||||
|
||||
diff --git widget.cc widget.cc
|
||||
index 280969a..8ea7f0b 100644
|
||||
index 154d107..cf276b1 100644
|
||||
--- widget.cc
|
||||
+++ widget.cc
|
||||
@@ -118,6 +118,7 @@ Widget::InitParams::InitParams()
|
||||
@@ -119,6 +119,7 @@ Widget::InitParams::InitParams()
|
||||
use_system_default_icon(false),
|
||||
show_state(ui::SHOW_STATE_DEFAULT),
|
||||
parent(NULL),
|
||||
@ -166,7 +166,7 @@ index 280969a..8ea7f0b 100644
|
||||
native_widget(NULL),
|
||||
desktop_window_tree_host(NULL),
|
||||
layer_type(ui::LAYER_TEXTURED),
|
||||
@@ -141,6 +142,7 @@ Widget::InitParams::InitParams(Type type)
|
||||
@@ -142,6 +143,7 @@ Widget::InitParams::InitParams(Type type)
|
||||
use_system_default_icon(false),
|
||||
show_state(ui::SHOW_STATE_DEFAULT),
|
||||
parent(NULL),
|
||||
@ -174,7 +174,7 @@ index 280969a..8ea7f0b 100644
|
||||
native_widget(NULL),
|
||||
desktop_window_tree_host(NULL),
|
||||
layer_type(ui::LAYER_TEXTURED),
|
||||
@@ -315,7 +317,7 @@ void Widget::Init(const InitParams& in_params) {
|
||||
@@ -316,7 +318,7 @@ void Widget::Init(const InitParams& in_params) {
|
||||
InitParams params = in_params;
|
||||
|
||||
params.child |= (params.type == InitParams::TYPE_CONTROL);
|
||||
@ -183,7 +183,7 @@ index 280969a..8ea7f0b 100644
|
||||
|
||||
if (params.opacity == views::Widget::InitParams::INFER_OPACITY &&
|
||||
params.type != views::Widget::InitParams::TYPE_WINDOW &&
|
||||
@@ -378,7 +380,12 @@ void Widget::Init(const InitParams& in_params) {
|
||||
@@ -379,7 +381,12 @@ void Widget::Init(const InitParams& in_params) {
|
||||
Minimize();
|
||||
} else if (params.delegate) {
|
||||
SetContentsView(params.delegate->GetContentsView());
|
||||
@ -198,10 +198,10 @@ index 280969a..8ea7f0b 100644
|
||||
// This must come after SetContentsView() or it might not be able to find
|
||||
// the correct NativeTheme (on Linux). See http://crbug.com/384492
|
||||
diff --git widget.h widget.h
|
||||
index 320332b..8d46883 100644
|
||||
index 1342625..7fbc24c 100644
|
||||
--- widget.h
|
||||
+++ widget.h
|
||||
@@ -233,6 +233,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
@@ -232,6 +232,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
|
||||
// Whether the widget should be maximized or minimized.
|
||||
ui::WindowShowState show_state;
|
||||
gfx::NativeView parent;
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git Source/web/ChromeClientImpl.cpp Source/web/ChromeClientImpl.cpp
|
||||
index 7f94b2d..1390a1f 100644
|
||||
index 5577228..74ccf53 100644
|
||||
--- Source/web/ChromeClientImpl.cpp
|
||||
+++ Source/web/ChromeClientImpl.cpp
|
||||
@@ -801,7 +801,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
|
||||
@@ -814,7 +814,7 @@ bool ChromeClientImpl::hasOpenedPopup() const
|
||||
PassRefPtrWillBeRawPtr<PopupMenu> ChromeClientImpl::openPopupMenu(LocalFrame& frame, HTMLSelectElement& select)
|
||||
{
|
||||
notifyPopupOpeningObservers();
|
||||
@ -12,18 +12,18 @@ index 7f94b2d..1390a1f 100644
|
||||
|
||||
ASSERT(RuntimeEnabledFeatures::pagePopupEnabled());
|
||||
diff --git Source/web/WebViewImpl.cpp Source/web/WebViewImpl.cpp
|
||||
index c1d869d..e11d102 100644
|
||||
index b708684..769c127 100644
|
||||
--- Source/web/WebViewImpl.cpp
|
||||
+++ Source/web/WebViewImpl.cpp
|
||||
@@ -427,6 +427,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
|
||||
@@ -421,6 +421,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
|
||||
, m_enableFakePageScaleAnimationForTesting(false)
|
||||
, m_fakePageScaleAnimationPageScaleFactor(0)
|
||||
, m_fakePageScaleAnimationUseAnchor(false)
|
||||
, m_contextMenuAllowed(false)
|
||||
+ , m_shouldUseExternalPopupMenus(shouldUseExternalPopupMenus)
|
||||
, m_doingDragAndDrop(false)
|
||||
, m_ignoreInputEvents(false)
|
||||
, m_compositorDeviceScaleFactorOverride(0)
|
||||
@@ -3959,9 +3960,14 @@ void WebViewImpl::pageScaleFactorChanged()
|
||||
@@ -4018,9 +4019,14 @@ void WebViewImpl::pageScaleFactorChanged()
|
||||
m_client->pageScaleFactorChanged();
|
||||
}
|
||||
|
||||
@ -40,10 +40,10 @@ index c1d869d..e11d102 100644
|
||||
|
||||
void WebViewImpl::startDragging(LocalFrame* frame,
|
||||
diff --git Source/web/WebViewImpl.h Source/web/WebViewImpl.h
|
||||
index 98268d4..9b2f03a 100644
|
||||
index a1f3e54..24f60a9 100644
|
||||
--- Source/web/WebViewImpl.h
|
||||
+++ Source/web/WebViewImpl.h
|
||||
@@ -394,7 +394,8 @@ public:
|
||||
@@ -393,7 +393,8 @@ public:
|
||||
|
||||
// Returns true if popup menus should be rendered by the browser, false if
|
||||
// they should be rendered by WebKit (which is the default).
|
||||
@ -51,11 +51,11 @@ index 98268d4..9b2f03a 100644
|
||||
+ void setUseExternalPopupMenusThisInstance(bool);
|
||||
+ bool useExternalPopupMenus();
|
||||
|
||||
bool contextMenuAllowed() const
|
||||
bool shouldAutoResize() const
|
||||
{
|
||||
@@ -687,6 +688,8 @@ private:
|
||||
|
||||
bool m_contextMenuAllowed;
|
||||
@@ -671,6 +672,8 @@ private:
|
||||
float m_fakePageScaleAnimationPageScaleFactor;
|
||||
bool m_fakePageScaleAnimationUseAnchor;
|
||||
|
||||
+ bool m_shouldUseExternalPopupMenus;
|
||||
+
|
||||
@ -63,10 +63,10 @@ index 98268d4..9b2f03a 100644
|
||||
|
||||
bool m_ignoreInputEvents;
|
||||
diff --git public/web/WebView.h public/web/WebView.h
|
||||
index fac145a..0fc5c23 100644
|
||||
index 1bce1b2..3ea51c1 100644
|
||||
--- public/web/WebView.h
|
||||
+++ public/web/WebView.h
|
||||
@@ -399,6 +399,7 @@ public:
|
||||
@@ -400,6 +400,7 @@ public:
|
||||
|
||||
// Sets whether select popup menus should be rendered by the browser.
|
||||
BLINK_EXPORT static void setUseExternalPopupMenus(bool);
|
||||
|
@ -1,37 +0,0 @@
|
||||
diff --git stub_cdm.cc stub_cdm.cc
|
||||
index 0bfa25e..0db23db 100644
|
||||
--- stub_cdm.cc
|
||||
+++ stub_cdm.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "media/cdm/stub/stub_cdm.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
+#include "base/numerics/safe_conversions.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
|
||||
// Version number for this stub. The third number represents the
|
||||
@@ -61,9 +62,11 @@ void StubCdm::CreateSessionAndGenerateRequest(
|
||||
// Provide a dummy message (with a trivial session ID) to enable some testing
|
||||
// and be consistent with existing testing without a license server.
|
||||
std::string session_id(base::UintToString(next_session_id_++));
|
||||
- host_->OnResolveNewSessionPromise(promise_id, session_id.data(),
|
||||
- session_id.length());
|
||||
- host_->OnSessionMessage(session_id.data(), session_id.length(),
|
||||
+ host_->OnResolveNewSessionPromise(
|
||||
+ promise_id, session_id.data(),
|
||||
+ base::checked_cast<uint32_t>(session_id.length()));
|
||||
+ host_->OnSessionMessage(session_id.data(),
|
||||
+ base::checked_cast<uint32_t>(session_id.length()),
|
||||
cdm::kLicenseRequest, nullptr, 0, nullptr, 0);
|
||||
}
|
||||
|
||||
@@ -156,7 +159,8 @@ void StubCdm::OnQueryOutputProtectionStatus(
|
||||
void StubCdm::FailRequest(uint32 promise_id) {
|
||||
std::string message("Operation not supported by stub CDM.");
|
||||
host_->OnRejectPromise(promise_id, cdm::kInvalidAccessError, 0,
|
||||
- message.data(), message.length());
|
||||
+ message.data(),
|
||||
+ base::checked_cast<uint32_t>(message.length()));
|
||||
}
|
||||
|
||||
} // namespace media
|
Reference in New Issue
Block a user