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