• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2009, The Android Open Source Project
3  * Copyright (C) 2006, 2007 Apple Inc.  All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
15  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
18  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  */
26 
27 #include "config.h"
28 #include "ClipboardAndroid.h"
29 
30 #include "CachedImage.h"
31 #include "Element.h"
32 #include "FileList.h"
33 #include "Frame.h"
34 #include "Range.h"
35 
36 namespace WebCore {
37 
ClipboardAndroid(ClipboardAccessPolicy policy,bool isForDragging)38 ClipboardAndroid::ClipboardAndroid(ClipboardAccessPolicy policy, bool isForDragging)
39     : Clipboard(policy, isForDragging)
40 {
41 }
42 
~ClipboardAndroid()43 ClipboardAndroid::~ClipboardAndroid()
44 {
45 }
46 
clearData(const String &)47 void ClipboardAndroid::clearData(const String&)
48 {
49     ASSERT(isForDragging());
50 }
51 
clearAllData()52 void ClipboardAndroid::clearAllData()
53 {
54     ASSERT(isForDragging());
55 }
56 
getData(const String &,bool & success) const57 String ClipboardAndroid::getData(const String&, bool& success) const
58 {
59     success = false;
60     return "";
61 }
62 
setData(const String &,const String &)63 bool ClipboardAndroid::setData(const String&, const String&)
64 {
65     ASSERT(isForDragging());
66     return false;
67 }
68 
69 // extensions beyond IE's API
types() const70 HashSet<String> ClipboardAndroid::types() const
71 {
72     return HashSet<String>();
73 }
74 
files() const75 PassRefPtr<FileList> ClipboardAndroid::files() const
76 {
77     return 0;
78 }
79 
setDragImage(CachedImage *,const IntPoint &)80 void ClipboardAndroid::setDragImage(CachedImage*, const IntPoint&)
81 {
82 }
83 
setDragImageElement(Node *,const IntPoint &)84 void ClipboardAndroid::setDragImageElement(Node*, const IntPoint&)
85 {
86 }
87 
createDragImage(IntPoint &) const88 DragImageRef ClipboardAndroid::createDragImage(IntPoint&) const
89 {
90     return 0;
91 }
92 
declareAndWriteDragImage(Element *,const KURL &,const String &,Frame *)93 void ClipboardAndroid::declareAndWriteDragImage(Element*, const KURL&, const String&, Frame*)
94 {
95 }
96 
writeURL(const KURL &,const String &,Frame *)97 void ClipboardAndroid::writeURL(const KURL&, const String&, Frame*)
98 {
99 }
100 
writeRange(Range * selectedRange,Frame *)101 void ClipboardAndroid::writeRange(Range* selectedRange, Frame*)
102 {
103     ASSERT(selectedRange);
104 }
105 
writePlainText(const String &)106 void ClipboardAndroid::writePlainText(const String&)
107 {
108 }
109 
hasData()110 bool ClipboardAndroid::hasData()
111 {
112     return false;
113 }
114 
115 } // namespace WebCore
116