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/renderer_context_menu/context_menu_content_type_extension_popup.h"
6
7ContextMenuContentTypeExtensionPopup::ContextMenuContentTypeExtensionPopup(
8    content::WebContents* web_contents,
9    const content::ContextMenuParams& params)
10    : ContextMenuContentType(web_contents, params, false) {
11}
12
13ContextMenuContentTypeExtensionPopup::~ContextMenuContentTypeExtensionPopup() {
14}
15
16bool ContextMenuContentTypeExtensionPopup::SupportsGroup(int group) {
17  switch (group) {
18    case ITEM_GROUP_EDITABLE:
19    case ITEM_GROUP_COPY:
20    case ITEM_GROUP_SEARCH_PROVIDER:
21    case ITEM_GROUP_DEVELOPER:
22      return ContextMenuContentType::SupportsGroup(group);
23    case ITEM_GROUP_ALL_EXTENSION:
24      // TODO(lazyboy): Check if it's OK to use
25      // ContextMenuContentType::SupportsGroup() in this case too.
26      return true;
27    default:
28      return false;
29  }
30}
31