| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/tab_contents/menu_category_panel.h" |
| 6 |
| 7 MenuCategoryPanel::MenuCategoryPanel( |
| 8 content::RenderFrameHost* render_frame_host, |
| 9 const content::ContextMenuParams& params) |
| 10 : MenuCategoryBase(render_frame_host, params) { |
| 11 } |
| 12 |
| 13 MenuCategoryPanel::~MenuCategoryPanel() { |
| 14 } |
| 15 |
| 16 bool MenuCategoryPanel::IsCategoryEnabled(int category) { |
| 17 // Note that on Mac right-clicking a link also makes it selected. |
| 18 switch (category) { |
| 19 case ITEM_CATEGORY_LINK: |
| 20 case ITEM_CATEGORY_EDITABLE: |
| 21 case ITEM_CATEGORY_COPY: |
| 22 return MenuCategoryBase::IsCategoryEnabled(category); |
| 23 case ITEM_CATEGORY_CURRENT_EXTENSION: |
| 24 return true; |
| 25 default: |
| 26 return false; |
| 27 } |
| 28 } |
| OLD | NEW |