Skip to content

Commit

Permalink
helper method
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Jul 23, 2024
1 parent 4e940cc commit ea7f208
Showing 1 changed file with 20 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,23 +174,8 @@ export class ChromeService {
this.mutationObserver.observe(body, { attributes: true });
};

public setup({ analytics }: SetupDeps) {
const docTitle = this.docTitle.setup({ document: window.document });
registerAnalyticsContextProvider(analytics, docTitle.title$);
}

public async start({
application,
docLinks,
http,
injectedMetadata,
notifications,
customBranding,
}: StartDeps): Promise<InternalChromeStart> {
this.initVisibility(application);
this.handleEuiFullScreenChanges();

// Ensure developers are notified if working in a context that lacks the EUI Provider.
// Ensure developers are notified if working in a context that lacks the EUI Provider.
private handleEuiDevProviderWarning = (notifications: NotificationsStart) => {
const isDev = this.params.coreContext.env.mode.name === 'development';
if (isDev) {
setEuiDevProviderWarning((providerError) => {
Expand Down Expand Up @@ -220,6 +205,24 @@ export class ChromeService {
});
});
}
};

public setup({ analytics }: SetupDeps) {
const docTitle = this.docTitle.setup({ document: window.document });
registerAnalyticsContextProvider(analytics, docTitle.title$);
}

public async start({
application,
docLinks,
http,
injectedMetadata,
notifications,
customBranding,
}: StartDeps): Promise<InternalChromeStart> {
this.initVisibility(application);
this.handleEuiFullScreenChanges();
this.handleEuiDevProviderWarning(notifications);

const globalHelpExtensionMenuLinks$ = new BehaviorSubject<ChromeGlobalHelpExtensionMenuLink[]>(
[]
Expand Down

0 comments on commit ea7f208

Please sign in to comment.