#ifndef CHROME_BROWSER_RENDERER_CONTEXT_MENU_CONTEXT_MENU_CONTENT_TYPE_H_
#define CHROME_BROWSER_RENDERER_CONTEXT_MENU_CONTEXT_MENU_CONTENT_TYPE_H_
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
#include "content/public/common/context_menu_params.h"
#include "ui/base/models/simple_menu_model.h"
class Profile;
namespace content {
class RenderFrameHost;
class WebContents;
}
namespace extensions {
class Extension;
}
class ContextMenuContentType {
public:
virtual ~ContextMenuContentType();
enum ItemGroup {
ITEM_GROUP_CUSTOM,
ITEM_GROUP_PAGE,
ITEM_GROUP_FRAME,
ITEM_GROUP_LINK,
ITEM_GROUP_MEDIA_IMAGE,
ITEM_GROUP_SEARCHWEBFORIMAGE,
ITEM_GROUP_MEDIA_VIDEO,
ITEM_GROUP_MEDIA_AUDIO,
ITEM_GROUP_MEDIA_PLUGIN,
ITEM_GROUP_MEDIA_FILE,
ITEM_GROUP_EDITABLE,
ITEM_GROUP_COPY,
ITEM_GROUP_SEARCH_PROVIDER,
ITEM_GROUP_PRINT,
ITEM_GROUP_ALL_EXTENSION,
ITEM_GROUP_CURRENT_EXTENSION,
ITEM_GROUP_DEVELOPER,
ITEM_GROUP_DEVTOOLS_UNPACKED_EXT,
ITEM_GROUP_PRINT_PREVIEW
};
static ContextMenuContentType* Create(
content::WebContents* web_contents,
content::RenderFrameHost* render_frame_host,
const content::ContextMenuParams& params);
virtual bool SupportsGroup(int group);
protected:
ContextMenuContentType(content::RenderFrameHost* render_frame_host,
const content::ContextMenuParams& params,
bool supports_custom_items);
const content::ContextMenuParams& params() const { return params_; }
const extensions::Extension* GetExtension() const;
private:
friend class ContextMenuContentTypeFactory;
friend class ContextMenuContentTypeTest;
bool SupportsGroupInternal(int group);
const content::ContextMenuParams params_;
content::WebContents* source_web_contents_;
Profile* profile_;
const bool supports_custom_items_;
DISALLOW_COPY_AND_ASSIGN(ContextMenuContentType);
};
#endif