Skip to content

Commit

Permalink
Merge pull request #65 from brightray/mac-devtools-focus
Browse files Browse the repository at this point in the history
Focus on devtools when it is opened on Mac.
  • Loading branch information
zcbenz committed Aug 7, 2014
2 parents 2f87b81 + 29bada5 commit b06cc7a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion browser/devtools_delegate.cc
Expand Up @@ -139,7 +139,6 @@ DevToolsDelegate::DevToolsDelegate(
}

DevToolsDelegate::~DevToolsDelegate() {
LOG(ERROR) << "delete!";
}

void DevToolsDelegate::Stop() {
Expand Down
2 changes: 1 addition & 1 deletion browser/devtools_delegate.h
Expand Up @@ -49,6 +49,6 @@ class DevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
DISALLOW_COPY_AND_ASSIGN(DevToolsDelegate);
};

} // namespace brightray
} // namespace brightray

#endif // BRIGHTRAY_DEVTOOLS_DELEGATE_H_
3 changes: 3 additions & 0 deletions browser/mac/bry_inspectable_web_contents_view.mm
Expand Up @@ -55,6 +55,9 @@ - (void)setDevToolsVisible:(BOOL)visible {
// sizes for them until the setContentsResizingStrategy message.
[self addSubview:devToolsView positioned:NSWindowBelow relativeTo:nil];
[self update];

// Focus on web view.
devToolsWebContents->RestoreFocus();
} else {
gfx::ScopedNSDisableScreenUpdates disabler;
devToolsWebContents->RemoveOverlayView();
Expand Down

0 comments on commit b06cc7a

Please sign in to comment.