File: arc_session_manager_observer.h

package info (click to toggle)
chromium 138.0.7204.183-1~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 6,080,960 kB
  • sloc: cpp: 34,937,079; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,954; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,811; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (82 lines) | stat: -rw-r--r-- 3,333 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_ASH_ARC_SESSION_ARC_SESSION_MANAGER_OBSERVER_H_
#define CHROME_BROWSER_ASH_ARC_SESSION_ARC_SESSION_MANAGER_OBSERVER_H_

#include "chrome/browser/ash/arc/arc_support_host.h"

namespace arc {

enum class ArcStopReason;

// Observer for those services outside of ARC which want to know ARC events.
class ArcSessionManagerObserver {
 public:
  // Called to notify that whether Google Play Store is enabled or not, which
  // is represented by "arc.enabled" preference, is updated.
  virtual void OnArcPlayStoreEnabledChanged(bool enabled) {}

  // Called with when user opted-in for ARC and ARC is going to be created for
  // this user. I.e. successful user action triggered ARC user instance
  // initialization.
  virtual void OnArcOptInUserAction() {}

  // Called to notify that checking of Android management status started
  // during the opt-in flow.
  virtual void OnArcOptInManagementCheckStarted() {}

  // Called to notify that ARC begins to start.
  virtual void OnArcStarted() {}

  // Called to notify that ARC has been successfully provisioned for the first
  // time after OptIn.
  virtual void OnArcInitialStart() {}

  // Called when ARC session is stopped, and is not being restarted
  // automatically.
  virtual void OnArcSessionStopped(ArcStopReason stop_reason) {}

  // Called when ARC session is stopped, but is being restarted automatically.
  // This is called _after_ the container is actually created.
  virtual void OnArcSessionRestarting() {}

  // Called to notify that Android data has been removed. Used in
  // browser_tests
  virtual void OnArcDataRemoved() {}

  // Called to notify that ARC start is delayed by ARC on demand
  virtual void OnArcStartDelayed() {}

  // Called to notify that the error is requested by the session manager to be
  // displayed in the support host. This is called even if Support UI is
  // disabled. Note that this is not called in cases when the support app
  // switches to an error page by itself.
  // |error| points to the top level error indicating the type of problem and an
  // optional argument to format the error message for display on the UI.
  virtual void OnArcErrorShowRequested(ArcSupportHost::ErrorInfo error_info) {}

  // Called with true when the /run/arc[vm]/host_generated/*.prop files are
  // generated (and false when the attempt fails.) The function is called once
  // per observer regardless of whether the attempt has already been made
  // before the observer is added.
  virtual void OnPropertyFilesExpanded(bool result) {}

  // Called when ARC session is blocked because ARCVM /data migration is in
  // progress. If |auto_resume_enabled| is true, the migration will be
  // automatically resumed by restarting the Chrome session. Otherwise the user
  // needs to manually enter the migration flow by clicking a notification.
  virtual void OnArcSessionBlockedByArcVmDataMigration(
      bool auto_resume_enabled) {}

  // Called when ARC session manager is shutting down.
  virtual void OnShutdown() {}

 protected:
  virtual ~ArcSessionManagerObserver() = default;
};

}  // namespace arc

#endif  // CHROME_BROWSER_ASH_ARC_SESSION_ARC_SESSION_MANAGER_OBSERVER_H_