Commit 4a7ce7d3 authored by oshima@chromium.org's avatar oshima@chromium.org

Separate Toolkit specific impl

 ToolkitDelegateViews will be moved to components/renderer_contenxt_menu in a separate CL so that athena can use it.

BUG=397320

Review URL: https://codereview.chromium.org/417063004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287463 0039d316-1c4b-4281-b951-d872f2087c98
parent e7a653c3
...@@ -85,8 +85,6 @@ class PlatformAppContextMenu : public RenderViewContextMenu { ...@@ -85,8 +85,6 @@ class PlatformAppContextMenu : public RenderViewContextMenu {
ui::Accelerator* accelerator) OVERRIDE { ui::Accelerator* accelerator) OVERRIDE {
return false; return false;
} }
virtual void PlatformInit() OVERRIDE {}
virtual void PlatformCancel() OVERRIDE {}
}; };
// This class keeps track of tabs as they are added to the browser. It will be // This class keeps track of tabs as they are added to the browser. It will be
......
...@@ -459,11 +459,13 @@ RenderViewContextMenu::~RenderViewContextMenu() { ...@@ -459,11 +459,13 @@ RenderViewContextMenu::~RenderViewContextMenu() {
void RenderViewContextMenu::Init() { void RenderViewContextMenu::Init() {
InitMenu(); InitMenu();
PlatformInit(); if (toolkit_delegate_)
toolkit_delegate_->Init(&menu_model_);
} }
void RenderViewContextMenu::Cancel() { void RenderViewContextMenu::Cancel() {
PlatformCancel(); if (toolkit_delegate_)
toolkit_delegate_->Cancel();
} }
static bool ExtensionPatternMatch(const extensions::URLPatternSet& patterns, static bool ExtensionPatternMatch(const extensions::URLPatternSet& patterns,
...@@ -769,8 +771,12 @@ void RenderViewContextMenu::UpdateMenuItem(int command_id, ...@@ -769,8 +771,12 @@ void RenderViewContextMenu::UpdateMenuItem(int command_id,
bool enabled, bool enabled,
bool hidden, bool hidden,
const base::string16& label) { const base::string16& label) {
// This function needs platform-specific implementation. if (toolkit_delegate_) {
NOTIMPLEMENTED(); toolkit_delegate_->UpdateMenuItem(command_id,
enabled,
hidden,
label);
}
} }
RenderViewHost* RenderViewContextMenu::GetRenderViewHost() const { RenderViewHost* RenderViewContextMenu::GetRenderViewHost() const {
......
...@@ -49,6 +49,23 @@ struct WebPluginAction; ...@@ -49,6 +49,23 @@ struct WebPluginAction;
class RenderViewContextMenu : public ui::SimpleMenuModel::Delegate, class RenderViewContextMenu : public ui::SimpleMenuModel::Delegate,
public RenderViewContextMenuProxy { public RenderViewContextMenuProxy {
public: public:
// A delegate interface to communicate with the toolkit used by
// the embedder.
class ToolkitDelegate {
public:
virtual ~ToolkitDelegate() {}
// Initialize the toolkit's menu.
virtual void Init(ui::SimpleMenuModel* menu_model) = 0;
virtual void Cancel() = 0;
// Updates the actual menu items controlled by the toolkit.
virtual void UpdateMenuItem(int command_id,
bool enabled,
bool hidden,
const base::string16& title) = 0;
};
static const size_t kMaxSelectionTextLength; static const size_t kMaxSelectionTextLength;
// Convert a command ID so that it fits within the range for // Convert a command ID so that it fits within the range for
...@@ -97,12 +114,18 @@ class RenderViewContextMenu : public ui::SimpleMenuModel::Delegate, ...@@ -97,12 +114,18 @@ class RenderViewContextMenu : public ui::SimpleMenuModel::Delegate,
virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; virtual content::BrowserContext* GetBrowserContext() const OVERRIDE;
protected: protected:
void set_toolkit_delegate(scoped_ptr<ToolkitDelegate> delegate) {
toolkit_delegate_ = delegate.Pass();
}
ToolkitDelegate* toolkit_delegate() {
return toolkit_delegate_.get();
}
void InitMenu(); void InitMenu();
Profile* GetProfile(); Profile* GetProfile();
// Platform specific functions. // Platform specific functions.
virtual void PlatformInit() = 0;
virtual void PlatformCancel() = 0;
virtual bool GetAcceleratorForCommandId( virtual bool GetAcceleratorForCommandId(
int command_id, int command_id,
ui::Accelerator* accelerator) = 0; ui::Accelerator* accelerator) = 0;
...@@ -217,6 +240,8 @@ class RenderViewContextMenu : public ui::SimpleMenuModel::Delegate, ...@@ -217,6 +240,8 @@ class RenderViewContextMenu : public ui::SimpleMenuModel::Delegate,
scoped_ptr<ContextMenuContentType> content_type_; scoped_ptr<ContextMenuContentType> content_type_;
scoped_ptr<ToolkitDelegate> toolkit_delegate_;
DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu);
}; };
......
...@@ -31,10 +31,6 @@ TestRenderViewContextMenu* TestRenderViewContextMenu::Create( ...@@ -31,10 +31,6 @@ TestRenderViewContextMenu* TestRenderViewContextMenu::Create(
return menu; return menu;
} }
void TestRenderViewContextMenu::PlatformInit() {}
void TestRenderViewContextMenu::PlatformCancel() {}
bool TestRenderViewContextMenu::GetAcceleratorForCommandId( bool TestRenderViewContextMenu::GetAcceleratorForCommandId(
int command_id, int command_id,
ui::Accelerator* accelerator) { ui::Accelerator* accelerator) {
......
...@@ -35,8 +35,6 @@ class TestRenderViewContextMenu : public RenderViewContextMenu { ...@@ -35,8 +35,6 @@ class TestRenderViewContextMenu : public RenderViewContextMenu {
const GURL& frame_url); const GURL& frame_url);
// Implementation of pure virtuals in RenderViewContextMenu. // Implementation of pure virtuals in RenderViewContextMenu.
virtual void PlatformInit() OVERRIDE;
virtual void PlatformCancel() OVERRIDE;
virtual bool GetAcceleratorForCommandId( virtual bool GetAcceleratorForCommandId(
int command_id, int command_id,
ui::Accelerator* accelerator) OVERRIDE; ui::Accelerator* accelerator) OVERRIDE;
......
...@@ -27,26 +27,29 @@ class RenderViewContextMenuMac : public RenderViewContextMenu { ...@@ -27,26 +27,29 @@ class RenderViewContextMenuMac : public RenderViewContextMenu {
virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
// RenderViewContextMenuDelegate implementation.
virtual void UpdateMenuItem(int command_id,
bool enabled,
bool hidden,
const base::string16& title) OVERRIDE;
void Show(); void Show();
protected: protected:
// RenderViewContextMenu implementation. // RenderViewContextMenu implementation.
virtual void PlatformInit() OVERRIDE;
virtual void PlatformCancel() OVERRIDE;
virtual bool GetAcceleratorForCommandId( virtual bool GetAcceleratorForCommandId(
int command_id, int command_id,
ui::Accelerator* accelerator) OVERRIDE; ui::Accelerator* accelerator) OVERRIDE;
virtual void AppendPlatformEditableItems() OVERRIDE; virtual void AppendPlatformEditableItems() OVERRIDE;
private: private:
// Adds platform-specific items to the menu. friend class ToolkitDelegateMac;
void InitPlatformMenu();
// Adds menu to the platform's toolkit.
void InitToolkitMenu();
// Cancels the menu.
void CancelToolkitMenu();
// Updates the status and text of the specified context-menu item.
void UpdateToolkitMenuItem(int command_id,
bool enabled,
bool hidden,
const base::string16& title);
// Adds writing direction submenu. // Adds writing direction submenu.
void AppendBidiSubMenu(); void AppendBidiSubMenu();
......
...@@ -46,6 +46,35 @@ NSMenuItem* GetMenuItemByID(ui::MenuModel* model, ...@@ -46,6 +46,35 @@ NSMenuItem* GetMenuItemByID(ui::MenuModel* model,
} // namespace } // namespace
// OSX implemenation of the ToolkitDelegate.
// This simply (re)delegates calls to RVContextMenuMac because they do not
// have to be componentized.
class ToolkitDelegateMac : public RenderViewContextMenu::ToolkitDelegate {
public:
explicit ToolkitDelegateMac(RenderViewContextMenuMac* context_menu)
: context_menu_(context_menu) {}
virtual ~ToolkitDelegateMac() {}
private:
// ToolkitDelegate:
virtual void Init(ui::SimpleMenuModel* menu_model) OVERRIDE {
context_menu_->InitToolkitMenu();
}
virtual void Cancel() OVERRIDE{
context_menu_->CancelToolkitMenu();
}
virtual void UpdateMenuItem(int command_id,
bool enabled,
bool hidden,
const base::string16& title) OVERRIDE {
context_menu_->UpdateToolkitMenuItem(
command_id, enabled, hidden, title);
}
RenderViewContextMenuMac* context_menu_;
DISALLOW_COPY_AND_ASSIGN(ToolkitDelegateMac);
};
// Obj-C bridge class that is the target of all items in the context menu. // Obj-C bridge class that is the target of all items in the context menu.
// Relies on the tag being set to the command id. // Relies on the tag being set to the command id.
...@@ -57,15 +86,13 @@ RenderViewContextMenuMac::RenderViewContextMenuMac( ...@@ -57,15 +86,13 @@ RenderViewContextMenuMac::RenderViewContextMenuMac(
speech_submenu_model_(this), speech_submenu_model_(this),
bidi_submenu_model_(this), bidi_submenu_model_(this),
parent_view_(parent_view) { parent_view_(parent_view) {
scoped_ptr<ToolkitDelegate> delegate(new ToolkitDelegateMac(this));
set_toolkit_delegate(delegate.Pass());
} }
RenderViewContextMenuMac::~RenderViewContextMenuMac() { RenderViewContextMenuMac::~RenderViewContextMenuMac() {
} }
void RenderViewContextMenuMac::PlatformInit() {
InitPlatformMenu();
}
void RenderViewContextMenuMac::Show() { void RenderViewContextMenuMac::Show() {
menu_controller_.reset( menu_controller_.reset(
[[MenuController alloc] initWithModel:&menu_model_ [[MenuController alloc] initWithModel:&menu_model_
...@@ -108,10 +135,6 @@ void RenderViewContextMenuMac::Show() { ...@@ -108,10 +135,6 @@ void RenderViewContextMenuMac::Show() {
} }
} }
void RenderViewContextMenuMac::PlatformCancel() {
[menu_controller_ cancel];
}
void RenderViewContextMenuMac::ExecuteCommand(int command_id, int event_flags) { void RenderViewContextMenuMac::ExecuteCommand(int command_id, int event_flags) {
switch (command_id) { switch (command_id) {
case IDC_CONTENT_CONTEXT_LOOK_UP_IN_DICTIONARY: case IDC_CONTENT_CONTEXT_LOOK_UP_IN_DICTIONARY:
...@@ -210,7 +233,7 @@ void RenderViewContextMenuMac::AppendPlatformEditableItems() { ...@@ -210,7 +233,7 @@ void RenderViewContextMenuMac::AppendPlatformEditableItems() {
AppendBidiSubMenu(); AppendBidiSubMenu();
} }
void RenderViewContextMenuMac::InitPlatformMenu() { void RenderViewContextMenuMac::InitToolkitMenu() {
bool has_selection = !params_.selection_text.empty(); bool has_selection = !params_.selection_text.empty();
if (has_selection) { if (has_selection) {
...@@ -235,6 +258,27 @@ void RenderViewContextMenuMac::InitPlatformMenu() { ...@@ -235,6 +258,27 @@ void RenderViewContextMenuMac::InitPlatformMenu() {
} }
} }
void RenderViewContextMenuMac::CancelToolkitMenu() {
[menu_controller_ cancel];
}
void RenderViewContextMenuMac::UpdateToolkitMenuItem(
int command_id,
bool enabled,
bool hidden,
const base::string16& title) {
NSMenuItem* item = GetMenuItemByID(&menu_model_, [menu_controller_ menu],
command_id);
if (!item)
return;
// Update the returned NSMenuItem directly so we can update it immediately.
[item setEnabled:enabled];
[item setTitle:base::SysUTF16ToNSString(title)];
[item setHidden:hidden];
[[item menu] itemChanged:item];
}
void RenderViewContextMenuMac::AppendBidiSubMenu() { void RenderViewContextMenuMac::AppendBidiSubMenu() {
bidi_submenu_model_.AddCheckItem(IDC_WRITING_DIRECTION_DEFAULT, bidi_submenu_model_.AddCheckItem(IDC_WRITING_DIRECTION_DEFAULT,
l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_WRITING_DIRECTION_DEFAULT)); l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_WRITING_DIRECTION_DEFAULT));
...@@ -266,19 +310,3 @@ void RenderViewContextMenuMac::StopSpeaking() { ...@@ -266,19 +310,3 @@ void RenderViewContextMenuMac::StopSpeaking() {
if (view) if (view)
view->StopSpeaking(); view->StopSpeaking();
} }
void RenderViewContextMenuMac::UpdateMenuItem(int command_id,
bool enabled,
bool hidden,
const base::string16& title) {
NSMenuItem* item = GetMenuItemByID(&menu_model_, [menu_controller_ menu],
command_id);
if (!item)
return;
// Update the returned NSMenuItem directly so we can update it immediately.
[item setEnabled:enabled];
[item setTitle:SysUTF16ToNSString(title)];
[item setHidden:hidden];
[[item menu] itemChanged:item];
}
...@@ -130,8 +130,6 @@ class PanelContextMenu : public RenderViewContextMenu { ...@@ -130,8 +130,6 @@ class PanelContextMenu : public RenderViewContextMenu {
ui::Accelerator* accelerator) OVERRIDE { ui::Accelerator* accelerator) OVERRIDE {
return false; return false;
} }
virtual void PlatformInit() OVERRIDE {}
virtual void PlatformCancel() OVERRIDE {}
}; };
IN_PROC_BROWSER_TEST_F(PanelExtensionBrowserTest, BasicContextMenu) { IN_PROC_BROWSER_TEST_F(PanelExtensionBrowserTest, BasicContextMenu) {
......
...@@ -5,10 +5,9 @@ ...@@ -5,10 +5,9 @@
#include "chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.h" #include "chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/string16.h"
#include "chrome/app/chrome_command_ids.h" #include "chrome/app/chrome_command_ids.h"
#include "content/public/browser/render_view_host.h" #include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h" #include "grit/generated_resources.h"
#include "ui/base/accelerators/accelerator.h" #include "ui/base/accelerators/accelerator.h"
...@@ -21,6 +20,73 @@ ...@@ -21,6 +20,73 @@
using content::WebContents; using content::WebContents;
namespace {
// Views implementation of the ToolkitDelegate.
// TODO(oshima): Move this to components/renderer_context_menu/
class ToolkitDelegateViews : public RenderViewContextMenu::ToolkitDelegate {
public:
ToolkitDelegateViews() : menu_view_(NULL) {}
virtual ~ToolkitDelegateViews() {}
void RunMenuAt(views::Widget* parent,
const gfx::Point& point,
ui::MenuSourceType type) {
views::MenuAnchorPosition anchor_position =
(type == ui::MENU_SOURCE_TOUCH ||
type == ui::MENU_SOURCE_TOUCH_EDIT_MENU)
? views::MENU_ANCHOR_BOTTOMCENTER
: views::MENU_ANCHOR_TOPLEFT;
views::MenuRunner::RunResult result ALLOW_UNUSED = menu_runner_->RunMenuAt(
parent, NULL, gfx::Rect(point, gfx::Size()), anchor_position, type);
}
private:
// ToolkitDelegate:
virtual void Init(ui::SimpleMenuModel* menu_model) OVERRIDE {
menu_adapter_.reset(new views::MenuModelAdapter(menu_model));
menu_view_ = menu_adapter_->CreateMenu();
menu_runner_.reset(new views::MenuRunner(
menu_view_,
views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU));
}
virtual void Cancel() OVERRIDE{
DCHECK(menu_runner_.get());
menu_runner_->Cancel();
}
virtual void UpdateMenuItem(int command_id,
bool enabled,
bool hidden,
const base::string16& title) OVERRIDE {
views::MenuItemView* item = menu_view_->GetMenuItemByID(command_id);
if (!item)
return;
item->SetEnabled(enabled);
item->SetTitle(title);
item->SetVisible(!hidden);
views::MenuItemView* parent = item->GetParentMenuItem();
if (!parent)
return;
parent->ChildrenChanged();
}
scoped_ptr<views::MenuModelAdapter> menu_adapter_;
scoped_ptr<views::MenuRunner> menu_runner_;
// Weak. Owned by menu_runner_;
views::MenuItemView* menu_view_;
DISALLOW_COPY_AND_ASSIGN(ToolkitDelegateViews);
};
} // namespace
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// RenderViewContextMenuViews, public: // RenderViewContextMenuViews, public:
...@@ -28,8 +94,9 @@ RenderViewContextMenuViews::RenderViewContextMenuViews( ...@@ -28,8 +94,9 @@ RenderViewContextMenuViews::RenderViewContextMenuViews(
content::RenderFrameHost* render_frame_host, content::RenderFrameHost* render_frame_host,
const content::ContextMenuParams& params) const content::ContextMenuParams& params)
: RenderViewContextMenu(render_frame_host, params), : RenderViewContextMenu(render_frame_host, params),
bidi_submenu_model_(this), bidi_submenu_model_(this) {
menu_view_(NULL) { scoped_ptr<ToolkitDelegate> delegate(new ToolkitDelegateViews);
set_toolkit_delegate(delegate.Pass());
} }
RenderViewContextMenuViews::~RenderViewContextMenuViews() { RenderViewContextMenuViews::~RenderViewContextMenuViews() {
...@@ -45,33 +112,13 @@ RenderViewContextMenuViews* RenderViewContextMenuViews::Create( ...@@ -45,33 +112,13 @@ RenderViewContextMenuViews* RenderViewContextMenuViews::Create(
void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent, void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent,
const gfx::Point& point, const gfx::Point& point,
ui::MenuSourceType type) { ui::MenuSourceType type) {
views::MenuAnchorPosition anchor_position = static_cast<ToolkitDelegateViews*>(toolkit_delegate())->
(type == ui::MENU_SOURCE_TOUCH || type == ui::MENU_SOURCE_TOUCH_EDIT_MENU) RunMenuAt(parent, point, type);
? views::MENU_ANCHOR_BOTTOMCENTER
: views::MENU_ANCHOR_TOPLEFT;
if (menu_runner_->RunMenuAt(
parent, NULL, gfx::Rect(point, gfx::Size()), anchor_position, type) ==
views::MenuRunner::MENU_DELETED)
return;
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// RenderViewContextMenuViews, protected: // RenderViewContextMenuViews, protected:
void RenderViewContextMenuViews::PlatformInit() {
menu_adapter_.reset(new views::MenuModelAdapter(&menu_model_));
menu_view_ = menu_adapter_->CreateMenu();
menu_runner_.reset(new views::MenuRunner(
menu_view_,
views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU));
}
void RenderViewContextMenuViews::PlatformCancel() {
DCHECK(menu_runner_.get());
menu_runner_->Cancel();
}
bool RenderViewContextMenuViews::GetAcceleratorForCommandId( bool RenderViewContextMenuViews::GetAcceleratorForCommandId(
int command_id, int command_id,
ui::Accelerator* accel) { ui::Accelerator* accel) {
...@@ -190,22 +237,3 @@ void RenderViewContextMenuViews::AppendPlatformEditableItems() { ...@@ -190,22 +237,3 @@ void RenderViewContextMenuViews::AppendPlatformEditableItems() {
l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_WRITING_DIRECTION_MENU), l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_WRITING_DIRECTION_MENU),
&bidi_submenu_model_); &bidi_submenu_model_);
} }
void RenderViewContextMenuViews::UpdateMenuItem(int command_id,
bool enabled,
bool hidden,
const base::string16& title) {
views::MenuItemView* item = menu_view_->GetMenuItemByID(command_id);
if (!item)
return;
item->SetEnabled(enabled);
item->SetTitle(title);
item->SetVisible(!hidden);
views::MenuItemView* parent = item->GetParentMenuItem();
if (!parent)
return;
parent->ChildrenChanged();
}
...@@ -5,9 +5,6 @@ ...@@ -5,9 +5,6 @@
#ifndef CHROME_BROWSER_UI_VIEWS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_VIEWS_H_ #ifndef CHROME_BROWSER_UI_VIEWS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_VIEWS_H_
#define CHROME_BROWSER_UI_VIEWS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_VIEWS_H_ #define CHROME_BROWSER_UI_VIEWS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_VIEWS_H_
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/strings/string16.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu.h" #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
#include "ui/base/ui_base_types.h" #include "ui/base/ui_base_types.h"
...@@ -16,9 +13,6 @@ class Point; ...@@ -16,9 +13,6 @@ class Point;
} }
namespace views { namespace views {
class MenuItemView;
class MenuModelAdapter;
class MenuRunner;
class Widget; class Widget;
} }
...@@ -35,12 +29,6 @@ class RenderViewContextMenuViews : public RenderViewContextMenu { ...@@ -35,12 +29,6 @@ class RenderViewContextMenuViews : public RenderViewContextMenu {
const gfx::Point& point, const gfx::Point& point,
ui::MenuSourceType type); ui::MenuSourceType type);
// RenderViewContextMenuDelegate implementation.
virtual void UpdateMenuItem(int command_id,
bool enabled,
bool hidden,
const base::string16& title) OVERRIDE;
virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
protected: protected:
...@@ -48,8 +36,6 @@ class RenderViewContextMenuViews : public RenderViewContextMenu { ...@@ -48,8 +36,6 @@ class RenderViewContextMenuViews : public RenderViewContextMenu {
const content::ContextMenuParams& params); const content::ContextMenuParams& params);
// RenderViewContextMenu implementation. // RenderViewContextMenu implementation.
virtual void PlatformInit() OVERRIDE;
virtual void PlatformCancel() OVERRIDE;
virtual bool GetAcceleratorForCommandId( virtual bool GetAcceleratorForCommandId(
int command_id, int command_id,
ui::Accelerator* accelerator) OVERRIDE; ui::Accelerator* accelerator) OVERRIDE;
...@@ -61,13 +47,6 @@ class RenderViewContextMenuViews : public RenderViewContextMenu { ...@@ -61,13 +47,6 @@ class RenderViewContextMenuViews : public RenderViewContextMenu {
// Model for the BiDi input submenu. // Model for the BiDi input submenu.
ui::SimpleMenuModel bidi_submenu_model_; ui::SimpleMenuModel bidi_submenu_model_;
scoped_ptr<views::MenuModelAdapter> menu_adapter_;
scoped_ptr<views::MenuRunner> menu_runner_;
// Weak. Owned by menu_runner_;
views::MenuItemView* menu_view_;
DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuViews); DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuViews);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment