Add InspectableWebContentsViewDelegate
This commit is contained in:
parent
9fb30b702a
commit
f9dc87ba97
9 changed files with 71 additions and 38 deletions
|
@ -13,10 +13,21 @@ class View;
|
|||
|
||||
namespace brightray {
|
||||
|
||||
class InspectableWebContentsViewDelegate;
|
||||
|
||||
class InspectableWebContentsView {
|
||||
public:
|
||||
InspectableWebContentsView() : delegate_(nullptr) {}
|
||||
virtual ~InspectableWebContentsView() {}
|
||||
|
||||
// The delegate manages its own life.
|
||||
void SetDelegate(InspectableWebContentsViewDelegate* delegate) {
|
||||
delegate_ = delegate;
|
||||
}
|
||||
InspectableWebContentsViewDelegate* GetDelegate() const {
|
||||
return delegate_;
|
||||
}
|
||||
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
// Returns the container control, which has devtools view attached.
|
||||
virtual views::View* GetView() = 0;
|
||||
|
@ -35,6 +46,9 @@ class InspectableWebContentsView {
|
|||
virtual void SetIsDocked(bool docked) = 0;
|
||||
virtual void SetContentsResizingStrategy(
|
||||
const DevToolsContentsResizingStrategy& strategy) = 0;
|
||||
|
||||
private:
|
||||
InspectableWebContentsViewDelegate* delegate_; // weak references.
|
||||
};
|
||||
|
||||
} // namespace brightray
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue