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