| OLD | NEW |
| 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 } |
| OLD | NEW |