Skip to content

Commit ea7f208

Browse files
committed
helper method
1 parent 4e940cc commit ea7f208

1 file changed

Lines changed: 20 additions & 17 deletions

File tree

packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -174,23 +174,8 @@ export class ChromeService {
174174
this.mutationObserver.observe(body, { attributes: true });
175175
};
176176

177-
public setup({ analytics }: SetupDeps) {
178-
const docTitle = this.docTitle.setup({ document: window.document });
179-
registerAnalyticsContextProvider(analytics, docTitle.title$);
180-
}
181-
182-
public async start({
183-
application,
184-
docLinks,
185-
http,
186-
injectedMetadata,
187-
notifications,
188-
customBranding,
189-
}: StartDeps): Promise<InternalChromeStart> {
190-
this.initVisibility(application);
191-
this.handleEuiFullScreenChanges();
192-
193-
// Ensure developers are notified if working in a context that lacks the EUI Provider.
177+
// Ensure developers are notified if working in a context that lacks the EUI Provider.
178+
private handleEuiDevProviderWarning = (notifications: NotificationsStart) => {
194179
const isDev = this.params.coreContext.env.mode.name === 'development';
195180
if (isDev) {
196181
setEuiDevProviderWarning((providerError) => {
@@ -220,6 +205,24 @@ export class ChromeService {
220205
});
221206
});
222207
}
208+
};
209+
210+
public setup({ analytics }: SetupDeps) {
211+
const docTitle = this.docTitle.setup({ document: window.document });
212+
registerAnalyticsContextProvider(analytics, docTitle.title$);
213+
}
214+
215+
public async start({
216+
application,
217+
docLinks,
218+
http,
219+
injectedMetadata,
220+
notifications,
221+
customBranding,
222+
}: StartDeps): Promise<InternalChromeStart> {
223+
this.initVisibility(application);
224+
this.handleEuiFullScreenChanges();
225+
this.handleEuiDevProviderWarning(notifications);
223226

224227
const globalHelpExtensionMenuLinks$ = new BehaviorSubject<ChromeGlobalHelpExtensionMenuLink[]>(
225228
[]

0 commit comments

Comments
 (0)