| Index: chrome/browser/tab_contents/menu_category_panel.cc
|
| diff --git a/chrome/browser/tab_contents/menu_category_panel.cc b/chrome/browser/tab_contents/menu_category_panel.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8a07f99a1b8f9f54abb19bbfbe689b0d4a14c5cb
|
| --- /dev/null
|
| +++ b/chrome/browser/tab_contents/menu_category_panel.cc
|
| @@ -0,0 +1,28 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/tab_contents/menu_category_panel.h"
|
| +
|
| +MenuCategoryPanel::MenuCategoryPanel(
|
| + content::RenderFrameHost* render_frame_host,
|
| + const content::ContextMenuParams& params)
|
| + : MenuCategoryBase(render_frame_host, params) {
|
| +}
|
| +
|
| +MenuCategoryPanel::~MenuCategoryPanel() {
|
| +}
|
| +
|
| +bool MenuCategoryPanel::IsCategoryEnabled(int category) {
|
| + // Note that on Mac right-clicking a link also makes it selected.
|
| + switch (category) {
|
| + case ITEM_CATEGORY_LINK:
|
| + case ITEM_CATEGORY_EDITABLE:
|
| + case ITEM_CATEGORY_COPY:
|
| + return MenuCategoryBase::IsCategoryEnabled(category);
|
| + case ITEM_CATEGORY_CURRENT_EXTENSION:
|
| + return true;
|
| + default:
|
| + return false;
|
| + }
|
| +}
|
|
|