diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-11 22:37:45 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-11 22:37:45 +0000 |
commit | 579e319b672d1e703249fa9f236c6b9dbb7909b5 (patch) | |
tree | d3823bf4be2c4180bd7f174405ecece4a62cc78a /chrome/browser/notifications | |
parent | 7f66520ba5dd150bbdbaad746539a4206d483dc1 (diff) | |
download | chromium_src-579e319b672d1e703249fa9f236c6b9dbb7909b5.zip chromium_src-579e319b672d1e703249fa9f236c6b9dbb7909b5.tar.gz chromium_src-579e319b672d1e703249fa9f236c6b9dbb7909b5.tar.bz2 |
Options: Remove the GTK and Views native options code.
BUG=75320
TEST=none
Review URL: http://codereview.chromium.org/6670011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77878 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications')
-rw-r--r-- | chrome/browser/notifications/notification_options_menu_model.cc | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/chrome/browser/notifications/notification_options_menu_model.cc b/chrome/browser/notifications/notification_options_menu_model.cc index c524643..b04b5a9 100644 --- a/chrome/browser/notifications/notification_options_menu_model.cc +++ b/chrome/browser/notifications/notification_options_menu_model.cc @@ -11,6 +11,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/notifications/balloon_collection.h" +#include "chrome/browser/notifications/balloon_host.h" #include "chrome/browser/notifications/desktop_notification_service.h" #include "chrome/browser/notifications/notification.h" #include "chrome/browser/notifications/notification_ui_manager.h" @@ -20,13 +21,10 @@ #include "chrome/common/content_settings_types.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/url_constants.h" +#include "content/browser/tab_contents/tab_contents.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" -#if defined(OS_WIN) -#include "chrome/browser/ui/views/browser_dialogs.h" -#endif // OS_WIN - // Menu commands const int kTogglePermissionCommand = 0; const int kToggleExtensionCommand = 1; @@ -154,8 +152,8 @@ bool NotificationOptionsMenuModel::IsItemForCommandIdDynamic(int command_id) string16 NotificationOptionsMenuModel::GetLabelForCommandId(int command_id) const { - // TODO(tfarina,johnnyg): Removed this code if we decide to close - // notifications after permissions are revoked. + // TODO(tfarina,johnnyg): Remove this code if we decide to close notifications + // after permissions are revoked. if (command_id == kTogglePermissionCommand || command_id == kToggleExtensionCommand) { const Notification& notification = balloon_->notification(); @@ -236,21 +234,10 @@ void NotificationOptionsMenuModel::ExecuteCommand(int command_id) { break; } case kOpenContentSettingsCommand: { - Browser* browser = BrowserList::GetLastActive(); - if (browser) { - static_cast<TabContentsDelegate*>(browser)->ShowContentSettingsWindow( - CONTENT_SETTINGS_TYPE_NOTIFICATIONS); - } else { -#if defined(OS_WIN) - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kChromeFrame)) { - // We may not have a browser if this is a chrome frame process. - browser::ShowContentSettingsWindow(NULL, - CONTENT_SETTINGS_TYPE_DEFAULT, - balloon_->profile()); - } -#endif // OS_WIN - } + TabContents* tab_contents = + balloon_->view()->GetHost()->associated_tab_contents(); + tab_contents->delegate()->ShowContentSettingsPage( + CONTENT_SETTINGS_TYPE_NOTIFICATIONS); break; } default: |