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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 384243004: Make <a ping> work for context menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address darin's comments Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/dom_utils.cc ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "content/public/renderer/document_state.h" 46 #include "content/public/renderer/document_state.h"
47 #include "content/public/renderer/navigation_state.h" 47 #include "content/public/renderer/navigation_state.h"
48 #include "content/public/renderer/render_frame_observer.h" 48 #include "content/public/renderer/render_frame_observer.h"
49 #include "content/renderer/accessibility/renderer_accessibility.h" 49 #include "content/renderer/accessibility/renderer_accessibility.h"
50 #include "content/renderer/browser_plugin/browser_plugin.h" 50 #include "content/renderer/browser_plugin/browser_plugin.h"
51 #include "content/renderer/browser_plugin/browser_plugin_manager.h" 51 #include "content/renderer/browser_plugin/browser_plugin_manager.h"
52 #include "content/renderer/child_frame_compositing_helper.h" 52 #include "content/renderer/child_frame_compositing_helper.h"
53 #include "content/renderer/context_menu_params_builder.h" 53 #include "content/renderer/context_menu_params_builder.h"
54 #include "content/renderer/devtools/devtools_agent.h" 54 #include "content/renderer/devtools/devtools_agent.h"
55 #include "content/renderer/dom_automation_controller.h" 55 #include "content/renderer/dom_automation_controller.h"
56 #include "content/renderer/dom_utils.h"
56 #include "content/renderer/geolocation_dispatcher.h" 57 #include "content/renderer/geolocation_dispatcher.h"
57 #include "content/renderer/history_controller.h" 58 #include "content/renderer/history_controller.h"
58 #include "content/renderer/history_serialization.h" 59 #include "content/renderer/history_serialization.h"
59 #include "content/renderer/image_loading_helper.h" 60 #include "content/renderer/image_loading_helper.h"
60 #include "content/renderer/ime_event_guard.h" 61 #include "content/renderer/ime_event_guard.h"
61 #include "content/renderer/internal_document_state_data.h" 62 #include "content/renderer/internal_document_state_data.h"
62 #include "content/renderer/media/audio_renderer_mixer_manager.h" 63 #include "content/renderer/media/audio_renderer_mixer_manager.h"
63 #include "content/renderer/media/media_stream_dispatcher.h" 64 #include "content/renderer/media/media_stream_dispatcher.h"
64 #include "content/renderer/media/media_stream_impl.h" 65 #include "content/renderer/media/media_stream_impl.h"
65 #include "content/renderer/media/media_stream_renderer_factory.h" 66 #include "content/renderer/media/media_stream_renderer_factory.h"
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 const CustomContextMenuContext& custom_context) { 1023 const CustomContextMenuContext& custom_context) {
1023 if (custom_context.request_id) { 1024 if (custom_context.request_id) {
1024 // External request, should be in our map. 1025 // External request, should be in our map.
1025 ContextMenuClient* client = 1026 ContextMenuClient* client =
1026 pending_context_menus_.Lookup(custom_context.request_id); 1027 pending_context_menus_.Lookup(custom_context.request_id);
1027 if (client) { 1028 if (client) {
1028 client->OnMenuClosed(custom_context.request_id); 1029 client->OnMenuClosed(custom_context.request_id);
1029 pending_context_menus_.Remove(custom_context.request_id); 1030 pending_context_menus_.Remove(custom_context.request_id);
1030 } 1031 }
1031 } else { 1032 } else {
1033 if (custom_context.link_followed.is_valid()) {
1034 frame_->sendPings(
1035 DomUtils::ExtractParentAnchorNode(context_menu_node_),
1036 custom_context.link_followed);
1037 }
1032 // Internal request, forward to WebKit. 1038 // Internal request, forward to WebKit.
1033 context_menu_node_.reset(); 1039 context_menu_node_.reset();
1034 } 1040 }
1035 } 1041 }
1036 1042
1037 void RenderFrameImpl::OnCustomContextMenuAction( 1043 void RenderFrameImpl::OnCustomContextMenuAction(
1038 const CustomContextMenuContext& custom_context, 1044 const CustomContextMenuContext& custom_context,
1039 unsigned action) { 1045 unsigned action) {
1040 if (custom_context.request_id) { 1046 if (custom_context.request_id) {
1041 // External context menu request, look in our map. 1047 // External context menu request, look in our map.
(...skipping 2532 matching lines...) Expand 10 before | Expand all | Expand 10 after
3574 3580
3575 #if defined(ENABLE_BROWSER_CDMS) 3581 #if defined(ENABLE_BROWSER_CDMS)
3576 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 3582 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
3577 if (!cdm_manager_) 3583 if (!cdm_manager_)
3578 cdm_manager_ = new RendererCdmManager(this); 3584 cdm_manager_ = new RendererCdmManager(this);
3579 return cdm_manager_; 3585 return cdm_manager_;
3580 } 3586 }
3581 #endif // defined(ENABLE_BROWSER_CDMS) 3587 #endif // defined(ENABLE_BROWSER_CDMS)
3582 3588
3583 } // namespace content 3589 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/dom_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698