| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "app/os_exchange_data_provider_win.h" | 5 #include "ui/base/dragdrop/os_exchange_data_provider_win.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/i18n/file_util_icu.h" | 9 #include "base/i18n/file_util_icu.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/pickle.h" | 11 #include "base/pickle.h" |
| 12 #include "base/scoped_handle.h" | 12 #include "base/scoped_handle.h" |
| 13 #include "base/stl_util-inl.h" | 13 #include "base/stl_util-inl.h" |
| 14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 15 #include "base/win/scoped_hglobal.h" | 15 #include "base/win/scoped_hglobal.h" |
| 16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 17 #include "grit/app_strings.h" | 17 #include "grit/app_strings.h" |
| 18 #include "net/base/net_util.h" | 18 #include "net/base/net_util.h" |
| 19 #include "ui/base/clipboard/clipboard_util_win.h" | 19 #include "ui/base/clipboard/clipboard_util_win.h" |
| 20 | 20 |
| 21 using ui::ClipboardUtil; | 21 namespace ui { |
| 22 | 22 |
| 23 // Creates a new STGMEDIUM object to hold the specified text. The caller | 23 // Creates a new STGMEDIUM object to hold the specified text. The caller |
| 24 // owns the resulting object. The "Bytes" version does not NULL terminate, the | 24 // owns the resulting object. The "Bytes" version does not NULL terminate, the |
| 25 // string version does. | 25 // string version does. |
| 26 static STGMEDIUM* GetStorageForBytes(const char* data, size_t bytes); | 26 static STGMEDIUM* GetStorageForBytes(const char* data, size_t bytes); |
| 27 static STGMEDIUM* GetStorageForWString(const std::wstring& data); | 27 static STGMEDIUM* GetStorageForWString(const std::wstring& data); |
| 28 static STGMEDIUM* GetStorageForString(const std::string& data); | 28 static STGMEDIUM* GetStorageForString(const std::string& data); |
| 29 // Creates the contents of an Internet Shortcut file for the given URL. | 29 // Creates the contents of an Internet Shortcut file for the given URL. |
| 30 static void GetInternetShortcutFileContents(const GURL& url, std::string* data); | 30 static void GetInternetShortcutFileContents(const GURL& url, std::string* data); |
| 31 // Creates a valid file name given a suggested title and URL. | 31 // Creates a valid file name given a suggested title and URL. |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 // static | 914 // static |
| 915 OSExchangeData::Provider* OSExchangeData::CreateProvider() { | 915 OSExchangeData::Provider* OSExchangeData::CreateProvider() { |
| 916 return new OSExchangeDataProviderWin(); | 916 return new OSExchangeDataProviderWin(); |
| 917 } | 917 } |
| 918 | 918 |
| 919 // static | 919 // static |
| 920 OSExchangeData::CustomFormat OSExchangeData::RegisterCustomFormat( | 920 OSExchangeData::CustomFormat OSExchangeData::RegisterCustomFormat( |
| 921 const std::string& type) { | 921 const std::string& type) { |
| 922 return RegisterClipboardFormat(ASCIIToWide(type).c_str()); | 922 return RegisterClipboardFormat(ASCIIToWide(type).c_str()); |
| 923 } | 923 } |
| 924 |
| 925 } // namespace ui |
| OLD | NEW |