Commit 690e9b3d authored by Darwin Huang's avatar Darwin Huang Committed by Commit Bot

Clipboard: Rename render_frame_pid to render_process_id.

render_process_id is a much more common name for this process identifier
variable.

Refactoring change only. No functional changes intended.

Change-Id: Iefe4ce12ab1583031a031d1789ceafff4204b9d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2413018
Commit-Queue: Darwin Huang <huangdarwin@chromium.org>
Auto-Submit: Darwin Huang <huangdarwin@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807594}
parent 25af1243
......@@ -89,14 +89,12 @@ ClipboardHostImpl::ClipboardHostImpl(
// |render_frame_host| may be null in unit tests.
if (render_frame_host) {
render_frame_routing_id_ = render_frame_host->GetRoutingID();
render_frame_pid_ = render_frame_host->GetProcess()->GetID();
render_process_id_ = render_frame_host->GetProcess()->GetID();
clipboard_writer_ = std::make_unique<ui::ScopedClipboardWriter>(
ui::ClipboardBuffer::kCopyPaste,
std::make_unique<ui::ClipboardDataEndpoint>(
render_frame_host->GetLastCommittedOrigin()));
} else {
render_frame_routing_id_ = MSG_ROUTING_NONE;
render_frame_pid_ = ChildProcessHost::kInvalidUniqueID;
clipboard_writer_ = std::make_unique<ui::ScopedClipboardWriter>(
ui::ClipboardBuffer::kCopyPaste);
}
......@@ -386,7 +384,7 @@ void ClipboardHostImpl::StartIsPasteAllowedRequest(
std::string data) {
// May not have a RenderFrameHost in tests.
RenderFrameHostImpl* render_frame_host =
RenderFrameHostImpl::FromID(render_frame_pid_, render_frame_routing_id_);
RenderFrameHostImpl::FromID(render_process_id_, render_frame_routing_id_);
if (render_frame_host) {
render_frame_host->IsClipboardPasteAllowed(
data_type, data,
......@@ -418,7 +416,7 @@ void ClipboardHostImpl::CleanupObsoleteRequests() {
std::unique_ptr<ui::ClipboardDataEndpoint>
ClipboardHostImpl::CreateDataEndpoint() {
RenderFrameHostImpl* render_frame_host =
RenderFrameHostImpl::FromID(render_frame_pid_, render_frame_routing_id_);
RenderFrameHostImpl::FromID(render_process_id_, render_frame_routing_id_);
if (render_frame_host) {
return std::make_unique<ui::ClipboardDataEndpoint>(
render_frame_host->GetLastCommittedOrigin());
......
......@@ -182,8 +182,8 @@ class CONTENT_EXPORT ClipboardHostImpl : public blink::mojom::ClipboardHost {
mojo::Receiver<blink::mojom::ClipboardHost> receiver_;
ui::Clipboard* const clipboard_; // Not owned
int render_frame_routing_id_;
int render_frame_pid_;
int render_frame_routing_id_ = MSG_ROUTING_NONE;
int render_process_id_ = ChildProcessHost::kInvalidUniqueID;
std::unique_ptr<ui::ScopedClipboardWriter> clipboard_writer_;
// Outstanding is allowed requests per clipboard contents. Maps a clipboard
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment