Commit 40d64a60 authored by Hongchan Choi's avatar Hongchan Choi Committed by Commit Bot

Revert "VR: Add initial UI sound support"

This reverts commit a6bf420a.

Reason for revert: Compilation error.

https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.memory%2FAndroid_CFI%2F185%2F%2B%2Frecipes%2Fsteps%2Fcompile%2F0%2Fstdout

TBR=cjgrant

Original change's description:
> VR: Add initial UI sound support
> 
> This change wires up button hover and click sounds, and adds them to the
> asset structure.
> 
> BUG=812026
> R=​tiborg
> 
> Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
> Change-Id: Iccf113e74663201c62aa220c7e134990369fd755
> Reviewed-on: https://chromium-review.googlesource.com/953962
> Commit-Queue: Christopher Grant <cjgrant@chromium.org>
> Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org>
> Reviewed-by: Ian Vollick <vollick@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#542109}

TBR=vollick@chromium.org,cjgrant@chromium.org,tiborg@chromium.org

Change-Id: I76dc098547a55502b8d38a96320a55e48132ed05
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 812026
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Reviewed-on: https://chromium-review.googlesource.com/955827Reviewed-by: default avatarHongchan Choi <hongchan@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542150}
parent e632d236
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include "chrome/browser/vr/model/assets.h" #include "chrome/browser/vr/model/assets.h"
#include "chrome/browser/vr/model/omnibox_suggestions.h" #include "chrome/browser/vr/model/omnibox_suggestions.h"
#include "chrome/browser/vr/model/toolbar_state.h" #include "chrome/browser/vr/model/toolbar_state.h"
#include "chrome/browser/vr/sounds_manager_audio_delegate.h"
#include "chrome/browser/vr/ui.h" #include "chrome/browser/vr/ui.h"
#include "chrome/common/chrome_features.h" #include "chrome/common/chrome_features.h"
#include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkBitmap.h"
...@@ -67,12 +66,8 @@ void VrGLThread::Init() { ...@@ -67,12 +66,8 @@ void VrGLThread::Init() {
!keyboard_delegate_ ? nullptr : keyboard_delegate_.get(); !keyboard_delegate_ ? nullptr : keyboard_delegate_.get();
if (!keyboard_delegate) if (!keyboard_delegate)
ui_initial_state_.needs_keyboard_update = true; ui_initial_state_.needs_keyboard_update = true;
audio_delegate_ = std::make_unique<SoundsManagerAudioDelegate>();
auto ui = std::make_unique<Ui>(this, this, keyboard_delegate, auto ui = std::make_unique<Ui>(this, this, keyboard_delegate,
text_input_delegate_.get(), text_input_delegate_.get(), ui_initial_state_);
audio_delegate_.get(), ui_initial_state_);
if (keyboard_enabled) { if (keyboard_enabled) {
text_input_delegate_->SetRequestFocusCallback( text_input_delegate_->SetRequestFocusCallback(
base::BindRepeating(&Ui::RequestFocus, base::Unretained(ui.get()))); base::BindRepeating(&Ui::RequestFocus, base::Unretained(ui.get())));
...@@ -96,7 +91,6 @@ void VrGLThread::Init() { ...@@ -96,7 +91,6 @@ void VrGLThread::Init() {
} }
void VrGLThread::CleanUp() { void VrGLThread::CleanUp() {
audio_delegate_.reset();
vr_shell_gl_.reset(); vr_shell_gl_.reset();
} }
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include "chrome/browser/vr/browser_ui_interface.h" #include "chrome/browser/vr/browser_ui_interface.h"
#include "chrome/browser/vr/content_input_delegate.h" #include "chrome/browser/vr/content_input_delegate.h"
#include "chrome/browser/vr/model/omnibox_suggestions.h" #include "chrome/browser/vr/model/omnibox_suggestions.h"
#include "chrome/browser/vr/model/sound_id.h"
#include "chrome/browser/vr/text_input_delegate.h" #include "chrome/browser/vr/text_input_delegate.h"
#include "chrome/browser/vr/ui.h" #include "chrome/browser/vr/ui.h"
#include "chrome/browser/vr/ui_browser_interface.h" #include "chrome/browser/vr/ui_browser_interface.h"
...@@ -28,7 +27,6 @@ class Version; ...@@ -28,7 +27,6 @@ class Version;
namespace vr { namespace vr {
class AudioDelegate;
class VrInputConnection; class VrInputConnection;
class VrShell; class VrShell;
class VrShellGl; class VrShellGl;
...@@ -133,7 +131,6 @@ class VrGLThread : public base::android::JavaHandlerThread, ...@@ -133,7 +131,6 @@ class VrGLThread : public base::android::JavaHandlerThread,
std::unique_ptr<VrShellGl> vr_shell_gl_; std::unique_ptr<VrShellGl> vr_shell_gl_;
std::unique_ptr<GvrKeyboardDelegate> keyboard_delegate_; std::unique_ptr<GvrKeyboardDelegate> keyboard_delegate_;
std::unique_ptr<TextInputDelegate> text_input_delegate_; std::unique_ptr<TextInputDelegate> text_input_delegate_;
std::unique_ptr<AudioDelegate> audio_delegate_;
base::WeakPtr<VrShell> weak_vr_shell_; base::WeakPtr<VrShell> weak_vr_shell_;
base::WeakPtr<BrowserUiInterface> weak_browser_ui_; base::WeakPtr<BrowserUiInterface> weak_browser_ui_;
......
...@@ -183,8 +183,6 @@ static_library("vr_common") { ...@@ -183,8 +183,6 @@ static_library("vr_common") {
"service/vr_service_impl.h", "service/vr_service_impl.h",
"sliding_average.cc", "sliding_average.cc",
"sliding_average.h", "sliding_average.h",
"sounds_manager_audio_delegate.cc",
"sounds_manager_audio_delegate.h",
"speech_recognizer.cc", "speech_recognizer.cc",
"speech_recognizer.h", "speech_recognizer.h",
"target_property.cc", "target_property.cc",
......
...@@ -22,9 +22,6 @@ namespace vr { ...@@ -22,9 +22,6 @@ namespace vr {
namespace { namespace {
constexpr char kMinVersionWithGradients[] = "1.1";
constexpr char kMinVersionWithSounds[] = "2.0";
static const base::FilePath::CharType kBackgroundBaseFilename[] = static const base::FilePath::CharType kBackgroundBaseFilename[] =
FILE_PATH_LITERAL("background"); FILE_PATH_LITERAL("background");
static const base::FilePath::CharType kNormalGradientBaseFilename[] = static const base::FilePath::CharType kNormalGradientBaseFilename[] =
...@@ -38,12 +35,7 @@ static const base::FilePath::CharType kPngExtension[] = ...@@ -38,12 +35,7 @@ static const base::FilePath::CharType kPngExtension[] =
static const base::FilePath::CharType kJpegExtension[] = static const base::FilePath::CharType kJpegExtension[] =
FILE_PATH_LITERAL("jpeg"); FILE_PATH_LITERAL("jpeg");
static const base::FilePath::CharType kButtonHoverSoundFilename[] = constexpr char kMinVersionWithGradients[] = "1.1";
FILE_PATH_LITERAL("button_hover.wav");
static const base::FilePath::CharType kButtonClickSoundFilename[] =
FILE_PATH_LITERAL("button_click.wav");
static const base::FilePath::CharType kBackButtonClickSoundFilename[] =
FILE_PATH_LITERAL("back_button_click.wav");
} // namespace } // namespace
...@@ -155,23 +147,6 @@ AssetsLoadStatus LoadImage(const base::FilePath& component_install_dir, ...@@ -155,23 +147,6 @@ AssetsLoadStatus LoadImage(const base::FilePath& component_install_dir,
return AssetsLoadStatus::kSuccess; return AssetsLoadStatus::kSuccess;
} }
AssetsLoadStatus LoadSound(const base::FilePath& component_install_dir,
const base::FilePath::CharType* file_name,
std::unique_ptr<std::string>* out_buffer) {
base::FilePath file_path = component_install_dir.Append(file_name);
if (!base::PathExists(file_path)) {
return AssetsLoadStatus::kNotFound;
}
auto buffer = std::make_unique<std::string>();
if (!base::ReadFileToString(file_path, buffer.get())) {
return AssetsLoadStatus::kParseFailure;
}
*out_buffer = std::move(buffer);
return AssetsLoadStatus::kSuccess;
}
// static // static
void AssetsLoader::LoadAssetsTask( void AssetsLoader::LoadAssetsTask(
scoped_refptr<base::SingleThreadTaskRunner> task_runner, scoped_refptr<base::SingleThreadTaskRunner> task_runner,
...@@ -199,22 +174,6 @@ void AssetsLoader::LoadAssetsTask( ...@@ -199,22 +174,6 @@ void AssetsLoader::LoadAssetsTask(
} }
} }
if (status == AssetsLoadStatus::kSuccess &&
component_version >= base::Version(kMinVersionWithSounds)) {
std::vector<std::pair<const base::FilePath::CharType*,
std::unique_ptr<std::string>*>>
sounds = {
{kButtonHoverSoundFilename, &assets->button_hover_sound},
{kButtonClickSoundFilename, &assets->button_click_sound},
{kBackButtonClickSoundFilename, &assets->back_button_click_sound},
};
for (auto& sound : sounds) {
status = LoadSound(component_install_dir, sound.first, sound.second);
if (status != AssetsLoadStatus::kSuccess)
break;
}
}
if (status != AssetsLoadStatus::kSuccess) { if (status != AssetsLoadStatus::kSuccess) {
assets.reset(); assets.reset();
} }
......
...@@ -22,7 +22,7 @@ class Version; ...@@ -22,7 +22,7 @@ class Version;
namespace vr { namespace vr {
constexpr uint32_t kCompatibleMajorVrAssetsComponentVersion = 2; constexpr uint32_t kCompatibleMajorVrAssetsComponentVersion = 1;
class MetricsHelper; class MetricsHelper;
struct AssetsLoaderSingletonTrait; struct AssetsLoaderSingletonTrait;
......
// Copyright 2018 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.
#ifndef CHROME_BROWSER_VR_AUDIO_DELEGATE_H_
#define CHROME_BROWSER_VR_AUDIO_DELEGATE_H_
#include <memory>
#include <string>
#include "chrome/browser/vr/model/sound_id.h"
namespace vr {
// This delegate interface describes an audio implementation supplied to the UI.
class AudioDelegate {
public:
virtual ~AudioDelegate() {}
// Clears all registered sounds. This must be done before re-registering a
// particular sound.
virtual void ResetSounds();
// The delegate must assume ownership of the audio data. A sound may only be
// registered once. To change the sound later, call ResetSounds and
// re-register all sounds.
virtual bool RegisterSound(SoundId id, std::unique_ptr<std::string> data) = 0;
virtual void PlaySound(SoundId id) = 0;
};
} // namespace vr
#endif // CHROME_BROWSER_VR_AUDIO_DELEGATE_H_
...@@ -21,8 +21,7 @@ constexpr float kIconScaleFactor = 0.5f; ...@@ -21,8 +21,7 @@ constexpr float kIconScaleFactor = 0.5f;
} // namespace } // namespace
DiscButton::DiscButton(base::RepeatingCallback<void()> click_handler, DiscButton::DiscButton(base::RepeatingCallback<void()> click_handler,
const gfx::VectorIcon& icon, const gfx::VectorIcon& icon)
AudioDelegate* audio_delegate)
: Button(click_handler) { : Button(click_handler) {
auto vector_icon = std::make_unique<VectorIcon>(512); auto vector_icon = std::make_unique<VectorIcon>(512);
vector_icon->SetType(kTypeButtonForeground); vector_icon->SetType(kTypeButtonForeground);
...@@ -36,8 +35,6 @@ DiscButton::DiscButton(base::RepeatingCallback<void()> click_handler, ...@@ -36,8 +35,6 @@ DiscButton::DiscButton(base::RepeatingCallback<void()> click_handler,
auto target = RemoveChild(hit_plane()); auto target = RemoveChild(hit_plane());
vector_icon->AddChild(std::move(target)); vector_icon->AddChild(std::move(target));
AddChild(std::move(vector_icon)); AddChild(std::move(vector_icon));
SetSounds(kSoundButtonHover, kSoundBackButtonClick, audio_delegate);
} }
DiscButton::~DiscButton() = default; DiscButton::~DiscButton() = default;
......
...@@ -22,8 +22,7 @@ class VectorIcon; ...@@ -22,8 +22,7 @@ class VectorIcon;
class DiscButton : public Button { class DiscButton : public Button {
public: public:
DiscButton(base::RepeatingCallback<void()> click_handler, DiscButton(base::RepeatingCallback<void()> click_handler,
const gfx::VectorIcon& icon, const gfx::VectorIcon& icon);
AudioDelegate* audio_delegate);
~DiscButton() override; ~DiscButton() override;
VectorIcon* foreground() const { return foreground_; } VectorIcon* foreground() const { return foreground_; }
......
...@@ -18,8 +18,7 @@ ...@@ -18,8 +18,7 @@
namespace vr { namespace vr {
TEST(DiscButton, HoverTest) { TEST(DiscButton, HoverTest) {
DiscButton button(base::RepeatingCallback<void()>(), vector_icons::kMicIcon, DiscButton button(base::RepeatingCallback<void()>(), vector_icons::kMicIcon);
nullptr);
button.SetSize(1.0f, 1.0f); button.SetSize(1.0f, 1.0f);
button.set_hover_offset(0.5f); button.set_hover_offset(0.5f);
...@@ -46,8 +45,7 @@ TEST(DiscButton, HoverTest) { ...@@ -46,8 +45,7 @@ TEST(DiscButton, HoverTest) {
} }
TEST(DiscButton, SizePropagatesToSubElements) { TEST(DiscButton, SizePropagatesToSubElements) {
DiscButton button(base::RepeatingCallback<void()>(), vector_icons::kMicIcon, DiscButton button(base::RepeatingCallback<void()>(), vector_icons::kMicIcon);
nullptr);
gfx::SizeF size(1000.0f, 1000.0f); gfx::SizeF size(1000.0f, 1000.0f);
gfx::SizeF icon_size = size; gfx::SizeF icon_size = size;
icon_size.Scale(0.5f); icon_size.Scale(0.5f);
...@@ -71,8 +69,7 @@ TEST(DiscButton, SizePropagatesToSubElements) { ...@@ -71,8 +69,7 @@ TEST(DiscButton, SizePropagatesToSubElements) {
} }
TEST(DiscButton, DrawPhasePropagatesToSubElements) { TEST(DiscButton, DrawPhasePropagatesToSubElements) {
DiscButton button(base::RepeatingCallback<void()>(), vector_icons::kMicIcon, DiscButton button(base::RepeatingCallback<void()>(), vector_icons::kMicIcon);
nullptr);
button.SetDrawPhase(kPhaseOverlayForeground); button.SetDrawPhase(kPhaseOverlayForeground);
for (auto& child : button.children()) { for (auto& child : button.children()) {
...@@ -81,8 +78,7 @@ TEST(DiscButton, DrawPhasePropagatesToSubElements) { ...@@ -81,8 +78,7 @@ TEST(DiscButton, DrawPhasePropagatesToSubElements) {
} }
TEST(DiscButton, NamePropagatesToSubElements) { TEST(DiscButton, NamePropagatesToSubElements) {
DiscButton button(base::RepeatingCallback<void()>(), vector_icons::kMicIcon, DiscButton button(base::RepeatingCallback<void()>(), vector_icons::kMicIcon);
nullptr);
button.SetName(kCloseButton); button.SetName(kCloseButton);
for (auto& child : button.children()) { for (auto& child : button.children()) {
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "chrome/browser/vr/model/camera_model.h" #include "chrome/browser/vr/model/camera_model.h"
#include "chrome/browser/vr/model/sound_id.h"
#include "third_party/WebKit/public/platform/WebGestureEvent.h" #include "third_party/WebKit/public/platform/WebGestureEvent.h"
#include "third_party/skia/include/core/SkRRect.h" #include "third_party/skia/include/core/SkRRect.h"
#include "third_party/skia/include/core/SkRect.h" #include "third_party/skia/include/core/SkRect.h"
...@@ -140,9 +139,6 @@ void UiElement::Render(UiElementRenderer* renderer, ...@@ -140,9 +139,6 @@ void UiElement::Render(UiElementRenderer* renderer,
void UiElement::Initialize(SkiaSurfaceProvider* provider) {} void UiElement::Initialize(SkiaSurfaceProvider* provider) {}
void UiElement::OnHoverEnter(const gfx::PointF& position) { void UiElement::OnHoverEnter(const gfx::PointF& position) {
if (hover_sound_id_ != kSoundNone && audio_delegate_) {
audio_delegate_->PlaySound(hover_sound_id_);
}
if (event_handlers_.hover_enter) { if (event_handlers_.hover_enter) {
event_handlers_.hover_enter.Run(); event_handlers_.hover_enter.Run();
} else if (parent() && bubble_events()) { } else if (parent() && bubble_events()) {
...@@ -167,9 +163,6 @@ void UiElement::OnMove(const gfx::PointF& position) { ...@@ -167,9 +163,6 @@ void UiElement::OnMove(const gfx::PointF& position) {
} }
void UiElement::OnButtonDown(const gfx::PointF& position) { void UiElement::OnButtonDown(const gfx::PointF& position) {
if (hover_sound_id_ != kSoundNone && audio_delegate_) {
audio_delegate_->PlaySound(click_sound_id_);
}
if (event_handlers_.button_down) { if (event_handlers_.button_down) {
event_handlers_.button_down.Run(); event_handlers_.button_down.Run();
} else if (parent() && bubble_events()) { } else if (parent() && bubble_events()) {
...@@ -534,14 +527,6 @@ void UiElement::DumpGeometry(std::ostringstream* os) const { ...@@ -534,14 +527,6 @@ void UiElement::DumpGeometry(std::ostringstream* os) const {
} }
#endif #endif
void UiElement::SetSounds(SoundId hover,
SoundId click,
AudioDelegate* delegate) {
hover_sound_id_ = hover;
click_sound_id_ = click;
audio_delegate_ = delegate;
}
void UiElement::OnUpdatedWorldSpaceTransform() {} void UiElement::OnUpdatedWorldSpaceTransform() {}
gfx::SizeF UiElement::stale_size() const { gfx::SizeF UiElement::stale_size() const {
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include "cc/animation/animation_target.h" #include "cc/animation/animation_target.h"
#include "cc/animation/transform_operations.h" #include "cc/animation/transform_operations.h"
#include "chrome/browser/vr/animation.h" #include "chrome/browser/vr/animation.h"
#include "chrome/browser/vr/audio_delegate.h"
#include "chrome/browser/vr/databinding/binding_base.h" #include "chrome/browser/vr/databinding/binding_base.h"
#include "chrome/browser/vr/elements/corner_radii.h" #include "chrome/browser/vr/elements/corner_radii.h"
#include "chrome/browser/vr/elements/draw_phase.h" #include "chrome/browser/vr/elements/draw_phase.h"
...@@ -58,11 +57,11 @@ enum LayoutAlignment { ...@@ -58,11 +57,11 @@ enum LayoutAlignment {
struct EventHandlers { struct EventHandlers {
EventHandlers(); EventHandlers();
~EventHandlers(); ~EventHandlers();
base::RepeatingCallback<void()> hover_enter; base::Callback<void()> hover_enter;
base::RepeatingCallback<void()> hover_leave; base::Callback<void()> hover_leave;
base::RepeatingCallback<void(const gfx::PointF&)> hover_move; base::Callback<void(const gfx::PointF&)> hover_move;
base::RepeatingCallback<void()> button_down; base::Callback<void()> button_down;
base::RepeatingCallback<void()> button_up; base::Callback<void()> button_up;
base::RepeatingCallback<void(bool)> focus_change; base::RepeatingCallback<void(bool)> focus_change;
}; };
...@@ -444,10 +443,6 @@ class UiElement : public cc::AnimationTarget { ...@@ -444,10 +443,6 @@ class UiElement : public cc::AnimationTarget {
// change your size based on your old size). // change your size based on your old size).
gfx::SizeF stale_size() const; gfx::SizeF stale_size() const;
// Set the sounds that play when an applicable handler is executed. Elements
// that override element hover and click methods must manage their own sounds.
void SetSounds(SoundId hover, SoundId click, AudioDelegate* delegate);
protected: protected:
Animation& animation() { return animation_; } Animation& animation() { return animation_; }
...@@ -573,10 +568,6 @@ class UiElement : public cc::AnimationTarget { ...@@ -573,10 +568,6 @@ class UiElement : public cc::AnimationTarget {
UpdatePhase phase_ = kClean; UpdatePhase phase_ = kClean;
AudioDelegate* audio_delegate_ = nullptr;
SoundId hover_sound_id_ = kSoundNone;
SoundId click_sound_id_ = kSoundNone;
DISALLOW_COPY_AND_ASSIGN(UiElement); DISALLOW_COPY_AND_ASSIGN(UiElement);
}; };
......
...@@ -29,10 +29,6 @@ struct Assets { ...@@ -29,10 +29,6 @@ struct Assets {
std::unique_ptr<SkBitmap> incognito_gradient; std::unique_ptr<SkBitmap> incognito_gradient;
std::unique_ptr<SkBitmap> fullscreen_gradient; std::unique_ptr<SkBitmap> fullscreen_gradient;
std::unique_ptr<std::string> button_hover_sound;
std::unique_ptr<std::string> button_click_sound;
std::unique_ptr<std::string> back_button_click_sound;
base::Version version; base::Version version;
}; };
......
// Copyright 2018 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.
#ifndef CHROME_BROWSER_VR_MODEL_SOUND_ID_H_
#define CHROME_BROWSER_VR_MODEL_SOUND_ID_H_
namespace vr {
enum SoundId {
kSoundNone,
kSoundButtonHover,
kSoundButtonClick,
kSoundBackButtonClick,
};
} // namespace vr
#endif // CHROME_BROWSER_VR_MODEL_SOUND_ID_H_
// Copyright 2018 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/sounds_manager_audio_delegate.h"
#include "media/audio/sounds/sounds_manager.h"
namespace vr {
SoundsManagerAudioDelegate::SoundsManagerAudioDelegate() {}
SoundsManagerAudioDelegate::~SoundsManagerAudioDelegate() {
ResetSounds();
}
void SoundsManagerAudioDelegate::ResetSounds() {
// Because SoundsManager cannot replace a registered sound, start fresh
// with a new manager if needed.
if (!sounds_.empty()) {
media::SoundsManager::Shutdown();
sounds_.clear();
}
}
bool SoundsManagerAudioDelegate::RegisterSound(
SoundId id,
std::unique_ptr<std::string> data) {
DCHECK_NE(id, kSoundNone);
DCHECK(sounds_.find(id) == sounds_.end());
if (sounds_.empty())
media::SoundsManager::Create();
sounds_[id] = std::move(data);
return media::SoundsManager::Get()->Initialize(id, *sounds_[id]);
}
void SoundsManagerAudioDelegate::PlaySound(SoundId id) {
if (sounds_.find(id) != sounds_.end())
media::SoundsManager::Get()->Play(id);
}
} // namespace vr
// Copyright 2018 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.
#ifndef CHROME_BROWSER_VR_SOUNDS_MANAGER_AUDIO_DELEGATE_H_
#define CHROME_BROWSER_VR_SOUNDS_MANAGER_AUDIO_DELEGATE_H_
#include <unordered_map>
#include "base/macros.h"
#include "chrome/browser/vr/audio_delegate.h"
namespace vr {
class SoundsManagerAudioDelegate : public AudioDelegate {
public:
SoundsManagerAudioDelegate();
~SoundsManagerAudioDelegate() override;
// AudioDelegate implementation.
void ResetSounds() override;
bool RegisterSound(SoundId, std::unique_ptr<std::string> data) override;
void PlaySound(SoundId id) override;
private:
std::unordered_map<SoundId, std::unique_ptr<std::string>> sounds_;
DISALLOW_COPY_AND_ASSIGN(SoundsManagerAudioDelegate);
};
} // namespace vr
#endif // CHROME_BROWSER_VR_SOUNDS_MANAGER_AUDIO_DELEGATE_H_
...@@ -57,7 +57,7 @@ void UiPixelTest::TearDown() { ...@@ -57,7 +57,7 @@ void UiPixelTest::TearDown() {
void UiPixelTest::MakeUi(const UiInitialState& ui_initial_state, void UiPixelTest::MakeUi(const UiInitialState& ui_initial_state,
const ToolbarState& toolbar_state) { const ToolbarState& toolbar_state) {
ui_ = std::make_unique<Ui>(browser_.get(), nullptr, nullptr, nullptr, nullptr, ui_ = std::make_unique<Ui>(browser_.get(), nullptr, nullptr, nullptr,
ui_initial_state); ui_initial_state);
ui_->OnGlInitialized(content_texture_, ui_->OnGlInitialized(content_texture_,
vr::UiElementRenderer::kTextureLocationLocal, vr::UiElementRenderer::kTextureLocationLocal,
......
...@@ -76,7 +76,7 @@ void UiTest::CreateSceneInternal( ...@@ -76,7 +76,7 @@ void UiTest::CreateSceneInternal(
content_input_delegate_ = content_input_delegate.get(); content_input_delegate_ = content_input_delegate.get();
ui_ = std::make_unique<Ui>(std::move(browser_.get()), ui_ = std::make_unique<Ui>(std::move(browser_.get()),
std::move(content_input_delegate), nullptr, std::move(content_input_delegate), nullptr,
nullptr, nullptr, state); nullptr, state);
scene_ = ui_->scene(); scene_ = ui_->scene();
model_ = ui_->model_for_test(); model_ = ui_->model_for_test();
model_->controller.transform.Translate3d(kStartControllerPosition); model_->controller.transform.Translate3d(kStartControllerPosition);
......
...@@ -90,8 +90,7 @@ VrTestContext::VrTestContext() : view_scale_factor_(kDefaultViewScaleFactor) { ...@@ -90,8 +90,7 @@ VrTestContext::VrTestContext() : view_scale_factor_(kDefaultViewScaleFactor) {
UiInitialState ui_initial_state; UiInitialState ui_initial_state;
ui_ = std::make_unique<Ui>(this, nullptr, keyboard_delegate_.get(), ui_ = std::make_unique<Ui>(this, nullptr, keyboard_delegate_.get(),
text_input_delegate_.get(), nullptr, text_input_delegate_.get(), ui_initial_state);
ui_initial_state);
LoadAssets(); LoadAssets();
text_input_delegate_->SetRequestFocusCallback( text_input_delegate_->SetRequestFocusCallback(
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include "chrome/browser/vr/model/assets.h" #include "chrome/browser/vr/model/assets.h"
#include "chrome/browser/vr/model/model.h" #include "chrome/browser/vr/model/model.h"
#include "chrome/browser/vr/model/omnibox_suggestions.h" #include "chrome/browser/vr/model/omnibox_suggestions.h"
#include "chrome/browser/vr/model/sound_id.h"
#include "chrome/browser/vr/speech_recognizer.h" #include "chrome/browser/vr/speech_recognizer.h"
#include "chrome/browser/vr/ui_browser_interface.h" #include "chrome/browser/vr/ui_browser_interface.h"
#include "chrome/browser/vr/ui_element_renderer.h" #include "chrome/browser/vr/ui_element_renderer.h"
...@@ -33,29 +32,25 @@ namespace vr { ...@@ -33,29 +32,25 @@ namespace vr {
Ui::Ui(UiBrowserInterface* browser, Ui::Ui(UiBrowserInterface* browser,
ContentInputForwarder* content_input_forwarder, ContentInputForwarder* content_input_forwarder,
KeyboardDelegate* keyboard_delegate, vr::KeyboardDelegate* keyboard_delegate,
TextInputDelegate* text_input_delegate, vr::TextInputDelegate* text_input_delegate,
AudioDelegate* audio_delegate,
const UiInitialState& ui_initial_state) const UiInitialState& ui_initial_state)
: Ui(browser, : Ui(browser,
std::make_unique<ContentInputDelegate>(content_input_forwarder), std::make_unique<ContentInputDelegate>(content_input_forwarder),
keyboard_delegate, keyboard_delegate,
text_input_delegate, text_input_delegate,
audio_delegate,
ui_initial_state) {} ui_initial_state) {}
Ui::Ui(UiBrowserInterface* browser, Ui::Ui(UiBrowserInterface* browser,
std::unique_ptr<ContentInputDelegate> content_input_delegate, std::unique_ptr<ContentInputDelegate> content_input_delegate,
KeyboardDelegate* keyboard_delegate, vr::KeyboardDelegate* keyboard_delegate,
TextInputDelegate* text_input_delegate, vr::TextInputDelegate* text_input_delegate,
AudioDelegate* audio_delegate,
const UiInitialState& ui_initial_state) const UiInitialState& ui_initial_state)
: browser_(browser), : browser_(browser),
scene_(std::make_unique<UiScene>()), scene_(std::make_unique<UiScene>()),
model_(std::make_unique<Model>()), model_(std::make_unique<Model>()),
content_input_delegate_(std::move(content_input_delegate)), content_input_delegate_(std::move(content_input_delegate)),
input_manager_(std::make_unique<UiInputManager>(scene_.get())), input_manager_(std::make_unique<UiInputManager>(scene_.get())),
audio_delegate_(audio_delegate),
weak_ptr_factory_(this) { weak_ptr_factory_(this) {
UiInitialState state = ui_initial_state; UiInitialState state = ui_initial_state;
if (keyboard_delegate != nullptr) if (keyboard_delegate != nullptr)
...@@ -63,8 +58,7 @@ Ui::Ui(UiBrowserInterface* browser, ...@@ -63,8 +58,7 @@ Ui::Ui(UiBrowserInterface* browser,
InitializeModel(state); InitializeModel(state);
UiSceneCreator(browser, scene_.get(), this, content_input_delegate_.get(), UiSceneCreator(browser, scene_.get(), this, content_input_delegate_.get(),
keyboard_delegate, text_input_delegate, audio_delegate, keyboard_delegate, text_input_delegate, model_.get())
model_.get())
.CreateScene(); .CreateScene();
} }
...@@ -410,19 +404,6 @@ void Ui::OnAssetsLoaded(AssetsLoadStatus status, ...@@ -410,19 +404,6 @@ void Ui::OnAssetsLoaded(AssetsLoadStatus status,
ColorScheme::UpdateForComponent(component_version); ColorScheme::UpdateForComponent(component_version);
model_->background_loaded = true; model_->background_loaded = true;
if (audio_delegate_) {
std::vector<std::pair<SoundId, std::unique_ptr<std::string>&>> sounds = {
{kSoundButtonHover, assets->button_hover_sound},
{kSoundButtonClick, assets->button_click_sound},
{kSoundBackButtonClick, assets->back_button_click_sound},
};
audio_delegate_->ResetSounds();
for (auto& sound : sounds) {
if (sound.second)
audio_delegate_->RegisterSound(sound.first, std::move(sound.second));
}
}
} }
void Ui::OnAssetsUnavailable() { void Ui::OnAssetsUnavailable() {
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include "chrome/browser/vr/ui_element_renderer.h" #include "chrome/browser/vr/ui_element_renderer.h"
namespace vr { namespace vr {
class AudioDelegate;
class BrowserUiInterface; class BrowserUiInterface;
class ContentInputDelegate; class ContentInputDelegate;
class ContentInputForwarder; class ContentInputForwarder;
...@@ -52,16 +51,14 @@ class Ui : public BrowserUiInterface, public KeyboardUiInterface { ...@@ -52,16 +51,14 @@ class Ui : public BrowserUiInterface, public KeyboardUiInterface {
public: public:
Ui(UiBrowserInterface* browser, Ui(UiBrowserInterface* browser,
ContentInputForwarder* content_input_forwarder, ContentInputForwarder* content_input_forwarder,
KeyboardDelegate* keyboard_delegate, vr::KeyboardDelegate* keyboard_delegate,
TextInputDelegate* text_input_delegate, vr::TextInputDelegate* text_input_delegate,
AudioDelegate* audio_delegate,
const UiInitialState& ui_initial_state); const UiInitialState& ui_initial_state);
Ui(UiBrowserInterface* browser, Ui(UiBrowserInterface* browser,
std::unique_ptr<ContentInputDelegate> content_input_delegate, std::unique_ptr<ContentInputDelegate> content_input_delegate,
KeyboardDelegate* keyboard_delegate, vr::KeyboardDelegate* keyboard_delegate,
TextInputDelegate* text_input_delegate, vr::TextInputDelegate* text_input_delegate,
AudioDelegate* audio_delegate,
const UiInitialState& ui_initial_state); const UiInitialState& ui_initial_state);
~Ui() override; ~Ui() override;
...@@ -74,7 +71,7 @@ class Ui : public BrowserUiInterface, public KeyboardUiInterface { ...@@ -74,7 +71,7 @@ class Ui : public BrowserUiInterface, public KeyboardUiInterface {
UiRenderer* ui_renderer() { return ui_renderer_.get(); } UiRenderer* ui_renderer() { return ui_renderer_.get(); }
UiInputManager* input_manager() { return input_manager_.get(); } UiInputManager* input_manager() { return input_manager_.get(); }
base::WeakPtr<BrowserUiInterface> GetBrowserUiWeakPtr(); base::WeakPtr<vr::BrowserUiInterface> GetBrowserUiWeakPtr();
// BrowserUiInterface // BrowserUiInterface
void SetWebVrMode(bool enabled, bool show_toast) override; void SetWebVrMode(bool enabled, bool show_toast) override;
...@@ -168,16 +165,14 @@ class Ui : public BrowserUiInterface, public KeyboardUiInterface { ...@@ -168,16 +165,14 @@ class Ui : public BrowserUiInterface, public KeyboardUiInterface {
UiBrowserInterface* browser_; UiBrowserInterface* browser_;
// This state may be further abstracted into a SkiaUi object. // This state may be further abstracted into a SkiaUi object.
std::unique_ptr<UiScene> scene_; std::unique_ptr<vr::UiScene> scene_;
std::unique_ptr<Model> model_; std::unique_ptr<vr::Model> model_;
std::unique_ptr<ContentInputDelegate> content_input_delegate_; std::unique_ptr<vr::ContentInputDelegate> content_input_delegate_;
std::unique_ptr<UiElementRenderer> ui_element_renderer_; std::unique_ptr<vr::UiElementRenderer> ui_element_renderer_;
std::unique_ptr<UiInputManager> input_manager_; std::unique_ptr<vr::UiInputManager> input_manager_;
std::unique_ptr<UiRenderer> ui_renderer_; std::unique_ptr<vr::UiRenderer> ui_renderer_;
std::unique_ptr<SkiaSurfaceProvider> provider_; std::unique_ptr<SkiaSurfaceProvider> provider_;
AudioDelegate* audio_delegate_ = nullptr;
base::WeakPtrFactory<Ui> weak_ptr_factory_; base::WeakPtrFactory<Ui> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(Ui); DISALLOW_COPY_AND_ASSIGN(Ui);
......
...@@ -132,7 +132,6 @@ void OnSuggestionModelAdded(UiScene* scene, ...@@ -132,7 +132,6 @@ void OnSuggestionModelAdded(UiScene* scene,
UiBrowserInterface* browser, UiBrowserInterface* browser,
Ui* ui, Ui* ui,
Model* model, Model* model,
AudioDelegate* audio_delegate,
SuggestionBinding* element_binding) { SuggestionBinding* element_binding) {
auto icon = std::make_unique<VectorIcon>(100); auto icon = std::make_unique<VectorIcon>(100);
icon->SetDrawPhase(kPhaseForeground); icon->SetDrawPhase(kPhaseForeground);
...@@ -198,7 +197,6 @@ void OnSuggestionModelAdded(UiScene* scene, ...@@ -198,7 +197,6 @@ void OnSuggestionModelAdded(UiScene* scene,
background->set_bubble_events(true); background->set_bubble_events(true);
background->set_bounds_contain_children(true); background->set_bounds_contain_children(true);
background->set_hover_offset(0.0); background->set_hover_offset(0.0);
background->SetSounds(kSoundButtonHover, kSoundButtonClick, audio_delegate);
VR_BIND_BUTTON_COLORS(model, background.get(), VR_BIND_BUTTON_COLORS(model, background.get(),
&ColorScheme::suggestion_button_colors, &ColorScheme::suggestion_button_colors,
&Button::SetButtonColors); &Button::SetButtonColors);
...@@ -594,7 +592,6 @@ UiSceneCreator::UiSceneCreator(UiBrowserInterface* browser, ...@@ -594,7 +592,6 @@ UiSceneCreator::UiSceneCreator(UiBrowserInterface* browser,
ContentInputDelegate* content_input_delegate, ContentInputDelegate* content_input_delegate,
KeyboardDelegate* keyboard_delegate, KeyboardDelegate* keyboard_delegate,
TextInputDelegate* text_input_delegate, TextInputDelegate* text_input_delegate,
AudioDelegate* audio_delegate,
Model* model) Model* model)
: browser_(browser), : browser_(browser),
scene_(scene), scene_(scene),
...@@ -602,7 +599,6 @@ UiSceneCreator::UiSceneCreator(UiBrowserInterface* browser, ...@@ -602,7 +599,6 @@ UiSceneCreator::UiSceneCreator(UiBrowserInterface* browser,
content_input_delegate_(content_input_delegate), content_input_delegate_(content_input_delegate),
keyboard_delegate_(keyboard_delegate), keyboard_delegate_(keyboard_delegate),
text_input_delegate_(text_input_delegate), text_input_delegate_(text_input_delegate),
audio_delegate_(audio_delegate),
model_(model) {} model_(model) {}
UiSceneCreator::~UiSceneCreator() {} UiSceneCreator::~UiSceneCreator() {}
...@@ -1134,7 +1130,7 @@ void UiSceneCreator::CreateWebVrTimeoutScreen() { ...@@ -1134,7 +1130,7 @@ void UiSceneCreator::CreateWebVrTimeoutScreen() {
Create<DiscButton>(kWebVrTimeoutMessageButton, kPhaseForeground, Create<DiscButton>(kWebVrTimeoutMessageButton, kPhaseForeground,
base::BindRepeating(&UiBrowserInterface::ExitPresent, base::BindRepeating(&UiBrowserInterface::ExitPresent,
base::Unretained(browser_)), base::Unretained(browser_)),
vector_icons::kClose16Icon, audio_delegate_); vector_icons::kClose16Icon);
button->SetVisible(false); button->SetVisible(false);
button->SetTranslate(0, -kTimeoutMessageTextWidthDMM, 0); button->SetTranslate(0, -kTimeoutMessageTextWidthDMM, 0);
button->SetRotate(1, 0, 0, kTimeoutButtonRotationRad); button->SetRotate(1, 0, 0, kTimeoutButtonRotationRad);
...@@ -1407,7 +1403,7 @@ void UiSceneCreator::CreateVoiceSearchUiGroup() { ...@@ -1407,7 +1403,7 @@ void UiSceneCreator::CreateVoiceSearchUiGroup() {
kSpeechRecognitionListeningCloseButton, kPhaseForeground, kSpeechRecognitionListeningCloseButton, kPhaseForeground,
base::BindRepeating(&UiBrowserInterface::SetVoiceSearchActive, base::BindRepeating(&UiBrowserInterface::SetVoiceSearchActive,
base::Unretained(browser_), false), base::Unretained(browser_), false),
vector_icons::kClose16Icon, audio_delegate_); vector_icons::kClose16Icon);
close_button->SetSize(kVoiceSearchCloseButtonDiameter, close_button->SetSize(kVoiceSearchCloseButtonDiameter,
kVoiceSearchCloseButtonDiameter); kVoiceSearchCloseButtonDiameter);
close_button->set_hover_offset(kButtonZOffsetHoverDMM * kContentDistance); close_button->set_hover_offset(kButtonZOffsetHoverDMM * kContentDistance);
...@@ -1452,7 +1448,7 @@ void UiSceneCreator::CreateContentRepositioningAffordance() { ...@@ -1452,7 +1448,7 @@ void UiSceneCreator::CreateContentRepositioningAffordance() {
base::BindRepeating( base::BindRepeating(
[](Model* model) { model->push_mode(kModeRepositionWindow); }, [](Model* model) { model->push_mode(kModeRepositionWindow); },
base::Unretained(model_)), base::Unretained(model_)),
kRepositionIcon, audio_delegate_); kRepositionIcon);
reposition_button->SetSize(kRepositionButtonDiameter, reposition_button->SetSize(kRepositionButtonDiameter,
kRepositionButtonDiameter); kRepositionButtonDiameter);
reposition_button->set_y_anchoring(BOTTOM); reposition_button->set_y_anchoring(BOTTOM);
...@@ -1467,7 +1463,6 @@ void UiSceneCreator::CreateContentRepositioningAffordance() { ...@@ -1467,7 +1463,6 @@ void UiSceneCreator::CreateContentRepositioningAffordance() {
reposition_button->background()->SetTransitionedProperties( reposition_button->background()->SetTransitionedProperties(
{BACKGROUND_COLOR, TRANSFORM}); {BACKGROUND_COLOR, TRANSFORM});
reposition_button->SetOpacity(kRepositionButtonMinOpacity); reposition_button->SetOpacity(kRepositionButtonMinOpacity);
reposition_button->SetSounds(kSoundNone, kSoundNone, nullptr);
reposition_button->AddBinding(std::make_unique<Binding<float>>( reposition_button->AddBinding(std::make_unique<Binding<float>>(
VR_BIND_LAMBDA( VR_BIND_LAMBDA(
[](Model* model, Button* button) { [](Model* model, Button* button) {
...@@ -1686,7 +1681,6 @@ void UiSceneCreator::CreateUrlBar() { ...@@ -1686,7 +1681,6 @@ void UiSceneCreator::CreateUrlBar() {
back_button->SetCornerRadii( back_button->SetCornerRadii(
{kUrlBarHeightDMM / 2, 0, kUrlBarHeightDMM / 2, 0}); {kUrlBarHeightDMM / 2, 0, kUrlBarHeightDMM / 2, 0});
back_button->set_hover_offset(0.0f); back_button->set_hover_offset(0.0f);
back_button->SetSounds(kSoundButtonHover, kSoundButtonClick, audio_delegate_);
back_button->AddBinding(VR_BIND_FUNC(bool, Model, model_, back_button->AddBinding(VR_BIND_FUNC(bool, Model, model_,
model->can_navigate_back, Button, model->can_navigate_back, Button,
back_button.get(), set_enabled)); back_button.get(), set_enabled));
...@@ -2049,8 +2043,6 @@ void UiSceneCreator::CreateOmnibox() { ...@@ -2049,8 +2043,6 @@ void UiSceneCreator::CreateOmnibox() {
mic_icon_box->SetSize(kOmniboxTextFieldIconButtonSizeDMM, mic_icon_box->SetSize(kOmniboxTextFieldIconButtonSizeDMM,
kOmniboxTextFieldIconButtonSizeDMM); kOmniboxTextFieldIconButtonSizeDMM);
mic_icon_box->set_corner_radius(kOmniboxTextFieldIconButtonRadiusDMM); mic_icon_box->set_corner_radius(kOmniboxTextFieldIconButtonRadiusDMM);
mic_icon_box->SetSounds(kSoundButtonHover, kSoundButtonClick,
audio_delegate_);
VR_BIND_VISIBILITY(mic_icon_box, VR_BIND_VISIBILITY(mic_icon_box,
model->speech.has_or_can_request_audio_permission && model->speech.has_or_can_request_audio_permission &&
!model->incognito && !model->incognito &&
...@@ -2080,10 +2072,10 @@ void UiSceneCreator::CreateOmnibox() { ...@@ -2080,10 +2072,10 @@ void UiSceneCreator::CreateOmnibox() {
text_field_layout->AddChild(std::move(right_spacer)); text_field_layout->AddChild(std::move(right_spacer));
// Set up the vector binding to manage suggestions dynamically. // Set up the vector binding to manage suggestions dynamically.
SuggestionSetBinding::ModelAddedCallback added_callback = base::BindRepeating( SuggestionSetBinding::ModelAddedCallback added_callback =
&OnSuggestionModelAdded, base::Unretained(scene_), base::BindRepeating(&OnSuggestionModelAdded, base::Unretained(scene_),
base::Unretained(browser_), base::Unretained(ui_), base::Unretained(browser_), base::Unretained(ui_),
base::Unretained(model_), base::Unretained(audio_delegate_)); base::Unretained(model_));
SuggestionSetBinding::ModelRemovedCallback removed_callback = SuggestionSetBinding::ModelRemovedCallback removed_callback =
base::BindRepeating(&OnSuggestionModelRemoved, base::Unretained(scene_)); base::BindRepeating(&OnSuggestionModelRemoved, base::Unretained(scene_));
...@@ -2105,7 +2097,7 @@ void UiSceneCreator::CreateOmnibox() { ...@@ -2105,7 +2097,7 @@ void UiSceneCreator::CreateOmnibox() {
base::BindRepeating( base::BindRepeating(
[](Model* model) { model->pop_mode(kModeEditingOmnibox); }, [](Model* model) { model->pop_mode(kModeEditingOmnibox); },
base::Unretained(model_)), base::Unretained(model_)),
vector_icons::kBackArrowIcon, audio_delegate_); vector_icons::kBackArrowIcon);
close_button->SetSize(kOmniboxCloseButtonDiameterDMM, close_button->SetSize(kOmniboxCloseButtonDiameterDMM,
kOmniboxCloseButtonDiameterDMM); kOmniboxCloseButtonDiameterDMM);
close_button->SetTranslate(0, kOmniboxCloseButtonVerticalOffsetDMM, 0); close_button->SetTranslate(0, kOmniboxCloseButtonVerticalOffsetDMM, 0);
...@@ -2156,7 +2148,7 @@ void UiSceneCreator::CreateCloseButton() { ...@@ -2156,7 +2148,7 @@ void UiSceneCreator::CreateCloseButton() {
base::Unretained(model_), base::Unretained(browser_)); base::Unretained(model_), base::Unretained(browser_));
std::unique_ptr<DiscButton> element = std::unique_ptr<DiscButton> element =
Create<DiscButton>(kCloseButton, kPhaseForeground, click_handler, Create<DiscButton>(kCloseButton, kPhaseForeground, click_handler,
vector_icons::kClose16Icon, audio_delegate_); vector_icons::kClose16Icon);
element->SetSize(kCloseButtonDiameter, kCloseButtonDiameter); element->SetSize(kCloseButtonDiameter, kCloseButtonDiameter);
element->set_hover_offset(kButtonZOffsetHoverDMM * kCloseButtonDistance); element->set_hover_offset(kButtonZOffsetHoverDMM * kCloseButtonDistance);
element->SetTranslate(0, kCloseButtonVerticalOffset, -kCloseButtonDistance); element->SetTranslate(0, kCloseButtonVerticalOffset, -kCloseButtonDistance);
......
...@@ -29,7 +29,6 @@ class UiSceneCreator { ...@@ -29,7 +29,6 @@ class UiSceneCreator {
ContentInputDelegate* content_input_delegate, ContentInputDelegate* content_input_delegate,
KeyboardDelegate* keyboard_delegate, KeyboardDelegate* keyboard_delegate,
TextInputDelegate* text_input_delegate, TextInputDelegate* text_input_delegate,
AudioDelegate* audio_delegate,
Model* model); Model* model);
~UiSceneCreator(); ~UiSceneCreator();
...@@ -67,7 +66,6 @@ class UiSceneCreator { ...@@ -67,7 +66,6 @@ class UiSceneCreator {
ContentInputDelegate* content_input_delegate_; ContentInputDelegate* content_input_delegate_;
KeyboardDelegate* keyboard_delegate_; KeyboardDelegate* keyboard_delegate_;
TextInputDelegate* text_input_delegate_; TextInputDelegate* text_input_delegate_;
AudioDelegate* audio_delegate_;
Model* model_; Model* model_;
DISALLOW_COPY_AND_ASSIGN(UiSceneCreator); DISALLOW_COPY_AND_ASSIGN(UiSceneCreator);
......
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