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

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

Issue 7033033: Add hideKeyboard API to chrome.experimental.input. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 EXTENSION_LAUNCHER_REORDERED, 1291 EXTENSION_LAUNCHER_REORDERED,
1292 1292
1293 #if defined(OS_CHROMEOS) 1293 #if defined(OS_CHROMEOS)
1294 // Sent when WebSocketProxy started accepting connections. 1294 // Sent when WebSocketProxy started accepting connections.
1295 WEB_SOCKET_PROXY_STARTED, 1295 WEB_SOCKET_PROXY_STARTED,
1296 #endif 1296 #endif
1297 1297
1298 // Sent when a new web store promo has been loaded. 1298 // Sent when a new web store promo has been loaded.
1299 WEB_STORE_PROMO_LOADED, 1299 WEB_STORE_PROMO_LOADED,
1300 1300
1301 #if defined(TOUCH_UI)
1302 // Sent when an API for hiding the keyboard is invoked from JavaScript code.
1303 HIDE_KEYBOARD_INVOKED,
1304 #endif
1305
1301 // Count (must be last) ---------------------------------------------------- 1306 // Count (must be last) ----------------------------------------------------
1302 // Used to determine the number of notification types. Not valid as 1307 // Used to determine the number of notification types. Not valid as
1303 // a type parameter when registering for or posting notifications. 1308 // a type parameter when registering for or posting notifications.
1304 NOTIFICATION_TYPE_COUNT 1309 NOTIFICATION_TYPE_COUNT
1305 }; 1310 };
1306 1311
1307 // TODO(erg): Our notification system relies on implicit conversion. 1312 // TODO(erg): Our notification system relies on implicit conversion.
1308 NotificationType(Type v) : value(v) {} // NOLINT 1313 NotificationType(Type v) : value(v) {} // NOLINT
1309 1314
1310 bool operator==(NotificationType t) const { return value == t.value; } 1315 bool operator==(NotificationType t) const { return value == t.value; }
1311 bool operator!=(NotificationType t) const { return value != t.value; } 1316 bool operator!=(NotificationType t) const { return value != t.value; }
1312 1317
1313 // Comparison to explicit enum values. 1318 // Comparison to explicit enum values.
1314 bool operator==(Type v) const { return value == v; } 1319 bool operator==(Type v) const { return value == v; }
1315 bool operator!=(Type v) const { return value != v; } 1320 bool operator!=(Type v) const { return value != v; }
1316 1321
1317 Type value; 1322 Type value;
1318 }; 1323 };
1319 1324
1320 inline bool operator==(NotificationType::Type a, NotificationType b) { 1325 inline bool operator==(NotificationType::Type a, NotificationType b) {
1321 return a == b.value; 1326 return a == b.value;
1322 } 1327 }
1323 inline bool operator!=(NotificationType::Type a, NotificationType b) { 1328 inline bool operator!=(NotificationType::Type a, NotificationType b) {
1324 return a != b.value; 1329 return a != b.value;
1325 } 1330 }
1326 1331
1327 #endif // CONTENT_COMMON_NOTIFICATION_TYPE_H_ 1332 #endif // CONTENT_COMMON_NOTIFICATION_TYPE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698