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

Side by Side Diff: content/public/browser/notification_source.h

Issue 10696166: Remove #pragma once from content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file defines the type used to provide sources for NotificationService 5 // This file defines the type used to provide sources for NotificationService
6 // notifications. 6 // notifications.
7 7
8 #ifndef CONTENT_PUBLIC_BROWSER_NOTIFICATION_SOURCE_H_ 8 #ifndef CONTENT_PUBLIC_BROWSER_NOTIFICATION_SOURCE_H_
9 #define CONTENT_PUBLIC_BROWSER_NOTIFICATION_SOURCE_H_ 9 #define CONTENT_PUBLIC_BROWSER_NOTIFICATION_SOURCE_H_
10 #pragma once
11 10
12 #include "base/basictypes.h" 11 #include "base/basictypes.h"
13 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
14 13
15 namespace content { 14 namespace content {
16 15
17 // Do not declare a NotificationSource directly--use either 16 // Do not declare a NotificationSource directly--use either
18 // "Source<sourceclassname>(sourceclasspointer)" or 17 // "Source<sourceclassname>(sourceclasspointer)" or
19 // NotificationService::AllSources(). 18 // NotificationService::AllSources().
20 class CONTENT_EXPORT NotificationSource { 19 class CONTENT_EXPORT NotificationSource {
(...skipping 30 matching lines...) Expand all
51 : NotificationSource(other) {} 50 : NotificationSource(other) {}
52 51
53 T* operator->() const { return ptr(); } 52 T* operator->() const { return ptr(); }
54 // The casts here allow this to compile with both T = Foo and T = const Foo. 53 // The casts here allow this to compile with both T = Foo and T = const Foo.
55 T* ptr() const { return static_cast<T*>(const_cast<void*>(ptr_)); } 54 T* ptr() const { return static_cast<T*>(const_cast<void*>(ptr_)); }
56 }; 55 };
57 56
58 } // namespace content 57 } // namespace content
59 58
60 #endif // CONTENT_PUBLIC_BROWSER_NOTIFICATION_SOURCE_H_ 59 #endif // CONTENT_PUBLIC_BROWSER_NOTIFICATION_SOURCE_H_
OLDNEW
« no previous file with comments | « content/public/browser/notification_service.h ('k') | content/public/browser/notification_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698