1a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 2a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 3a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// found in the LICENSE file. 4a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 5a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#include "chrome/browser/renderer_context_menu/context_menu_content_type_extension_popup.h" 6a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 7a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)ContextMenuContentTypeExtensionPopup::ContextMenuContentTypeExtensionPopup( 8c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch content::WebContents* web_contents, 9a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) const content::ContextMenuParams& params) 10c5cede9ae108bb15f6b7a8aea21c7e1fefa2834cBen Murdoch : ContextMenuContentType(web_contents, params, false) { 11a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)} 12a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 13a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)ContextMenuContentTypeExtensionPopup::~ContextMenuContentTypeExtensionPopup() { 14a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)} 15a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 16a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)bool ContextMenuContentTypeExtensionPopup::SupportsGroup(int group) { 17a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) switch (group) { 18a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) case ITEM_GROUP_EDITABLE: 19a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) case ITEM_GROUP_COPY: 20a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) case ITEM_GROUP_SEARCH_PROVIDER: 21a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) case ITEM_GROUP_DEVELOPER: 22a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) return ContextMenuContentType::SupportsGroup(group); 23a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) case ITEM_GROUP_ALL_EXTENSION: 24a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // TODO(lazyboy): Check if it's OK to use 25a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) // ContextMenuContentType::SupportsGroup() in this case too. 26a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) return true; 27a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) default: 28a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) return false; 29a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) } 30a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)} 31