| 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 "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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 { 46, IDC_CONTENT_CONTEXT_LANGUAGE_SETTINGS }, | 198 { 46, IDC_CONTENT_CONTEXT_LANGUAGE_SETTINGS }, |
| 199 { 47, IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_SETTINGS }, | 199 { 47, IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_SETTINGS }, |
| 200 { 48, IDC_CONTENT_CONTEXT_ADDSEARCHENGINE }, | 200 { 48, IDC_CONTENT_CONTEXT_ADDSEARCHENGINE }, |
| 201 { 52, IDC_CONTENT_CONTEXT_OPENLINKWITH }, | 201 { 52, IDC_CONTENT_CONTEXT_OPENLINKWITH }, |
| 202 { 53, IDC_CHECK_SPELLING_WHILE_TYPING }, | 202 { 53, IDC_CHECK_SPELLING_WHILE_TYPING }, |
| 203 { 54, IDC_SPELLCHECK_MENU }, | 203 { 54, IDC_SPELLCHECK_MENU }, |
| 204 { 55, IDC_CONTENT_CONTEXT_SPELLING_TOGGLE }, | 204 { 55, IDC_CONTENT_CONTEXT_SPELLING_TOGGLE }, |
| 205 { 56, IDC_SPELLCHECK_LANGUAGES_FIRST }, | 205 { 56, IDC_SPELLCHECK_LANGUAGES_FIRST }, |
| 206 { 57, IDC_CONTENT_CONTEXT_SEARCHWEBFORIMAGE }, | 206 { 57, IDC_CONTENT_CONTEXT_SEARCHWEBFORIMAGE }, |
| 207 { 58, IDC_SPELLCHECK_SUGGESTION_0 }, | 207 { 58, IDC_SPELLCHECK_SUGGESTION_0 }, |
| 208 { 59, IDC_SPELLCHECK_ADD_TO_DICTIONARY }, |
| 209 { 60, IDC_SPELLPANEL_TOGGLE }, |
| 208 // Add new items here and use |enum_id| from the next line. | 210 // Add new items here and use |enum_id| from the next line. |
| 209 { 59, 0 }, // Must be the last. Increment |enum_id| when new IDC was added. | 211 { 61, 0 }, // Must be the last. Increment |enum_id| when new IDC was added. |
| 210 }; | 212 }; |
| 211 | 213 |
| 212 // Collapses large ranges of ids before looking for UMA enum. | 214 // Collapses large ranges of ids before looking for UMA enum. |
| 213 int CollapseCommandsForUMA(int id) { | 215 int CollapseCommandsForUMA(int id) { |
| 214 if (id >= IDC_CONTENT_CONTEXT_CUSTOM_FIRST && | 216 if (id >= IDC_CONTENT_CONTEXT_CUSTOM_FIRST && |
| 215 id <= IDC_CONTENT_CONTEXT_CUSTOM_LAST) { | 217 id <= IDC_CONTENT_CONTEXT_CUSTOM_LAST) { |
| 216 return IDC_CONTENT_CONTEXT_CUSTOM_FIRST; | 218 return IDC_CONTENT_CONTEXT_CUSTOM_FIRST; |
| 217 } | 219 } |
| 218 | 220 |
| 219 if (id >= IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST && | 221 if (id >= IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST && |
| (...skipping 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1993 source_web_contents_->GetRenderViewHost()-> | 1995 source_web_contents_->GetRenderViewHost()-> |
| 1994 ExecuteMediaPlayerActionAtLocation(location, action); | 1996 ExecuteMediaPlayerActionAtLocation(location, action); |
| 1995 } | 1997 } |
| 1996 | 1998 |
| 1997 void RenderViewContextMenu::PluginActionAt( | 1999 void RenderViewContextMenu::PluginActionAt( |
| 1998 const gfx::Point& location, | 2000 const gfx::Point& location, |
| 1999 const WebPluginAction& action) { | 2001 const WebPluginAction& action) { |
| 2000 source_web_contents_->GetRenderViewHost()-> | 2002 source_web_contents_->GetRenderViewHost()-> |
| 2001 ExecutePluginActionAtLocation(location, action); | 2003 ExecutePluginActionAtLocation(location, action); |
| 2002 } | 2004 } |
| OLD | NEW |