Add API to get whether the devtools is opened.

This commit is contained in:
Cheng Zhao 2013-11-05 10:29:53 +08:00
parent afc627aae1
commit de7892cd6e
10 changed files with 24 additions and 2 deletions

View file

@ -112,6 +112,10 @@ void SetActive(content::WebContents* web_contents, bool active) {
[_private->splitView adjustSubviews];
}
- (BOOL)isDevToolsVisible {
return _private->visible;
}
- (BOOL)setDockSide:(const std::string&)side {
if (side == "right") {
_private->splitView.vertical = YES;
@ -221,4 +225,4 @@ void SetActive(content::WebContents* web_contents, bool active) {
@end
@implementation BRYInspectableWebContentsViewPrivate
@end
@end

View file

@ -8,6 +8,7 @@ class InspectableWebContentsViewMac;
- (instancetype)initWithInspectableWebContentsViewMac:(brightray::InspectableWebContentsViewMac *)inspectableWebContentsView;
- (void)setDevToolsVisible:(BOOL)visible;
- (BOOL)isDevToolsVisible;
- (BOOL)setDockSide:(const std::string&)side;
@end
@end