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

Side by Side Diff: ui/base/dragdrop/os_exchange_data_provider_aura.cc

Issue 208313009: Fix the HTML5 drag and drop demos on Linux and CrOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | ui/base/dragdrop/os_exchange_data_provider_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698