OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ |
6 #define CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ | 6 #define CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 int x; | 55 int x; |
56 int y; | 56 int y; |
57 | 57 |
58 // This is the URL of the link that encloses the node the context menu was | 58 // This is the URL of the link that encloses the node the context menu was |
59 // invoked on. | 59 // invoked on. |
60 GURL link_url; | 60 GURL link_url; |
61 | 61 |
62 // The text associated with the link. May be an empty string if the contents | 62 // The text associated with the link. May be an empty string if the contents |
63 // of the link are an image. | 63 // of the link are an image. |
64 // Will be empty if link_url is empty. | 64 // Will be empty if link_url is empty. |
65 string16 link_text; | 65 base::string16 link_text; |
66 | 66 |
67 // The link URL to be used ONLY for "copy link address". We don't validate | 67 // The link URL to be used ONLY for "copy link address". We don't validate |
68 // this field in the frontend process. | 68 // this field in the frontend process. |
69 GURL unfiltered_link_url; | 69 GURL unfiltered_link_url; |
70 | 70 |
71 // This is the source URL for the element that the context menu was | 71 // This is the source URL for the element that the context menu was |
72 // invoked on. Example of elements with source URLs are img, audio, and | 72 // invoked on. Example of elements with source URLs are img, audio, and |
73 // video. | 73 // video. |
74 GURL src_url; | 74 GURL src_url; |
75 | 75 |
(...skipping 16 matching lines...) Expand all Loading... |
92 int64 frame_id; | 92 int64 frame_id; |
93 | 93 |
94 // This is the page state of the frame on which the context menu was invoked. | 94 // This is the page state of the frame on which the context menu was invoked. |
95 PageState frame_page_state; | 95 PageState frame_page_state; |
96 | 96 |
97 // These are the parameters for the media element that the context menu | 97 // These are the parameters for the media element that the context menu |
98 // was invoked on. | 98 // was invoked on. |
99 int media_flags; | 99 int media_flags; |
100 | 100 |
101 // This is the text of the selection that the context menu was invoked on. | 101 // This is the text of the selection that the context menu was invoked on. |
102 string16 selection_text; | 102 base::string16 selection_text; |
103 | 103 |
104 // The misspelled word under the cursor, if any. Used to generate the | 104 // The misspelled word under the cursor, if any. Used to generate the |
105 // |dictionary_suggestions| list. | 105 // |dictionary_suggestions| list. |
106 string16 misspelled_word; | 106 base::string16 misspelled_word; |
107 | 107 |
108 // The identifier of the misspelling under the cursor, if any. | 108 // The identifier of the misspelling under the cursor, if any. |
109 uint32 misspelling_hash; | 109 uint32 misspelling_hash; |
110 | 110 |
111 // Suggested replacements for a misspelled word under the cursor. | 111 // Suggested replacements for a misspelled word under the cursor. |
112 // This vector gets populated in the render process host | 112 // This vector gets populated in the render process host |
113 // by intercepting ViewHostMsg_ContextMenu in ResourceMessageFilter | 113 // by intercepting ViewHostMsg_ContextMenu in ResourceMessageFilter |
114 // and populating dictionary_suggestions if the type is EDITABLE | 114 // and populating dictionary_suggestions if the type is EDITABLE |
115 // and the misspelled_word is not empty. | 115 // and the misspelled_word is not empty. |
116 std::vector<string16> dictionary_suggestions; | 116 std::vector<base::string16> dictionary_suggestions; |
117 | 117 |
118 // If editable, flag for whether node is speech-input enabled. | 118 // If editable, flag for whether node is speech-input enabled. |
119 bool speech_input_enabled; | 119 bool speech_input_enabled; |
120 | 120 |
121 // If editable, flag for whether spell check is enabled or not. | 121 // If editable, flag for whether spell check is enabled or not. |
122 bool spellcheck_enabled; | 122 bool spellcheck_enabled; |
123 | 123 |
124 // Whether context is editable. | 124 // Whether context is editable. |
125 bool is_editable; | 125 bool is_editable; |
126 | 126 |
(...skipping 27 matching lines...) Expand all Loading... |
154 // Points representing the coordinates in the document space of the start and | 154 // Points representing the coordinates in the document space of the start and |
155 // end of the selection, if there is one. | 155 // end of the selection, if there is one. |
156 gfx::Point selection_start; | 156 gfx::Point selection_start; |
157 gfx::Point selection_end; | 157 gfx::Point selection_end; |
158 #endif | 158 #endif |
159 }; | 159 }; |
160 | 160 |
161 } // namespace content | 161 } // namespace content |
162 | 162 |
163 #endif // CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ | 163 #endif // CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ |
OLD | NEW |