OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/notifications/notification_options_menu_model.h" | 5 #include "chrome/browser/notifications/notification_options_menu_model.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 extension_service->EnableExtension(id); | 259 extension_service->EnableExtension(id); |
260 } | 260 } |
261 break; | 261 break; |
262 } | 262 } |
263 case kOpenContentSettingsCommand: { | 263 case kOpenContentSettingsCommand: { |
264 chrome::HostDesktopType active_desktop = chrome::GetActiveDesktop(); | 264 chrome::HostDesktopType active_desktop = chrome::GetActiveDesktop(); |
265 Browser* browser = chrome::FindLastActiveWithProfile( | 265 Browser* browser = chrome::FindLastActiveWithProfile( |
266 balloon_->profile(), active_desktop); | 266 balloon_->profile(), active_desktop); |
267 if (!browser) { | 267 if (!browser) { |
268 // It is possible that there is no browser window (e.g. when there are | 268 // It is possible that there is no browser window (e.g. when there are |
269 // background pages, or for a chrome frame process on windows). | 269 // background pages). |
270 browser = new Browser(Browser::CreateParams(balloon_->profile(), | 270 browser = new Browser(Browser::CreateParams(balloon_->profile(), |
271 active_desktop)); | 271 active_desktop)); |
272 } | 272 } |
273 chrome::ShowContentSettings(browser, CONTENT_SETTINGS_TYPE_NOTIFICATIONS); | 273 chrome::ShowContentSettings(browser, CONTENT_SETTINGS_TYPE_NOTIFICATIONS); |
274 break; | 274 break; |
275 } | 275 } |
276 default: | 276 default: |
277 NOTREACHED(); | 277 NOTREACHED(); |
278 break; | 278 break; |
279 } | 279 } |
280 } | 280 } |
OLD | NEW |