| Index: components/renderer_context_menu/render_view_context_menu_base.h
|
| diff --git a/components/renderer_context_menu/render_view_context_menu_base.h b/components/renderer_context_menu/render_view_context_menu_base.h
|
| index 779e8bbd9297aa178665649f6a32371860e6573d..cfebc3477f64696a18eb0e8265411978c001bf72 100644
|
| --- a/components/renderer_context_menu/render_view_context_menu_base.h
|
| +++ b/components/renderer_context_menu/render_view_context_menu_base.h
|
| @@ -50,7 +50,8 @@ class RenderViewContextMenuBase : public ui::SimpleMenuModel::Delegate,
|
| virtual void UpdateMenuItem(int command_id,
|
| bool enabled,
|
| bool hidden,
|
| - const base::string16& title) = 0;
|
| + const base::string16& title,
|
| + gfx::Image* icon) = 0;
|
| };
|
|
|
| static const size_t kMaxSelectionTextLength;
|
| @@ -103,7 +104,8 @@ class RenderViewContextMenuBase : public ui::SimpleMenuModel::Delegate,
|
| void UpdateMenuItem(int command_id,
|
| bool enabled,
|
| bool hidden,
|
| - const base::string16& title) override;
|
| + const base::string16& title,
|
| + gfx::Image* icon) override;
|
| content::RenderViewHost* GetRenderViewHost() const override;
|
| content::WebContents* GetWebContents() const override;
|
| content::BrowserContext* GetBrowserContext() const override;
|
| @@ -181,11 +183,24 @@ class RenderViewContextMenuBase : public ui::SimpleMenuModel::Delegate,
|
|
|
| private:
|
| bool AppendCustomItems();
|
| -
|
| + void AddCustomItemsToMenu(const std::vector<content::MenuItem>& items,
|
| + size_t depth,
|
| + size_t* total_items,
|
| + ui::SimpleMenuModel::Delegate* delegate,
|
| + ui::SimpleMenuModel* menu_model);
|
| + void OnIconDownloaded(int id,
|
| + int http_status_code,
|
| + const GURL& image_url,
|
| + const std::vector<SkBitmap>& bitmaps,
|
| + const std::vector<gfx::Size>& original_bitmap_sizes);
|
| +
|
| + typedef std::map<int, content::MenuItem> IconMap;
|
| + IconMap icon_map_;
|
| // The RenderFrameHost's IDs.
|
| int render_process_id_;
|
|
|
| scoped_ptr<ToolkitDelegate> toolkit_delegate_;
|
| + base::WeakPtrFactory<RenderViewContextMenuBase> weak_ptr_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase);
|
| };
|
|
|