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

Side by Side Diff: ui/views/mus/os_exchange_data_provider_mus.cc

Issue 2266603002: mus: Implement interwindow drag and drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Uploaded for a few comments. Created 4 years, 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/views/mus/os_exchange_data_provider_mus.h" 5 #include "ui/views/mus/os_exchange_data_provider_mus.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "mojo/common/common_type_converters.h" 10 #include "mojo/common/common_type_converters.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 std::vector<uint8_t>* bytes) { 44 std::vector<uint8_t>* bytes) {
45 const unsigned char* front = 45 const unsigned char* front =
46 reinterpret_cast<const uint8_t*>(str.data()); 46 reinterpret_cast<const uint8_t*>(str.data());
47 bytes->insert(bytes->end(), front, front + (str.size() * 2)); 47 bytes->insert(bytes->end(), front, front + (str.size() * 2));
48 } 48 }
49 49
50 } // namespace 50 } // namespace
51 51
52 OSExchangeDataProviderMus::OSExchangeDataProviderMus() {} 52 OSExchangeDataProviderMus::OSExchangeDataProviderMus() {}
53 53
54 OSExchangeDataProviderMus::OSExchangeDataProviderMus(const Data& data)
55 : mime_data_(data) {}
56
54 OSExchangeDataProviderMus::~OSExchangeDataProviderMus() {} 57 OSExchangeDataProviderMus::~OSExchangeDataProviderMus() {}
55 58
56 OSExchangeDataProviderMus::Data OSExchangeDataProviderMus::GetData() const { 59 OSExchangeDataProviderMus::Data OSExchangeDataProviderMus::GetData() const {
57 return mime_data_; 60 return mime_data_;
58 } 61 }
59 62
60 std::unique_ptr<ui::OSExchangeData::Provider> 63 std::unique_ptr<ui::OSExchangeData::Provider>
61 OSExchangeDataProviderMus::Clone() const { 64 OSExchangeDataProviderMus::Clone() const {
62 std::unique_ptr<OSExchangeDataProviderMus> r = 65 std::unique_ptr<OSExchangeDataProviderMus> r =
63 base::MakeUnique<OSExchangeDataProviderMus>(); 66 base::MakeUnique<OSExchangeDataProviderMus>();
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 GURL test_url(str); 358 GURL test_url(str);
356 if (!test_url.is_valid()) 359 if (!test_url.is_valid())
357 return false; 360 return false;
358 361
359 if (url) 362 if (url)
360 *url = test_url; 363 *url = test_url;
361 return true; 364 return true;
362 } 365 }
363 366
364 } // namespace views 367 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698