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

Side by Side Diff: chrome/browser/renderer_context_menu/render_view_context_menu.cc

Issue 267103002: Ignore title parameter for navigator.registerProtocolHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 6 years, 7 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
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 "chrome/browser/renderer_context_menu/render_view_context_menu.h" 5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 void RenderViewContextMenu::AppendProtocolHandlerSubMenu() { 1057 void RenderViewContextMenu::AppendProtocolHandlerSubMenu() {
1058 const ProtocolHandlerRegistry::ProtocolHandlerList handlers = 1058 const ProtocolHandlerRegistry::ProtocolHandlerList handlers =
1059 GetHandlersForLinkUrl(); 1059 GetHandlersForLinkUrl();
1060 if (handlers.empty()) 1060 if (handlers.empty())
1061 return; 1061 return;
1062 size_t max = IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_LAST - 1062 size_t max = IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_LAST -
1063 IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_FIRST; 1063 IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_FIRST;
1064 for (size_t i = 0; i < handlers.size() && i <= max; i++) { 1064 for (size_t i = 0; i < handlers.size() && i <= max; i++) {
1065 protocol_handler_submenu_model_.AddItem( 1065 protocol_handler_submenu_model_.AddItem(
1066 IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_FIRST + i, 1066 IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_FIRST + i,
1067 handlers[i].title()); 1067 base::UTF8ToUTF16(handlers[i].url().host()));
1068 } 1068 }
1069 protocol_handler_submenu_model_.AddSeparator(ui::NORMAL_SEPARATOR); 1069 protocol_handler_submenu_model_.AddSeparator(ui::NORMAL_SEPARATOR);
1070 protocol_handler_submenu_model_.AddItem( 1070 protocol_handler_submenu_model_.AddItem(
1071 IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_SETTINGS, 1071 IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_SETTINGS,
1072 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_OPENLINKWITH_CONFIGURE)); 1072 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_OPENLINKWITH_CONFIGURE));
1073 1073
1074 menu_model_.AddSubMenu( 1074 menu_model_.AddSubMenu(
1075 IDC_CONTENT_CONTEXT_OPENLINKWITH, 1075 IDC_CONTENT_CONTEXT_OPENLINKWITH,
1076 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_OPENLINKWITH), 1076 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_OPENLINKWITH),
1077 &protocol_handler_submenu_model_); 1077 &protocol_handler_submenu_model_);
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 source_web_contents_->GetRenderViewHost()-> 1989 source_web_contents_->GetRenderViewHost()->
1990 ExecuteMediaPlayerActionAtLocation(location, action); 1990 ExecuteMediaPlayerActionAtLocation(location, action);
1991 } 1991 }
1992 1992
1993 void RenderViewContextMenu::PluginActionAt( 1993 void RenderViewContextMenu::PluginActionAt(
1994 const gfx::Point& location, 1994 const gfx::Point& location,
1995 const WebPluginAction& action) { 1995 const WebPluginAction& action) {
1996 source_web_contents_->GetRenderViewHost()-> 1996 source_web_contents_->GetRenderViewHost()->
1997 ExecutePluginActionAtLocation(location, action); 1997 ExecutePluginActionAtLocation(location, action);
1998 } 1998 }
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_contents.cc ('k') | chrome/browser/resources/options/handler_options_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698