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

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

Issue 660173002: Type conversion fixes, ui/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile Created 6 years, 2 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
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 <shellapi.h> 10 #include <shellapi.h>
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 161
162 } // namespace 162 } // namespace
163 163
164 // Clipboard::FormatType implementation. 164 // Clipboard::FormatType implementation.
165 Clipboard::FormatType::FormatType() : data_() {} 165 Clipboard::FormatType::FormatType() : data_() {}
166 166
167 Clipboard::FormatType::FormatType(UINT native_format) : data_() { 167 Clipboard::FormatType::FormatType(UINT native_format) : data_() {
168 // There's no good way to actually initialize this in the constructor in 168 // There's no good way to actually initialize this in the constructor in
169 // C++03. 169 // C++03.
170 data_.cfFormat = native_format; 170 data_.cfFormat = static_cast<CLIPFORMAT>(native_format);
171 data_.dwAspect = DVASPECT_CONTENT; 171 data_.dwAspect = DVASPECT_CONTENT;
172 data_.lindex = -1; 172 data_.lindex = -1;
173 data_.tymed = TYMED_HGLOBAL; 173 data_.tymed = TYMED_HGLOBAL;
174 } 174 }
175 175
176 Clipboard::FormatType::FormatType(UINT native_format, LONG index) : data_() { 176 Clipboard::FormatType::FormatType(UINT native_format, LONG index) : data_() {
177 // There's no good way to actually initialize this in the constructor in 177 // There's no good way to actually initialize this in the constructor in
178 // C++03. 178 // C++03.
179 data_.cfFormat = native_format; 179 data_.cfFormat = static_cast<CLIPFORMAT>(native_format);
180 data_.dwAspect = DVASPECT_CONTENT; 180 data_.dwAspect = DVASPECT_CONTENT;
181 data_.lindex = index; 181 data_.lindex = index;
182 data_.tymed = TYMED_HGLOBAL; 182 data_.tymed = TYMED_HGLOBAL;
183 } 183 }
184 184
185 Clipboard::FormatType::~FormatType() { 185 Clipboard::FormatType::~FormatType() {
186 } 186 }
187 187
188 std::string Clipboard::FormatType::Serialize() const { 188 std::string Clipboard::FormatType::Serialize() const {
189 return base::IntToString(data_.cfFormat); 189 return base::IntToString(data_.cfFormat);
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 if (!clipboard_owner_) 834 if (!clipboard_owner_)
835 return NULL; 835 return NULL;
836 836
837 if (clipboard_owner_->hwnd() == NULL) 837 if (clipboard_owner_->hwnd() == NULL)
838 clipboard_owner_->Create(base::Bind(&ClipboardOwnerWndProc)); 838 clipboard_owner_->Create(base::Bind(&ClipboardOwnerWndProc));
839 839
840 return clipboard_owner_->hwnd(); 840 return clipboard_owner_->hwnd();
841 } 841 }
842 842
843 } // namespace ui 843 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698