blob: 88e7d4749363d8de56f9a821ed1071174701f7d5 [file] [log] [blame]
// Copyright 2017 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.
#include "chrome/browser/vr/elements/webvr_url_toast.h"
#include "chrome/browser/vr/elements/webvr_url_toast_texture.h"
#include "chrome/browser/vr/target_property.h"
namespace vr {
WebVrUrlToast::WebVrUrlToast(
int preferred_width,
const base::Callback<void(UiUnsupportedMode)>& failure_callback)
: TexturedElement(preferred_width),
texture_(std::make_unique<WebVrUrlToastTexture>(failure_callback)) {}
WebVrUrlToast::~WebVrUrlToast() = default;
UiTexture* WebVrUrlToast::GetTexture() const {
return texture_.get();
}
void WebVrUrlToast::SetToolbarState(const ToolbarState& state) {
texture_->SetToolbarState(state);
}
} // namespace vr