OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <shlobj.h> | 5 #include <shlobj.h> |
6 | 6 |
7 #include "chrome/common/os_exchange_data.h" | 7 #include "chrome/common/os_exchange_data.h" |
8 | 8 |
| 9 #include "app/l10n_util.h" |
9 #include "base/clipboard_util.h" | 10 #include "base/clipboard_util.h" |
10 #include "base/file_util.h" | 11 #include "base/file_util.h" |
11 #include "base/logging.h" | 12 #include "base/logging.h" |
12 #include "base/pickle.h" | 13 #include "base/pickle.h" |
13 #include "base/scoped_handle.h" | 14 #include "base/scoped_handle.h" |
14 #include "base/stl_util-inl.h" | 15 #include "base/stl_util-inl.h" |
15 #include "base/string_util.h" | 16 #include "base/string_util.h" |
16 #include "chrome/common/l10n_util.h" | |
17 #include "chrome/common/win_util.h" | 17 #include "chrome/common/win_util.h" |
18 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
19 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
20 #include "net/base/net_util.h" | 20 #include "net/base/net_util.h" |
21 | 21 |
22 // Creates a new STGMEDIUM object to hold the specified text. The caller | 22 // Creates a new STGMEDIUM object to hold the specified text. The caller |
23 // owns the resulting object. The "Bytes" version does not NULL terminate, the | 23 // owns the resulting object. The "Bytes" version does not NULL terminate, the |
24 // string version does. | 24 // string version does. |
25 static STGMEDIUM* GetStorageForBytes(const char* data, size_t bytes); | 25 static STGMEDIUM* GetStorageForBytes(const char* data, size_t bytes); |
26 static STGMEDIUM* GetStorageForWString(const std::wstring& data); | 26 static STGMEDIUM* GetStorageForWString(const std::wstring& data); |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 descriptor->fgd[0].dwFlags = FD_LINKUI; | 698 descriptor->fgd[0].dwFlags = FD_LINKUI; |
699 | 699 |
700 GlobalUnlock(handle); | 700 GlobalUnlock(handle); |
701 | 701 |
702 STGMEDIUM* storage = new STGMEDIUM; | 702 STGMEDIUM* storage = new STGMEDIUM; |
703 storage->hGlobal = handle; | 703 storage->hGlobal = handle; |
704 storage->tymed = TYMED_HGLOBAL; | 704 storage->tymed = TYMED_HGLOBAL; |
705 storage->pUnkForRelease = NULL; | 705 storage->pUnkForRelease = NULL; |
706 return storage; | 706 return storage; |
707 } | 707 } |
OLD | NEW |