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

Side by Side Diff: ui/base/clipboard/clipboard_win.cc

Issue 11225021: Move flash clipboard to the new proxy and add custom format support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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
« no previous file with comments | « ui/base/clipboard/clipboard_util_win.cc ('k') | ui/base/clipboard/scoped_clipboard_writer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Many of these functions are based on those found in 5 // Many of these functions are based on those found in
6 // webkit/port/platform/PasteboardWin.cpp 6 // webkit/port/platform/PasteboardWin.cpp
7 7
8 #include "ui/base/clipboard/clipboard.h" 8 #include "ui/base/clipboard/clipboard.h"
9 9
10 #include <shlobj.h> 10 #include <shlobj.h>
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 // static 820 // static
821 const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() { 821 const Clipboard::FormatType& Clipboard::GetWebCustomDataFormatType() {
822 CR_DEFINE_STATIC_LOCAL( 822 CR_DEFINE_STATIC_LOCAL(
823 FormatType, 823 FormatType,
824 type, 824 type,
825 (ClipboardUtil::GetWebCustomDataFormat()->cfFormat)); 825 (ClipboardUtil::GetWebCustomDataFormat()->cfFormat));
826 return type; 826 return type;
827 } 827 }
828 828
829 // static 829 // static
830 const Clipboard::FormatType& Clipboard::GetPepperCustomDataFormatType() {
831 CR_DEFINE_STATIC_LOCAL(
832 FormatType,
833 type,
834 (ClipboardUtil::GetPepperCustomDataFormat()->cfFormat));
835 return type;
836 }
837
838 // static
830 void Clipboard::FreeData(unsigned int format, HANDLE data) { 839 void Clipboard::FreeData(unsigned int format, HANDLE data) {
831 if (format == CF_BITMAP) 840 if (format == CF_BITMAP)
832 ::DeleteObject(static_cast<HBITMAP>(data)); 841 ::DeleteObject(static_cast<HBITMAP>(data));
833 else 842 else
834 ::GlobalFree(data); 843 ::GlobalFree(data);
835 } 844 }
836 845
837 HWND Clipboard::GetClipboardWindow() const { 846 HWND Clipboard::GetClipboardWindow() const {
838 if (!clipboard_owner_ && create_window_) { 847 if (!clipboard_owner_ && create_window_) {
839 clipboard_owner_ = ::CreateWindow(L"ClipboardOwnerWindowClass", 848 clipboard_owner_ = ::CreateWindow(L"ClipboardOwnerWindowClass",
840 L"ClipboardOwnerWindow", 849 L"ClipboardOwnerWindow",
841 0, 0, 0, 0, 0, 850 0, 0, 0, 0, 0,
842 HWND_MESSAGE, 851 HWND_MESSAGE,
843 0, 0, 0); 852 0, 0, 0);
844 } 853 }
845 return clipboard_owner_; 854 return clipboard_owner_;
846 } 855 }
847 856
848 } // namespace ui 857 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_util_win.cc ('k') | ui/base/clipboard/scoped_clipboard_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698