Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: components/renderer_context_menu/render_view_context_menu_base.cc

Issue 2385363002: Pass the RenderProcessHost id on retargeting. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/renderer_context_menu/render_view_context_menu_base.h" 5 #include "components/renderer_context_menu/render_view_context_menu_base.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 id <= content_context_custom_last; 153 id <= content_context_custom_last;
154 } 154 }
155 155
156 RenderViewContextMenuBase::RenderViewContextMenuBase( 156 RenderViewContextMenuBase::RenderViewContextMenuBase(
157 content::RenderFrameHost* render_frame_host, 157 content::RenderFrameHost* render_frame_host,
158 const content::ContextMenuParams& params) 158 const content::ContextMenuParams& params)
159 : params_(params), 159 : params_(params),
160 source_web_contents_(WebContents::FromRenderFrameHost(render_frame_host)), 160 source_web_contents_(WebContents::FromRenderFrameHost(render_frame_host)),
161 browser_context_(source_web_contents_->GetBrowserContext()), 161 browser_context_(source_web_contents_->GetBrowserContext()),
162 menu_model_(this), 162 menu_model_(this),
163 render_process_host_id_(render_frame_host->GetProcess()->GetID()),
163 render_frame_id_(render_frame_host->GetRoutingID()), 164 render_frame_id_(render_frame_host->GetRoutingID()),
164 command_executed_(false), 165 command_executed_(false),
165 render_process_id_(render_frame_host->GetProcess()->GetID()) { 166 render_process_id_(render_frame_host->GetProcess()->GetID()) {}
Charlie Reis 2016/10/03 22:15:23 Yep, already have it here.
nasko 2016/10/03 22:38:04 Acknowledged.
166 }
167 167
168 RenderViewContextMenuBase::~RenderViewContextMenuBase() { 168 RenderViewContextMenuBase::~RenderViewContextMenuBase() {
169 } 169 }
170 170
171 // Menu construction functions ------------------------------------------------- 171 // Menu construction functions -------------------------------------------------
172 172
173 void RenderViewContextMenuBase::Init() { 173 void RenderViewContextMenuBase::Init() {
174 // Command id range must have been already initializerd. 174 // Command id range must have been already initializerd.
175 DCHECK_NE(-1, content_context_custom_first); 175 DCHECK_NE(-1, content_context_custom_first);
176 DCHECK_NE(-1, content_context_custom_last); 176 DCHECK_NE(-1, content_context_custom_last);
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 NotifyURLOpened(url, new_contents); 406 NotifyURLOpened(url, new_contents);
407 } 407 }
408 408
409 bool RenderViewContextMenuBase::IsCustomItemChecked(int id) const { 409 bool RenderViewContextMenuBase::IsCustomItemChecked(int id) const {
410 return IsCustomItemCheckedInternal(params_.custom_items, id); 410 return IsCustomItemCheckedInternal(params_.custom_items, id);
411 } 411 }
412 412
413 bool RenderViewContextMenuBase::IsCustomItemEnabled(int id) const { 413 bool RenderViewContextMenuBase::IsCustomItemEnabled(int id) const {
414 return IsCustomItemEnabledInternal(params_.custom_items, id); 414 return IsCustomItemEnabledInternal(params_.custom_items, id);
415 } 415 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698