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

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

Issue 110693004: Moves the notification icon out of the status area overflow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup + address some comments 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 #include <objbase.h>
8 9
10 #include "base/memory/ref_counted.h"
11 #include "base/win/scoped_com_initializer.h"
9 #include "base/win/windows_version.h" 12 #include "base/win/windows_version.h"
10 #include "chrome/browser/app_icon_win.h" 13 #include "chrome/browser/app_icon_win.h"
11 #include "chrome/browser/profiles/profile_manager.h" 14 #include "chrome/browser/profiles/profile_manager.h"
12 #include "chrome/browser/status_icons/status_icon.h" 15 #include "chrome/browser/status_icons/status_icon.h"
13 #include "chrome/browser/ui/browser.h" 16 #include "chrome/browser/ui/browser.h"
14 #include "chrome/browser/ui/host_desktop.h" 17 #include "chrome/browser/ui/host_desktop.h"
15 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" 18 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
16 #include "chrome/browser/ui/singleton_tabs.h" 19 #include "chrome/browser/ui/singleton_tabs.h"
20 #include "chrome/browser/ui/views/status_icons/status_icon_win.h"
17 #include "chrome/common/url_constants.h" 21 #include "chrome/common/url_constants.h"
18 #include "grit/chromium_strings.h" 22 #include "grit/chromium_strings.h"
19 #include "third_party/skia/include/core/SkBitmap.h" 23 #include "third_party/skia/include/core/SkBitmap.h"
20 #include "ui/base/l10n/l10n_util.h" 24 #include "ui/base/l10n/l10n_util.h"
21 #include "ui/base/resource/resource_bundle.h" 25 #include "ui/base/resource/resource_bundle.h"
22 #include "ui/gfx/image/image_skia.h" 26 #include "ui/gfx/image/image_skia.h"
23 27
24 namespace message_center { 28 namespace message_center {
25 void WebNotificationTray::OnBalloonClicked() { 29 void WebNotificationTray::OnBalloonClicked() {
26 chrome::ScopedTabbedBrowserDisplayer displayer( 30 chrome::ScopedTabbedBrowserDisplayer displayer(
(...skipping 22 matching lines...) Expand all
49 icon_size = GetSystemMetrics(SM_CXSMICON); 53 icon_size = GetSystemMetrics(SM_CXSMICON);
50 54
51 scoped_ptr<SkBitmap> sized_app_icon_bitmap = GetAppIconForSize(icon_size); 55 scoped_ptr<SkBitmap> sized_app_icon_bitmap = GetAppIconForSize(icon_size);
52 gfx::ImageSkia sized_app_icon_skia = 56 gfx::ImageSkia sized_app_icon_skia =
53 gfx::ImageSkia::CreateFrom1xBitmap(*sized_app_icon_bitmap); 57 gfx::ImageSkia::CreateFrom1xBitmap(*sized_app_icon_bitmap);
54 status_icon_->DisplayBalloon( 58 status_icon_->DisplayBalloon(
55 sized_app_icon_skia, 59 sized_app_icon_skia,
56 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_BALLOON_TITLE), 60 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_BALLOON_TITLE),
57 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_BALLOON_TEXT)); 61 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_BALLOON_TEXT));
58 } 62 }
63
64 void WebNotificationTray::EnforceStatusIconVisible() {
65 DCHECK(status_icon_);
66 status_icon_->ForceVisible();
67 }
68
59 } // namespace message_center 69 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698