| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_VIEW_MESSAGES_ENUMS_H_ | 5 #ifndef CONTENT_COMMON_ACCESSIBILITY_MODE_ENUMS_H_ |
| 6 #define CONTENT_COMMON_VIEW_MESSAGES_ENUMS_H_ | 6 #define CONTENT_COMMON_ACCESSIBILITY_MODE_ENUMS_H_ |
| 7 | |
| 8 #include "ipc/ipc_message_macros.h" | |
| 9 | |
| 10 // Values that may be OR'd together to form the 'flags' parameter of a | |
| 11 // ViewHostMsg_UpdateRect_Params structure. | |
| 12 struct ViewHostMsg_UpdateRect_Flags { | |
| 13 enum { | |
| 14 IS_RESIZE_ACK = 1 << 0, | |
| 15 IS_REPAINT_ACK = 1 << 2, | |
| 16 }; | |
| 17 static bool is_resize_ack(int flags) { | |
| 18 return (flags & IS_RESIZE_ACK) != 0; | |
| 19 } | |
| 20 static bool is_repaint_ack(int flags) { | |
| 21 return (flags & IS_REPAINT_ACK) != 0; | |
| 22 } | |
| 23 }; | |
| 24 | 7 |
| 25 // Note: keep enums in content/browser/resources/accessibility/accessibility.js | 8 // Note: keep enums in content/browser/resources/accessibility/accessibility.js |
| 26 // in sync with these two enums. | 9 // in sync with these two enums. |
| 27 enum AccessibilityModeFlag { | 10 enum AccessibilityModeFlag { |
| 28 // Accessibility updates are processed to create platform trees and events are | 11 // Accessibility updates are processed to create platform trees and events are |
| 29 // passed to platform APIs in the browser. | 12 // passed to platform APIs in the browser. |
| 30 AccessibilityModeFlagPlatform = 1 << 0, | 13 AccessibilityModeFlagPlatform = 1 << 0, |
| 31 | 14 |
| 32 // Accessibility is on, and the full tree is computed. If this flag is off, | 15 // Accessibility is on, and the full tree is computed. If this flag is off, |
| 33 // only limited information about editable text nodes is sent to the browser | 16 // only limited information about editable text nodes is sent to the browser |
| (...skipping 11 matching lines...) Expand all Loading... |
| 45 | 28 |
| 46 // Renderer accessibility is on, and platform APIs are called. | 29 // Renderer accessibility is on, and platform APIs are called. |
| 47 AccessibilityModeComplete = | 30 AccessibilityModeComplete = |
| 48 AccessibilityModeFlagPlatform | AccessibilityModeFlagFullTree, | 31 AccessibilityModeFlagPlatform | AccessibilityModeFlagFullTree, |
| 49 | 32 |
| 50 // Renderer accessibility is on, and events are passed to any extensions | 33 // Renderer accessibility is on, and events are passed to any extensions |
| 51 // requesting automation, but not to platform accessibility. | 34 // requesting automation, but not to platform accessibility. |
| 52 AccessibilityModeTreeOnly = AccessibilityModeFlagFullTree, | 35 AccessibilityModeTreeOnly = AccessibilityModeFlagFullTree, |
| 53 }; | 36 }; |
| 54 | 37 |
| 55 #endif // CONTENT_COMMON_VIEW_MESSAGES_ENUMS_H_ | 38 #endif // CONTENT_COMMON_ACCESSIBILITY_MODE_ENUMS_H_ |
| OLD | NEW |