(id: string)
| 705 | } |
| 706 | |
| 707 | bringViewToFront(id: string) { |
| 708 | try { |
| 709 | log.log('[main] webcontentsview-bringToFront: bringing view with id', id, 'to front') |
| 710 | |
| 711 | const view = this.views.get(id) |
| 712 | if (!view) { |
| 713 | log.warn('[main] webcontentsview-bringToFront: no view found with id', id) |
| 714 | return false |
| 715 | } |
| 716 | |
| 717 | // Remove and re-add to bring to front |
| 718 | this.removeChildView(view) |
| 719 | this.addChildView(view) |
| 720 | log.log('[main] Activated WebContentsView, brought to top for id:', view.id) |
| 721 | |
| 722 | if (view.isOverlay) { |
| 723 | this.activeOverlayViewId = view.id |
| 724 | } else { |
| 725 | this.activeViewId = view.id |
| 726 | } |
| 727 | |
| 728 | return true |
| 729 | } catch (e) { |
| 730 | log.warn('[main] Could not activate WebContentsView', e) |
| 731 | return false |
| 732 | } |
| 733 | } |
| 734 | |
| 735 | activateView(id: string) { |
| 736 | log.log('[main] webcontentsview-activate: activating view with id', id) |
no test coverage detected