From b1f28c8f2c486bf5891a56dd3af00fe93b0a30d3 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 11 Sep 2014 10:30:11 -0700 Subject: Move the logic for creating data: URLs out of DesktopNotificationService. This code is only used by the Notification constructor, and doesn't have to be a public method on a class that's otherwise unrelated to it. Also get rid of caching the UI manager in the service. All callsites of the constructor passed in NULL, and BrowserProcess::notification_ui_manager() actually does the caching for us. TBR=jochen BUG= Review URL: https://codereview.chromium.org/561813002 Cr-Commit-Position: refs/heads/master@{#294414} --- chrome/browser/notifications/notification.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'chrome/browser/notifications/notification.h') diff --git a/chrome/browser/notifications/notification.h b/chrome/browser/notifications/notification.h index d2a9d4a..9390ca2 100644 --- a/chrome/browser/notifications/notification.h +++ b/chrome/browser/notifications/notification.h @@ -13,11 +13,14 @@ #include "base/values.h" #include "chrome/browser/notifications/notification_delegate.h" #include "third_party/WebKit/public/web/WebTextDirection.h" -#include "ui/gfx/image/image.h" #include "ui/message_center/notification.h" #include "ui/message_center/notification_types.h" #include "url/gurl.h" +namespace gfx { +class Image; +} + // Representation of a notification to be shown to the user. // On non-Ash platforms these are rendered as HTML, sometimes described by a // data url converted from text + icon data. On Ash they are rendered as @@ -63,9 +66,6 @@ class Notification : public message_center::Notification { virtual ~Notification(); Notification& operator=(const Notification& notification); - // The URL (may be data:) containing the contents for the notification. - const GURL& content_url() const { return content_url_; } - // The origin URL of the script which requested the notification. const GURL& origin_url() const { return origin_url_; } @@ -101,10 +101,6 @@ class Notification : public message_center::Notification { // to have a non NULL RenderViewHost. GURL icon_url_; - // The URL of the HTML content of the toast (may be a data: URL for simple - // string-based notifications). - GURL content_url_; - // The URLs of the button images for a rich notification. GURL button_one_icon_url_; GURL button_two_icon_url_; -- cgit v1.1