// Copyright 2019 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.

syntax = "proto2";

package components.feed.core.proto.ui.stream;

option optimize_for = LITE_RUNTIME;

import "components/feed/core/proto/ui/piet/elements.proto";

option java_package = "org.chromium.components.feed.core.proto.ui.stream";
option java_outer_classname = "StreamOfflineExtensionProto";
option cc_enable_arenas = true;

// Extension for Piet bindings content based on offline availability status.
message OfflineExtension {
  extend components.feed.core.proto.ui.piet.HostBindingData {
    optional OfflineExtension offline_extension = 208815589;
  }

  // The URL that determines which binding to use. If the URL is available
  // offline, then offline_binding should be used, otherwise
  // not_offline_binding should be used.
  optional string url = 1;

  optional components.feed.core.proto.ui.piet.BindingValue offline_binding = 2;
  optional components.feed.core.proto.ui.piet.BindingValue not_offline_binding =
      3;
}
