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

Unified Diff: fpdfsdk/pdfwindow/PWL_IconList.cpp

Issue 1865123002: Remove IPWL_IconList_Notify. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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/pdfwindow/PWL_IconList.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/pdfwindow/PWL_IconList.cpp
diff --git a/fpdfsdk/pdfwindow/PWL_IconList.cpp b/fpdfsdk/pdfwindow/PWL_IconList.cpp
index 951b6821f4af49825c4ed86c1bbb4d58a15ebf85..4928560f1c1c9e8174b0d04d93c64e55defeeb2a 100644
--- a/fpdfsdk/pdfwindow/PWL_IconList.cpp
+++ b/fpdfsdk/pdfwindow/PWL_IconList.cpp
@@ -129,8 +129,6 @@ void CPWL_IconList_Item::OnDisabled() {
CPWL_IconList_Content::CPWL_IconList_Content(int32_t nListCount)
: m_nSelectIndex(-1),
- m_pNotify(NULL),
- m_bEnableNotify(TRUE),
m_bMouseDown(FALSE),
m_nListCount(nListCount) {}
@@ -261,34 +259,18 @@ void CPWL_IconList_Content::ScrollToItem(int32_t nItemIndex) {
}
void CPWL_IconList_Content::SetSelect(int32_t nIndex) {
- if (m_nSelectIndex != nIndex) {
- SelectItem(m_nSelectIndex, FALSE);
- SelectItem(nIndex, TRUE);
- m_nSelectIndex = nIndex;
+ if (m_nSelectIndex == nIndex)
+ return;
- if (IPWL_IconList_Notify* pNotify = GetNotify())
- pNotify->OnNoteListSelChanged(nIndex);
- }
+ SelectItem(m_nSelectIndex, FALSE);
+ SelectItem(nIndex, TRUE);
+ m_nSelectIndex = nIndex;
}
int32_t CPWL_IconList_Content::GetSelect() const {
return m_nSelectIndex;
}
-IPWL_IconList_Notify* CPWL_IconList_Content::GetNotify() const {
- if (m_bEnableNotify)
- return m_pNotify;
- return NULL;
-}
-
-void CPWL_IconList_Content::SetNotify(IPWL_IconList_Notify* pNotify) {
- m_pNotify = pNotify;
-}
-
-void CPWL_IconList_Content::EnableNotify(FX_BOOL bNotify) {
- m_bEnableNotify = bNotify;
-}
-
void CPWL_IconList_Content::SelectItem(int32_t nItemIndex, FX_BOOL bSelect) {
if (CPWL_IconList_Item* pItem = GetListItem(nItemIndex)) {
pItem->SetSelect(bSelect);
@@ -433,14 +415,6 @@ int32_t CPWL_IconList::GetSelect() const {
return m_pListContent->GetSelect();
}
-void CPWL_IconList::SetNotify(IPWL_IconList_Notify* pNotify) {
- m_pListContent->SetNotify(pNotify);
-}
-
-void CPWL_IconList::EnableNotify(FX_BOOL bNotify) {
- m_pListContent->EnableNotify(bNotify);
-}
-
void CPWL_IconList::SetListData(int32_t nItemIndex, void* pData) {
m_pListContent->SetListData(nItemIndex, pData);
}
« no previous file with comments | « fpdfsdk/pdfwindow/PWL_IconList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698