Commit bb3be552 authored by Sky Malice's avatar Sky Malice Committed by Commit Bot

Initial cardrenderer interface.

This CL should expose enough to allow a sort of hello world example,
but is missing critical pieces. This is because the design is not yet
finalized and to try to avoid unnecessary churn.

Bug: 1046069
Change-Id: I330222affdfe547685cfec5981f438b0e4ab4922
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2023849
Commit-Queue: Sky Malice <skym@chromium.org>
Reviewed-by: default avatarCathy Li <chili@chromium.org>
Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Reviewed-by: default avatarJustin DeWitt <dewittj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736172}
parent 6f6c394f
# Copyright 2020 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.
import("//build/config/android/rules.gni")
android_library("java") {
sources = [
"android/java/src/org/chromium/chrome/browser/cardrenderer/CardRendererAdapter.java",
"android/java/src/org/chromium/chrome/browser/cardrenderer/CardRendererAdapterFactory.java",
]
}
noparent = True
include_rules = []
chili@chromium.org
dewittj@chromium.org
skym@chromium.org
# Team: feed@chromium.org
# COMPONENT: UI>Browser>ContentSuggestions>Feed
This feature contains interfaces used by downstream code. Changes will likely
cause build failures. Please do not TBR changes through without engaging OWNERS.
// Copyright 2020 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.
package org.chromium.chrome.browser.cardrenderer;
import android.view.View;
/**
* Creates, owns, and manages an exposed view. Can be rebound to a given implementation specific
* payload.
*/
public interface CardRendererAdapter {
/**
* Rebinds the associated view to the given payload.
* @param protoPayload The payload that should describe what the view should do.
*/
void bind(byte[] protoPayload);
/**
* @return The single associated view.
*/
View getView();
}
// Copyright 2020 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.
package org.chromium.chrome.browser.cardrenderer;
import android.content.Context;
/**
* Creates CardRendererAdapters on demand.
*/
public interface CardRendererAdapterFactory {
/**
* @param context The context that any new Android UI objects should be created within.
* @return A new wrapper capable of making view objects.
*/
CardRendererAdapter createCardRendererAdapter(Context context);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment