Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/widget/ContextualSearchOptOutPromo.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/ContextualSearchOptOutPromo.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/ContextualSearchOptOutPromo.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..27f5468aaeb1b96188ce7e0158a8f741af2479e5 |
| --- /dev/null |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/ContextualSearchOptOutPromo.java |
| @@ -0,0 +1,46 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
|
David Trainor- moved to gerrit
2015/04/02 20:38:24
2015
pedro (no code reviews)
2015/04/03 21:01:02
Done.
|
| +// 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.widget; |
| + |
| +import android.content.Context; |
| +import android.util.AttributeSet; |
| +import android.view.View; |
| +import android.widget.LinearLayout; |
| + |
| +import org.chromium.chrome.R; |
| +import org.chromium.ui.resources.dynamics.ViewResourceAdapter; |
| + |
| +/** |
| + */ |
| +public class ContextualSearchOptOutPromo extends LinearLayout { |
|
David Trainor- moved to gerrit
2015/04/02 20:38:24
Do you need to implement invalidateChildInParent?
pedro (no code reviews)
2015/04/03 21:01:02
It's working without it, so I guess we don't need
|
| + private ViewResourceAdapter mResourceAdapter; |
| + |
| + /** |
| + * Constructs a new control container. |
| + * <p> |
| + * This constructor is used when inflating from XML. |
| + * |
| + * @param context The context used to build this view. |
| + * @param attrs The attributes used to determine how to construct this view. |
| + */ |
| + public ContextualSearchOptOutPromo(Context context, AttributeSet attrs) { |
| + super(context, attrs); |
| + } |
| + |
| + /** |
| + * @return The {@link ViewResourceAdapter} that exposes this {@link View} as a CC resource. |
| + */ |
| + public ViewResourceAdapter getResourceAdapter() { |
| + return mResourceAdapter; |
| + } |
| + |
| + @Override |
| + public void onFinishInflate() { |
| + super.onFinishInflate(); |
| + |
| + mResourceAdapter = |
| + new ViewResourceAdapter(findViewById(R.id.contextual_search_opt_out_promo)); |
| + } |
| +} |