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 #include "ui/base/dragdrop/os_exchange_data_provider_aura.h" | 5 #include "ui/base/dragdrop/os_exchange_data_provider_aura.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "net/base/net_util.h" | 9 #include "net/base/net_util.h" |
10 #include "ui/base/clipboard/clipboard.h" | 10 #include "ui/base/clipboard/clipboard.h" |
(...skipping 15 matching lines...) Expand all Loading... | |
26 ret->title_ = title_; | 26 ret->title_ = title_; |
27 ret->filenames_ = filenames_; | 27 ret->filenames_ = filenames_; |
28 ret->pickle_data_ = pickle_data_; | 28 ret->pickle_data_ = pickle_data_; |
29 // We skip copying the drag images. | 29 // We skip copying the drag images. |
30 ret->html_ = html_; | 30 ret->html_ = html_; |
31 ret->base_url_ = base_url_; | 31 ret->base_url_ = base_url_; |
32 | 32 |
33 return ret; | 33 return ret; |
34 } | 34 } |
35 | 35 |
36 void OSExchangeDataProviderAura::MarkRendererTainted() { | |
37 // TODO(dcheng): Currently unneeded because ChromeOS Aura correctly separates | |
38 // URL and filename metadata, and does not implement the DownloadURL protocol. | |
tony
2014/03/21 23:09:00
I worry that someone will implement DownloadURL an
dcheng
2014/03/21 23:57:07
Implementing this breaks dragging and dropping fil
| |
39 } | |
40 | |
41 bool OSExchangeDataProviderAura::IsRendererTainted() const { | |
42 return false; | |
43 } | |
44 | |
36 void OSExchangeDataProviderAura::SetString(const base::string16& data) { | 45 void OSExchangeDataProviderAura::SetString(const base::string16& data) { |
37 string_ = data; | 46 string_ = data; |
38 formats_ |= OSExchangeData::STRING; | 47 formats_ |= OSExchangeData::STRING; |
39 } | 48 } |
40 | 49 |
41 void OSExchangeDataProviderAura::SetURL(const GURL& url, | 50 void OSExchangeDataProviderAura::SetURL(const GURL& url, |
42 const base::string16& title) { | 51 const base::string16& title) { |
43 url_ = url; | 52 url_ = url; |
44 title_ = title; | 53 title_ = title; |
45 formats_ |= OSExchangeData::URL; | 54 formats_ |= OSExchangeData::URL; |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
192 | 201 |
193 /////////////////////////////////////////////////////////////////////////////// | 202 /////////////////////////////////////////////////////////////////////////////// |
194 // OSExchangeData, public: | 203 // OSExchangeData, public: |
195 | 204 |
196 // static | 205 // static |
197 OSExchangeData::Provider* OSExchangeData::CreateProvider() { | 206 OSExchangeData::Provider* OSExchangeData::CreateProvider() { |
198 return new OSExchangeDataProviderAura(); | 207 return new OSExchangeDataProviderAura(); |
199 } | 208 } |
200 | 209 |
201 } // namespace ui | 210 } // namespace ui |
OLD | NEW |