Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: chrome/browser/background/background_mode_manager.cc

Issue 1807743003: Remove HostDesktopType from AppLaunchParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp-parent
Patch Set: cros Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/background/background_mode_manager.h" 5 #include "chrome/browser/background/background_mode_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 // If we're adding a new profile and running in multi-profile mode, this new 388 // If we're adding a new profile and running in multi-profile mode, this new
389 // profile should be added to the status icon if one currently exists. 389 // profile should be added to the status icon if one currently exists.
390 if (in_background_mode_ && status_icon_) 390 if (in_background_mode_ && status_icon_)
391 UpdateStatusTrayIconContextMenu(); 391 UpdateStatusTrayIconContextMenu();
392 } 392 }
393 393
394 // static 394 // static
395 void BackgroundModeManager::LaunchBackgroundApplication( 395 void BackgroundModeManager::LaunchBackgroundApplication(
396 Profile* profile, 396 Profile* profile,
397 const Extension* extension) { 397 const Extension* extension) {
398 OpenApplication(AppLaunchParams(profile, extension, NEW_FOREGROUND_TAB, 398 OpenApplication(CreateAppLaunchParamsUserContainer(
399 extensions::SOURCE_BACKGROUND)); 399 profile, extension, NEW_FOREGROUND_TAB, extensions::SOURCE_BACKGROUND));
400 } 400 }
401 401
402 // static 402 // static
403 Browser* BackgroundModeManager::GetBrowserWindowForProfile(Profile* profile) { 403 Browser* BackgroundModeManager::GetBrowserWindowForProfile(Profile* profile) {
404 Browser* browser = chrome::FindLastActiveWithProfile(profile); 404 Browser* browser = chrome::FindLastActiveWithProfile(profile);
405 return browser ? browser : chrome::OpenEmptyWindow(profile); 405 return browser ? browser : chrome::OpenEmptyWindow(profile);
406 } 406 }
407 407
408 bool BackgroundModeManager::IsBackgroundModeActive() { 408 bool BackgroundModeManager::IsBackgroundModeActive() {
409 return in_background_mode_; 409 return in_background_mode_;
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 } 1030 }
1031 } 1031 }
1032 return profile_it; 1032 return profile_it;
1033 } 1033 }
1034 1034
1035 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { 1035 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const {
1036 PrefService* service = g_browser_process->local_state(); 1036 PrefService* service = g_browser_process->local_state();
1037 DCHECK(service); 1037 DCHECK(service);
1038 return service->GetBoolean(prefs::kBackgroundModeEnabled); 1038 return service->GetBoolean(prefs::kBackgroundModeEnabled);
1039 } 1039 }
OLDNEW
« no previous file with comments | « chrome/browser/apps/app_shim/extension_app_shim_handler_mac.cc ('k') | chrome/browser/chromeos/arc/arc_auth_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698