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

Unified Diff: chrome/browser/ui/views/message_center/web_notification_tray.cc

Issue 17286015: Adds a first-run balloon to the Windows notification center. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added some tests. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/message_center/web_notification_tray.cc
diff --git a/chrome/browser/ui/views/message_center/web_notification_tray.cc b/chrome/browser/ui/views/message_center/web_notification_tray.cc
index 77a79db0edd353d3ed4e2047de6c220d23dc79bb..53b8a1c4d069a26028c1279eed2e35e98993977b 100644
--- a/chrome/browser/ui/views/message_center/web_notification_tray.cc
+++ b/chrome/browser/ui/views/message_center/web_notification_tray.cc
@@ -8,9 +8,14 @@
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/status_icons/status_icon.h"
#include "chrome/browser/status_icons/status_tray.h"
+#include "chrome/browser/ui/browser_finder.h"
+#include "chrome/browser/ui/host_desktop.h"
+#include "chrome/browser/ui/singleton_tabs.h"
#include "chrome/browser/ui/views/message_center/notification_bubble_wrapper.h"
+#include "chrome/common/url_constants.h"
#include "content/public/browser/user_metrics.h"
#include "grit/chromium_strings.h"
#include "grit/theme_resources.h"
@@ -30,10 +35,6 @@
#include "ui/message_center/views/message_popup_collection.h"
#include "ui/views/widget/widget.h"
-#if defined(OS_WIN)
-#include "ui/base/win/hwnd_util.h"
-#endif
-
namespace {
// Tray constants
@@ -277,6 +278,13 @@ void WebNotificationTray::OnStatusIconClicked() {
message_center_tray_->ToggleMessageCenterBubble();
}
+void WebNotificationTray::OnBalloonClicked() {
+ Browser* browser = chrome::FindOrCreateTabbedBrowser(
sky 2013/06/20 17:22:01 If this creates a new browser who shows it?
dewittj 2013/06/20 17:51:51 line 285 shows a tab in the browser. But it's pos
sky 2013/06/20 17:56:27 That shows the tab, but if FindOrCreateTabbedBrows
+ ProfileManager::GetLastUsedProfileAllowedByPolicy(),
+ chrome::GetActiveDesktop());
+ chrome::ShowSingletonTab(browser, GURL(chrome::kNotificationsHelpURL));
+}
+
void WebNotificationTray::HideBubbleWithView(
const views::TrayBubbleView* bubble_view) {
if (message_center_bubble_.get() &&

Powered by Google App Engine
This is Rietveld 408576698