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

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

Issue 122027: Remove the Menu object, converting all the remaining callers to use Menu2. I'... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/tab_contents/render_view_context_menu_external_win.h" 5 #include "chrome/browser/tab_contents/render_view_context_menu_external_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 RenderViewContextMenuExternalWin::RenderViewContextMenuExternalWin( 9 RenderViewContextMenuExternalWin::RenderViewContextMenuExternalWin(
10 TabContents* tab_contents, 10 TabContents* tab_contents,
11 const ContextMenuParams& params, 11 const ContextMenuParams& params,
12 HWND owner,
13 const std::vector<int> disabled_ids) 12 const std::vector<int> disabled_ids)
14 : RenderViewContextMenuWin(tab_contents, params, owner), 13 : RenderViewContextMenuWin(tab_contents, params),
15 disabled_menu_ids_(disabled_ids) { 14 disabled_menu_ids_(disabled_ids) {
16 } 15 }
17 16
18 void RenderViewContextMenuExternalWin::AppendMenuItem(int id) { 17 void RenderViewContextMenuExternalWin::AppendMenuItem(int id) {
19 std::vector<int>::iterator found = 18 std::vector<int>::iterator found =
20 std::find(disabled_menu_ids_.begin(), disabled_menu_ids_.end(), id); 19 std::find(disabled_menu_ids_.begin(), disabled_menu_ids_.end(), id);
21 20
22 if (found == disabled_menu_ids_.end()) { 21 if (found == disabled_menu_ids_.end()) {
23 RenderViewContextMenuWin::AppendMenuItem(id); 22 RenderViewContextMenuWin::AppendMenuItem(id);
24 } 23 }
25 } 24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698