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

Side by Side Diff: ui/base/dragdrop/gtk_dnd_util.h

Issue 207013003: Mark drags starting in web content as tainted to avoid file path forgery (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 6 years, 9 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 UI_BASE_DRAGDROP_GTK_DND_UTIL_H_ 5 #ifndef UI_BASE_DRAGDROP_GTK_DND_UTIL_H_
6 #define UI_BASE_DRAGDROP_GTK_DND_UTIL_H_ 6 #define UI_BASE_DRAGDROP_GTK_DND_UTIL_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 21 matching lines...) Expand all
32 // Other types. NETSCAPE_URL is provided for compatibility with other 32 // Other types. NETSCAPE_URL is provided for compatibility with other
33 // apps. 33 // apps.
34 NETSCAPE_URL = 1 << 7, 34 NETSCAPE_URL = 1 << 7,
35 35
36 // Used for drag-out download. 36 // Used for drag-out download.
37 TEXT_PLAIN_NO_CHARSET = 1 << 8, 37 TEXT_PLAIN_NO_CHARSET = 1 << 8,
38 DIRECT_SAVE_FILE = 1 << 9, 38 DIRECT_SAVE_FILE = 1 << 9,
39 39
40 // Custom data for web drag/drop. 40 // Custom data for web drag/drop.
41 CUSTOM_DATA = 1 << 10, 41 CUSTOM_DATA = 1 << 10,
42 INVALID_TARGET = 1 << 11, 42
43 // Tracks if the drag originated from the renderer.
44 RENDERER_TAINT = 1 << 11,
45
46 INVALID_TARGET = 1 << 12,
43 }; 47 };
44 48
45 // Get the atom for a given target (of the above enum type). Will return NULL 49 // Get the atom for a given target (of the above enum type). Will return NULL
46 // for non-custom targets, such as CHROME_TEXT_PLAIN. 50 // for non-custom targets, such as CHROME_TEXT_PLAIN.
47 UI_BASE_EXPORT GdkAtom GetAtomForTarget(int target); 51 UI_BASE_EXPORT GdkAtom GetAtomForTarget(int target);
48 52
49 // Creates a target list from the given mask. The mask should be an OR of 53 // Creates a target list from the given mask. The mask should be an OR of
50 // CHROME_* values. The target list is returned with ref count 1; the caller 54 // CHROME_* values. The target list is returned with ref count 1; the caller
51 // is responsible for calling gtk_target_list_unref() when it is no longer 55 // is responsible for calling gtk_target_list_unref() when it is no longer
52 // needed. 56 // needed.
(...skipping 29 matching lines...) Expand all
82 std::vector<GURL>* urls); 86 std::vector<GURL>* urls);
83 87
84 // Extracts a Netscape URL (url\ntitle) from |selection_data|. 88 // Extracts a Netscape URL (url\ntitle) from |selection_data|.
85 UI_BASE_EXPORT bool ExtractNetscapeURL(GtkSelectionData* selection_data, 89 UI_BASE_EXPORT bool ExtractNetscapeURL(GtkSelectionData* selection_data,
86 GURL* url, 90 GURL* url,
87 base::string16* title); 91 base::string16* title);
88 92
89 } // namespace ui 93 } // namespace ui
90 94
91 #endif // UI_BASE_DRAGDROP_GTK_DND_UTIL_H_ 95 #endif // UI_BASE_DRAGDROP_GTK_DND_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698