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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 const GURL& url, 384 const GURL& url,
385 const GURL& referring_url, 385 const GURL& referring_url,
386 WindowOpenDisposition disposition, 386 WindowOpenDisposition disposition,
387 ui::PageTransition transition, 387 ui::PageTransition transition,
388 const std::string& extra_headers) { 388 const std::string& extra_headers) {
389 content::Referrer referrer = content::Referrer::SanitizeForRequest( 389 content::Referrer referrer = content::Referrer::SanitizeForRequest(
390 url, 390 url,
391 content::Referrer(referring_url.GetAsReferrer(), 391 content::Referrer(referring_url.GetAsReferrer(),
392 params_.referrer_policy)); 392 params_.referrer_policy));
393 393
394 if (params_.link_url == url && disposition != OFF_THE_RECORD) 394 if (params_.link_url == url &&
395 disposition != WindowOpenDisposition::OFF_THE_RECORD)
395 params_.custom_context.link_followed = url; 396 params_.custom_context.link_followed = url;
396 397
397 OpenURLParams open_url_params(url, referrer, disposition, transition, false); 398 OpenURLParams open_url_params(url, referrer, disposition, transition, false);
398 if (!extra_headers.empty()) 399 if (!extra_headers.empty())
399 open_url_params.extra_headers = extra_headers; 400 open_url_params.extra_headers = extra_headers;
400 401
401 WebContents* new_contents = source_web_contents_->OpenURL(open_url_params); 402 WebContents* new_contents = source_web_contents_->OpenURL(open_url_params);
402 if (!new_contents) 403 if (!new_contents)
403 return; 404 return;
404 405
405 NotifyURLOpened(url, new_contents); 406 NotifyURLOpened(url, new_contents);
406 } 407 }
407 408
408 bool RenderViewContextMenuBase::IsCustomItemChecked(int id) const { 409 bool RenderViewContextMenuBase::IsCustomItemChecked(int id) const {
409 return IsCustomItemCheckedInternal(params_.custom_items, id); 410 return IsCustomItemCheckedInternal(params_.custom_items, id);
410 } 411 }
411 412
412 bool RenderViewContextMenuBase::IsCustomItemEnabled(int id) const { 413 bool RenderViewContextMenuBase::IsCustomItemEnabled(int id) const {
413 return IsCustomItemEnabledInternal(params_.custom_items, id); 414 return IsCustomItemEnabledInternal(params_.custom_items, id);
414 } 415 }
OLDNEW
« no previous file with comments | « components/omnibox/browser/omnibox_edit_unittest.cc ('k') | components/sessions/core/tab_restore_service_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698