tree: 8cc014c0e8e470c02c386016e5fd2dc3cd934e0f
  1. android/
  2. resources/
  3. tools/
  4. ui/
  5. action_tracker_for_metrics.cc
  6. action_tracker_for_metrics.h
  7. actor_container_config.cc
  8. actor_container_config.h
  9. actor_container_config_unittest.cc
  10. actor_keyed_service.cc
  11. actor_keyed_service.h
  12. actor_keyed_service_browsertest.cc
  13. actor_keyed_service_factory.cc
  14. actor_keyed_service_factory.h
  15. actor_keyed_service_fake.cc
  16. actor_keyed_service_fake.h
  17. actor_keyed_service_unittest.cc
  18. actor_metrics.cc
  19. actor_metrics.h
  20. actor_metrics_unittest.cc
  21. actor_navigation_throttle.cc
  22. actor_navigation_throttle.h
  23. actor_navigation_throttle_unittest.cc
  24. actor_proto_conversion.cc
  25. actor_proto_conversion.h
  26. actor_script_tool_receiver.cc
  27. actor_script_tool_receiver.h
  28. actor_tab_data.cc
  29. actor_tab_data.h
  30. actor_tab_data_unittest.cc
  31. actor_task.cc
  32. actor_task.h
  33. actor_task_delegate.h
  34. actor_task_metadata.cc
  35. actor_task_metadata.h
  36. actor_task_metadata_unittest.cc
  37. actor_task_unittest.cc
  38. actor_test_util.cc
  39. actor_test_util.h
  40. actor_test_util_unittest.cc
  41. actor_util.cc
  42. actor_util.h
  43. actor_util_browsertest.cc
  44. aggregated_journal.cc
  45. aggregated_journal.h
  46. aggregated_journal_file_serializer.cc
  47. aggregated_journal_file_serializer.h
  48. aggregated_journal_in_memory_serializer.cc
  49. aggregated_journal_in_memory_serializer.h
  50. aggregated_journal_serializer.cc
  51. aggregated_journal_serializer.h
  52. aggregated_journal_unittest.cc
  53. autofill_selection_dialog_event_handler.h
  54. BUILD.gn
  55. DEPS
  56. DIR_METADATA
  57. enterprise_policy_checker.h
  58. execution_engine.cc
  59. execution_engine.h
  60. execution_engine_browsertest.cc
  61. execution_engine_origin_gating_browsertest.cc
  62. execution_engine_unittest.cc
  63. OWNERS
  64. README.md
  65. site_policy.cc
  66. site_policy.h
  67. site_policy_browsertest.cc
  68. site_policy_unittest.cc
  69. tab_observation_controller.cc
  70. tab_observation_controller.h
  71. tab_observation_controller_browsertest.cc
  72. tab_observation_strategy.cc
  73. tab_observation_strategy.h
  74. tab_observation_strategy_unittest.cc
  75. tool_request_variant.cc
  76. tool_request_variant.h
chrome/browser/actor/README.md

Key classes

Below is a diagram that shows lifetime and ownership relations between some of the key classes in the actor component and the glic UI that they interact with.

The diagram is not exhaustive.

┌──────────────────────────┐ calls ┌────────────────────────────┐                                                                                                                   
│glic:GlicPageHandler      ┼───────►glic::GlicInstanceImpl      │                                                                                                                   
│1 per GLIC WebUI          │       │N per Profile               │                                                                                                                   
└──┬───────────────────────┘       └──┬─────────────────────────┘                                                                                                                   
   │owns                              │owns                                                                                                                                         
   │                                  │                                                                                                                                             
┌──▼───────────────────────┐       ┌──▼─────────────────────────┐calls  ┌───────────────────┐                                                                                       
│glic::GlicWebClientHandler│       │glic::GlicActorTaskManager  ┼───────►ActorKeyedService  │                                                                                       
│                          ◄─┐     │N per Profile               │     ┌─┐1 per Profile      │                                                                                       
└──┬───────────────────────┘ │calls└────────────────────────────┘     │ └┬┬─────────────────┘                              calls to delegate browser actions                        
   │owns and calls           └────────────────────────────────────────┼──┘│creates and                                    ┌──────────────────────────────────────┐                  
   │                                                                  │   │owns N_task                                    │                                      │                  
┌──▼───────────────────────┐                                          │ ┌─▼─────────────────┐owns 1  ┌────────────────────▼──┐owns 1┌───────────────────┐owns 1┌─┼─────────────────┐
│mojo::Remote<WebClient>   │                                          │ │ActorTask          ┼────────►ExecutionEngine,       ┼──────►ToolController     ┼──────►Tool               │
│Displays GLIC WebUI       │                                          │ │N_task per Profile │        │implements ToolDelegate│      │N_task per Profile │      │N_task per Profile │
└──────────────────────────┘                                          │ └─┬─────────────────┘        │                       │      └───────────────────┘      └─▲─────────────────┘
                                                                      │   │                          │N_task per Profile     ┼────┐                              │                  
                                                                      │   │owns 1                    └─┬──────────────────┬──┘    │owns N_request                │                  
                                                                      │   │                            │                  │       │                              │                  
                                                                      │ ┌─▼─────────────────┐ owns 1   │                  │       │ ┌───────────────────┐ creates│                  
                                                                      │ │UiEventDispatcher  ◄──────────┘                  │       └─►ToolRequest        ┼────────┘                  
                                                                      │ │2N_task per Profile│                             │         │N_task*N_request   │                           
                                                                      │ └─┬─────────────────┘                             │         │per Profile        │                           
                                                                      │   │calls                                          │         └───────────────────┘                           
                                                                owns 1│   │                                               │                                                         
                                                                      │ ┌─▼─────────────────┐                             │                                                         
                                                                      └─►ActorUiStateManager│                             │calls                                                    
                                                                        │1 per Profile      │                             │                                                         
                                                                        └─┬─────────────────┘                             │                                                         
                                                                          │calls                                          │                                                         
                                                                          │                                               │                                                         
                                                                          │                                               │                                                         
                                                                          │                                               │                                                         
                                                                        ┌─▼──────────────────┐       ┌────────────────────▼──┐                                                      
                                                                        │ActorUiTabController│       │General Chrome code    │                                                      
                                                                        │1 per Tab           │       │                       │                                                      
                                                                        └────────────────────┘       └───────────────────────┘                                                      

To edit the diagram, copy it into asciiflow.com.

Flags

To disable the actor framework in Chrome, pass the following commandline flags:

--disable-features=GlicActor,GlicActorUi