OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 } | 235 } |
236 | 236 |
237 // static | 237 // static |
238 void BackgroundModeManager::LaunchBackgroundApplication( | 238 void BackgroundModeManager::LaunchBackgroundApplication( |
239 Profile* profile, | 239 Profile* profile, |
240 const Extension* extension) { | 240 const Extension* extension) { |
241 ExtensionService* service = profile->GetExtensionService(); | 241 ExtensionService* service = profile->GetExtensionService(); |
242 extension_misc::LaunchContainer launch_container = | 242 extension_misc::LaunchContainer launch_container = |
243 service->extension_prefs()->GetLaunchContainer( | 243 service->extension_prefs()->GetLaunchContainer( |
244 extension, ExtensionPrefs::LAUNCH_REGULAR); | 244 extension, ExtensionPrefs::LAUNCH_REGULAR); |
245 Browser::OpenApplication(profile, extension, launch_container, | 245 Browser::OpenApplication(profile, extension, launch_container, GURL(), |
246 NEW_FOREGROUND_TAB); | 246 NEW_FOREGROUND_TAB); |
247 } | 247 } |
248 | 248 |
249 /////////////////////////////////////////////////////////////////////////////// | 249 /////////////////////////////////////////////////////////////////////////////// |
250 // BackgroundModeManager, content::NotificationObserver overrides | 250 // BackgroundModeManager, content::NotificationObserver overrides |
251 void BackgroundModeManager::Observe( | 251 void BackgroundModeManager::Observe( |
252 int type, | 252 int type, |
253 const content::NotificationSource& source, | 253 const content::NotificationSource& source, |
254 const content::NotificationDetails& details) { | 254 const content::NotificationDetails& details) { |
255 switch (type) { | 255 switch (type) { |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 command_line->HasSwitch(switches::kDisableExtensions); | 650 command_line->HasSwitch(switches::kDisableExtensions); |
651 return background_mode_disabled; | 651 return background_mode_disabled; |
652 #endif | 652 #endif |
653 } | 653 } |
654 | 654 |
655 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { | 655 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { |
656 PrefService* service = g_browser_process->local_state(); | 656 PrefService* service = g_browser_process->local_state(); |
657 DCHECK(service); | 657 DCHECK(service); |
658 return service->GetBoolean(prefs::kBackgroundModeEnabled); | 658 return service->GetBoolean(prefs::kBackgroundModeEnabled); |
659 } | 659 } |
OLD | NEW |