OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_COMMON_VIEW_MESSAGES_ENUMS_H_ |
| 6 #define CONTENT_COMMON_VIEW_MESSAGES_ENUMS_H_ |
| 7 |
| 8 struct ViewHostMsg_AccEvent { |
| 9 enum Value { |
| 10 // The active descendant of a node has changed. |
| 11 ACTIVE_DESCENDANT_CHANGED, |
| 12 |
| 13 // An alert appeared. |
| 14 ALERT, |
| 15 |
| 16 // The node checked state has changed. |
| 17 CHECK_STATE_CHANGED, |
| 18 |
| 19 // The node tree structure has changed. |
| 20 CHILDREN_CHANGED, |
| 21 |
| 22 // The node in focus has changed. |
| 23 FOCUS_CHANGED, |
| 24 |
| 25 // Page layout has completed. |
| 26 LAYOUT_COMPLETE, |
| 27 |
| 28 // Content within a part of the page marked as a live region changed. |
| 29 LIVE_REGION_CHANGED, |
| 30 |
| 31 // The document node has loaded. |
| 32 LOAD_COMPLETE, |
| 33 |
| 34 // A menu list value changed. |
| 35 MENU_LIST_VALUE_CHANGED, |
| 36 |
| 37 // An object was shown. |
| 38 OBJECT_SHOW, |
| 39 |
| 40 // An object was hidden. |
| 41 OBJECT_HIDE, |
| 42 |
| 43 // The number of rows in a grid or tree control changed. |
| 44 ROW_COUNT_CHANGED, |
| 45 |
| 46 // A row in a grid or tree control was collapsed. |
| 47 ROW_COLLAPSED, |
| 48 |
| 49 // A row in a grid or tree control was expanded. |
| 50 ROW_EXPANDED, |
| 51 |
| 52 // The document was scrolled to an anchor node. |
| 53 SCROLLED_TO_ANCHOR, |
| 54 |
| 55 // One or more selected children of this node have changed. |
| 56 SELECTED_CHILDREN_CHANGED, |
| 57 |
| 58 // The text cursor or selection changed. |
| 59 SELECTED_TEXT_CHANGED, |
| 60 |
| 61 // Text was inserted in a node with text content. |
| 62 TEXT_INSERTED, |
| 63 |
| 64 // Text was removed in a node with text content. |
| 65 TEXT_REMOVED, |
| 66 |
| 67 // The node value has changed. |
| 68 VALUE_CHANGED, |
| 69 }; |
| 70 }; |
| 71 |
| 72 // Values that may be OR'd together to form the 'flags' parameter of the |
| 73 // ViewMsg_EnablePreferredSizeChangedMode message. |
| 74 enum ViewHostMsg_EnablePreferredSizeChangedMode_Flags { |
| 75 kPreferredSizeNothing, |
| 76 kPreferredSizeWidth = 1 << 0, |
| 77 // Requesting the height currently requires a polling loop in render_view.cc. |
| 78 kPreferredSizeHeightThisIsSlow = 1 << 1, |
| 79 }; |
| 80 |
| 81 struct ViewHostMsg_RunFileChooser_Mode { |
| 82 public: |
| 83 enum Value { |
| 84 // Requires that the file exists before allowing the user to pick it. |
| 85 Open, |
| 86 |
| 87 // Like Open, but allows picking multiple files to open. |
| 88 OpenMultiple, |
| 89 |
| 90 // Like Open, but selects a folder. |
| 91 OpenFolder, |
| 92 |
| 93 // Allows picking a nonexistent file, and prompts to overwrite if the file |
| 94 // already exists. |
| 95 Save, |
| 96 }; |
| 97 }; |
| 98 |
| 99 // Values that may be OR'd together to form the 'flags' parameter of a |
| 100 // ViewHostMsg_UpdateRect_Params structure. |
| 101 struct ViewHostMsg_UpdateRect_Flags { |
| 102 enum { |
| 103 IS_RESIZE_ACK = 1 << 0, |
| 104 IS_RESTORE_ACK = 1 << 1, |
| 105 IS_REPAINT_ACK = 1 << 2, |
| 106 }; |
| 107 static bool is_resize_ack(int flags) { |
| 108 return (flags & IS_RESIZE_ACK) != 0; |
| 109 } |
| 110 static bool is_restore_ack(int flags) { |
| 111 return (flags & IS_RESTORE_ACK) != 0; |
| 112 } |
| 113 static bool is_repaint_ack(int flags) { |
| 114 return (flags & IS_REPAINT_ACK) != 0; |
| 115 } |
| 116 }; |
| 117 |
| 118 struct ViewMsg_Navigate_Type { |
| 119 public: |
| 120 enum Value { |
| 121 // Reload the page. |
| 122 RELOAD, |
| 123 |
| 124 // Reload the page, ignoring any cache entries. |
| 125 RELOAD_IGNORING_CACHE, |
| 126 |
| 127 // The navigation is the result of session restore and should honor the |
| 128 // page's cache policy while restoring form state. This is set to true if |
| 129 // restoring a tab/session from the previous session and the previous |
| 130 // session did not crash. If this is not set and the page was restored then |
| 131 // the page's cache policy is ignored and we load from the cache. |
| 132 RESTORE, |
| 133 |
| 134 // Navigation type not categorized by the other types. |
| 135 NORMAL |
| 136 }; |
| 137 }; |
| 138 |
| 139 // The user has completed a find-in-page; this type defines what actions the |
| 140 // renderer should take next. |
| 141 struct ViewMsg_StopFinding_Params { |
| 142 enum Action { |
| 143 kClearSelection, |
| 144 kKeepSelection, |
| 145 kActivateSelection |
| 146 }; |
| 147 |
| 148 ViewMsg_StopFinding_Params() : action(kClearSelection) {} |
| 149 |
| 150 // The action that should be taken when the find is completed. |
| 151 Action action; |
| 152 }; |
| 153 |
| 154 #endif // CONTENT_COMMON_VIEW_MESSAGES_ENUMS_H_ |
OLD | NEW |