Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: webkit/api/public/WebContextMenuData.h

Issue 385057: Deleted webkit/api which now lives in webkit.org (Closed)
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webkit/api/public/WebConsoleMessage.h ('k') | webkit/api/public/WebCookie.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
13 * distribution.
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef WebContextMenuData_h
32 #define WebContextMenuData_h
33
34 #include "WebPoint.h"
35 #include "WebString.h"
36 #include "WebURL.h"
37
38 namespace WebKit {
39
40 // This struct is passed to WebViewClient::ShowContextMenu.
41 struct WebContextMenuData {
42 enum MediaType {
43 // No special node is in context.
44 MediaTypeNone,
45 // An image node is selected.
46 MediaTypeImage,
47 // A video node is selected.
48 MediaTypeVideo,
49 // An audio node is selected.
50 MediaTypeAudio,
51 };
52 // The type of media the context menu is being invoked on.
53 MediaType mediaType;
54
55 // The x and y position of the mouse pointer (relative to the webview).
56 WebPoint mousePosition;
57
58 // The absolute URL of the link that is in context.
59 WebURL linkURL;
60
61 // The absolute URL of the image/video/audio that is in context.
62 WebURL srcURL;
63
64 // The absolute URL of the page in context.
65 WebURL pageURL;
66
67 // The absolute URL of the subframe in context.
68 WebURL frameURL;
69
70 // The encoding for the frame in context.
71 WebString frameEncoding;
72
73 enum MediaFlags {
74 MediaNone = 0x0,
75 MediaInError = 0x1,
76 MediaPaused = 0x2,
77 MediaMuted = 0x4,
78 MediaLoop = 0x8,
79 MediaCanSave = 0x10,
80 MediaHasAudio = 0x20,
81 };
82
83 // Extra attributes describing media elements.
84 int mediaFlags;
85
86 // The raw text of the selection in context.
87 WebString selectedText;
88
89 // Whether spell checking is enabled.
90 bool isSpellCheckingEnabled;
91
92 // The editable (possibily) misspelled word.
93 WebString misspelledWord;
94
95 // Whether context is editable.
96 bool isEditable;
97
98 enum EditFlags {
99 CanDoNone = 0x0,
100 CanUndo = 0x1,
101 CanRedo = 0x2,
102 CanCut = 0x4,
103 CanCopy = 0x8,
104 CanPaste = 0x10,
105 CanDelete = 0x20,
106 CanSelectAll = 0x40,
107 };
108
109 // Which edit operations are available in the context.
110 int editFlags;
111
112 // Security information for the context.
113 WebCString securityInfo;
114 };
115
116 } // namespace WebKit
117
118 #endif
OLDNEW
« no previous file with comments | « webkit/api/public/WebConsoleMessage.h ('k') | webkit/api/public/WebCookie.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698