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

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

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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/core/page/PerformanceUserTiming.cpp ('k') | Source/core/svg/SVGAngle.cpp » ('j') | 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 RefPtr<ChromiumDataObjectItem> item = m_dataObject->item(index); 99 RefPtr<ChromiumDataObjectItem> item = m_dataObject->item(index);
100 if (!item) 100 if (!item)
101 return 0; 101 return 0;
102 102
103 return DataTransferItemPolicyWrapper::create(m_clipboard, item); 103 return DataTransferItemPolicyWrapper::create(m_clipboard, item);
104 } 104 }
105 105
106 void DataTransferItemListPolicyWrapper::deleteItem(unsigned long index, Exceptio nCode& ec) 106 void DataTransferItemListPolicyWrapper::deleteItem(unsigned long index, Exceptio nCode& ec)
107 { 107 {
108 if (!m_clipboard->canWriteData()) { 108 if (!m_clipboard->canWriteData()) {
109 ec = INVALID_STATE_ERR; 109 ec = InvalidStateError;
110 return; 110 return;
111 } 111 }
112 m_dataObject->deleteItem(index); 112 m_dataObject->deleteItem(index);
113 } 113 }
114 114
115 void DataTransferItemListPolicyWrapper::clear() 115 void DataTransferItemListPolicyWrapper::clear()
116 { 116 {
117 if (!m_clipboard->canWriteData()) 117 if (!m_clipboard->canWriteData())
118 return; 118 return;
119 m_dataObject->clearAll(); 119 m_dataObject->clearAll();
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 460
461 PassRefPtr<DataTransferItemList> ClipboardChromium::items() 461 PassRefPtr<DataTransferItemList> ClipboardChromium::items()
462 { 462 {
463 // FIXME: According to the spec, we are supposed to return the same collecti on of items each 463 // FIXME: According to the spec, we are supposed to return the same collecti on of items each
464 // time. We now return a wrapper that always wraps the *same* set of items, so JS shouldn't be 464 // time. We now return a wrapper that always wraps the *same* set of items, so JS shouldn't be
465 // able to tell, but we probably still want to fix this. 465 // able to tell, but we probably still want to fix this.
466 return DataTransferItemListPolicyWrapper::create(this, m_dataObject); 466 return DataTransferItemListPolicyWrapper::create(this, m_dataObject);
467 } 467 }
468 468
469 } // namespace WebCore 469 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/PerformanceUserTiming.cpp ('k') | Source/core/svg/SVGAngle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698