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

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

Issue 10453101: Convert most of the rest of chrome to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
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 "base/base_paths.h" 5 #include "base/base_paths.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "base/win/registry.h" 12 #include "base/win/registry.h"
13 #include "chrome/browser/background/background_mode_manager.h" 13 #include "chrome/browser/background/background_mode_manager.h"
14 #include "chrome/common/chrome_switches.h"
14 #include "chrome/installer/util/auto_launch_util.h" 15 #include "chrome/installer/util/auto_launch_util.h"
15 #include "chrome/common/chrome_switches.h"
16 #include "content/public/browser/browser_thread.h" 16 #include "content/public/browser/browser_thread.h"
17 #include "grit/chromium_strings.h" 17 #include "grit/chromium_strings.h"
18 #include "grit/generated_resources.h" 18 #include "grit/generated_resources.h"
19 #include "third_party/skia/include/core/SkBitmap.h"
20 #include "ui/base/l10n/l10n_util.h" 19 #include "ui/base/l10n/l10n_util.h"
20 #include "ui/gfx/image/image_skia.h"
21 21
22 using content::BrowserThread; 22 using content::BrowserThread;
23 23
24 void BackgroundModeManager::EnableLaunchOnStartup(bool should_launch) { 24 void BackgroundModeManager::EnableLaunchOnStartup(bool should_launch) {
25 // This functionality is only defined for default profile, currently. 25 // This functionality is only defined for default profile, currently.
26 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserDataDir)) 26 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUserDataDir))
27 return; 27 return;
28 BrowserThread::PostTask( 28 BrowserThread::PostTask(
29 BrowserThread::FILE, FROM_HERE, 29 BrowserThread::FILE, FROM_HERE,
30 should_launch ? 30 should_launch ?
31 base::Bind(auto_launch_util::EnableBackgroundStartAtLogin) : 31 base::Bind(auto_launch_util::EnableBackgroundStartAtLogin) :
32 base::Bind(auto_launch_util::DisableBackgroundStartAtLogin)); 32 base::Bind(auto_launch_util::DisableBackgroundStartAtLogin));
33 } 33 }
34 34
35 void BackgroundModeManager::DisplayAppInstalledNotification( 35 void BackgroundModeManager::DisplayAppInstalledNotification(
36 const extensions::Extension* extension) { 36 const extensions::Extension* extension) {
37 // Create a status tray notification balloon explaining to the user that 37 // Create a status tray notification balloon explaining to the user that
38 // a background app has been installed. 38 // a background app has been installed.
39 CreateStatusTrayIcon(); 39 CreateStatusTrayIcon();
40 status_icon_->DisplayBalloon( 40 status_icon_->DisplayBalloon(
41 SkBitmap(), 41 gfx::ImageSkia(),
42 l10n_util::GetStringUTF16(IDS_BACKGROUND_APP_INSTALLED_BALLOON_TITLE), 42 l10n_util::GetStringUTF16(IDS_BACKGROUND_APP_INSTALLED_BALLOON_TITLE),
43 l10n_util::GetStringFUTF16( 43 l10n_util::GetStringFUTF16(
44 IDS_BACKGROUND_APP_INSTALLED_BALLOON_BODY, 44 IDS_BACKGROUND_APP_INSTALLED_BALLOON_BODY,
45 UTF8ToUTF16(extension->name()), 45 UTF8ToUTF16(extension->name()),
46 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); 46 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
47 } 47 }
48 48
49 string16 BackgroundModeManager::GetPreferencesMenuLabel() { 49 string16 BackgroundModeManager::GetPreferencesMenuLabel() {
50 return l10n_util::GetStringUTF16(IDS_OPTIONS); 50 return l10n_util::GetStringUTF16(IDS_OPTIONS);
51 } 51 }
OLDNEW
« no previous file with comments | « chrome/browser/background/background_mode_manager.cc ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698