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

Side by Side Diff: third_party/WebKit/Source/modules/notifications/Notification.h

Issue 1943963004: Revert of (reland) Move permission.mojom from WebKit/public/platform/ to components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef Notification_h 31 #ifndef Notification_h
32 #define Notification_h 32 #define Notification_h
33 33
34 #include "bindings/core/v8/ActiveScriptWrappable.h" 34 #include "bindings/core/v8/ActiveScriptWrappable.h"
35 #include "bindings/core/v8/ScriptPromise.h" 35 #include "bindings/core/v8/ScriptPromise.h"
36 #include "bindings/core/v8/ScriptValue.h" 36 #include "bindings/core/v8/ScriptValue.h"
37 #include "bindings/core/v8/SerializedScriptValue.h" 37 #include "bindings/core/v8/SerializedScriptValue.h"
38 #include "components/permissions/permission_status.mojom.h"
39 #include "core/dom/ActiveDOMObject.h" 38 #include "core/dom/ActiveDOMObject.h"
40 #include "core/dom/DOMTimeStamp.h" 39 #include "core/dom/DOMTimeStamp.h"
41 #include "modules/EventTargetModules.h" 40 #include "modules/EventTargetModules.h"
42 #include "modules/ModulesExport.h" 41 #include "modules/ModulesExport.h"
43 #include "modules/vibration/NavigatorVibration.h" 42 #include "modules/vibration/NavigatorVibration.h"
44 #include "platform/AsyncMethodRunner.h" 43 #include "platform/AsyncMethodRunner.h"
45 #include "platform/heap/Handle.h" 44 #include "platform/heap/Handle.h"
46 #include "platform/weborigin/KURL.h" 45 #include "platform/weborigin/KURL.h"
47 #include "public/platform/WebVector.h" 46 #include "public/platform/WebVector.h"
48 #include "public/platform/modules/notifications/WebNotificationData.h" 47 #include "public/platform/modules/notifications/WebNotificationData.h"
49 #include "public/platform/modules/notifications/WebNotificationDelegate.h" 48 #include "public/platform/modules/notifications/WebNotificationDelegate.h"
49 #include "public/platform/modules/permissions/permission_status.mojom.h"
50 50
51 namespace blink { 51 namespace blink {
52 52
53 class ExecutionContext; 53 class ExecutionContext;
54 class NotificationAction; 54 class NotificationAction;
55 class NotificationOptions; 55 class NotificationOptions;
56 class NotificationPermissionCallback; 56 class NotificationPermissionCallback;
57 class NotificationResourcesLoader; 57 class NotificationResourcesLoader;
58 class ScriptState; 58 class ScriptState;
59 59
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 String icon() const; 92 String icon() const;
93 String badge() const; 93 String badge() const;
94 NavigatorVibration::VibrationPattern vibrate(bool& isNull) const; 94 NavigatorVibration::VibrationPattern vibrate(bool& isNull) const;
95 DOMTimeStamp timestamp() const; 95 DOMTimeStamp timestamp() const;
96 bool renotify() const; 96 bool renotify() const;
97 bool silent() const; 97 bool silent() const;
98 bool requireInteraction() const; 98 bool requireInteraction() const;
99 ScriptValue data(ScriptState*); 99 ScriptValue data(ScriptState*);
100 HeapVector<NotificationAction> actions() const; 100 HeapVector<NotificationAction> actions() const;
101 101
102 static String permissionString(permissions::mojom::PermissionStatus); 102 static String permissionString(mojom::PermissionStatus);
103 static String permission(ExecutionContext*); 103 static String permission(ExecutionContext*);
104 static permissions::mojom::PermissionStatus checkPermission(ExecutionContext *); 104 static mojom::PermissionStatus checkPermission(ExecutionContext*);
105 static ScriptPromise requestPermission(ScriptState*, NotificationPermissionC allback*); 105 static ScriptPromise requestPermission(ScriptState*, NotificationPermissionC allback*);
106 106
107 static size_t maxActions(); 107 static size_t maxActions();
108 108
109 // EventTarget interface. 109 // EventTarget interface.
110 ExecutionContext* getExecutionContext() const final { return ActiveDOMObject ::getExecutionContext(); } 110 ExecutionContext* getExecutionContext() const final { return ActiveDOMObject ::getExecutionContext(); }
111 const AtomicString& interfaceName() const override; 111 const AtomicString& interfaceName() const override;
112 112
113 // ActiveDOMObject interface. 113 // ActiveDOMObject interface.
114 void stop() override; 114 void stop() override;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 NotificationState m_state; 163 NotificationState m_state;
164 164
165 Member<AsyncMethodRunner<Notification>> m_prepareShowMethodRunner; 165 Member<AsyncMethodRunner<Notification>> m_prepareShowMethodRunner;
166 166
167 Member<NotificationResourcesLoader> m_loader; 167 Member<NotificationResourcesLoader> m_loader;
168 }; 168 };
169 169
170 } // namespace blink 170 } // namespace blink
171 171
172 #endif // Notification_h 172 #endif // Notification_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/notifications/DEPS ('k') | third_party/WebKit/Source/modules/notifications/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698