diff --git a/brightray/browser/inspectable_web_contents_impl.cc b/brightray/browser/inspectable_web_contents_impl.cc index 94b1069ebfab..2cb8aba6defe 100644 --- a/brightray/browser/inspectable_web_contents_impl.cc +++ b/brightray/browser/inspectable_web_contents_impl.cc @@ -36,7 +36,9 @@ const double kPresetZoomFactors[] = { 0.25, 0.333, 0.5, 0.666, 0.75, 0.9, 1.0, const char kDevToolsScheme[] = "chrome-devtools"; const char kDevToolsHost[] = "devtools"; const char kChromeUIDevToolsURL[] = "chrome-devtools://devtools/devtools.html?" - "can_dock=true&&" + "can_dock=true&" + "toolbarColor=rgba(223,223,223,1)&" + "textColor=rgba(0,0,0,1)&" "experiments=true"; const char kDevToolsBoundsPref[] = "brightray.devtools.bounds"; diff --git a/brightray/browser/mac/bry_inspectable_web_contents_view.mm b/brightray/browser/mac/bry_inspectable_web_contents_view.mm index 0fa06f2077d3..4db0d8ac050f 100644 --- a/brightray/browser/mac/bry_inspectable_web_contents_view.mm +++ b/brightray/browser/mac/bry_inspectable_web_contents_view.mm @@ -148,4 +148,30 @@ using namespace brightray; inspectableWebContentsView_->inspectable_web_contents()->CloseDevTools(); } +- (void)windowDidBecomeMain:(NSNotification*)notification { + content::WebContents* web_contents = + inspectableWebContentsView_->inspectable_web_contents()->devtools_web_contents(); + if (!web_contents) + return; + + web_contents->RestoreFocus(); + + content::RenderWidgetHostView* rwhv = web_contents->GetRenderWidgetHostView(); + if (rwhv) + rwhv->SetActive(true); +} + +- (void)windowDidResignMain:(NSNotification*)notification { + content::WebContents* web_contents = + inspectableWebContentsView_->inspectable_web_contents()->devtools_web_contents(); + if (!web_contents) + return; + + web_contents->StoreFocus(); + + content::RenderWidgetHostView* rwhv = web_contents->GetRenderWidgetHostView(); + if (rwhv) + rwhv->SetActive(false); +} + @end