summaryrefslogtreecommitdiff
path: root/chromium/chrome/common/renderer_configuration.mojom
blob: 4d01879f0cb814da722a018c6718899941620065 (plain)
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
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module chrome.mojom;

import "components/content_settings/core/common/content_settings.mojom";

// The renderer configuration parameters which can change post renderer launch.
struct DynamicParams {
  bool force_safe_search = true;
  int32 youtube_restrict = 0;
  string allowed_domains_for_apps;
  string variation_ids_header;
};

interface ChromeOSListener {
  // Call when the merge session process (cookie reconstruction from
  // OAuth2 refresh token in ChromeOS login) is complete. All XHR's
  // will be throttled until unlocked by this call.
  [EnableIf=is_chromeos]
  MergeSessionComplete();
};

// Configures the renderer.
interface RendererConfiguration {
  // Configures the renderer with settings that won't change.
  // The |chromeos_listener| is only passed on Chrome OS when
  // the merge session is still running - otherwise not set.
  SetInitialConfiguration(
      bool is_incognito_process,
      pending_receiver<ChromeOSListener>? chromeos_listener);

  // Update renderer configuration with settings that can change.
  SetConfiguration(DynamicParams params);

  // Set the content setting rules stored by the renderer.
  SetContentSettingRules(
      content_settings.mojom.RendererContentSettingRules rules);

  // Tells the renderer to create a FieldTrial, and by using a 100% probability
  // for the FieldTrial, forces the FieldTrial to have assigned group name.
  //
  // See base/metrics/field_trial.h for more information.
  SetFieldTrialGroup(string trial_name, string group_name);
};