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

Side by Side Diff: content/common/notification_type.h

Issue 7033018: Handler settings page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove in_unit_test_ Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CONTENT_COMMON_NOTIFICATION_TYPE_H_ 5 #ifndef CONTENT_COMMON_NOTIFICATION_TYPE_H_
6 #define CONTENT_COMMON_NOTIFICATION_TYPE_H_ 6 #define CONTENT_COMMON_NOTIFICATION_TYPE_H_
7 #pragma once 7 #pragma once
8 8
9 // This file describes various types used to describe and filter notifications 9 // This file describes various types used to describe and filter notifications
10 // that pass through the NotificationService. 10 // that pass through the NotificationService.
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 #endif 1298 #endif
1299 1299
1300 // Sent when a new web store promo has been loaded. 1300 // Sent when a new web store promo has been loaded.
1301 WEB_STORE_PROMO_LOADED, 1301 WEB_STORE_PROMO_LOADED,
1302 1302
1303 #if defined(TOUCH_UI) 1303 #if defined(TOUCH_UI)
1304 // Sent when an API for hiding the keyboard is invoked from JavaScript code. 1304 // Sent when an API for hiding the keyboard is invoked from JavaScript code.
1305 HIDE_KEYBOARD_INVOKED, 1305 HIDE_KEYBOARD_INVOKED,
1306 #endif 1306 #endif
1307 1307
1308 // Protocol Handler Registry -----------------------------------------------
1309 // Sent when a ProtocolHandlerRegistry is changed.
1310 PROTOCOL_HANDLER_REGISTRY_CHANGED,
1311
1308 // Count (must be last) ---------------------------------------------------- 1312 // Count (must be last) ----------------------------------------------------
1309 // Used to determine the number of notification types. Not valid as 1313 // Used to determine the number of notification types. Not valid as
1310 // a type parameter when registering for or posting notifications. 1314 // a type parameter when registering for or posting notifications.
1311 NOTIFICATION_TYPE_COUNT 1315 NOTIFICATION_TYPE_COUNT
1312 }; 1316 };
1313 1317
1314 // TODO(erg): Our notification system relies on implicit conversion. 1318 // TODO(erg): Our notification system relies on implicit conversion.
1315 NotificationType(Type v) : value(v) {} // NOLINT 1319 NotificationType(Type v) : value(v) {} // NOLINT
1316 1320
1317 bool operator==(NotificationType t) const { return value == t.value; } 1321 bool operator==(NotificationType t) const { return value == t.value; }
1318 bool operator!=(NotificationType t) const { return value != t.value; } 1322 bool operator!=(NotificationType t) const { return value != t.value; }
1319 1323
1320 // Comparison to explicit enum values. 1324 // Comparison to explicit enum values.
1321 bool operator==(Type v) const { return value == v; } 1325 bool operator==(Type v) const { return value == v; }
1322 bool operator!=(Type v) const { return value != v; } 1326 bool operator!=(Type v) const { return value != v; }
1323 1327
1324 Type value; 1328 Type value;
1325 }; 1329 };
1326 1330
1327 inline bool operator==(NotificationType::Type a, NotificationType b) { 1331 inline bool operator==(NotificationType::Type a, NotificationType b) {
1328 return a == b.value; 1332 return a == b.value;
1329 } 1333 }
1330 inline bool operator!=(NotificationType::Type a, NotificationType b) { 1334 inline bool operator!=(NotificationType::Type a, NotificationType b) {
1331 return a != b.value; 1335 return a != b.value;
1332 } 1336 }
1333 1337
1334 #endif // CONTENT_COMMON_NOTIFICATION_TYPE_H_ 1338 #endif // CONTENT_COMMON_NOTIFICATION_TYPE_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698