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

Side by Side Diff: Source/modules/notifications/DOMWindowNotifications.h

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 25 matching lines...) Expand all
36 36
37 namespace WebCore { 37 namespace WebCore {
38 38
39 class DOMWindow; 39 class DOMWindow;
40 class NotificationCenter; 40 class NotificationCenter;
41 41
42 class DOMWindowNotifications FINAL : public Supplement<DOMWindow>, public DOMWin dowProperty { 42 class DOMWindowNotifications FINAL : public Supplement<DOMWindow>, public DOMWin dowProperty {
43 public: 43 public:
44 virtual ~DOMWindowNotifications(); 44 virtual ~DOMWindowNotifications();
45 45
46 static NotificationCenter* webkitNotifications(DOMWindow*); 46 static NotificationCenter* webkitNotifications(DOMWindow&);
47 static DOMWindowNotifications* from(DOMWindow*); 47 static DOMWindowNotifications& from(DOMWindow&);
48 48
49 virtual void willDestroyGlobalObjectInFrame() OVERRIDE; 49 virtual void willDestroyGlobalObjectInFrame() OVERRIDE;
50 virtual void willDetachGlobalObjectFromFrame() OVERRIDE; 50 virtual void willDetachGlobalObjectFromFrame() OVERRIDE;
51 51
52 private: 52 private:
53 explicit DOMWindowNotifications(DOMWindow*); 53 explicit DOMWindowNotifications(DOMWindow&);
54 54
55 NotificationCenter* webkitNotifications(); 55 NotificationCenter* webkitNotifications();
56 static const char* supplementName(); 56 static const char* supplementName();
57 57
58 DOMWindow* m_window; 58 DOMWindow& m_window;
59 RefPtrWillBePersistent<NotificationCenter> m_notificationCenter; 59 RefPtrWillBePersistent<NotificationCenter> m_notificationCenter;
60 }; 60 };
61 61
62 } // namespace WebCore 62 } // namespace WebCore
63 63
64 #endif // ENABLE(LEGACY_NOTIFICATIONS) 64 #endif // ENABLE(LEGACY_NOTIFICATIONS)
65 65
66 #endif // DOMWindowNotifications_h 66 #endif // DOMWindowNotifications_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698