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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 formats_ |= OSExchangeData::PICKLED_DATA; | 66 formats_ |= OSExchangeData::PICKLED_DATA; |
67 } | 67 } |
68 | 68 |
69 bool OSExchangeDataProviderAura::GetString(base::string16* data) const { | 69 bool OSExchangeDataProviderAura::GetString(base::string16* data) const { |
70 if ((formats_ & OSExchangeData::STRING) == 0) | 70 if ((formats_ & OSExchangeData::STRING) == 0) |
71 return false; | 71 return false; |
72 *data = string_; | 72 *data = string_; |
73 return true; | 73 return true; |
74 } | 74 } |
75 | 75 |
76 bool OSExchangeDataProviderAura::GetURLAndTitle(GURL* url, | 76 bool OSExchangeDataProviderAura::GetURLAndTitle( |
77 base::string16* title) const { | 77 OSExchangeData::FilenameToURLPolicy policy, |
| 78 GURL* url, |
| 79 base::string16* title) const { |
| 80 // TODO(dcheng): implement filename conversion. |
78 if ((formats_ & OSExchangeData::URL) == 0) { | 81 if ((formats_ & OSExchangeData::URL) == 0) { |
79 title->clear(); | 82 title->clear(); |
80 return GetPlainTextURL(url); | 83 return GetPlainTextURL(url); |
81 } | 84 } |
82 | 85 |
83 if (!url_.is_valid()) | 86 if (!url_.is_valid()) |
84 return false; | 87 return false; |
85 | 88 |
86 *url = url_; | 89 *url = url_; |
87 *title = title_; | 90 *title = title_; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 190 |
188 /////////////////////////////////////////////////////////////////////////////// | 191 /////////////////////////////////////////////////////////////////////////////// |
189 // OSExchangeData, public: | 192 // OSExchangeData, public: |
190 | 193 |
191 // static | 194 // static |
192 OSExchangeData::Provider* OSExchangeData::CreateProvider() { | 195 OSExchangeData::Provider* OSExchangeData::CreateProvider() { |
193 return new OSExchangeDataProviderAura(); | 196 return new OSExchangeDataProviderAura(); |
194 } | 197 } |
195 | 198 |
196 } // namespace ui | 199 } // namespace ui |
OLD | NEW |