| 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 26 matching lines...) Expand all Loading... |
| 37 void OSExchangeDataProviderAura::MarkOriginatedFromRenderer() { | 37 void OSExchangeDataProviderAura::MarkOriginatedFromRenderer() { |
| 38 // TODO(dcheng): Currently unneeded because ChromeOS Aura correctly separates | 38 // TODO(dcheng): Currently unneeded because ChromeOS Aura correctly separates |
| 39 // URL and filename metadata, and does not implement the DownloadURL protocol. | 39 // URL and filename metadata, and does not implement the DownloadURL protocol. |
| 40 } | 40 } |
| 41 | 41 |
| 42 bool OSExchangeDataProviderAura::DidOriginateFromRenderer() const { | 42 bool OSExchangeDataProviderAura::DidOriginateFromRenderer() const { |
| 43 return false; | 43 return false; |
| 44 } | 44 } |
| 45 | 45 |
| 46 void OSExchangeDataProviderAura::SetString(const base::string16& data) { | 46 void OSExchangeDataProviderAura::SetString(const base::string16& data) { |
| 47 if (HasString()) |
| 48 return; |
| 49 |
| 47 string_ = data; | 50 string_ = data; |
| 48 formats_ |= OSExchangeData::STRING; | 51 formats_ |= OSExchangeData::STRING; |
| 49 } | 52 } |
| 50 | 53 |
| 51 void OSExchangeDataProviderAura::SetURL(const GURL& url, | 54 void OSExchangeDataProviderAura::SetURL(const GURL& url, |
| 52 const base::string16& title) { | 55 const base::string16& title) { |
| 53 url_ = url; | 56 url_ = url; |
| 54 title_ = title; | 57 title_ = title; |
| 55 formats_ |= OSExchangeData::URL; | 58 formats_ |= OSExchangeData::URL; |
| 56 | 59 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 205 |
| 203 /////////////////////////////////////////////////////////////////////////////// | 206 /////////////////////////////////////////////////////////////////////////////// |
| 204 // OSExchangeData, public: | 207 // OSExchangeData, public: |
| 205 | 208 |
| 206 // static | 209 // static |
| 207 OSExchangeData::Provider* OSExchangeData::CreateProvider() { | 210 OSExchangeData::Provider* OSExchangeData::CreateProvider() { |
| 208 return new OSExchangeDataProviderAura(); | 211 return new OSExchangeDataProviderAura(); |
| 209 } | 212 } |
| 210 | 213 |
| 211 } // namespace ui | 214 } // namespace ui |
| OLD | NEW |