| 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::MarkOriginatedFromRenderer() { |
| 37 // TODO(dcheng): Currently unneeded because ChromeOS Aura correctly separates |
| 38 // URL and filename metadata, and does not implement the DownloadURL protocol. |
| 39 } |
| 40 |
| 41 bool OSExchangeDataProviderAura::DidOriginateFromRenderer() 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 199 |
| 191 /////////////////////////////////////////////////////////////////////////////// | 200 /////////////////////////////////////////////////////////////////////////////// |
| 192 // OSExchangeData, public: | 201 // OSExchangeData, public: |
| 193 | 202 |
| 194 // static | 203 // static |
| 195 OSExchangeData::Provider* OSExchangeData::CreateProvider() { | 204 OSExchangeData::Provider* OSExchangeData::CreateProvider() { |
| 196 return new OSExchangeDataProviderAura(); | 205 return new OSExchangeDataProviderAura(); |
| 197 } | 206 } |
| 198 | 207 |
| 199 } // namespace ui | 208 } // namespace ui |
| OLD | NEW |