diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-12 01:59:17 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-12 01:59:17 +0000 |
commit | 0ee57e2fd0130dea13c030e340c41f72a36840a5 (patch) | |
tree | 979d3d25bfcc6733fde72f97f99cf53085e7733f /content/public | |
parent | 455a6168fdb26900460987080579734103c96f6e (diff) | |
download | chromium_src-0ee57e2fd0130dea13c030e340c41f72a36840a5.zip chromium_src-0ee57e2fd0130dea13c030e340c41f72a36840a5.tar.gz chromium_src-0ee57e2fd0130dea13c030e340c41f72a36840a5.tar.bz2 |
Move the struct used when showing a desktop notification to content/public/common, so that chrome code doesn't include desktop_notification_messages.h which is an internal detail of content.
BUG=98716
Review URL: http://codereview.chromium.org/8511075
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109757 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public')
-rw-r--r-- | content/public/browser/content_browser_client.h | 4 | ||||
-rw-r--r-- | content/public/common/show_desktop_notification_params.cc | 16 | ||||
-rw-r--r-- | content/public/common/show_desktop_notification_params.h | 46 |
3 files changed, 64 insertions, 2 deletions
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h index 6ab3c87..bc4c32a 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -36,12 +36,12 @@ class SkBitmap; class TabContents; class TabContentsView; class WorkerProcessHost; -struct DesktopNotificationHostMsg_Show_Params; struct WebPreferences; namespace content { class BrowserMainParts; struct MainFunctionParams; +struct ShowDesktopNotificationHostMsgParams; } namespace crypto { @@ -278,7 +278,7 @@ class ContentBrowserClient { // Show a desktop notification. If |worker| is true, the request came from an // HTML5 web worker, otherwise, it came from a renderer. virtual void ShowDesktopNotification( - const DesktopNotificationHostMsg_Show_Params& params, + const content::ShowDesktopNotificationHostMsgParams& params, int render_process_id, int render_view_id, bool worker) = 0; diff --git a/content/public/common/show_desktop_notification_params.cc b/content/public/common/show_desktop_notification_params.cc new file mode 100644 index 0000000..e93f7cc --- /dev/null +++ b/content/public/common/show_desktop_notification_params.cc @@ -0,0 +1,16 @@ +// Copyright (c) 2011 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 "content/public/common/show_desktop_notification_params.h" + +namespace content { + +ShowDesktopNotificationHostMsgParams::ShowDesktopNotificationHostMsgParams() + : is_html(false), notification_id(0) { +} + +ShowDesktopNotificationHostMsgParams::~ShowDesktopNotificationHostMsgParams() { +} + +} // namespace content diff --git a/content/public/common/show_desktop_notification_params.h b/content/public/common/show_desktop_notification_params.h new file mode 100644 index 0000000..2f19079 --- /dev/null +++ b/content/public/common/show_desktop_notification_params.h @@ -0,0 +1,46 @@ +// Copyright (c) 2011 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. + +#ifndef CONTENT_PUBLIC_COMMON_SHOW_DESKTOP_NOTIFICATION_PARAMS_H_ +#define CONTENT_PUBLIC_COMMON_SHOW_DESKTOP_NOTIFICATION_PARAMS_H_ +#pragma once + +#include "googleurl/src/gurl.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" + +namespace content { + +// Parameters used when showing an HTML5 notification. +struct ShowDesktopNotificationHostMsgParams { + ShowDesktopNotificationHostMsgParams(); + ~ShowDesktopNotificationHostMsgParams(); + + // URL which is the origin that created this notification. + GURL origin; + + // True if this is HTML + bool is_html; + + // URL which contains the HTML contents (if is_html is true), otherwise empty. + GURL contents_url; + + // Contents of the notification if is_html is false. + GURL icon_url; + string16 title; + string16 body; + + // Directionality of the notification. + WebKit::WebTextDirection direction; + + // ReplaceID if this notification should replace an existing one; may be + // empty if no replacement is called for. + string16 replace_id; + + // Notification ID for sending events back for this notification. + int notification_id; +}; + +} // namespace content + +#endif // CONTENT_PUBLIC_COMMON_SHOW_DESKTOP_NOTIFICATION_PARAMS_H_ |