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

Side by Side Diff: ui/base/dragdrop/os_exchange_data_provider_win.cc

Issue 6200005: Move OSExchangeData from src/app to src/ui/base/dragdrop... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_win.h ('k') | ui/base/dragdrop/os_exchange_data_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698