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

Unified Diff: chrome/browser/notifications/desktop_notification_service_win.cc

Issue 243703003: Removes win8_util (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/desktop_notification_service_win.cc
diff --git a/chrome/browser/notifications/desktop_notification_service_win.cc b/chrome/browser/notifications/desktop_notification_service_win.cc
deleted file mode 100644
index 0a6c2f819048f5f74e358587e82887a777dc90f7..0000000000000000000000000000000000000000
--- a/chrome/browser/notifications/desktop_notification_service_win.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/notifications/desktop_notification_service.h"
-
-#include "base/logging.h"
-#include "base/win/metro.h"
-#include "chrome/browser/notifications/notification.h"
-#include "chrome/browser/notifications/notification_object_proxy.h"
-#include "chrome/browser/notifications/notification_ui_manager.h"
-#include "chrome/browser/notifications/notification_ui_manager.h"
-#include "win8/util/win8_util.h"
-
-bool DesktopNotificationService::CancelDesktopNotification(
- int process_id, int route_id, int notification_id) {
- scoped_refptr<NotificationObjectProxy> proxy(
- new NotificationObjectProxy(process_id, route_id, notification_id));
- if (win8::IsSingleWindowMetroMode()) {
- base::win::MetroCancelNotification cancel_metro_notification =
- reinterpret_cast<base::win::MetroCancelNotification>(GetProcAddress(
- base::win::GetMetroModule(), "CancelNotification"));
- DCHECK(cancel_metro_notification);
- if (cancel_metro_notification(proxy->id().c_str()))
- return true;
- }
- return GetUIManager()->CancelById(proxy->id());
-}
-
-void DesktopNotificationService::ShowNotification(
- const Notification& notification) {
- if (win8::IsSingleWindowMetroMode()) {
- base::win::MetroNotification display_metro_notification =
- reinterpret_cast<base::win::MetroNotification>(GetProcAddress(
- base::win::GetMetroModule(), "DisplayNotification"));
- DCHECK(display_metro_notification);
- if (!notification.is_html()) {
- display_metro_notification(notification.origin_url().spec().c_str(),
- notification.content_url().spec().c_str(),
- notification.title().c_str(),
- notification.message().c_str(),
- notification.display_source().c_str(),
- notification.notification_id().c_str(),
- NULL, NULL);
- return;
- } else {
- NOTREACHED() << "We don't support HTML notifications in Windows 8 metro";
- }
- }
- GetUIManager()->Add(notification, profile_);
-}
« no previous file with comments | « chrome/browser/notifications/desktop_notification_service.cc ('k') | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698