
This CL avoids sending |page_url| and |frame_url| as a payload of FrameHostMsg_ContextMenu. The CL accomplishes this by splitting the old ContextMenuParams struct into: 1. UntrustworthyContextMenuParams: - Sent over IPC. - Doesn't include |frame_url| nor |page_url|. 2. ContextMenuParams: - Never sent over IPC (no IPC traits are defined). - Includes |frame_url| and |page_url| which are populated based on browser-side data (rather than IPC-based data). - Cannot be copy-constructed directly from UntrustworthyContextMenuParams, except by RenderFrameHostImpl. Fixed: 534561, 1059083 Change-Id: I80239532aa693a0cb80aab29dcf4824bbb971e13 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2091921 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Reviewed-by: Nasko Oskov <nasko@chromium.org> Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org> Cr-Commit-Position: refs/heads/master@{#749036}
24 lines
614 B
C++
24 lines
614 B
C++
// Copyright (c) 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_RENDERER_CONTEXT_MENU_PARAMS_BUILDER_H_
|
|
#define CONTENT_RENDERER_CONTEXT_MENU_PARAMS_BUILDER_H_
|
|
|
|
namespace blink {
|
|
struct WebContextMenuData;
|
|
}
|
|
|
|
namespace content {
|
|
struct UntrustworthyContextMenuParams;
|
|
|
|
class ContextMenuParamsBuilder {
|
|
public:
|
|
static UntrustworthyContextMenuParams Build(
|
|
const blink::WebContextMenuData& data);
|
|
};
|
|
|
|
} // namespace content
|
|
|
|
#endif // CONTENT_RENDERER_CONTEXT_MENU_PARAMS_BUILDER_H_
|