OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "app/os_exchange_data_provider_win.h" |
6 | 6 |
7 #include "app/clipboard/clipboard_util_win.h" | 7 #include "app/clipboard/clipboard_util_win.h" |
8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/i18n/file_util_icu.h" | 10 #include "base/i18n/file_util_icu.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/pickle.h" | 12 #include "base/pickle.h" |
13 #include "base/scoped_handle.h" | 13 #include "base/scoped_handle.h" |
14 #include "base/stl_util-inl.h" | 14 #include "base/stl_util-inl.h" |
15 #include "base/string_util.h" | 15 #include "base/utf_string_conversions.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 | 19 |
20 // Creates a new STGMEDIUM object to hold the specified text. The caller | 20 // Creates a new STGMEDIUM object to hold the specified text. The caller |
21 // owns the resulting object. The "Bytes" version does not NULL terminate, the | 21 // owns the resulting object. The "Bytes" version does not NULL terminate, the |
22 // string version does. | 22 // string version does. |
23 static STGMEDIUM* GetStorageForBytes(const char* data, size_t bytes); | 23 static STGMEDIUM* GetStorageForBytes(const char* data, size_t bytes); |
24 static STGMEDIUM* GetStorageForWString(const std::wstring& data); | 24 static STGMEDIUM* GetStorageForWString(const std::wstring& data); |
25 static STGMEDIUM* GetStorageForString(const std::string& data); | 25 static STGMEDIUM* GetStorageForString(const std::string& data); |
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 // static | 909 // static |
910 OSExchangeData::Provider* OSExchangeData::CreateProvider() { | 910 OSExchangeData::Provider* OSExchangeData::CreateProvider() { |
911 return new OSExchangeDataProviderWin(); | 911 return new OSExchangeDataProviderWin(); |
912 } | 912 } |
913 | 913 |
914 // static | 914 // static |
915 OSExchangeData::CustomFormat OSExchangeData::RegisterCustomFormat( | 915 OSExchangeData::CustomFormat OSExchangeData::RegisterCustomFormat( |
916 const std::string& type) { | 916 const std::string& type) { |
917 return RegisterClipboardFormat(ASCIIToWide(type).c_str()); | 917 return RegisterClipboardFormat(ASCIIToWide(type).c_str()); |
918 } | 918 } |
OLD | NEW |