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

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

Issue 10411002: Implement the Chromium-specific part of WebCore context menus with submenus (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « no previous file | webkit/glue/webmenuitem.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <algorithm> 5 #include <algorithm>
6 #include <set> 6 #include <set>
7 #include <utility> 7 #include <utility>
8 8
9 #include "chrome/browser/tab_contents/render_view_context_menu.h" 9 #include "chrome/browser/tab_contents/render_view_context_menu.h"
10 10
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 case WebMenuItem::OPTION: 172 case WebMenuItem::OPTION:
173 menu_model->AddItem( 173 menu_model->AddItem(
174 items[i].action + IDC_CONTENT_CONTEXT_CUSTOM_FIRST, 174 items[i].action + IDC_CONTENT_CONTEXT_CUSTOM_FIRST,
175 items[i].label); 175 items[i].label);
176 break; 176 break;
177 case WebMenuItem::CHECKABLE_OPTION: 177 case WebMenuItem::CHECKABLE_OPTION:
178 menu_model->AddCheckItem( 178 menu_model->AddCheckItem(
179 items[i].action + IDC_CONTENT_CONTEXT_CUSTOM_FIRST, 179 items[i].action + IDC_CONTENT_CONTEXT_CUSTOM_FIRST,
180 items[i].label); 180 items[i].label);
181 break; 181 break;
182 case WebMenuItem::GROUP:
183 // TODO(viettrungluu): I don't know what this is supposed to do.
184 NOTREACHED();
185 break;
186 case WebMenuItem::SEPARATOR: 182 case WebMenuItem::SEPARATOR:
187 menu_model->AddSeparator(); 183 menu_model->AddSeparator();
188 break; 184 break;
185 case WebMenuItem::GROUP:
pfeldman 2012/05/22 14:22:30 why did this change?
189 case WebMenuItem::SUBMENU: { 186 case WebMenuItem::SUBMENU: {
190 ui::SimpleMenuModel* submenu = new ui::SimpleMenuModel(delegate); 187 ui::SimpleMenuModel* submenu = new ui::SimpleMenuModel(delegate);
191 AddCustomItemsToMenu(items[i].submenu, depth + 1, total_items, delegate, 188 AddCustomItemsToMenu(items[i].submenu, depth + 1, total_items, delegate,
192 submenu); 189 submenu);
193 menu_model->AddSubMenu( 190 menu_model->AddSubMenu(
194 items[i].action + IDC_CONTENT_CONTEXT_CUSTOM_FIRST, 191 items[i].action + IDC_CONTENT_CONTEXT_CUSTOM_FIRST,
195 items[i].label, 192 items[i].label,
196 submenu); 193 submenu);
197 break; 194 break;
198 } 195 }
(...skipping 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1983 source_web_contents_->GetRenderViewHost()-> 1980 source_web_contents_->GetRenderViewHost()->
1984 ExecuteMediaPlayerActionAtLocation(location, action); 1981 ExecuteMediaPlayerActionAtLocation(location, action);
1985 } 1982 }
1986 1983
1987 void RenderViewContextMenu::PluginActionAt( 1984 void RenderViewContextMenu::PluginActionAt(
1988 const gfx::Point& location, 1985 const gfx::Point& location,
1989 const WebPluginAction& action) { 1986 const WebPluginAction& action) {
1990 source_web_contents_->GetRenderViewHost()-> 1987 source_web_contents_->GetRenderViewHost()->
1991 ExecutePluginActionAtLocation(location, action); 1988 ExecutePluginActionAtLocation(location, action);
1992 } 1989 }
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/webmenuitem.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698