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

Side by Side Diff: third_party/WebKit/public/platform/WebDragData.h

Issue 1723763002: Add WebDragData to blink::WebView::dragtargetDrop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // Only valid when storageType == StorageTypeFileSystemFile. 79 // Only valid when storageType == StorageTypeFileSystemFile.
80 WebURL fileSystemURL; 80 WebURL fileSystemURL;
81 long long fileSystemFileSize; 81 long long fileSystemFileSize;
82 82
83 // Only valid when stringType == "text/html". 83 // Only valid when stringType == "text/html".
84 WebURL baseURL; 84 WebURL baseURL;
85 }; 85 };
86 86
87 WebDragData() 87 WebDragData()
88 : m_valid(false) 88 : m_valid(false)
89 , m_canReadContent(true)
89 , m_modifierKeyState(0) 90 , m_modifierKeyState(0)
90 { } 91 { }
91 92
92 WebDragData(const WebDragData& object) 93 WebDragData(const WebDragData& object)
93 : m_valid(object.m_valid) 94 : m_valid(object.m_valid)
95 , m_canReadContent(object.m_canReadContent)
94 , m_itemList(object.m_itemList) 96 , m_itemList(object.m_itemList)
95 , m_modifierKeyState(object.m_modifierKeyState) 97 , m_modifierKeyState(object.m_modifierKeyState)
96 , m_filesystemId(object.m_filesystemId) 98 , m_filesystemId(object.m_filesystemId)
97 { } 99 { }
98 100
99 WebDragData& operator=(const WebDragData& object) 101 WebDragData& operator=(const WebDragData& object)
100 { 102 {
101 m_valid = object.m_valid; 103 m_valid = object.m_valid;
104 m_canReadContent = object.m_canReadContent;
102 m_itemList = object.m_itemList; 105 m_itemList = object.m_itemList;
103 m_modifierKeyState = object.m_modifierKeyState; 106 m_modifierKeyState = object.m_modifierKeyState;
104 m_filesystemId = object.m_filesystemId; 107 m_filesystemId = object.m_filesystemId;
105 return *this; 108 return *this;
106 } 109 }
107 110
108 ~WebDragData() { } 111 ~WebDragData() { }
109 112
110 WebVector<Item> items() const 113 WebVector<Item> items() const
111 { 114 {
(...skipping 18 matching lines...) Expand all
130 { 133 {
131 return m_filesystemId; 134 return m_filesystemId;
132 } 135 }
133 136
134 void setFilesystemId(const WebString& filesystemId) 137 void setFilesystemId(const WebString& filesystemId)
135 { 138 {
136 // The ID is an opaque string, given by and validated by chromium port. 139 // The ID is an opaque string, given by and validated by chromium port.
137 m_filesystemId = filesystemId; 140 m_filesystemId = filesystemId;
138 } 141 }
139 142
143 void setCanReadContent(bool canReadContent)
144 {
145 m_canReadContent = canReadContent;
146 }
147
148 bool canReadContent() const { return m_canReadContent; }
149
140 private: 150 private:
141 bool m_valid; 151 bool m_valid;
152 bool m_canReadContent;
142 WebVector<Item> m_itemList; 153 WebVector<Item> m_itemList;
143 int m_modifierKeyState; // State of Shift/Ctrl/Alt/Meta keys. 154 int m_modifierKeyState; // State of Shift/Ctrl/Alt/Meta keys.
144 WebString m_filesystemId; 155 WebString m_filesystemId;
145 }; 156 };
146 157
147 } // namespace blink 158 } // namespace blink
148 159
149 #endif 160 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698