• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 The PDFium Authors
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 #ifndef XFA_FWL_CFWL_MESSAGEKILLFOCUS_H_
8 #define XFA_FWL_CFWL_MESSAGEKILLFOCUS_H_
9 
10 #include "core/fxcrt/unowned_ptr.h"
11 #include "xfa/fwl/cfwl_message.h"
12 
13 namespace pdfium {
14 
15 class CFWL_MessageKillFocus final : public CFWL_Message {
16  public:
17   explicit CFWL_MessageKillFocus(CFWL_Widget* pDstTarget);
18   ~CFWL_MessageKillFocus() override;
19 
IsFocusedOnWidget(const CFWL_Widget * pWidget)20   bool IsFocusedOnWidget(const CFWL_Widget* pWidget) const {
21     return pWidget == m_pSetFocus;
22   }
23 
24  private:
25   UnownedPtr<CFWL_Widget> m_pSetFocus;  // Ok, stack-only.
26 };
27 
28 }  // namespace pdfium
29 
30 // TODO(crbug.com/42271761): Remove.
31 using pdfium::CFWL_MessageKillFocus;
32 
33 #endif  // XFA_FWL_CFWL_MESSAGEKILLFOCUS_H_
34