| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 260 |
| 261 // static | 261 // static |
| 262 void BackgroundModeManager::LaunchBackgroundApplication( | 262 void BackgroundModeManager::LaunchBackgroundApplication( |
| 263 Profile* profile, | 263 Profile* profile, |
| 264 const Extension* extension) { | 264 const Extension* extension) { |
| 265 ExtensionService* service = profile->GetExtensionService(); | 265 ExtensionService* service = profile->GetExtensionService(); |
| 266 extension_misc::LaunchContainer launch_container = | 266 extension_misc::LaunchContainer launch_container = |
| 267 service->extension_prefs()->GetLaunchContainer( | 267 service->extension_prefs()->GetLaunchContainer( |
| 268 extension, ExtensionPrefs::LAUNCH_REGULAR); | 268 extension, ExtensionPrefs::LAUNCH_REGULAR); |
| 269 application_launch::OpenApplication(profile, extension, launch_container, | 269 application_launch::OpenApplication(profile, extension, launch_container, |
| 270 GURL(), NEW_FOREGROUND_TAB); | 270 GURL(), NEW_FOREGROUND_TAB, NULL); |
| 271 } | 271 } |
| 272 | 272 |
| 273 bool BackgroundModeManager::IsBackgroundModeActiveForTest() { | 273 bool BackgroundModeManager::IsBackgroundModeActiveForTest() { |
| 274 return in_background_mode_; | 274 return in_background_mode_; |
| 275 } | 275 } |
| 276 | 276 |
| 277 int BackgroundModeManager::NumberOfBackgroundModeData() { | 277 int BackgroundModeManager::NumberOfBackgroundModeData() { |
| 278 return background_mode_data_.size(); | 278 return background_mode_data_.size(); |
| 279 } | 279 } |
| 280 | 280 |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 } | 768 } |
| 769 } | 769 } |
| 770 return profile_it; | 770 return profile_it; |
| 771 } | 771 } |
| 772 | 772 |
| 773 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { | 773 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { |
| 774 PrefService* service = g_browser_process->local_state(); | 774 PrefService* service = g_browser_process->local_state(); |
| 775 DCHECK(service); | 775 DCHECK(service); |
| 776 return service->GetBoolean(prefs::kBackgroundModeEnabled); | 776 return service->GetBoolean(prefs::kBackgroundModeEnabled); |
| 777 } | 777 } |
| OLD | NEW |