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

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

Issue 941603002: This is followup of 449919 for addressing nit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « components/renderer_context_menu/render_view_context_menu_base.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 bool RenderViewContextMenuBase::IsContentCustomCommandId(int id) { 162 bool RenderViewContextMenuBase::IsContentCustomCommandId(int id) {
163 return id >= content_context_custom_first && 163 return id >= content_context_custom_first &&
164 id <= content_context_custom_last; 164 id <= content_context_custom_last;
165 } 165 }
166 166
167 RenderViewContextMenuBase::RenderViewContextMenuBase( 167 RenderViewContextMenuBase::RenderViewContextMenuBase(
168 content::RenderFrameHost* render_frame_host, 168 content::RenderFrameHost* render_frame_host,
169 const content::ContextMenuParams& params) 169 const content::ContextMenuParams& params)
170 : params_(params), 170 : params_(params),
171 source_web_contents_(WebContents::FromRenderFrameHost(render_frame_host)), 171 source_web_contents_(WebContents::FromRenderFrameHost(render_frame_host)),
172 embedded_web_contents_(GetWebContentsToUse(source_web_contents_)), 172 embedder_web_contents_(GetWebContentsToUse(source_web_contents_)),
173 browser_context_(source_web_contents_->GetBrowserContext()), 173 browser_context_(source_web_contents_->GetBrowserContext()),
174 menu_model_(this), 174 menu_model_(this),
175 render_frame_id_(render_frame_host->GetRoutingID()), 175 render_frame_id_(render_frame_host->GetRoutingID()),
176 command_executed_(false), 176 command_executed_(false),
177 render_process_id_(render_frame_host->GetProcess()->GetID()) { 177 render_process_id_(render_frame_host->GetProcess()->GetID()) {
178 } 178 }
179 179
180 RenderViewContextMenuBase::~RenderViewContextMenuBase() { 180 RenderViewContextMenuBase::~RenderViewContextMenuBase() {
181 } 181 }
182 182
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 395 }
396 396
397 bool RenderViewContextMenuBase::IsCustomItemChecked(int id) const { 397 bool RenderViewContextMenuBase::IsCustomItemChecked(int id) const {
398 return IsCustomItemCheckedInternal(params_.custom_items, id); 398 return IsCustomItemCheckedInternal(params_.custom_items, id);
399 } 399 }
400 400
401 bool RenderViewContextMenuBase::IsCustomItemEnabled(int id) const { 401 bool RenderViewContextMenuBase::IsCustomItemEnabled(int id) const {
402 return IsCustomItemEnabledInternal(params_.custom_items, id); 402 return IsCustomItemEnabledInternal(params_.custom_items, id);
403 } 403 }
404 404
OLDNEW
« no previous file with comments | « components/renderer_context_menu/render_view_context_menu_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698