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

Unified Diff: fpdfsdk/src/javascript/JS_Object.cpp

Issue 1390623003: Merge to XFA: Remove pointless CPDFSDK_PageView usage in CJS_Object / CJS_EmbedObj. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: fix build Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/include/javascript/JS_Object.h ('k') | fpdfsdk/src/javascript/app.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/JS_Object.cpp
diff --git a/fpdfsdk/src/javascript/JS_Object.cpp b/fpdfsdk/src/javascript/JS_Object.cpp
index a3f972c1cd3f175350b774a712bccb1e3ed00097..7898f4851691944615c6f760822e562fc2a1372b 100644
--- a/fpdfsdk/src/javascript/JS_Object.cpp
+++ b/fpdfsdk/src/javascript/JS_Object.cpp
@@ -5,12 +5,13 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../include/javascript/IJavaScript.h"
+#include "../../include/javascript/JS_Context.h"
#include "../../include/javascript/JS_Define.h"
#include "../../include/javascript/JS_Object.h"
-#include "../../include/javascript/JS_Context.h"
+
+namespace {
int FXJS_MsgBox(CPDFDoc_Environment* pApp,
- CPDFSDK_PageView* pPageView,
const FX_WCHAR* swMsg,
const FX_WCHAR* swTitle,
FX_UINT nType,
@@ -24,13 +25,7 @@ int FXJS_MsgBox(CPDFDoc_Environment* pApp,
return pApp->JS_appAlert(swMsg, swTitle, nType, nIcon);
}
-CPDFSDK_PageView* FXJS_GetPageView(IFXJS_Context* cc) {
- if (CJS_Context* pContext = (CJS_Context*)cc) {
- if (pContext->GetReaderDocument())
- return NULL;
- }
- return NULL;
-}
+} // namespace
CJS_EmbedObj::CJS_EmbedObj(CJS_Object* pJSObject) : m_pJSObject(pJSObject) {}
@@ -38,17 +33,12 @@ CJS_EmbedObj::~CJS_EmbedObj() {
m_pJSObject = NULL;
}
-CPDFSDK_PageView* CJS_EmbedObj::JSGetPageView(IFXJS_Context* cc) {
- return FXJS_GetPageView(cc);
-}
-
int CJS_EmbedObj::MsgBox(CPDFDoc_Environment* pApp,
- CPDFSDK_PageView* pPageView,
const FX_WCHAR* swMsg,
const FX_WCHAR* swTitle,
FX_UINT nType,
FX_UINT nIcon) {
- return FXJS_MsgBox(pApp, pPageView, swMsg, swTitle, nType, nIcon);
+ return FXJS_MsgBox(pApp, swMsg, swTitle, nType, nIcon);
}
void CJS_EmbedObj::Alert(CJS_Context* pContext, const FX_WCHAR* swMsg) {
@@ -85,17 +75,12 @@ void CJS_Object::Dispose() {
m_pV8Object.Reset();
}
-CPDFSDK_PageView* CJS_Object::JSGetPageView(IFXJS_Context* cc) {
- return FXJS_GetPageView(cc);
-}
-
int CJS_Object::MsgBox(CPDFDoc_Environment* pApp,
- CPDFSDK_PageView* pPageView,
const FX_WCHAR* swMsg,
const FX_WCHAR* swTitle,
FX_UINT nType,
FX_UINT nIcon) {
- return FXJS_MsgBox(pApp, pPageView, swMsg, swTitle, nType, nIcon);
+ return FXJS_MsgBox(pApp, swMsg, swTitle, nType, nIcon);
}
void CJS_Object::Alert(CJS_Context* pContext, const FX_WCHAR* swMsg) {
« no previous file with comments | « fpdfsdk/include/javascript/JS_Object.h ('k') | fpdfsdk/src/javascript/app.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698