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

Unified Diff: chrome/browser/chromeos/choose_mobile_network_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
Index: chrome/browser/chromeos/choose_mobile_network_dialog.cc
diff --git a/chrome/browser/chromeos/choose_mobile_network_dialog.cc b/chrome/browser/chromeos/choose_mobile_network_dialog.cc
index fe369eb5d973b6bb1e6c847a2c8eefa8495dbd72..7bd894f01ccdaeb3ae1419e038e5d54c449b387a 100644
--- a/chrome/browser/chromeos/choose_mobile_network_dialog.cc
+++ b/chrome/browser/chromeos/choose_mobile_network_dialog.cc
@@ -18,20 +18,6 @@ namespace {
const int kDefaultWidth = 350;
const int kDefaultHeight = 225;
-// 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 {
@@ -46,8 +32,8 @@ void ChooseMobileNetworkDialog::ShowDialog(gfx::NativeWindow owning_window) {
} else {
profile = ProfileManager::GetDefaultProfile();
}
- HtmlDialogView* html_view = new HtmlDialogWithoutContextMenuView(
- profile, new ChooseMobileNetworkDialog);
+ HtmlDialogView* html_view =
+ new HtmlDialogView(profile, new ChooseMobileNetworkDialog);
html_view->InitDialog();
chromeos::BubbleWindow::Create(owning_window,
gfx::Rect(),
@@ -97,4 +83,10 @@ bool ChooseMobileNetworkDialog::ShouldShowDialogTitle() const {
return false;
}
+bool ChooseMobileNetworkDialog::HandleContextMenu(
+ const ContextMenuParams& params) {
+ // Disable context menu.
+ return true;
+}
+
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/choose_mobile_network_dialog.h ('k') | chrome/browser/chromeos/login/login_html_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698