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

Side by Side Diff: fpdfsdk/src/javascript/Icon.cpp

Issue 1799773002: Move fpdfsdk/src up to fpdfsdk/. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 9 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
« no previous file with comments | « fpdfsdk/src/javascript/Icon.h ('k') | fpdfsdk/src/javascript/JS_Context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #include "fpdfsdk/src/javascript/Icon.h"
8
9 #include "fpdfsdk/include/javascript/IJavaScript.h"
10 #include "fpdfsdk/src/javascript/JS_Define.h"
11 #include "fpdfsdk/src/javascript/JS_Object.h"
12 #include "fpdfsdk/src/javascript/JS_Value.h"
13
14 /* ---------------------- Icon ---------------------- */
15
16 BEGIN_JS_STATIC_CONST(CJS_Icon)
17 END_JS_STATIC_CONST()
18
19 BEGIN_JS_STATIC_PROP(CJS_Icon)
20 JS_STATIC_PROP_ENTRY(name)
21 END_JS_STATIC_PROP()
22
23 BEGIN_JS_STATIC_METHOD(CJS_Icon)
24 END_JS_STATIC_METHOD()
25
26 IMPLEMENT_JS_CLASS(CJS_Icon, Icon)
27
28 Icon::Icon(CJS_Object* pJSObject)
29 : CJS_EmbedObj(pJSObject), m_pIconStream(NULL), m_swIconName(L"") {}
30
31 Icon::~Icon() {}
32
33 void Icon::SetStream(CPDF_Stream* pIconStream) {
34 if (pIconStream)
35 m_pIconStream = pIconStream;
36 }
37
38 CPDF_Stream* Icon::GetStream() {
39 return m_pIconStream;
40 }
41
42 void Icon::SetIconName(CFX_WideString name) {
43 m_swIconName = name;
44 }
45
46 CFX_WideString Icon::GetIconName() {
47 return m_swIconName;
48 }
49
50 FX_BOOL Icon::name(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) {
51 if (!vp.IsGetting())
52 return FALSE;
53
54 vp << m_swIconName;
55 return TRUE;
56 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/Icon.h ('k') | fpdfsdk/src/javascript/JS_Context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698