blob: c957601cae35530edf9013e280460e010e794dcf [file] [log] [blame]
[email protected]612d3bf2013-05-22 10:10:461// Copyright (c) 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_MAC_H_
6#define CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_MAC_H_
7
dcheng4af48582016-04-19 00:29:358#include <memory>
9
Christopher Cameron4d18d1a2019-08-27 18:01:5310#include "chrome/browser/apps/app_shim/app_shim_listener.h"
[email protected]612d3bf2013-05-22 10:10:4611#include "chrome/browser/browser_process_platform_part_base.h"
Charlie Harrison325846b2021-07-14 13:57:4112#include "chrome/browser/mac/key_window_notifier.h"
[email protected]612d3bf2013-05-22 10:10:4613
Christopher Cameron7b6e4352020-03-17 16:59:4014namespace apps {
15class AppShimManager;
16} // namespace apps
17
James Hollyer63eb7e0f2021-02-24 03:02:4018namespace device {
James Hollyer066512f2021-04-16 23:56:0719class GeolocationManager;
James Hollyer63eb7e0f2021-02-24 03:02:4020} // namespace device
21
[email protected]612d3bf2013-05-22 10:10:4622class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase {
23 public:
24 BrowserProcessPlatformPart();
Peter Boström53c6c5952021-09-17 09:41:2625
26 BrowserProcessPlatformPart(const BrowserProcessPlatformPart&) = delete;
27 BrowserProcessPlatformPart& operator=(const BrowserProcessPlatformPart&) =
28 delete;
29
Daniel Chenga542fca2014-10-21 09:51:2930 ~BrowserProcessPlatformPart() override;
[email protected]612d3bf2013-05-22 10:10:4631
32 // Overridden from BrowserProcessPlatformPartBase:
Christopher Cameron3257ebf2020-10-19 19:55:5233 void BeginStartTearDown() override;
Daniel Chenga542fca2014-10-21 09:51:2934 void StartTearDown() override;
Avi Drissmanf19bb472018-11-29 19:51:2835 void AttemptExit(bool try_to_quit_application) override;
Daniel Chenga542fca2014-10-21 09:51:2936 void PreMainMessageLoopRun() override;
[email protected]90a4b9d2013-07-31 12:14:4037
Christopher Cameron4d18d1a2019-08-27 18:01:5338 AppShimListener* app_shim_listener();
Christopher Cameron7b6e4352020-03-17 16:59:4039 apps::AppShimManager* app_shim_manager();
James Hollyer066512f2021-04-16 23:56:0740 device::GeolocationManager* geolocation_manager();
James Hollyerd8c9d05b2020-08-20 08:18:2841
Charlie Harrison325846b2021-07-14 13:57:4142 KeyWindowNotifier& key_window_notifier() { return key_window_notifier_; }
43
James Hollyer82b022e2021-03-29 22:10:2244 void SetGeolocationManagerForTesting(
James Hollyer066512f2021-04-16 23:56:0745 std::unique_ptr<device::GeolocationManager> fake_geolocation_manager);
James Hollyer82b022e2021-03-29 22:10:2246
James Hollyerd8c9d05b2020-08-20 08:18:2847 protected:
James Hollyer066512f2021-04-16 23:56:0748 std::unique_ptr<device::GeolocationManager> geolocation_manager_;
[email protected]612d3bf2013-05-22 10:10:4649
50 private:
Christopher Cameron7b6e4352020-03-17 16:59:4051 std::unique_ptr<apps::AppShimManager> app_shim_manager_;
52
[email protected]90a4b9d2013-07-31 12:14:4053 // Hosts the IPC channel factory that App Shims connect to on Mac.
Christopher Cameron4d18d1a2019-08-27 18:01:5354 scoped_refptr<AppShimListener> app_shim_listener_;
[email protected]90a4b9d2013-07-31 12:14:4055
Charlie Harrison325846b2021-07-14 13:57:4156 KeyWindowNotifier key_window_notifier_;
[email protected]612d3bf2013-05-22 10:10:4657};
58
59#endif // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_MAC_H_