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

Side by Side Diff: chrome/browser/ui/views/message_center/web_notification_tray_win.cc

Issue 1128173005: Clean up ProfileManager interface. Base URL: https://chromium.googlesource.com/chromium/src@issue479309
Patch Set: sync Created 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/views/message_center/web_notification_tray.h" 5 #include "chrome/browser/ui/views/message_center/web_notification_tray.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include "base/win/windows_version.h" 8 #include "base/win/windows_version.h"
9 #include "chrome/browser/app_icon_win.h" 9 #include "chrome/browser/app_icon_win.h"
10 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/profiles/profile_manager.h" 11 #include "chrome/browser/profiles/profile_manager.h"
11 #include "chrome/browser/status_icons/status_icon.h" 12 #include "chrome/browser/status_icons/status_icon.h"
12 #include "chrome/browser/ui/browser.h" 13 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/host_desktop.h" 14 #include "chrome/browser/ui/host_desktop.h"
14 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" 15 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
15 #include "chrome/browser/ui/singleton_tabs.h" 16 #include "chrome/browser/ui/singleton_tabs.h"
16 #include "chrome/common/url_constants.h" 17 #include "chrome/common/url_constants.h"
17 #include "chrome/grit/chromium_strings.h" 18 #include "chrome/grit/chromium_strings.h"
18 #include "third_party/skia/include/core/SkBitmap.h" 19 #include "third_party/skia/include/core/SkBitmap.h"
19 #include "ui/base/l10n/l10n_util.h" 20 #include "ui/base/l10n/l10n_util.h"
20 #include "ui/gfx/image/image_skia.h" 21 #include "ui/gfx/image/image_skia.h"
21 22
22 namespace message_center { 23 namespace message_center {
23 void WebNotificationTray::OnBalloonClicked() { 24 void WebNotificationTray::OnBalloonClicked() {
24 chrome::ScopedTabbedBrowserDisplayer displayer( 25 chrome::ScopedTabbedBrowserDisplayer displayer(
25 ProfileManager::GetLastUsedProfileAllowedByPolicy(), 26 g_browser_process->profile_manager()->GetLastUsedProfileAllowedByPolicy(),
26 chrome::GetActiveDesktop()); 27 chrome::GetActiveDesktop());
27 chrome::ShowSingletonTab(displayer.browser(), 28 chrome::ShowSingletonTab(displayer.browser(),
28 GURL(chrome::kNotificationsHelpURL)); 29 GURL(chrome::kNotificationsHelpURL));
29 } 30 }
30 31
31 void WebNotificationTray::DisplayFirstRunBalloon() { 32 void WebNotificationTray::DisplayFirstRunBalloon() {
32 // We should never be calling DisplayFirstRunBalloon without a status icon. 33 // We should never be calling DisplayFirstRunBalloon without a status icon.
33 // The status icon must have been created before this call. 34 // The status icon must have been created before this call.
34 DCHECK(status_icon_); 35 DCHECK(status_icon_);
35 36
(...skipping 18 matching lines...) Expand all
54 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_BALLOON_TITLE), 55 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_BALLOON_TITLE),
55 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_BALLOON_TEXT)); 56 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_BALLOON_TEXT));
56 } 57 }
57 58
58 void WebNotificationTray::EnforceStatusIconVisible() { 59 void WebNotificationTray::EnforceStatusIconVisible() {
59 DCHECK(status_icon_); 60 DCHECK(status_icon_);
60 status_icon_->ForceVisible(); 61 status_icon_->ForceVisible();
61 } 62 }
62 63
63 } // namespace message_center 64 } // namespace message_center
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/app_list/win/app_list_service_win.cc ('k') | chrome/browser/ui/views/profiles/user_manager_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698