1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 
7 /*
8  * interface for rendering objects for replaced elements implemented by
9  * a plugin
10  */
11 
12 #ifndef nsIObjectFrame_h___
13 #define nsIObjectFrame_h___
14 
15 #include "nsQueryFrame.h"
16 
17 class nsNPAPIPluginInstance;
18 class nsIWidget;
19 
20 class nsIObjectFrame : public nsQueryFrame {
21  public:
22   NS_DECL_QUERYFRAME_TARGET(nsIObjectFrame)
23 
24   virtual nsNPAPIPluginInstance* GetPluginInstance() = 0;
25 
26   /**
27    * Get the native widget for the plugin, if any.
28    */
29   virtual nsIWidget* GetWidget() = 0;
30 
31   /**
32    * Update plugin active state. Frame should update if it is on an active tab
33    * or not and forward that information to the plugin to make it possible to
34    * throttle down plugin instance in non active case.
35    */
36   virtual void SetIsDocumentActive(bool aIsActive) = 0;
37 };
38 
39 #endif /* nsIObjectFrame_h___ */
40