2013-03-14 09:03:50 -04:00
|
|
|
#ifndef BRIGHTRAY_INSPECTABLE_WEB_CONTENTS_H_
|
|
|
|
#define BRIGHTRAY_INSPECTABLE_WEB_CONTENTS_H_
|
|
|
|
|
|
|
|
#include "content/public/browser/web_contents.h"
|
|
|
|
|
|
|
|
namespace brightray {
|
|
|
|
|
2014-03-04 16:12:02 +08:00
|
|
|
class InspectableWebContentsDelegate;
|
2013-03-14 09:03:50 -04:00
|
|
|
class InspectableWebContentsView;
|
|
|
|
|
|
|
|
class InspectableWebContents {
|
2013-11-17 18:20:54 -05:00
|
|
|
public:
|
|
|
|
static InspectableWebContents* Create(
|
|
|
|
const content::WebContents::CreateParams&);
|
2013-04-22 20:41:58 +08:00
|
|
|
|
2013-11-17 18:20:54 -05:00
|
|
|
// The returned InspectableWebContents takes ownership of the passed-in
|
|
|
|
// WebContents.
|
2013-04-20 13:24:45 +08:00
|
|
|
static InspectableWebContents* Create(content::WebContents*);
|
2013-04-22 20:41:58 +08:00
|
|
|
|
2013-03-14 09:03:50 -04:00
|
|
|
virtual ~InspectableWebContents() {}
|
|
|
|
|
|
|
|
virtual InspectableWebContentsView* GetView() const = 0;
|
|
|
|
virtual content::WebContents* GetWebContents() const = 0;
|
|
|
|
|
2014-11-03 21:32:11 +08:00
|
|
|
virtual void SetCanDock(bool can_dock) = 0;
|
2013-03-14 09:03:50 -04:00
|
|
|
virtual void ShowDevTools() = 0;
|
2014-03-20 09:26:21 +08:00
|
|
|
// Close the DevTools completely instead of just hide it.
|
|
|
|
virtual void CloseDevTools() = 0;
|
2013-12-09 04:34:44 -08:00
|
|
|
virtual bool IsDevToolsViewShowing() = 0;
|
2014-03-04 16:12:02 +08:00
|
|
|
|
|
|
|
// The delegate manages its own life.
|
|
|
|
virtual void SetDelegate(InspectableWebContentsDelegate* delegate) = 0;
|
2014-09-09 15:28:48 +08:00
|
|
|
virtual InspectableWebContentsDelegate* GetDelegate() const = 0;
|
2013-03-14 09:03:50 -04:00
|
|
|
};
|
|
|
|
|
2013-11-17 18:20:17 -05:00
|
|
|
} // namespace brightray
|
2013-03-14 09:03:50 -04:00
|
|
|
|
|
|
|
#endif
|