OLD | NEW |
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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 | 386 |
387 if (params_.link_url == url && | 387 if (params_.link_url == url && |
388 disposition != WindowOpenDisposition::OFF_THE_RECORD) | 388 disposition != WindowOpenDisposition::OFF_THE_RECORD) |
389 params_.custom_context.link_followed = url; | 389 params_.custom_context.link_followed = url; |
390 | 390 |
391 OpenURLParams open_url_params(url, referrer, disposition, transition, false, | 391 OpenURLParams open_url_params(url, referrer, disposition, transition, false, |
392 started_from_context_menu); | 392 started_from_context_menu); |
393 if (!extra_headers.empty()) | 393 if (!extra_headers.empty()) |
394 open_url_params.extra_headers = extra_headers; | 394 open_url_params.extra_headers = extra_headers; |
395 | 395 |
396 WebContents* new_contents = source_web_contents_->OpenURL(open_url_params); | 396 open_url_params.source_render_process_id = render_process_id_; |
397 if (!new_contents) | 397 open_url_params.source_render_frame_id = render_frame_id_; |
398 return; | |
399 | 398 |
400 NotifyURLOpened(url, new_contents); | 399 source_web_contents_->OpenURL(open_url_params); |
401 } | 400 } |
402 | 401 |
403 bool RenderViewContextMenuBase::IsCustomItemChecked(int id) const { | 402 bool RenderViewContextMenuBase::IsCustomItemChecked(int id) const { |
404 return IsCustomItemCheckedInternal(params_.custom_items, id); | 403 return IsCustomItemCheckedInternal(params_.custom_items, id); |
405 } | 404 } |
406 | 405 |
407 bool RenderViewContextMenuBase::IsCustomItemEnabled(int id) const { | 406 bool RenderViewContextMenuBase::IsCustomItemEnabled(int id) const { |
408 return IsCustomItemEnabledInternal(params_.custom_items, id); | 407 return IsCustomItemEnabledInternal(params_.custom_items, id); |
409 } | 408 } |
OLD | NEW |