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

Side by Side Diff: Source/core/platform/chromium/ClipboardChromium.cpp

Issue 23496045: Have V8Clipboard::clearDataMethodCustom() use V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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
« no previous file with comments | « Source/bindings/v8/custom/V8ClipboardCustom.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Google Inc. 3 * Copyright (C) 2008, 2009 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 { 239 {
240 return adoptRef(new ClipboardChromium(clipboardType, dataObject, policy, fra me)); 240 return adoptRef(new ClipboardChromium(clipboardType, dataObject, policy, fra me));
241 } 241 }
242 242
243 void ClipboardChromium::clearData(const String& type) 243 void ClipboardChromium::clearData(const String& type)
244 { 244 {
245 if (!canWriteData()) 245 if (!canWriteData())
246 return; 246 return;
247 247
248 m_dataObject->clearData(normalizeType(type)); 248 m_dataObject->clearData(normalizeType(type));
249
250 ASSERT_NOT_REACHED();
251 } 249 }
252 250
253 void ClipboardChromium::clearAllData() 251 void ClipboardChromium::clearAllData()
254 { 252 {
255 if (!canWriteData()) 253 if (!canWriteData())
256 return; 254 return;
257 255
258 m_dataObject->clearAll(); 256 m_dataObject->clearAll();
259 } 257 }
260 258
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 470
473 PassRefPtr<DataTransferItemList> ClipboardChromium::items() 471 PassRefPtr<DataTransferItemList> ClipboardChromium::items()
474 { 472 {
475 // FIXME: According to the spec, we are supposed to return the same collecti on of items each 473 // FIXME: According to the spec, we are supposed to return the same collecti on of items each
476 // time. We now return a wrapper that always wraps the *same* set of items, so JS shouldn't be 474 // time. We now return a wrapper that always wraps the *same* set of items, so JS shouldn't be
477 // able to tell, but we probably still want to fix this. 475 // able to tell, but we probably still want to fix this.
478 return DataTransferItemListPolicyWrapper::create(this, m_dataObject); 476 return DataTransferItemListPolicyWrapper::create(this, m_dataObject);
479 } 477 }
480 478
481 } // namespace WebCore 479 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8ClipboardCustom.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698