| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 } | 257 } |
| 258 | 258 |
| 259 // static | 259 // static |
| 260 void BackgroundModeManager::LaunchBackgroundApplication( | 260 void BackgroundModeManager::LaunchBackgroundApplication( |
| 261 Profile* profile, | 261 Profile* profile, |
| 262 const Extension* extension) { | 262 const Extension* extension) { |
| 263 ExtensionService* service = profile->GetExtensionService(); | 263 ExtensionService* service = profile->GetExtensionService(); |
| 264 extension_misc::LaunchContainer launch_container = | 264 extension_misc::LaunchContainer launch_container = |
| 265 service->extension_prefs()->GetLaunchContainer( | 265 service->extension_prefs()->GetLaunchContainer( |
| 266 extension, extensions::ExtensionPrefs::LAUNCH_REGULAR); | 266 extension, extensions::ExtensionPrefs::LAUNCH_REGULAR); |
| 267 application_launch::OpenApplication(profile, extension, launch_container, | 267 application_launch::OpenApplication(application_launch::LaunchParams( |
| 268 GURL(), NEW_FOREGROUND_TAB, NULL); | 268 profile, extension, launch_container, NEW_FOREGROUND_TAB)); |
| 269 } | 269 } |
| 270 | 270 |
| 271 bool BackgroundModeManager::IsBackgroundModeActiveForTest() { | 271 bool BackgroundModeManager::IsBackgroundModeActiveForTest() { |
| 272 return in_background_mode_; | 272 return in_background_mode_; |
| 273 } | 273 } |
| 274 | 274 |
| 275 int BackgroundModeManager::NumberOfBackgroundModeData() { | 275 int BackgroundModeManager::NumberOfBackgroundModeData() { |
| 276 return background_mode_data_.size(); | 276 return background_mode_data_.size(); |
| 277 } | 277 } |
| 278 | 278 |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 } | 766 } |
| 767 } | 767 } |
| 768 return profile_it; | 768 return profile_it; |
| 769 } | 769 } |
| 770 | 770 |
| 771 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { | 771 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { |
| 772 PrefService* service = g_browser_process->local_state(); | 772 PrefService* service = g_browser_process->local_state(); |
| 773 DCHECK(service); | 773 DCHECK(service); |
| 774 return service->GetBoolean(prefs::kBackgroundModeEnabled); | 774 return service->GetBoolean(prefs::kBackgroundModeEnabled); |
| 775 } | 775 } |
| OLD | NEW |