| Index: chrome/browser/chromeos/sim_dialog_delegate.cc
|
| diff --git a/chrome/browser/chromeos/sim_dialog_delegate.cc b/chrome/browser/chromeos/sim_dialog_delegate.cc
|
| index f1ecabae274e8132c343817e416cd8681ad32286..b9ea14eb917476860cb45529a4576febf0747989 100644
|
| --- a/chrome/browser/chromeos/sim_dialog_delegate.cc
|
| +++ b/chrome/browser/chromeos/sim_dialog_delegate.cc
|
| @@ -36,27 +36,13 @@ const char kSimDialogChangePinMode[] = "change-pin";
|
| const char kSimDialogSetLockOnMode[] = "set-lock-on";
|
| const char kSimDialogSetLockOffMode[] = "set-lock-off";
|
|
|
| -// Custom HtmlDialogView with disabled context menu.
|
| -class HtmlDialogWithoutContextMenuView : public HtmlDialogView {
|
| - public:
|
| - HtmlDialogWithoutContextMenuView(Profile* profile,
|
| - HtmlDialogUIDelegate* delegate)
|
| - : HtmlDialogView(profile, delegate) {}
|
| -
|
| - // TabContentsDelegate implementation.
|
| - bool HandleContextMenu(const ContextMenuParams& params) {
|
| - // Disable context menu.
|
| - return true;
|
| - }
|
| -};
|
| -
|
| } // namespace
|
|
|
| namespace chromeos {
|
|
|
| // static
|
| void SimDialogDelegate::ShowDialog(gfx::NativeWindow owning_window,
|
| - SimDialogMode mode) {
|
| + SimDialogMode mode) {
|
| Profile* profile;
|
| if (UserManager::Get()->user_is_logged_in()) {
|
| Browser* browser = BrowserList::GetLastActive();
|
| @@ -65,8 +51,8 @@ void SimDialogDelegate::ShowDialog(gfx::NativeWindow owning_window,
|
| } else {
|
| profile = ProfileManager::GetDefaultProfile();
|
| }
|
| - HtmlDialogView* html_view = new HtmlDialogWithoutContextMenuView(
|
| - profile, new SimDialogDelegate(mode));
|
| + HtmlDialogView* html_view =
|
| + new HtmlDialogView(profile, new SimDialogDelegate(mode));
|
| html_view->InitDialog();
|
| chromeos::BubbleWindow::Create(owning_window,
|
| gfx::Rect(),
|
| @@ -136,4 +122,9 @@ bool SimDialogDelegate::ShouldShowDialogTitle() const {
|
| return false;
|
| }
|
|
|
| +bool SimDialogDelegate::HandleContextMenu(const ContextMenuParams& params) {
|
| + // Disable context menu.
|
| + return true;
|
| +}
|
| +
|
| } // namespace chromeos
|
|
|