Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1967)

Unified Diff: chrome/browser/chromeos/login/login_html_dialog.cc

Issue 7124001: [cleanup] Use Delegate method to control context menu and eliminate HtmlDialogWithoutContextMenuView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/login_html_dialog.h ('k') | chrome/browser/chromeos/sim_dialog_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/login_html_dialog.cc
diff --git a/chrome/browser/chromeos/login/login_html_dialog.cc b/chrome/browser/chromeos/login/login_html_dialog.cc
index 7f0b170aa4aff685c5759f84eccc09541b265d51..b0f4a8efa9babfe25d15aecb55e7f557f516a432 100644
--- a/chrome/browser/chromeos/login/login_html_dialog.cc
+++ b/chrome/browser/chromeos/login/login_html_dialog.cc
@@ -22,21 +22,6 @@ namespace {
const double kDefaultWidthRatio = 0.6;
const double kDefaultHeightRatio = 0.6;
-// Custom HtmlDialogView with disabled context menu.
-class HtmlDialogWithoutContextMenuView : public HtmlDialogView {
- public:
- HtmlDialogWithoutContextMenuView(Profile* profile,
- HtmlDialogUIDelegate* delegate)
- : HtmlDialogView(profile, delegate) {}
- virtual ~HtmlDialogWithoutContextMenuView() {}
-
- // TabContentsDelegate implementation.
- bool HandleContextMenu(const ContextMenuParams& params) {
- // Disable context menu.
- return true;
- }
-};
-
} // namespace
///////////////////////////////////////////////////////////////////////////////
@@ -64,9 +49,8 @@ LoginHtmlDialog::~LoginHtmlDialog() {
}
void LoginHtmlDialog::Show() {
- HtmlDialogWithoutContextMenuView* html_view =
- new HtmlDialogWithoutContextMenuView(ProfileManager::GetDefaultProfile(),
- this);
+ HtmlDialogView* html_view =
+ new HtmlDialogView(ProfileManager::GetDefaultProfile(), this);
if (style_ & STYLE_BUBBLE) {
views::Window* bubble_window = BubbleWindow::Create(
parent_window_, gfx::Rect(),
@@ -139,6 +123,11 @@ bool LoginHtmlDialog::ShouldShowDialogTitle() const {
return true;
}
+bool LoginHtmlDialog::HandleContextMenu(const ContextMenuParams& params) {
+ // Disable context menu.
+ return true;
+}
+
void LoginHtmlDialog::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
« no previous file with comments | « chrome/browser/chromeos/login/login_html_dialog.h ('k') | chrome/browser/chromeos/sim_dialog_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698