OLD | NEW |
| (Empty) |
1 // Copyright (c) 2006-2008 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 WEBKIT_GLUE_CONTEXT_NODE_TYPES_H__ | |
6 #define WEBKIT_GLUE_CONTEXT_NODE_TYPES_H__ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/logging.h" | |
10 | |
11 // The type of node that the user may perform a contextual action on | |
12 // in the WebView. | |
13 struct ContextNode { | |
14 enum TypeBit { | |
15 // No node is selected | |
16 NONE = 0x0, | |
17 | |
18 // The top page is selected | |
19 PAGE = 0x1, | |
20 | |
21 // A subframe page is selected | |
22 FRAME = 0x2, | |
23 | |
24 // A link is selected | |
25 LINK = 0x4, | |
26 | |
27 // An image is selected | |
28 IMAGE = 0x8, | |
29 | |
30 // There is a textual or mixed selection that is selected | |
31 SELECTION = 0x10, | |
32 | |
33 // An editable element is selected | |
34 EDITABLE = 0x20, | |
35 | |
36 // A misspelled word is selected | |
37 MISSPELLED_WORD = 0x40, | |
38 }; | |
39 | |
40 enum Capability { | |
41 CAN_DO_NONE = 0x0, | |
42 CAN_UNDO = 0x1, | |
43 CAN_REDO = 0x2, | |
44 CAN_CUT = 0x4, | |
45 CAN_COPY = 0x8, | |
46 CAN_PASTE = 0x10, | |
47 CAN_DELETE = 0x20, | |
48 CAN_SELECT_ALL = 0x40, | |
49 }; | |
50 | |
51 int32 type; | |
52 ContextNode() : type(NONE) {} | |
53 explicit ContextNode(int32 t) : type(t) {} | |
54 }; | |
55 | |
56 #endif // WEBKIT_GLUE_CONTEXT_NODE_TYPES_H__ | |
57 | |
OLD | NEW |