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

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

Issue 252513004: Reland r265807: "Moves the notification icon out of th..." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable tray size test on Vista since it won't have any effect on a new icon. Created 6 years, 8 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 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
9 #include "base/win/windows_version.h" 8 #include "base/win/windows_version.h"
10 #include "chrome/browser/app_icon_win.h" 9 #include "chrome/browser/app_icon_win.h"
11 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
12 #include "chrome/browser/status_icons/status_icon.h" 11 #include "chrome/browser/status_icons/status_icon.h"
13 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
14 #include "chrome/browser/ui/host_desktop.h" 13 #include "chrome/browser/ui/host_desktop.h"
15 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" 14 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
16 #include "chrome/browser/ui/singleton_tabs.h" 15 #include "chrome/browser/ui/singleton_tabs.h"
17 #include "chrome/common/url_constants.h" 16 #include "chrome/common/url_constants.h"
18 #include "grit/chromium_strings.h" 17 #include "grit/chromium_strings.h"
(...skipping 30 matching lines...) Expand all
49 icon_size = GetSystemMetrics(SM_CXSMICON); 48 icon_size = GetSystemMetrics(SM_CXSMICON);
50 49
51 scoped_ptr<SkBitmap> sized_app_icon_bitmap = GetAppIconForSize(icon_size); 50 scoped_ptr<SkBitmap> sized_app_icon_bitmap = GetAppIconForSize(icon_size);
52 gfx::ImageSkia sized_app_icon_skia = 51 gfx::ImageSkia sized_app_icon_skia =
53 gfx::ImageSkia::CreateFrom1xBitmap(*sized_app_icon_bitmap); 52 gfx::ImageSkia::CreateFrom1xBitmap(*sized_app_icon_bitmap);
54 status_icon_->DisplayBalloon( 53 status_icon_->DisplayBalloon(
55 sized_app_icon_skia, 54 sized_app_icon_skia,
56 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_BALLOON_TITLE), 55 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_BALLOON_TITLE),
57 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_BALLOON_TEXT)); 56 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_BALLOON_TEXT));
58 } 57 }
58
59 void WebNotificationTray::EnforceStatusIconVisible() {
60 DCHECK(status_icon_);
61 status_icon_->ForceVisible();
62 }
63
59 } // namespace message_center 64 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698