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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSoundActionDictionary_autogen.cpp

Issue 1266093003: Remove experimental/PdfViewer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-03 (Monday) 10:43:56 EDT Created 5 years, 4 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
(Empty)
1 /*
2 * Copyright 2013 Google Inc.
3
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "SkPdfSoundActionDictionary_autogen.h"
9 #include "SkPdfNativeDoc.h"
10
11 SkString SkPdfSoundActionDictionary::S(SkPdfNativeDoc* doc) {
12 SkPdfNativeObject* ret = get("S", "");
13 if (doc) {ret = doc->resolveReference(ret);}
14 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
15 // TODO(edisonn): warn about missing required field, assert for known good pdf s
16 return SkString();
17 }
18
19 bool SkPdfSoundActionDictionary::has_S() const {
20 return get("S", "") != NULL;
21 }
22
23 SkPdfStream* SkPdfSoundActionDictionary::Sound(SkPdfNativeDoc* doc) {
24 SkPdfNativeObject* ret = get("Sound", "");
25 if (doc) {ret = doc->resolveReference(ret);}
26 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->getStream();
27 // TODO(edisonn): warn about missing required field, assert for known good pdf s
28 return NULL;
29 }
30
31 bool SkPdfSoundActionDictionary::has_Sound() const {
32 return get("Sound", "") != NULL;
33 }
34
35 double SkPdfSoundActionDictionary::Volume(SkPdfNativeDoc* doc) {
36 SkPdfNativeObject* ret = get("Volume", "");
37 if (doc) {ret = doc->resolveReference(ret);}
38 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
39 // TODO(edisonn): warn about missing default value for optional fields
40 return 0;
41 }
42
43 bool SkPdfSoundActionDictionary::has_Volume() const {
44 return get("Volume", "") != NULL;
45 }
46
47 bool SkPdfSoundActionDictionary::Synchronous(SkPdfNativeDoc* doc) {
48 SkPdfNativeObject* ret = get("Synchronous", "");
49 if (doc) {ret = doc->resolveReference(ret);}
50 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->boolValue();
51 // TODO(edisonn): warn about missing default value for optional fields
52 return false;
53 }
54
55 bool SkPdfSoundActionDictionary::has_Synchronous() const {
56 return get("Synchronous", "") != NULL;
57 }
58
59 bool SkPdfSoundActionDictionary::Repeat(SkPdfNativeDoc* doc) {
60 SkPdfNativeObject* ret = get("Repeat", "");
61 if (doc) {ret = doc->resolveReference(ret);}
62 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->boolValue();
63 // TODO(edisonn): warn about missing default value for optional fields
64 return false;
65 }
66
67 bool SkPdfSoundActionDictionary::has_Repeat() const {
68 return get("Repeat", "") != NULL;
69 }
70
71 bool SkPdfSoundActionDictionary::Mix(SkPdfNativeDoc* doc) {
72 SkPdfNativeObject* ret = get("Mix", "");
73 if (doc) {ret = doc->resolveReference(ret);}
74 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->boolValue();
75 // TODO(edisonn): warn about missing default value for optional fields
76 return false;
77 }
78
79 bool SkPdfSoundActionDictionary::has_Mix() const {
80 return get("Mix", "") != NULL;
81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698